Difference between revisions of "Submitting Jobs"

From DeepSense Docs
Jump to: navigation, search
Line 31: Line 31:
  
 
You can check the job status using <code>bjobs</code>
 
You can check the job status using <code>bjobs</code>
 +
 +
Another example
 +
 +
[bhatiag@ds-lg-01 ~]$ bsub -oo "output.txt" -gpu "num=1:mode=exclusive_process:mps=yes" "python.sh"
 +
Job <5980> is submitted to queue <gpu>.
 +
 +
output file will contain
 +
[bhatiag@ds-lg-01 ~]$ cat output.txt
 +
Sender: LSF System <lsfadmin@ds-cmgpu-06>
 +
Subject: Job 5980: <python.sh> in cluster <DeepSenseLSFCluster> Exited
 +
Job <python.sh> 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
 +
python.sh
 +
------------------------------------------------------------
 +
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

Revision as of 18:34, 4 December 2020

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 - python.py
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

for example

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

You can check the job status using bjobs

Another example

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

output file will contain

[bhatiag@ds-lg-01 ~]$ cat output.txt
Sender: LSF System <lsfadmin@ds-cmgpu-06>
Subject: Job 5980: <python.sh> in cluster <DeepSenseLSFCluster> Exited
Job <python.sh> 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
python.sh
------------------------------------------------------------
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