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=
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
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
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