ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 07 Apr 2022 13:31:51 +0200submit a job to a supercomputer using slurmhttps://ask.sagemath.org/question/61860/submit-a-job-to-a-supercomputer-using-slurm/I am trying to submit a job to a supercomputer using slurm. The script is as follows
#!/bin/bash
#SBATCH -n 40
#SBATCH -N 1
#SBATCH -t 3-0:00
#SBATCH --mem=64000
#SBATCH -o myjob.o
#SBATCH -e myjob.e
#SBATCH --mail-type=ALL
#SBATCH --mail-user=aaa@gmail.com
#SBATCH --gres=gpu:2
module load sage
sage
load("HPC2.sage")
But it has errors:
sbatch: error: Sending email to aaa@gmail.com for events: 271
sbatch: error: Batch job submission failed: Invalid generic resource (gres) specification
How to fix this problem? Thank you very much.Wed, 06 Apr 2022 21:05:58 +0200https://ask.sagemath.org/question/61860/submit-a-job-to-a-supercomputer-using-slurm/Answer by rburing for <p>I am trying to submit a job to a supercomputer using slurm. The script is as follows</p>
<pre><code>#!/bin/bash
#SBATCH -n 40
#SBATCH -N 1
#SBATCH -t 3-0:00
#SBATCH --mem=64000
#SBATCH -o myjob.o
#SBATCH -e myjob.e
#SBATCH --mail-type=ALL
#SBATCH --mail-user=aaa@gmail.com
#SBATCH --gres=gpu:2
module load sage
sage
load("HPC2.sage")
</code></pre>
<p>But it has errors:</p>
<pre><code>sbatch: error: Sending email to aaa@gmail.com for events: 271
sbatch: error: Batch job submission failed: Invalid generic resource (gres) specification
</code></pre>
<p>How to fix this problem? Thank you very much.</p>
https://ask.sagemath.org/question/61860/submit-a-job-to-a-supercomputer-using-slurm/?answer=61864#post-id-61864Your *bash* script should say e.g. `sage HPC2.sage` instead of trying to use two lines like that. Whoever offers access to this supercomputer probably has a website with (a link to) relevant documentation about the `gres` specification. In any case, be sure to read the documentation of the correct version. You can also try `sbatch --gres=help`. Anyway, why do you want GPU's? It seems unlikely that a SageMath computation would use them. Maybe try omitting the line with `--gres` entirely.Thu, 07 Apr 2022 11:12:19 +0200https://ask.sagemath.org/question/61860/submit-a-job-to-a-supercomputer-using-slurm/?answer=61864#post-id-61864Comment by lijr07 for <p>Your <em>bash</em> script should say e.g. <code>sage HPC2.sage</code> instead of trying to use two lines like that. Whoever offers access to this supercomputer probably has a website with (a link to) relevant documentation about the <code>gres</code> specification. In any case, be sure to read the documentation of the correct version. You can also try <code>sbatch --gres=help</code>. Anyway, why do you want GPU's? It seems unlikely that a SageMath computation would use them. Maybe try omitting the line with <code>--gres</code> entirely.</p>
https://ask.sagemath.org/question/61860/submit-a-job-to-a-supercomputer-using-slurm/?comment=61866#post-id-61866@rburing, thank you very much! I removed the line with --gres and now it works.Thu, 07 Apr 2022 13:31:51 +0200https://ask.sagemath.org/question/61860/submit-a-job-to-a-supercomputer-using-slurm/?comment=61866#post-id-61866