https://github.com/NikVard/memstim-hh
Tip revision: 563f808f6c4f40630f5b8876cc0b440cdf4159e8 authored by NikVard on 22 September 2023, 08:19:24 UTC
[UPDATE] Updated default figure names in scripts
[UPDATE] Updated default figure names in scripts
Tip revision: 563f808
run_sim.sh
#!/usr/bin/env bash
# -*- encoding: utf-8 -*-
### Arguments list
### ----------------------------
# $CNT : simulation counter
# $RESDIR : results directory
# $FCONF : current configuration file
### ----------------------------
### Print current simulation start time [24H format]
CURRTIME=$(date +"%T")
echo "Running simulation $CNT with config file $FCONF at time $CURRTIME";
FNAME=$(basename $FCONF)
FNAME=$(echo $FNAME | cut -f 1 -d '.')
# python3 -c "from brian2 import *; clear_cache('cython');" > /dev/null 2>&1
command time -v python3 run_simulation.py -p $FCONF -sd $OUTDIR > "$RESDIR/sim_${CNT}_${FNAME}.txt" 2>&1
CODE=$?
echo $CODE
RESULT=""
if [ $CODE = 0 ]; then
RESULT="success"
else
RESULT="failure"
fi
echo "Done + $RESULT"
echo "$CNT : $FCONF : $RESULT" >> "$RESDIR/total.txt"
