- Infos im HLRS Wiki sind nicht rechtsverbindlich und ohne Gewähr -
- Information contained in the HLRS Wiki is not legally binding and HLRS is not responsible for any damages that might result from its use -

Phoenix Batch System: Difference between revisions

From HLRS Platforms
Jump to navigationJump to search
Line 32: Line 32:
<OL>
<OL>
   <li>
   <li>
<pre>-n <queue> </pre>
<pre>-n <queuename> </pre>
   </li>
   </li>
   <li>
   <li>
Line 41: Line 41:
|+'''Available node features are:'''
|+'''Available node features are:'''
|-
|-
|'''feature'''||'''describes'''||'''notes'''
|'''queuename'''||'''feature'''||'''describes'''||'''notes'''
|-
|-
|''old''||old CRAY strider nodes (dual cpu, 2GHz, 4GB, myrinet)||
|''myri''||''old''||old CRAY strider nodes (dual cpu, 2GHz, 4GB, myrinet)||
|-
|-
|''asus''|| asus boards (2 dual core cpus, 2.8GHz, 8GB, GigE)||  
|''normal''||''kfn4dre''|| asus boards (2 dual core cpus, 2.8GHz, 8GB, GigE)||  
|-
|-
|''rs161e4''|| transtec nodes (2 dual core cpus, 2.8GHz, 8GB, GigE)||
|''normal''||''rs161e4''|| transtec nodes (2 dual core cpus, 2.8GHz, 8GB, GigE)||
|-
|-
|''hp''|| HP Proliand DL145 Server (2 dual core cpus, 2.6GHz, 8GB, Infinipath)||
|''ipath''||''dl145g3''|| HP Proliand DL145 Server (2 dual core cpus, 2.6GHz, 8GB, Infinipath)||
|-
|-
|''c4''|| any node||
|''-''||''all''|| any node||
|}
|}
Multi nodes can be specified using a ''+'':
Multi nodes can be specified using a ''+'':
Line 61: Line 61:


   <li>
   <li>
<pre>walltime=<time></pre>
<pre>-l walltime=<time></pre>
   </li>
   </li>
</OL>
</OL>

Revision as of 08:48, 28 November 2007

The only way to start a parallel job on the compute nodes of this cluster is to use the portable batch system (Torque). You will get each requested node for your exclusive usage! Detailed information about the Batch system are available by the man pages 'man pbs'. There are 2 methods to use the batch system:

  • interactive batch jobs:
    if requested resources are available, the job starts a interactive shell immediately. For interactive access the qsub command has the option -I example:
    qsub -I ...


  • normal batch jobs:
    jobs will be started by the MAUI scheduler after passing some rules configured by the administrator (FAIRSHARE, BACKFILLING, ...).


Submit a batch job

Command for submitting a batch job request

 qsub <option>

On success, the qsub command returns a request ID. For detailed information, see man pages:

man pbs
man qsub
man pbs_resources

You have to specify the resources you need for your batch job. These resources are specified by including them in the -q option and -l option argument on the qsub command or in the PBS job script. On this cluster there are 3 important resources you need to specify:

  1. -n <queuename> 
  2. -l nodes=<number of nodes>:<feature>
      To distinguish between different nodes, features are assigned to each node. These features describe the properties of each node. Please do only use exactly 1 feature for each node type.
      Available node features are:
      queuename feature describes notes
      myri old old CRAY strider nodes (dual cpu, 2GHz, 4GB, myrinet)
      normal kfn4dre asus boards (2 dual core cpus, 2.8GHz, 8GB, GigE)
      normal rs161e4 transtec nodes (2 dual core cpus, 2.8GHz, 8GB, GigE)
      ipath dl145g3 HP Proliand DL145 Server (2 dual core cpus, 2.6GHz, 8GB, Infinipath)
      - all any node

      Multi nodes can be specified using a +:

      nodes=2:old+3:asus

      The example above will allocate 2 nodes with feature old and 3 nodes with feature asus.


  3. -l walltime=<time>

