Submitting Jobs

From DeepSense Docs
Revision as of 14:50, 4 December 2020 by Bgeetika (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Jobs can be submitted using bsub command. For more information on bsub , go to bsub You can also check Running jobs for more detail.

Some example:

1. bsub -Is -gpu - bash

This command will submit an interactive job to gpu queue and creates a pseudo-terminal with shell mode when the job starts. Also, it will provide you the jobid.

for example

[bhatiag@ds-lg-01 ~]$ bsub -Is -gpu - bash
Job <5972> is submitted to queue <gpu>.
<<Waiting for dispatch ...>>
<<Starting on ds-cmgpu-05>>

2. bsub -gpu - scriptname

It will submit the script to gpu queue

for example

[bhatiag@ds-lg-01 ~]$ bsub -gpu -
Job <5978> is submitted to queue <gpu>.

3. bsub -gpu "num=2:mode=shared:mps=yes" – scriptname

It will set the properties of gpu resources required by the job

Example 1

[bhatiag@ds-lg-01 ~]$ bsub -gpu "num=2:mode=shared:mps=yes" –
Job <5979> is submitted to queue <gpu>.

You can check the job status using bjobs

Example 2

Consider a bash script with following commands into it

source . /opt/anaconda2/etc/profile.d/
conda activate py36

See Writing Script for more information

Submit the job using following command

[bhatiag@ds-lg-01 ~]$ bsub -oo "output.txt" -gpu "num=1:mode=exclusive_process:mps=yes" ""
Job <5980> is submitted to queue <gpu>.

Output file output.txt will contain

[bhatiag@ds-lg-01 ~]$ cat output.txt
Sender: LSF System <lsfadmin@ds-cmgpu-06>
Subject: Job 5980: <> in cluster <DeepSenseLSFCluster> Exited
Job <> was submitted from host <ds-lg-01> by user <bhatiag> in cluster <DeepSenseLSFCluster> at Fri Dec  4 14:28:37 2020
Job was executed on host(s) <ds-cmgpu-06>, in queue <gpu>, as user <bhatiag> in cluster <DeepSenseLSFCluster> at Fri Dec  4 14:28:37 2020
</users/faculty/bhatiag> was used as the home directory.
</users/faculty/bhatiag> was used as the working directory.
Started at Fri Dec  4 14:28:37 2020
Terminated at Fri Dec  4 14:28:40 2020
Results reported at Fri Dec  4 14:28:40 2020
Your job looked like:
# LSBATCH: User input
Exited with exit code 127.
Resource usage summary:
   CPU time :                                   0.05 sec.
   Max Memory :                                 6 MB
   Average Memory :                             6.00 MB
   Total Requested Memory :                     -
   Delta Memory :                               -
   Max Swap :                                   -
   Max Processes :                              1
   Max Threads :                                1
   Run time :                                   3 sec.
   Turnaround time :                            3 sec.
The output (if any) follows:
Display whatever in your python script