diff --git a/examples/batchSGE/README.md b/examples/batchSGE/README.md index 0203b4c3a..4b7671d80 100644 --- a/examples/batchSGE/README.md +++ b/examples/batchSGE/README.md @@ -35,7 +35,7 @@ simulation logs are generated in ~/qsub/ b.runCfg = {'type': 'hpc_sge', 'jobName': 'my_batch', 'cores': 4, - 'script': 'init.py', + 'script': 'src/init.py', 'skip': True} ``` diff --git a/examples/batchSGE/src/batch.py b/examples/batchSGE/src/batch.py index 8b6e19b87..315cb074f 100644 --- a/examples/batchSGE/src/batch.py +++ b/examples/batchSGE/src/batch.py @@ -19,7 +19,7 @@ def batchTauWeight(): b.runCfg = {'type': 'hpc_sge', 'jobName': 'my_batch', 'cores': 4, - 'script': 'init.py', + 'script': 'src/init.py', 'skip': True} # Run batch simulations @@ -27,4 +27,4 @@ def batchTauWeight(): # Main code if __name__ == '__main__': - batchTauWeight() \ No newline at end of file + batchTauWeight() diff --git a/netpyne/batch/grid.py b/netpyne/batch/grid.py index dee221e96..4c676513d 100644 --- a/netpyne/batch/grid.py +++ b/netpyne/batch/grid.py @@ -326,7 +326,8 @@ def gridSubmit(batch, pc, netParamsSavePath, jobName, simLabel, processes, proce 'vmem': '32G', 'queueName': 'cpu.q', 'cores': 2, - 'pre': '', 'post': '', + 'pre': 'source ~/.bashrc', + 'post': '', 'mpiCommand': 'mpiexec', #'log': "~/qsub/{}".format(jobName) 'log': "{}/{}".format(os.getcwd(), jobName) @@ -335,8 +336,9 @@ def gridSubmit(batch, pc, netParamsSavePath, jobName, simLabel, processes, proce sge_args.update(batch.runCfg) #(batch, pc, netParamsSavePath, jobName, simLabel, processes, processFiles): - sge_args['command'] = '%s -n $NSLOTS -hosts $(hostname) nrniv -python -mpi %s simConfig=%s netParams=%s' % ( + sge_args['command'] = '%s -n %i nrniv -python -mpi %s simConfig=%s netParams=%s' % ( sge_args['mpiCommand'], + sge_args['cores'], script, cfgSavePath, netParamsSavePath, diff --git a/netpyne/batch/utils.py b/netpyne/batch/utils.py index 99bdbe759..aa088f229 100644 --- a/netpyne/batch/utils.py +++ b/netpyne/batch/utils.py @@ -107,7 +107,6 @@ def jobStringHPCSGE(jobName, walltime, vmem, queueName, cores, pre, command, pos #$ -o {log}.run #$ -e {log}.err {pre} -source ~/.bashrc {command} {post} """