If you don't set the resources for your job request , then you will get default resource limits for your job. The specified resources are needed for job priorization. At the moment the default value for walltime is 10 minutes and the default number of nodes is 4. If your jobs exceeds the specified resource limits, Torque will stop your job! The higher your specified resource limits the lower the job priority.

To have the same environmental settings (exported environment) of your current session in your batchjob, the qsub command needs the option argument -V.

Examples

You can submit batch jobs using qsub. A very simple qsub script for a MPI job with PBS (Torque) directives (#PBS ...) for the options of qsub looks like this:

#!/bin/bash
#
# Simple PBS batch script that reserves two nodes and runs a
# MPI program on two processors (one on each node)
# The default walltime is 10min !
#
#PBS -l nodes=2:old
cd $HOME/testdir
mpirun -np 2 -hostfile $PBS_NODEFILE ./mpitest

VERY important is that you specify a shell in the first line of your batch script.
If you want to use two MPI processes on each node this can be done like this:

#!/bin/bash
#
# Simple PBS batch script that reserves two nodes and runs a
# MPI program on four processors (two on each node)
# The default walltime is 10min !
#
#PBS -l nodes=2:asus
cd $HOME/testdir
# Create your own machinefile as follows
cat $PBS_NODEFILE $PBS_NODEFILE|sort > machines
mpirun -np 4 -hostfile machines ./mpitest

If you need 2h wall time and one node you can use the following script:

#
# Simple PBS batch script that runs a scalar job using 2h
#
#PBS -l nodes=1:old,walltime=2:00:00
cd $HOME/jobdir
./my_executable

Examples for starting batch jobs:

  • Starting a script using 3 old CRAY strider nodes and a real time of 2 hours:
    qsub -l nodes=3:old,walltime=2:00:00 <script>
  • Starting a script using 5 cluster nodes with PBS Feature old:
    qsub -l nodes=5:old,walltime=2:00:00 <script>
  • Starting a script using 1 cluster node with PBS Feature asus and 5 cluster nodes with PBS Feature hp and real job time of 1.5 hours:
    qsub -l nodes=1:asus+5:hp,walltime=1:30:00 <script>
  • Starting a interactive batch job using 5 nodes with a job real time of 300 seconds:
    qsub -I -l nodes=5:old,walltime=300

    For interactive Batch jobs, you don't need a script.sh file. If the requested resources are available, you will get an interactive shell on one of the allocated compute nodes. Which nodes are allocated can be shown with the command cat $PBS_NODEFILE on the batch job shell or with the PBS status command qstat -n on the master node

  • Starting a script which should run on other Account ID: First you have to know which Account ID's (groupnames) are valid for your login:
    id

    Choose a valid groupname for your job:

    qsub -l nodes=5:old,walltime=300 -W group_list=<groupname>

Get the batch job status

  • Available commands
    qstat [options]
    showq [options] (showq -h for details)
    nstat2
    

    For detailed informations, see man pages:

    man qstat
    man pbsnodes
    


  • Examples
    list all batch jobs:
    qstat -a

    lists all batch queues with resource limit settings:

    qstat -q

    lists node information of a batch job ID:

    qstat -n <JOB_ID>

    lists detailed information of a batch job ID:

    qstat -f <JOB_ID>

    lists information of the PBS node status:

    pbsnodes -a
    pbsnodes -l
    

    gives informatioin of PBS node and job status:

    nstat2
    

DISPLAY: X11 applications on interactive batch jobs

For X11 applications you need to have SSH X11 Forwarding enabled. This is usually activated per default. But to be sure you can set 'ForwardX11 yes' in your $HOME/.ssh/config. To have the same DISPLAY of your current session in your batchjob, the qsub command needs the option argument -X.

frontend> echo $DISPLAY
frontend:14.0

Now you can start your interactive Batch job:

frontend> qsub -l nodes=2:asus,walltime=300 -X -I

The DISPLAY variable on the allocated node where your interactive batchjob shell is running should look then similar to start your X11 application:

node01> echo $DISPLAY
frontend:14.0
node01> your_X11_application