Changes between Version 60 and Version 61 of cypress/using


Ignore:
Timestamp:
Dec 19, 2019 2:16:28 PM (2 years ago)
Author:
cbaribault
Comment:

Added sections for 1) exiting idev and 2) temporarily setting environment variables.

Legend:

Unmodified
Added
Removed
Modified
  • cypress/using

    v60 v61  
    403403`idev` transfers the environmental variables to computing node. Therefore, if you have loaded some modules on the login node, you don't have to load the same module again.
    404404
     405==== How to exit `idev` ====
     406
     407Once you're in the interactive session, at any time before the interactive session times out, you can terminate or leave the interactive session via the `exit` command, and you will be sent back to your login session on the login node with your most recent login prompt.
     408{{{
     409[fuji@cypress01-100 ~]$ exit
     410[fuji@cypress1 ~]$
     411}}}
     412
    405413==== For Workshop ====
    406414If you use a temporary workshop account, do this.
     
    458466
    459467==== "interactive" QOS ====
    460 The "interactive" QOS is intended to be used for testing SLURM script submission, and is limited to 1 job per user.  To use it, set your partition and QOS to "interactive".  For example, with idev:
     468The "interactive" QOS is intended to be used for testing SLURM script submission, and is limited to 1 job per user.  To use it, set your partition and QOS to "interactive".  For example, with `idev`:
    461469
    462470{{{
     
    475483Other QOS's on the system are for staff testing use only.
    476484
     485==== Temporarily Setting Environment Variables ====
     486As an alternative to the above, you can avoid possible confusion associated with environment variable values by temporarily setting those variables and invoking a command, e.g. `idev`, all on one line. Thus, when you exit from the interactive session, those variables will be restored to their prior state. Furthermore, you can define and use an alias, e.g. "idevi", as in the following.
     487
     488Starting from the login session, observe variables initially unset.
     489{{{
     490[fuji@cypress1 ~]$ echo MY_PARTITION=$MY_PARTITION, MY_QUEUE=$MY_QUEUE
     491MY_PARTITION=, MY_QUEUE=
     492}}}
     493Define and invoke alias "idevi", now entering the interactive session.
     494{{{
     495[fuji@cypress1 ~]$ alias idevi='MY_PARTITION=interactive MY_QUEUE=interactive idev'
     496[fuji@cypress1 ~]$ idevi
     497Requesting 1 node(s)  task(s) to interactive queue of interactive partition
     4981 task(s)/node, 20 cpu(s)/task, 2 MIC device(s)/node
     499Time: 0 (hr) 60 (min).
     500Submitted batch job 1255374
     501JOBID=1255374 begin on cypress01-089
     502--> Creating interactive terminal session (login) on node cypress01-089.
     503--> You have 0 (hr) 60 (min).
     504--> Assigned Host List : /tmp/idev_nodes_file_fuji
     505Last login: Thu Dec 19 12:27:32 2019 from cypress1.cm.cluster
     506}}}
     507In the interactive session, evaluate the variables and observe they are set.
     508{{{
     509[fuji@cypress01-089 ~]$ echo MY_PARTITION=$MY_PARTITION, MY_QUEUE=$MY_QUEUE
     510MY_PARTITION=interactive, MY_QUEUE=interactive
     511}}}
     512In the interactive session, do work, then exit back to the login session.
     513{{{
     514...
     515[fuji@cypress01-089 ~]$ exit
     516logout
     517Connection to cypress01-089 closed.
     518Removing job 1255374.
     519
     520[fuji@cypress1 ~]$
     521}}}
     522Back in the login session, observe the variables are restored to their prior state - in this case unset.
     523{{{
     524[fuji@cypress1 ~]$ echo MY_PARTITION=$MY_PARTITION, MY_QUEUE=$MY_QUEUE
     525MY_PARTITION=, MY_QUEUE=
     526}}}
     527
    477528==== Questions or Suggestions ====
    478529