Re: [slurm-users] Define variables within slurm script

2019-02-18 Thread Castellana Michele
It works, thank you. Best, M > On Feb 18, 2019, at 3:03 PM, Renfro, Michael wrote: > > If you’re literally putting spaces around the ‘=‘ character, I don’t think > that’s valid shell syntax, and should throw errors into your slurm-JOBID.out > file when you try it. > > See if it works with A=

Re: [slurm-users] Define variables within slurm script

2019-02-18 Thread Benson Muite
May be some aspects outside of slurms control that are tied to the machine you are using which require a specific way of handling environment variables. You might try the following: #!/bin/bash #SBATCH --job-name=my_job #SBATCH —time=01:00:00 for A in 1 2 do time ./my_code.o -a ${A} done On

Re: [slurm-users] Define variables within slurm script

2019-02-18 Thread Loris Bennett
Dear Michele, Castellana Michele 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: > > #!/b

Re: [slurm-users] Define variables within slurm script

2019-02-18 Thread Renfro, Michael
If you’re literally putting spaces around the ‘=‘ character, I don’t think that’s valid shell syntax, and should throw errors into your slurm-JOBID.out file when you try it. See if it works with A=1.0 instead of A = 1.0 > On Feb 18, 2019, at 7:55 AM, Castellana Michele > wrote: > > External