-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #399 from Hjorthmedh/region_mesh_redux
Region mesh redux
- Loading branch information
Showing
94 changed files
with
29,166 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"dSPN": { | ||
"Ctx_1" : { | ||
"generator" : "poisson", | ||
"start" : [0.5, 3.5], | ||
"end" : [1.5, 4.5], | ||
"frequency" : [25, 25], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 1, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
}, | ||
|
||
"Ctx_2" : { | ||
"generator" : "poisson", | ||
"start" : [2, 3.5], | ||
"end" : [3, 4.5], | ||
"frequency" : [5, 5], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 2, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
}, | ||
|
||
"VirtualNeuron" : { | ||
"spikeFile": "virtual_input_spikes.txt", | ||
"rowMappingFile": "virtual_input_mapping.txt" | ||
} | ||
}, | ||
|
||
"iSPN": { | ||
"Ctx_1" : { | ||
"generator" : "poisson", | ||
"start" : [0.5, 3.5], | ||
"end" : [1.5, 4.5], | ||
"frequency" : [25, 25], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 1, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
}, | ||
|
||
"Ctx_2" : { | ||
"generator" : "poisson", | ||
"start" : [2, 3.5], | ||
"end" : [3, 4.5], | ||
"frequency" : [5, 5], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 2, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
}, | ||
|
||
"VirtualNeuron" : { | ||
"spikeFile": "virtual_input_spikes.txt", | ||
"rowMappingFile": "virtual_input_mapping.txt" | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"dSPN": { | ||
"Ctx_1" : { | ||
"generator" : "poisson", | ||
"start" : [0.5, 3.5], | ||
"end" : [1.5, 4.5], | ||
"frequency" : [25, 25], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 1, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
}, | ||
|
||
"Ctx_2" : { | ||
"generator" : "poisson", | ||
"start" : [2, 3.5], | ||
"end" : [3, 4.5], | ||
"frequency" : [5, 5], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 2, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
} | ||
}, | ||
|
||
"iSPN": { | ||
"Ctx_1" : { | ||
"generator" : "poisson", | ||
"start" : [0.5, 3.5], | ||
"end" : [1.5, 4.5], | ||
"frequency" : [25, 25], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 1, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
}, | ||
|
||
"Ctx_2" : { | ||
"generator" : "poisson", | ||
"start" : [2, 3.5], | ||
"end" : [3, 4.5], | ||
"frequency" : [5, 5], | ||
"conductance" : 0.5e-9, | ||
"nInputs" : 50, | ||
"populationUnitCorrelation" : [0.5, 0.5], | ||
"populationUnitID" : 2, | ||
"jitter" : 0.01, | ||
"modFile": "tmGlut" | ||
} | ||
} | ||
|
||
} |
3,555 changes: 3,555 additions & 0 deletions
3,555
examples/notebooks/lateral_inhitibion/lateral_inhibition.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
7,756 changes: 7,756 additions & 0 deletions
7,756
examples/notebooks/lateral_inhitibion/lateral_inhibition_virtual.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
318 changes: 318 additions & 0 deletions
318
examples/parallel/KTH_PDC/lateral_inhibition/Analyse lateral inhibition.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
405 changes: 405 additions & 0 deletions
405
examples/parallel/KTH_PDC/lateral_inhibition/Analyse lateral inhibition_2.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
examples/parallel/KTH_PDC/lateral_inhibition/Dardel_ablate.job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash -l | ||
#SBATCH --partition=main | ||
#SBATCH -o log/Simulate-%j-output.txt | ||
#SBATCH -e log/Simulate-%j-error.txt | ||
#SBATCH -t 0:29:00 | ||
#SBATCH -J Simulate | ||
#SBATCH -A naiss2023-5-231 | ||
#SBATCH --nodes=1 | ||
#SBATCH --tasks-per-node=128 | ||
#SBATCH --mail-type=ALL | ||
|
||
export N_WORKERS=$SLURM_NTASKS | ||
|
||
module load snic-env | ||
source $HOME/Snudda/snudda_env/bin/activate | ||
SNUDDA_DIR=/cfs/klemming/home/"${USER:0:1}"/$USER/Snudda | ||
|
||
# If the BasalGangliaData directory exists, then use that for our data | ||
if [[ -d "/cfs/klemming/home/${USER:0:1}/$USER/BasalGangliaData/data" ]]; then | ||
export SNUDDA_DATA="/cfs/klemming/home/${USER:0:1}/$USER/BasalGangliaData/data" | ||
echo "Setting SNUDDA_DATA to $SNUDDA_DATA" | ||
rm mechanisms | ||
ln -s $SNUDDA_DATA/neurons/mechanisms/ mechanisms | ||
else | ||
echo "SNUDDA_DATA environment variable not changed (may be empty): $SNUDDA_DATA" | ||
rm mechanisms | ||
ln -s ../../../snudda/data/neurons/mechanisms/ | ||
fi | ||
|
||
|
||
echo "Network dir: "$NETWORK_DIR | ||
|
||
export PATH=$SNUDDA_DIR/snudda_env/bin/:$PATH | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CRAY_LD_LIBRARY_PATH | ||
export PYTHONPATH=$SNUDDA_DIR/snudda_env/lib/python3.9/ | ||
|
||
############## | ||
|
||
|
||
python ablate_network.py |
80 changes: 80 additions & 0 deletions
80
examples/parallel/KTH_PDC/lateral_inhibition/Dardel_runSnudda_lateral.job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash -l | ||
#SBATCH --partition=main | ||
#SBATCH -o log/runSnudda-%j-output.txt | ||
#SBATCH -e log/runSnudda-%j-error.txt | ||
#SBATCH -t 1:59:00 | ||
#SBATCH -J Snudda | ||
#SBATCH -A naiss2023-5-231 | ||
#SBATCH --nodes=2 | ||
#SBATCH -n 256 | ||
#SBATCH --cpus-per-task=2 | ||
#SBATCH --mem-per-cpu=930M | ||
#SBATCH --mail-type=ALL | ||
module load snic-env | ||
|
||
|
||
#.. | ||
#export OMP_STACKSIZE=128G | ||
ulimit -s unlimited | ||
|
||
|
||
#let NWORKERS="$SLURM_NTASKS-2" | ||
let NWORKERS="100" | ||
# let NWORKERS="50" | ||
|
||
export IPNWORKERS=$NWORKERS | ||
|
||
|
||
export IPYTHONDIR="/cfs/klemming/scratch/${USER:0:1}/$USER/.ipython" | ||
rm -r $IPYTHONDIR | ||
export IPYTHON_PROFILE=default | ||
source $HOME/Snudda/snudda_env/bin/activate | ||
|
||
|
||
#.. Start the ipcontroller | ||
export FI_CXI_DEFAULT_VNI=$(od -vAn -N4 -tu < /dev/urandom) | ||
srun -n 1 -N 1 -c 2 --exact --overlap --mem=0 ./../ipcontroller_new.sh & | ||
|
||
|
||
echo ">>> waiting 60s for controller to start" | ||
sleep 60 | ||
|
||
#.. Read in CONTROLLERIP | ||
CONTROLLERIP=$(<controller_ip.txt) | ||
|
||
|
||
##.. Start the engines | ||
echo ">>> starting ${IPNWORKERS} engines " | ||
#srun -n ${IPNWORKERS} -c 2 --exact --overlap ipengine --location=${CONTROLLERIP} --profile=${IPYTHON_PROFILE} --mpi \ | ||
#--ipython-dir=${IPYTHONDIR} --timeout=30.0 --log-level=DEBUG \ | ||
#--BaseParallelApplication.verbose_crash=True --IPEngine.verbose_crash=True \ | ||
#--Kernel.stop_on_error_timeout=1.0 --IPythonKernel.stop_on_error_timeout=1.0 \ | ||
#Session.buffer_threshold=4096 Session.copy_threshold=250000 \ | ||
#Session.digest_history_size=250000 c.EngineFactory.max_heartbeat_misses=10 c.MPI.use='mpi4py' \ | ||
#1> ipe_${SLURM_JOBID}.out 2> ipe_${SLURM_JOBID}.err & | ||
|
||
#srun -n ${IPNWORKERS} -c 2 --exact --overlap valgrind --leak-check=full --show-leak-kinds=all \ | ||
#ipengine --location=${CONTROLLERIP} --profile=${IPYTHON_PROFILE} --mpi \ | ||
#--ipython-dir=${IPYTHONDIR} --timeout=30.0 c.EngineFactory.max_heartbeat_misses=10 c.MPI.use='mpi4py' \ | ||
#1> ipe_${SLURM_JOBID}.out 2> ipe_${SLURM_JOBID}.err & | ||
|
||
export FI_CXI_DEFAULT_VNI=$(od -vAn -N4 -tu < /dev/urandom) | ||
srun -n ${IPNWORKERS} -c 2 -N ${SLURM_JOB_NUM_NODES} --exact --overlap --mem=0 ipengine \ | ||
--location=${CONTROLLERIP} --profile=${IPYTHON_PROFILE} --mpi \ | ||
--ipython-dir=${IPYTHONDIR} --timeout=30.0 c.EngineFactory.max_heartbeat_misses=10 c.MPI.use='mpi4py' \ | ||
1> ipe_${SLURM_JOBID}.out 2> ipe_${SLURM_JOBID}.err & | ||
|
||
|
||
echo ">>> waiting 60s for engines to start" | ||
sleep 30 | ||
|
||
export FI_CXI_DEFAULT_VNI=$(od -vAn -N4 -tu < /dev/urandom) | ||
srun -n 1 -N 1 --exact --overlap --mem=0 ./Dardel_runSnudda_lateral.sh | ||
|
||
|
||
echo " " | ||
|
||
echo "JOB END "`date` start_time_network_connect.txt | ||
|
||
wait | ||
|
122 changes: 122 additions & 0 deletions
122
examples/parallel/KTH_PDC/lateral_inhibition/Dardel_runSnudda_lateral.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
#!/bin/bash | ||
|
||
|
||
|
||
SNUDDA_DIR=$HOME/Snudda/snudda | ||
JOBDIR=networks/lateral_2 | ||
|
||
SIMSIZE=50000 | ||
|
||
# If the BasalGangliaData directory exists, then use that for our data | ||
#/cfs/klemming/scratch/${USER:0:1}/$USER/BasalGangliaData/data | ||
#BasalGangliaData/Parkinson/PD0 | ||
if [[ -d "$HOME/BasalGangliaData/data" ]]; then | ||
export SNUDDA_DATA="$HOME/BasalGangliaData/data" | ||
echo "Setting SNUDDA_DATA to $SNUDDA_DATA" | ||
else | ||
echo "SNUDDA_DATA environment variable not changed (may be empty): $SNUDDA_DATA" | ||
fi | ||
|
||
mkdir -p $JOBDIR | ||
|
||
echo "Dardel_runSnudda.sh should be started with srun -n 1, to only get one process" | ||
|
||
echo "SLURM_PROCID = $SLURM_PROCID" | ||
|
||
if [ "$SLURM_PROCID" -gt 0 ]; then | ||
mock_string="Not main process" | ||
else | ||
|
||
# For debug purposes: | ||
echo "PATH: "$PATH | ||
echo "IPYTHONDIR: "$IPYTHONDIR | ||
echo "PYTHONPATH: "$PYTHONPATH | ||
echo "LD_LIBRARY_PATH: "$LD_LIBRARY_PATH | ||
|
||
echo ">>>>>> Main process starting ipcluster" | ||
echo | ||
|
||
echo "Start time: " > start_time_network_connect.txt | ||
date >> start_time_network_connect.txt | ||
|
||
echo ">>> Init: "`date` | ||
# snudda init ${JOBDIR} --size ${SIMSIZE} --overwrite --randomseed 1234 | ||
python setup_lateral.py ${JOBDIR} | ||
|
||
if [ $? != 0 ]; then | ||
echo "Something went wrong during init, aborting!" | ||
ipcluster stop | ||
exit -1 | ||
fi | ||
|
||
# WE NOW START IPCLUSTER USING ipcontroller.sh INSTEAD... | ||
# | ||
# echo "SLURM_NODELIST = $SLURM_NODELIST" | ||
# let NWORKERS="$SLURM_NTASKS - 1" | ||
# | ||
# echo ">>> NWORKERS " $NWORKERS | ||
# echo ">>> Starting ipcluster `date`" | ||
# | ||
# #.. Start the ipcluster | ||
# ipcluster start -n ${NWORKERS} \ | ||
# --ip='*' \ | ||
# --HeartMonitor.max_heartmonitor_misses=1000 \ | ||
# --HubFactory.registration_timeout=600 \ | ||
# --HeartMonitor.period=10000 & | ||
# | ||
# | ||
# #.. Sleep to allow engines to start | ||
# echo ">>> Wait 120s to allow engines to start" | ||
# sleep 120 #60 | ||
|
||
echo ">>> Place: "`date` | ||
snudda place ${JOBDIR} --verbose | ||
|
||
if [ $? != 0 ]; then | ||
echo "Something went wrong during placement, aborting!" | ||
# ipcluster stop | ||
exit -1 | ||
fi | ||
|
||
echo ">>> Detect: "`date` | ||
snudda detect ${JOBDIR} --hvsize 50 --parallel | ||
|
||
if [ $? != 0 ]; then | ||
echo "Something went wrong during detection, aborting!" | ||
# ipcluster stop | ||
exit -1 | ||
fi | ||
|
||
echo ">>> Prune: "`date` | ||
snudda prune ${JOBDIR} --parallel | ||
|
||
if [ $? != 0 ]; then | ||
echo "Something went wrong during pruning, aborting!" | ||
# ipcluster stop | ||
exit -1 | ||
fi | ||
|
||
# Disable input generation at the moment | ||
|
||
echo ">>> Ablate: "`date` | ||
python ablate_network.py ${JOBDIR} | ||
|
||
echo ">>> Input: "`date` | ||
# snudda input ${JOBDIR} --parallel --time 5 --input input.json | ||
snudda input ${JOBDIR} --parallel --time 5 --input input.json --networkFile ${JOBDIR}/network-synapses-minimal.hdf5 | ||
|
||
|
||
#.. Shut down cluster | ||
# ipcluster stop | ||
#.. Shutdown ipcontroller | ||
echo "Shutting down ipcontroller" | ||
|
||
python ../ipcontroller_shutdown.py | ||
|
||
|
||
date | ||
#echo "JOB END "`date` start_time_network_connect.txt | ||
|
||
echo "EXITING Dardel_runjob_lateral.sh" | ||
|
||
fi |
Oops, something went wrong.