cape.pyover.cmd
: Create commands for OVERFLOW executables¶
This module creates system commands as lists of strings for executable binaries
or scripts for OVERFLOW. While OVERFLOW has only one main executable, there
are several versions, which are all interpreted by the primary function of this
module, overrun()
.
The basic format of the OVERFLOW command is determined using the value returned
from pyOver.options.runControl.get_overrun_cmd()
(or the keyword argument
cmd to overrun()
). In some cases, the command will also depend on the
OVERFLOW file prefix (usually "run"
), which is stored in a variable pre,
the number of processors (technically cores) in nProc, and the phase number
i (0-based; OVERFLOW uses 1-based phase indexing). Let
j = "%02i" % i
for convenience. Finally, mpicmd is the system’s call to run MPI
executables, which is often "mpiexec"
.
The format of the command that is generated can take any of the following versions based on the input options.
Value for cmd
System command
"overrunmpi"
[
"overrunmpi"
,"-np"
, nProc, pre, j]
"overflowmpi"
[mpicmd,
"-np"
, nProc,"overflowmpi"
]
"overrun"
[
"overrun"
, pre, j]
"overflow"
[
"overflow"
]
Commands are created in the form of a list of strings. This is the format used
in the built-in module subprocess
and also with cape.bin.calli()
.
As a very simple example, the system command "ls -lh"
becomes the list
["ls", "-lh"]
.
- See also:
cape.cmd
cape.bin
- cape.pyover.cmd.overrun(opts=None, i=0, **kw)¶
Interface to FUN3D binary
nodet
ornodet_mpi
- Call:
>>> cmdi = cmd.overrun(opts, i=0) >>> cmdi = cmd.overrun(**kw)
- Inputs:
- opts:
pyFun.options.Options
Global pyFun options interface or “RunControl” interface
- i:
int
Phase number
- args:
str
Extra arguments to cmd
- aux:
str
Auxiliary flag
- cmd:
str
Name of OVERFLOW binary to use
- opts:
- Outputs:
- cmdi:
list
[str
] Command split into a list of strings
- cmdi:
- Versions:
2016-02-02
@ddalle
: First version