The easiest way to run jobs is to create a job script that contains
your job setup.
Simple job script example:
$ cat simple-jobscript.sh
#!/bin/bash
#PBS -lwalltime=0:10:0
echo starting
sleep 10
echo ending |
Comments beginning with
#PBS is meaningful to the
queueing system, here we ask it to reserve 10 minutes for the job, if
the job runs longer than that it will be killed. You submit the job
to the queue with
qsub:
$ qsub simple-jobscript.sh
553.snowstorm.public
$ |
qsub answers with the job id it has assigned to the
job, and you can use this to get information about it later:
$ showq
ACTIVE JOBS--------------------
JOBNAME USERNAME STATE PROC REMAINING STARTTIME
553 usera Running 1 00:10:00 Fri Feb 13 10:39:25
549 userb Running 1 3:37:10 Fri Feb 13 09:16:35
541 userc Running 1 7:47:17 Thu Feb 12 12:26:42
551 userd Running 1 9:51:43 Fri Feb 13 10:31:08
552 userd Running 1 9:54:00 Fri Feb 13 10:33:25
534 userd Running 1 2:09:48:33 Wed Feb 11 16:27:58
547 userb Running 1 9:22:38:52 Thu Feb 12 23:18:17
536 usere Running 8 19:01:04:56 Thu Feb 12 09:44:21
8 Active Jobs 15 of 18 Processors Active (83.33%)
8 of 9 Nodes Active (88.89%)
IDLE JOBS----------------------
JOBNAME USERNAME STATE PROC WCLIMIT QUEUETIME
0 Idle Jobs
BLOCKED JOBS----------------
JOBNAME USERNAME STATE PROC WCLIMIT QUEUETIME
Total Jobs: 8 Active Jobs: 8 Idle Jobs: 0 Blocked Jobs: 0
|
showq is a maui command, you can also use the pbs
command
qstat to get similar information:
$ qstat
Job id Name User Time Use S Queue
---------------- ---------------- ---------------- -------- - -----
534.snowstorm TpaFeOOH-s1_opt userd 42:10:20 R default
536.snowstorm md7 usere 00:00:00 R default
541.snowstorm mitgcm.run userc 22:11:20 R default
547.snowstorm hfdaQ userb 11:17:10 R default
549.snowstorm hfaQ userb 01:22:14 R default
551.snowstorm FePh-s1_B1 userd 00:07:46 R default
552.snowstorm FePh-s1_A1 userd 00:04:59 R default
553.snowstorm simple-jobscrip usera 0 R default |