Ask Your Question
1

submit a job to a supercomputer using slurm

asked 2022-04-06 21:05:58 +0100

lijr07 gravatar image

updated 2022-04-07 03:03:32 +0100

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-04-07 11:12:19 +0100

rburing gravatar image

updated 2022-04-07 11:26:47 +0100

Your 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.

edit flag offensive delete link more

Comments

1

@rburing, thank you very much! I removed the line with --gres and now it works.

lijr07 gravatar imagelijr07 ( 2022-04-07 13:31:51 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-04-06 21:05:58 +0100

Seen: 587 times

Last updated: Apr 07 '22