The root problem is that "salloc" creates a subshell.
Therefore your "srsh" command in "rsalloc && srsh" is not going to run
until after the "rsalloc" subshell exits (at which point the allocation is
released).

-Paul

On Tue, Jun 20, 2017 at 10:55 AM, 나보균 <[email protected]> wrote:

> Hi all,
>
> I do not understand some commands related slurm.
>
> in a bash sell script, I put
>
>
>
> #!/bin/bash
>
> salloc -p remote_host_name -N 1 --gres=gpu:1
>
> ssh -X `echo $SLURM_NODELIST`
>
>
>
> But this was not work. "salloc" did not work well.
>
>
>
> so I put them in my .bashrc file such as
>
>
>
> alias rsalloc="salloc -p romeo -N 1 --gres=gpu:1"
>
> alias srsh="ssh -X `echo $SLURM_NODELIST`"
>
> alias rshow="rsalloc && srsh"
>
>
>
>
>
> Then, as a aliased command "rsalloc" and "srsh" works fine but "rshow" did
> not work.
>
>
>
> What is wrong?
>
>
>
> Bokyoon
>
>
>
>
>
> [image: Dr 나보균]
>
>
>



-- 
Paul H. Hargrove                          [email protected]
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department               Tel: +1-510-495-2352
Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900

Reply via email to