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

  • c9ea75c
  • /
  • multirun.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.

  • content
  • directory
content badge
swh:1:cnt:f505ada7ce3c73cf7f67a58e3d8ad1510c5bacc0
directory badge
swh:1:dir:c9ea75c6b374ab8ae9f7b5eae95cc73c0e9e065e

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.

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

### Get the current date and start making the results directory
CURRDATE=$(date +"%FT%H%M")
RESBASE="./results_opt"
RESDIR="$RESBASE"_"$CURRDATE"

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

### Make a subdirectory to store the processed used configuration files
BACKCONF="$RESDIR/configs"
if ! [ -d $BACKCONF ]; then
	echo "Directory $BACKCONF does not exist. Creating..."
	mkdir $BACKCONF
fi


CNT=0
RESULT=""
for FN_CONF in ./configs/opt_noise_EC/*;
	do
		### Print current simulation start time [24H format] ###
		CURRTIME=$(date +"%T")

		echo "Running simulation $CNT with config file $FN_CONF at time $CURRTIME";

        FNAME=$(basename $FN_CONF)
        FNAME=$(echo $FNAME | cut -f 1 -d '.')

        python3 -c "from brian2 import *; clear_cache('cython');" > /dev/null 2>&1
		time python3 run_sim_dumb.py -p $FN_CONF > "$RESDIR/sim_${CNT}_${FNAME}.txt" 2>&1
		#python3 -run_sim_dumb.py > /dev/null 2>&1
        CODE=$? ; echo 'Done'

		if [ $CODE = 0 ]; then
			RESULT="success"
		else
			RESULT="failure"
		fi

		echo "$CNT : $FN_CONF : $RESULT" >> "$RESDIR/total.txt"
		let "CNT+=1"

		### Copy the config file used to results dir
		cp $FN_CONF $BACKCONF
	done

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