The big difference is that you can get a larger allocation with the salloc, spawn a single shell on a login node, and from your shell use all of the job's resources. You can make that the default as shown below and explained at
http://slurm.schedmd.com/faq.html#salloc_default_command

SallocDefaultCommand="srun -n1 -N1 --mem-per-cpu=0 --pty --preserve-env --mpi=none $SHELL"

Quoting Jason Bacon <[email protected]>:



Well, UW-Milwaukee is now officially a SLURM site. SLURM is now the primary RM on two clusters running CentOS 6.5 (formerly LSF) and FreeBSD 9.2 (formerly Torque).

One usage question has come up that the FAQ and Google are fuzzy on: How to open a scheduled interactive shell on a compute node.

The FAQ at https://computing.llnl.gov/linux/slurm/faq.html#prompt seems to be incomplete, stating

    srun -u bash -i

Without --pty, though, editors and the like won't work.

I came across another site suggesting

    salloc -n1 srun -n1 -N1 --pty --preserve-env $SHELL

The salloc seems redundant to me, but maybe there's some advantage I'm unaware of. Wouldn't this
be exactly the same?

    srun -n1 -N1 --pty --preserve-env $SHELL

Thanks,

    Jason


Reply via email to