Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Revision 7fb24413abbe22deae39904459df4b74da19c4bc authored by NikVard on 18 September 2023, 09:36:11 UTC, committed by NikVard on 18 September 2023, 09:36:11 UTC
[ADD] Configuration files
1 parent 0cd3568
  • Files
  • Changes
  • 6bbd13c
  • /
  • parallel_run2.sh
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • revision
  • directory
  • content
revision badge
swh:1:rev:7fb24413abbe22deae39904459df4b74da19c4bc
directory badge
swh:1:dir:6bbd13c95cc43396738ef5824e4589fdd6370ad1
content badge
swh:1:cnt:eb3aaf349cf4315a0ab4465eb0ee5dcd7f31c75f

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • revision
  • directory
  • content
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
parallel_run2.sh
#!/usr/bin/env bash
# -*- encoding: utf-8 -*-

### Get the current date and start making the results directory
CURRDATE=$(date +"%FT%H%M")
RESBASE="/beegfs/nvardala/results_MS_stim_pacing"
RESDIRTOT="$RESBASE"_"$CURRDATE"


### Check and make directory for saving ALL the results
if [ -d $RESDIRTOT ]; then
	echo "Directory $RESDIRTOT exists. Cleaning..."
	rm $RESDIRTOT/*.txt
else
	echo "Directory $RESDIRTOT does not exist. Creating..."
	mkdir $RESDIRTOT
fi


### Get all config directories
# CONF_DIRS=$(find ./configs/ -maxdepth 1 -mindepth 1 -type d)
# ISTIM=$1
# CONF_DIRS="configs/${ISTIM}_nA"
CONF_DIRS="configs/MS_stim_test"

### Go through the config directories and do the following:
for DIR in $CONF_DIRS;
    do
        ### Store the basename for the parameters i.e. 10nA
        PNAME=$(basename $DIR)
        echo "In $PNAME"

        ### 1. Make a subdirectory to store the used configuration files for this parameter set i.e. results_{date}/10nA/...
        CURRRES="$RESDIRTOT/$PNAME"
        if ! [ -d $CURRRES ]; then
        	echo "Directory $CURRRES does not exist. Creating..."
        	mkdir $CURRRES
        fi

        BACKCONF="$CURRRES/configs"
        if ! [ -d $BACKCONF ]; then
        	echo "Directory $BACKCONF does not exist. Creating..."
        	mkdir $BACKCONF
        fi


        ### 2. Make the current config set output logs
        echo "Creating txt output for current config set..."
        touch "$CURRRES/total.txt"


        ### 3. Queue the batch script
        ### Set the variables used as arguments
        CNT=0
        RESDIR=$CURRRES
        for FN_CONF in $DIR/*.json
            do
                echo $FN_CONF

                ### Queue the simulation
                let DELAY="CNT*60"
        		echo "Delayed: $DELAY seconds"
                sbatch --job-name="SIM_${FN_CONF}" --begin=now+$DELAY --time=60 --cpus-per-task=1 --mem-per-cpu=16G --ntasks=1 --export=FCONF=$FN_CONF,RESDIR=$RESDIR,CNT=$CNT,OUTDIR=$RESBASE run_sim.sh

                let "CNT+=1"

                sleep 1

                ### Copy the config file used to results dir
                cp $FN_CONF $BACKCONF
            done
    done
The diff you're trying to view is too large. Only the first 1000 changed files have been loaded.
Showing with 0 additions and 0 deletions (0 / 0 diffs computed)
swh spinner

Computing file changes ...

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API