On 4 Lis, 18:09, "Lipari, Don" <[email protected]> wrote:
> There's no way to convey this to sbatch.  But you can modify your script to 
> achieve parallel execution by adding an ampersand to your srun lines:
>
> #!/bin/bash
> srun -n 1 script1.py &
> srun -n 1 script2.py &
> srun -n 1 script3.py
>
>
>
>
>
>
>
> > -----Original Message-----
> > From: [email protected] [mailto:owner-slurm-
> > [email protected]] On Behalf Of Chris Rataj
> > Sent: Thursday, November 03, 2011 2:05 PM
> > To: [email protected]
> > Subject: [slurm-dev] Running multiple tasks from a single batch script
>
> > Hi
> > I'm new to SLURM, and i encountered a problem.
> > I tried to use sbatch to run parallel tasks from a single batch
> > script, but, as i noticed, they are being run sequentially. What
> > should i do to force sbatch to run all tasks simultaneously?
>
> > Code:
> > Master script:
>
> > `sbatch -n "$count" -c 1 -J Name script.log`
>
> > where $count is the number of tasks to run and script.log is the batch
> > script
>
> > Batch script:
>
> > #!/bin/bash
> > srun -n 1 script1.py
> > srun -n 1 script2.py
> > srun -n 1 script3.py
>
> > Any ideas?

Well, I tried to use ampersands but they were added to each line of
the batch script (batch script generation is to be automated) and the
batch job was issued, but no processes were running whatsoever. Will
removing the last ampersand change anything? Unfortunately I can't
check your suggestions until tuesday sincce I'm out of office until
then. Thanks nevertheless, I'll reply about results as soon as I
manage to test them.

Reply via email to