TABLE OF CONTENTS
::pwtk::PBS
PURPOSE
The master command for the PBS batch queuing. It manages the submission to PBS.
USAGE
PBS { ...script code... } PBS file.pwtk or PBS options { ...script code... } PBS options file.pwtk or PBS profile ?options? { ...script code... } PBS profile ?options? file.pwtk
DESCRIPTION
The above "profile" is a user defined profile for PBS, i.e., a set of "#PBS" directives, whereas the above "options" are the PBS options, specified in the PBS syntax (i.e. they are passed verbatim to qsub command).
BEWARE
Tcl uses different quoting than shell. Therefore, option values which contain whitespace are specified differently. For example, the equivalence for the shell command:
qsub -W 'attr_name1 = attr_value1, attr_name2 = attr2_value' ...
in PWTK is:
PBS -W "attr_name1 = attr_value1, attr_name2 = attr2_value" ...
or
PBS -W {attr_name1 = attr_value1, attr_name2 = attr2_value} ...
FURTHER DESCRIPTION
If "profile" is omitted, the "default" profile is used, which is guaranteed to exist because it is defined in the $PWTK/config/pbs.tcl file.
Here is an example of two user defined profiles, named "parallel" and "long":
pbs_profile parallel { #!/bin/sh #PBS -q parallel #PBS -l nodes=1 #PBS -l ppn=8 #PBS -l walltime=6:00:00 }
pbs_profile long { #!/bin/sh #PBS -q long #PBS -l nodes=1 #PBS -l ppn=64 #PBS -l walltime=24:00:00 }
It is a good practice to also define the PWTK specifics (aka pwtk_profile) associated with the PBS profiles. For example, for the above "long" profile with ppn=64, it would be reasonable to use "mpirun -n 64" as a default. This can be achieved with:
pbs_pwtk_profile long { prefix mpirun -n 64 }
There is also a compact version which defines the PBS profile and the associated PWTK profile simultaneously, i.e.:
pbs_profile long { #!/bin/sh #PBS -q long #PBS -l nodes=1 #PBS -l ppn=64 #PBS -l walltime=24:00:00 } { prefix mpirun -n 64 }
Here, the 2nd argument to the 'pbs_profile' command is the PBS profile and the last argument is the associated PWTK profile. This form is recommended because it avoid typos/mismatches between profile and pwtk_profile names.
IMPORTANT
A typical place where to store PBS profiles for frequent use is in the ~/.pwtk/pbs.tcl configuration file (N.B. in the ~/.pwtk/pbs.tcl configuration file, the prefix 'pbs_' can be omitted).
FURTHER DESCRIPTION
The 'pbs_profile' command can be used to define profiles on the fly within the PWTK script, e.g.:
pbs_profile n24 { #!/bin/sh #PBS -l ppn=24 #PBS -l walltime=24:00:00 } { prefix mpirun -np 24 }
PBS n24 job.pwtk
The final effect of the PBS command is to submit either the script code encapsulated inside the PBS { ... } command or the script file specified with the PBS command (e.g. PBS file.pwtk) to the PBS job scheduling system via the qsub command.