cape.cfdx.options.pbs
: PBS script options¶
This portion of the options is universal, and so it is only encoded in the
cape
module. The cape.pycart
module, for example, does not have a
modified version. It contains options for specifying which architecture to use,
how many nodes to request, etc.
- class cape.cfdx.options.pbs.PBS¶
Dictionary-based options for PBS jobs
- Call:
>>> opts = PBS(**kw)
- Inputs:
- kw:
dict
Dictionary of PBS options
- kw:
- Outputs:
- opts:
cape.options.pbs.PBS
PBS options interface
- opts:
- Versions:
2014-12-01
@ddalle
: First version
- get_PBS_A(i=None)¶
Return PBS A setting, usually for “account”
- Call:
>>> A = opts.get_PBS_A(i=None)
- Inputs:
- opts:
cape.cfdx.options.Options
Options interface
- i: {
None
} |int
Phase number
- opts:
- Outputs:
- A:
str
Account name
- A:
- Versions:
2023-06-14
@ddalle
: v1.0
- get_PBS_S(i=None)¶
Return the PBS S setting, which determines the shell
- Call:
>>> r = opts.get_PBS_S(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- S:
str
PBS shell setting;
'/bin/bash'
in most cases
- S:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_W(i=None)¶
Return PBS W setting, usually for setting groups
- Call:
>>> W = opts.get_PBS_W(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- W:
str
PBS W setting; usually
'group_list=$grp'
- W:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_aoe(i=None)¶
Return the PBS operating environment
- Call:
>>> s = opts.get_PBS_model(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- s:
str
Name of (alternate) operating environment to use
- s:
- Versions:
2017-04-05
@ddalle
: First version
- get_PBS_e(i=None)¶
Return the explicit STDERR file
- Call:
>>> e = opts.get_PBS_o(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- e:
str
PBS e setting; explicit STDERR file
- e:
- Versions:
2017-01-11
@ddalle
: First version
- get_PBS_j(i=None)¶
Return the PBS j setting, which can be used to join STDIO and STDERR into a single file.
- Call:
>>> j = opts.get_PBS_j(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- j:
str
PBS j setting;
'oe'
to join outputs
- j:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_model(i=None)¶
Return the PBS model/architecture
- Call:
>>> s = opts.get_PBS_model(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- s:
str
Name of architecture/model to use
- s:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_mpiprocs(i=None)¶
Return the number of CPUs per node
- Call:
>>> n = opts.get_PBS_ncpus(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- n:
int
PBS number of MPI processes per node
- n:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_ncpus(i=None)¶
Return the number of CPUs per node
- Call:
>>> n = opts.get_PBS_ncpus(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- n:
int
PBS number of CPUs per node
- n:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_o(i=None)¶
Return the explicit STDOUT file
- Call:
>>> o = opts.get_PBS_o(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- o:
str
PBS o setting; explicit STDOUT file
- o:
- Versions:
2017-01-11
@ddalle
: First version
- get_PBS_ompthreads(i=None)¶
Return number of OMP threads
- Call:
>>> n = opts.get_PBS_ompthreads(i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- i: {
None
} |int
Phase number
- opts:
- Outputs:
- n:
None
|int
Number of OMP threads to select
- n:
- Versions:
2017-05-01
@ddalle
: First version
- get_PBS_p(i=None)¶
Return the PBS priority
- Call:
>>> p = opts.get_PBS_p(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- p:
int
PBS priority level
- p:
- Versions:
2017-05-30
@ddalle
: First version
- get_PBS_q(i=None)¶
Return PBS queue
- Call:
>>> q = opts.get_PBS_q()
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- q:
str
Name of PBS queue to submit to
- q:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_r(i=None)¶
Return the PBS r setting, which determines if a job can be rerun
- Call:
>>> r = opts.get_PBS_r(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- r:
str
PBS r setting;
'n'
for non-rerunable
- r:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_select(i=None)¶
Return the number of nodes
- Call:
>>> n = opts.get_PBS_select(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- n:
int
PBS number of nodes
- n:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_PBS_walltime(i=None)¶
Return maximum wall time
- Call:
>>> t = opts.get_PBS_walltime(i)
- Inputs:
- opts:
cape.options.Options
Options interface
- i:
int
orNone
Index to select
- opts:
- Outputs:
- t:
str
Maximum wall clock time (e.g.
'8:00:00'
)
- t:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- get_nPBS()¶
Return the maximum number of unique PBS inputs
For example, if a case is set up to be run in two parts, and the first phase needs only one node (select=1) while the second phase needs 10 nodes (select=10), then the input file should have
"select": [1, 10]
, and the output of this function will be2
.- Call:
>>> n = opts.get_nPBS()
- Inputs:
- opts:
cape.options.Options
Options interface
- opts:
- Outputs:
- n:
int
Number of unique PBS scripts
- n:
- Versions:
2014-12-01
@ddalle
: First version
- set_PBS_A(A, i=None)¶
Set PBS A setting, usually for account
- Call:
>>> opts.set_PBS_A(A, i=None)
- Inputs:
- opts:
cape.cfdx.options.Options
Options interface
- A:
str
Account name
- i: {
None
} |int
Phase number
- opts:
- Versions:
2023-06-14
@ddalle
: v1.0
- set_PBS_S(S='/bin/bash', i=None)¶
Set the PBS S setting, which determines the shell
- Call:
>>> opts.set_PBS_S(S, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- S:
str
PBS shell setting;
'/bin/bash'
in most cases- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_W(W='', i=None)¶
Set PBS W setting, usually for setting groups
- Call:
>>> opts.set_PBS_W(W, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- W:
str
PBS W setting; usually
'group_list=$grp'
- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_aoe(s=None, i=None)¶
Set the PBS model/architecture
- Call:
>>> opts.set_PBS_aoe(s, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- s:
str
Name of (alternate) operating environment to use
- i:
int
orNone
Index to select
- opts:
- Versions:
2017-04-05
@ddalle
: First version
- set_PBS_e(e=None, i=None)¶
Set PBS file for STDERR
- Call:
>>> opts.set_PBS_e(e, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- e:
str
PBS o setting; explicit STDERR file
- i:
int
orNone
Index to select
- opts:
- Versions:
2017-01-11
@ddalle
: First version
- set_PBS_j(j='oe', i=None)¶
Set PBS join setting
- Call:
>>> opts.set_PBS_j(j, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- j:
str
PBS j setting;
'oe'
to join outputs- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_model(s='ivy', i=None)¶
Set the PBS model/architecture
- Call:
>>> opts.set_PBS_model(s, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- s:
str
Name of architecture/model to use
- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_mpiprocs(n=20, i=None)¶
Set PBS number of cpus per node
- Call:
>>> opts.set_PBS_ncpus(n, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- n:
int
PBS number of MPI processes per node
- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_ncpus(n=20, i=None)¶
Set PBS number of CPUs per node
- Call:
>>> opts.set_PBS_ncpus(n, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- n:
int
PBS number of CPUs per node
- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_o(o=None, i=None)¶
Set PBS file for STDOUT
- Call:
>>> opts.set_PBS_o(o, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- o:
str
PBS o setting; explicit STDOUT file
- i:
int
orNone
Index to select
- opts:
- Versions:
2017-01-11
@ddalle
: First version
- set_PBS_ompthreads(n=None, i=None)¶
Set number of OMP threads
- Call:
>>> n = opts.get_PBS_ompthreads(n=None, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- n:
None
|int
Number of OMP threads to select
- i: {
None
} |int
Phase number
- opts:
- Versions:
2017-05-01
@ddalle
: First version
- set_PBS_p(p=None, i=None)¶
Set the PBS priority
- Call:
>>> opts.set_PBS_p(p, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- p:
int
PBS priority level
- i:
int
orNone
Index to select
- opts:
- Versions:
2017-04-05
@ddalle
: First version
- set_PBS_q(q='normal', i=None)¶
Set PBS W setting, usually for setting groups
- Call:
>>> opts.set_PBS_q(q, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- q:
str
Name of PBS queue to submit to
- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_r(r='n', i=None)¶
Set PBS rerun setting
- Call:
>>> opts.set_PBS_r(r, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- r:
str
PBS r setting;
'n'
for non-rerunable- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_select(n=1, i=None)¶
Set PBS join setting
- Call:
>>> opts.set_PBS_select(n, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- n:
int
PBS number of nodes
- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index
- set_PBS_walltime(t='8:00:00', i=None)¶
Set the maximum wall time
- Call:
>>> opts.set_PBS_walltime(t, i=None)
- Inputs:
- opts:
cape.options.Options
Options interface
- t:
str
Maximum wall clock time (e.g.
'8:00:00'
)- i:
int
orNone
Index to select
- opts:
- Versions:
2014-09-29
@ddalle
: First version2014-12-01
@ddalle
: Added index