Command line

Tosca Python Driver command line is for the most cases the same as in the Perl Driver. However in its full form it differs significantly. There are three run-modes : Optimize, Post and Restart. Each of these run-modes require different set of arguments, some of which identical. Optimize is the default run-mode.

Optimize

ToscaPython [optimize] --job|-j <jobname> [--par|-p <parfile>] [--solver|-s <solver>] [--sol_cpus|-scpus <scpus>] [--sol_quues|-sques <sques>] [--ow|-o] [--loglevel|-l <loglevel>] [--cpus|-cpus <cpus>] [--report|-r [sim] [vtfx]]

Long designation Short designation Usage Default Description
--job -j MANDATORY - Job name and the name of the job directory.
--par -p OPTIONAL <jobname>.par Par file. Full or relative path to the parameter file with or without extension. If this option is missing it is expected the parameter file to be named <jobname>.par
--solver -s OPTIONAL abaqus Solver name. It shall be one of the following lowercase strings: abaqus ,ansys ,mscnastran
--sol_cpus -scpus OPTIONAL 1 Number of processors used by the solver. This parameter will add the corresponding command line flag to the solver call to enable parallel execution on one host. The default is 1 which means serial execution.
--sol_queues -sques OPTIONAL 1 Number of solver execution queues. Specifies the number of parallel running solver jobs at the same time.
--life -life OPTIONAL fesafe Life solver name. It shall be one of the following lowercase strings: fesafe
--ow -o OPTIONAL <unset> Overwrite flag. Indicates whether the job directory shall be deleted if exists. If not set the job directory will be archived if exists
--loglevel -l OPTIONAL INFO Verbosity Level. The log level for TOSCA.OUT file. It shall be one of the following uppercase strings: QUIET , CRITICAL , ERROR , WARNING , NOTICE , INFO , DEBUG , TRACE , DEVELOP
--cpus -cpus OPTIONAL 1 Number of MPI threads for the optimization system. This flag is equivalent of seeting env. variable FED_OMP_NUM_THREADS
--report -r OPTIONAL vtfx Report format. Sets what type of report file to generate. It shall be one of the following: vtfx, sim

Restart

ToscaPython restart --job|-j <jobname>

Long designation Short designation Usage Default Description
--job -j MANDATORY - Job name. Full or relative path to the parameter file without extension. It is expected the parameter file to be named <jobname>.par

Post

ToscaPython post --job|-j <jobname> [--par|-p <parfile>] [--smooth|-s] [--report|-r [vtfx] [sim]] [--loglevel|-l <loglevel>] [--ow|-o]

Long designation Short designation Usage Default Description
--job -j MANDATORY - Job name. Full or relative path to the parameter file without extension. It is expected the parameter file to be named <jobname>.par
--par -p OPTIONAL <jobname>.par Parameter file. Full or relative path to the parameter file with or without extension. It is expected the parameter file to be named <jobname>.par
--smooth -s OPTIONAL <unset> Smoothing. Smooth commands are queried from the job parameter file located in the starting directory
--report -r OPTIONAL <unset> Report format. Sets what type of report file to generate. It shall be one of the following: vtfx; sim
--loglevel -l OPTIONAL INFO Verbosity Level. The log level for TOSCA.OUT file. It shall be one of the following uppercase strings: QUIET ; CRITICAL ; ERROR ; WARNING ; NOTICE ; INFO ; DEBUG ; TRACE ; DEVELOP
--ow -o OPTIONAL <unset> Overwrite. If not specified output files will be versioned (add _nnn siffix)

Information

ToscaPython info --job|-j <jobname>

Long designation Short designation Usage Default Description
--job -j MANDATORY - Job name. Full or relative path to the parameter file without extension. It is expected the parameter file to be named <jobname>.par

Fromperl

ToscaPython fromperl <perl control command line>

This mode is provided for compatibility reasons. Execution converts perl command line syntax into python command line syntax, dropping unsupported and migrating supported command line options. Also, for some options not available on the command line, but available through configuration settings, a tosca_python.cfg file will be create containing necessary configuration changes The perl command line must be used "as is"

Examples

  • Default: ToscaPython optimize -j <path_to_par> -s abaqus -sol_cpus 1 -l INFO -cpus 1 -r vtfx
  • Typical user call: ToscaPython -j <jobdir>
  • Typical parallel user call: ToscaPython -j <jobdir> -scpus 4
  • Typical mscnastran call with 4 cpus: ToscaPython -j <jobdir> -s mscnastran -scpus 4
  • Typical debug call: ToscaPython -j <jobdir> -l DEBUG -o
  • Typical report on-demand: ToscaPyton post -j <jobdir> -r
  • Multi-format report on-demand: ToscaPython post -j <jobdir> -r vtfx sim
  • Execute all post tools: ToscaPython post -j <jobdir> -s -r vtfx sim
  • Dump global configuration: ToscaPython info
  • Dump configuration for a job without running the job: ToscaPython info -j <path_to_par>
  • Executing a job with perl-style command line: ToscaPython fromperl --job <jobdir> --opt <path_to_par> --loglevel INFO