File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,12 @@ def get_argstr_hpc(self):
73
73
Return a formatted string with arguments and option flags to SLURM
74
74
commands such as salloc and sbatch, for non-MPI, HPC jobs.
75
75
"""
76
- argstr = ' -A {pr} -p {pt} -n {c} -t {t} -J {j} srun -n 1 -c {thr} ' .format (
77
- pr = self .project ,
76
+
77
+ argstr = " "
78
+ if self .project is not None :
79
+ argstr += "-A {pr} " .format (pr = self .project )
80
+
81
+ argstr += '-p {pt} -n {c} -t {t} -J {j} srun -n 1 -c {thr} ' .format (
78
82
pt = self .partition ,
79
83
c = self .cores ,
80
84
t = self .time ,
@@ -87,8 +91,12 @@ def get_argstr_mpi(self):
87
91
Return a formatted string with arguments and option flags to SLURM
88
92
commands such as salloc and sbatch, for MPI jobs.
89
93
"""
90
- argstr = ' -A {pr} -p {pt} -n {c1} -t {t} -J {j} mpirun -v -np {c2} ' .format (
91
- pr = self .project ,
94
+
95
+ argstr = " "
96
+ if self .project is not None :
97
+ argstr += "-A {pr} " .format (pr = self .project )
98
+
99
+ argstr += '-p {pt} -n {c1} -t {t} -J {j} mpirun -v -np {c2} ' .format (
92
100
pt = self .partition ,
93
101
c1 = self .cores ,
94
102
t = self .time ,
You can’t perform that action at this time.
0 commit comments