Dear Michele, Castellana Michele <michele.castell...@curie.fr> writes:
> 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? This has nothing to do with Slurm - it just the syntax of the shell. It should be A=1.0 with no spaces around the equals sign. Cheers, Loris -- Dr. Loris Bennett (Mr.) ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de