From 02686401d9bfe2209a43b84c23701aeaafb566c4 Mon Sep 17 00:00:00 2001 From: Franck Dary <franck.dary@lis-lab.fr> Date: Fri, 7 May 2021 15:25:30 +0200 Subject: [PATCH] Added jobid in stderr when launching job on cluster. Changed gpu partition to all in liscluster --- scripts/launchSlurmArray.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/launchSlurmArray.py b/scripts/launchSlurmArray.py index 5a4c996..c08ceee 100644 --- a/scripts/launchSlurmArray.py +++ b/scripts/launchSlurmArray.py @@ -54,6 +54,7 @@ cat $tmpFile >> $newErr rm $tmpFile +>&2 echo "Job ID : " "$SLURM_ARRAY_JOB_ID"_"$SLURM_ARRAY_TASK_ID" eval "${{commands[$SLURM_ARRAY_TASK_ID]}}" """.format(len(names)-1, limit, jobName, nbCPU, nbHours, " ".join(names), " ".join(commands)), file=sFile) sFile.close() @@ -99,6 +100,7 @@ cat $tmpFile >> $newErr rm $tmpFile +>&2 echo "Job ID : " "$SLURM_ARRAY_JOB_ID"_"$SLURM_ARRAY_TASK_ID" eval "${{commands[$SLURM_ARRAY_TASK_ID]}}" """.format(len(names)-1, limit, jobName, "qos_gpu-t4" if int(nbHours) > 20 else "qos_gpu-t3", nbHours, " ".join(names), " ".join(commands)), file=sFile) sFile.close() @@ -140,8 +142,9 @@ cat $tmpFile >> $newErr rm $tmpFile +>&2 echo "Job ID : " "$SLURM_ARRAY_JOB_ID"_"$SLURM_ARRAY_TASK_ID" eval "${{commands[$SLURM_ARRAY_TASK_ID]}}" -'''.format(len(names)-1, limit, jobName, nbCPU, "cpu" if device == "cpu" else "gpu\n#SBATCH --gres=gpu", nbHours, " ".join(names), commandList), file=sFile) +'''.format(len(names)-1, limit, jobName, nbCPU, "cpu" if device == "cpu" else "all\n#SBATCH --gres=gpu", nbHours, " ".join(names), commandList), file=sFile) sFile.close() else : print("ERROR : Unknown hostname \'%s\'"%hostname) -- GitLab