Skip to content
Snippets Groups Projects
Commit 136245ce authored by Franck Dary's avatar Franck Dary
Browse files

updated slurm array script for jeanZay cluster

parent 1f525691
No related branches found
No related tags found
No related merge requests found
...@@ -12,7 +12,7 @@ def launchSlurmArray(names, commands, jobName, device, nbHours, limit) : ...@@ -12,7 +12,7 @@ def launchSlurmArray(names, commands, jobName, device, nbHours, limit) :
commandList = " ".join(commands) commandList = " ".join(commands)
if hostname == "jean-zay1" : if "jean-zay" in hostname :
print("""#! /usr/bin/env bash print("""#! /usr/bin/env bash
#SBATCH --array=0-{}%{} #SBATCH --array=0-{}%{}
...@@ -24,8 +24,8 @@ def launchSlurmArray(names, commands, jobName, device, nbHours, limit) : ...@@ -24,8 +24,8 @@ def launchSlurmArray(names, commands, jobName, device, nbHours, limit) :
#SBATCH --cpus-per-task=10 #SBATCH --cpus-per-task=10
#SBATCH --gres=gpu:1 #SBATCH --gres=gpu:1
#SBATCH --hint=nomultithread #SBATCH --hint=nomultithread
#SBATCH --partition=gpu_p1
#SBATCH --qos={} #SBATCH --qos={}
#SBATCH --constraint=v100-16g
#SBATCH --time={}:00:00 #SBATCH --time={}:00:00
module purge module purge
...@@ -56,7 +56,7 @@ cat $tmpFile >> $newErr ...@@ -56,7 +56,7 @@ cat $tmpFile >> $newErr
rm $tmpFile rm $tmpFile
eval "${{commands[$SLURM_ARRAY_TASK_ID]}}" eval "${{commands[$SLURM_ARRAY_TASK_ID]}}"
""".format(len(names)-1, limit, jobName, "qos_gpu-t4" if nbHours > 20 else "qos_gpu-t3", nbHours, " ".join(names), " ".join(commands)), file=sFile) """.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() sFile.close()
elif hostname == "sms.liscluster" : elif hostname == "sms.liscluster" :
print('''#! /usr/bin/env bash print('''#! /usr/bin/env bash
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment