salloc <options> srun --pty -n1 -N1 --mem-per-cpu=0 --cpu_bind=none
--mpi=none $SHELL

will probably do what you want, i.e., get an allocation and start a shell
on the remote node.

----
Doug Jacobsen, Ph.D.
NERSC Computer Systems Engineer
National Energy Research Scientific Computing Center <http://www.nersc.gov>
dmjacob...@lbl.gov

------------- __o
---------- _ '\<,_
----------(_)/  (_)__________________________


On Tue, Jun 20, 2017 at 12:16 PM, Paul Hargrove <phhargr...@lbl.gov> wrote:

> 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, 나보균 <b...@kpu.ac.kr> 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                          phhargr...@lbl.gov
> Computer Languages & Systems Software (CLaSS) Group
> Computer Science Department               Tel: +1-510-495-2352
> <(510)%20495-2352>
> Lawrence Berkeley National Laboratory     Fax: +1-510-486-6900
> <(510)%20486-6900>
>

Reply via email to