[slurm-users] Define variables within slurm script

Castellana Michele Michele.Castellana at curie.fr
Mon Feb 18 13:55:40 UTC 2019


Dear all,
I would like to use a variable within a slurm script as shown in the following minimal working example. I want to define a variable A, assign a value to it, and run multiple times a code where I use A in a command-line flag:

#!/bin/sh
#SBATCH --job-name=my_job
#SBATCH —time=01:00:00

A = 1.0;
time ./my_code.o -a $A

A = 2.0;
time ./my_code.o -a $A

However, this does not work. Do you know a way around this?

Best,
M

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20190218/de619282/attachment.html>


More information about the slurm-users mailing list