Skip to content

Commit 51e3ddb

Browse files
committed
Always using mpiexec, even for single process, as on slurm this is needed
1 parent bff2943 commit 51e3ddb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

quandary.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,12 +1426,11 @@ def execute(*, runtype="simulation", ncores=1, config_filename="config.cfg", dat
14261426
if not verbose:
14271427
runcommand += " --quiet"
14281428
# If parallel run, specify runcommand. Default is 'mpirun -np ', unless batch args are given, then currently using 'srun -n', see end of this file for changing that to other batch systems.
1429-
if ncores > 1:
1430-
if len(batchargs)>0:
1431-
myrun = batch_run # currently set to "srun -n"
1432-
else:
1433-
myrun = mpi_exec
1434-
runcommand = f"{myrun} {ncores} " + runcommand
1429+
if len(batchargs)>0:
1430+
myrun = batch_run # currently set to "srun -n"
1431+
else:
1432+
myrun = mpi_exec
1433+
runcommand = f"{myrun} {ncores} " + runcommand
14351434
if verbose:
14361435
print("Running Quandary ... ")
14371436

0 commit comments

Comments
 (0)