Skip to content

Commit

Permalink
Updating
Browse files Browse the repository at this point in the history
  • Loading branch information
Hjorthmedh committed Nov 7, 2023
1 parent 478dcc7 commit 17fa897
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#SBATCH --partition=main
#SBATCH -o log/runSnudda-%j-output.txt
#SBATCH -e log/runSnudda-%j-error.txt
#SBATCH -t 00:59:00
#SBATCH -t 1:59:00
#SBATCH -J Snudda
#SBATCH -A naiss2023-5-231
#SBATCH --nodes=2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


SNUDDA_DIR=$HOME/Snudda/snudda
JOBDIR=networks/lateral_1
JOBDIR=networks/lateral_2

SIMSIZE=50000

Expand Down Expand Up @@ -41,7 +41,7 @@ else

echo ">>> Init: "`date`
# snudda init ${JOBDIR} --size ${SIMSIZE} --overwrite --randomseed 1234
python setup_lateral.py
python setup_lateral.py ${JOBDIR}

if [ $? != 0 ]; then
echo "Something went wrong during init, aborting!"
Expand Down Expand Up @@ -98,11 +98,12 @@ else

# Disable input generation at the moment

#echo ">>> Input: "`date`
# cp -a $SNUDDA_DIR/data/input_config/input-v10-scaled.json ${JOBDIR}/input.json
# cp -a $SNUDDA_DIR/data/input_config/external-input-dSTR-scaled-v4.json ${JOBDIR}/input.json

snudda input ${JOBDIR} --parallel --time 5 --input input.json
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ srun -n 1 nrnivmodl -incflags "-lltdl=/usr/lib64/libltdl.so.7 -lreadline=/lib64/
# srun -n $N_WORKERS $SNUDDA_DIR/examples/parallel/x86_64/special -mpi -python $SNUDDA_DIR/simulate/simulate.py $NETWORK_INFO_FILE $NETWORK_INPUT_FILE --disableGJ --time 3.5 --voltOut $NETWORK_VOLTAGE_FILE

# GJ active
srun -n $N_WORKERS $SNUDDA_DIR/examples/parallel/KTH_PDC/x86_64/special -mpi -python $SNUDDA_DIR/snudda/simulate/simulate.py $NETWORK_INFO_FILE $NETWORK_INPUT_FILE --time 5 --noVolt
srun -n $N_WORKERS $SNUDDA_DIR/examples/parallel/KTH_PDC/x86_64/special -mpi -python $SNUDDA_DIR/snudda/simulate/simulate.py $NETWORK_INFO_FILE $NETWORK_INPUT_FILE --time 5

# srun -n $N_WORKERS $SNUDDA_DIR/examples/parallel/KTH_PDC/x86_64/special -mpi -python $SNUDDA_DIR/snudda/simulate/simulate.py $NETWORK_INFO_FILE $NETWORK_INPUT_FILE --time 5 --noVolt
25 changes: 18 additions & 7 deletions examples/parallel/KTH_PDC/lateral_inhibition/setup_lateral.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
import os
import sys
import numpy as np
network_path = "networks/lateral_1"

if len(sys.argv) > 1:
network_path = sys.argv[1]
else:
sys.exit("No network path specified!")
network_path="networks/lateral_1"

# network_path = "networks/lateral_1"
# snudda_data = "$HOME/BasalGangliaData/data"
snudda_data = "../../../../../BasalGangliaData/data/"

print(f"Network_path = {network_path}, snudda data = {snudda_data}")


duration=5

# import pdb
Expand All @@ -12,8 +23,8 @@
# from snudda import SnuddaInit -- this works on local machine, but not on dardel
import snudda.init

n_DSPN = 30000
n_ISPN = 30000
n_DSPN = 50000
n_ISPN = 50000
n_FS = 0
n_LTS = 0
n_ChIN = 0
Expand All @@ -27,11 +38,11 @@

# The centre of the cube is [0.00475, 0.004, 0.00775]. num_neurons is optional
si.add_population_unit_density(structure_name="Striatum", neuron_types=["dSPN", "iSPN"],
unit_centre=np.array([0.00475, 0.004, 0.00775]) -np.array([0,50e-6,150e-6]),
probability_function="(d < 200e-6)*1", num_neurons=200)
unit_centre=np.array([0.00475, 0.004, 0.00775]) -np.array([0,50e-6,50e-6]),
probability_function="(d < 250e-6)*1", num_neurons=1000)
si.add_population_unit_density(structure_name="Striatum", neuron_types=["dSPN", "iSPN"],
unit_centre=np.array([0.00475, 0.004, 0.00775]) -np.array([150e-6,0,0]),
probability_function="(d < 200e-6) * 1", num_neurons=200)
unit_centre=np.array([0.00475, 0.004, 0.00775]) -np.array([50e-6,0,0]),
probability_function="(d < 250e-6) * 1", num_neurons=1000)

print("Writing json")

Expand Down

0 comments on commit 17fa897

Please sign in to comment.