Starting Tosca Structure from Command-Line

The program call in the command-line and the corresponding options are described within this section.

This page discusses:

Location

The start script ToscaStructure.[bat|sh] is located in <install_dir>/<os>/code/command/.

Program Call

The program call in the command-line is:


ToscaStructure.[bat|sh] --input_1 option_1 ... [--input_n option_n]

The user interfaces are started as follows:

Tosca Structure.gui tosca_gui

The start script can be found in <install_dir>/<os>/code/command/ToscaStructureGui.[bat|sh] .

Minimal Program Call

The minimal Tosca Structure call is


ToscaStructure.[bat|sh] -j <jobname>

The name of the parameter file can be derived directly from the jobname. The file <jobname>.par is loaded in this case. If it is required that the job name directory has a name different from the parameter file name, use the command-line option --opt as follows:


ToscaStructure.[bat|sh] -j <jobname> --opt <parameterfilename>

In this instance, the name of the working directory is specified by the jobname. The file name for the input file of the FE analysis is entered in the parameter file using the command FEM_INPUT.

List of Command-Line Options for licensing

Long designation Usage Default Description
--license_model OPTIONAL AUTO This can take the values AUTO|SIMUNIT|LEGACY Users can choose to run with simunit licensing or the legacy licensing. For more details, refer the section on licensing configuration.
--license_type OPTIONAL - This can take the values TOKEN|CREDIT Users can choose to run specifically with SIMUNITTOKEN or SIMUNITCREDIT licensing if simunit licensing is chosen. If the user has installed it with FlexLM licensing, the TOKEN option offers a chance to switch to DSLS licensing. For more details, refer the section on licensing configuration.

List of Command-Line Options: Optimize

ToscaStructure [optimize] --job|-j <jobname> [--par|-p <parfile>] [--loglevel|-l <loglevel>] [--solver|-s <solver>] [--ow|-o] [--report|-r [sim] [vtfx]] [-life LIFE] [-emag EMAG] [-emag_threads EMAG_THREADS] [-emag_cpus EMAG_CPUS] [-emag_gpus EMAG_GPUS] [--cpus|-cpus <cpus>] [--sol_cpus|-scpus <scpus>] [--sol_queues|-sques <sques>] [--sol_args|-sargs <solver arguments>] [-fe_solver_version FE_SOLVER_VERSION] [-life_solver_version LIFE_SOLVER_VERSION] [--logfile|-logfile <logfile>] [--morph_no_solve|-m_no_solve ]

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, the parameter file is named <jobname>.par.
--loglevel -l OPTIONAL INFO Verbosity Level. The log level for the TOSCA.OUT file. It must be one of the following uppercase strings: QUIET, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE.
--solver -s OPTIONAL abaqus Solver name. It is one of the following lowercase strings: abaqus, ansys, mscnastran, cosmos.
--ow -o OPTIONAL <unset> Overwrite flag. Indicates whether the job directory is deleted if it exists. If not set, the job directory is archived if exists
--report -r OPTIONAL vtfx Report format. Sets what type of report file to generate. It must be one of the following: vtfx, sim, or none.
--life -life OPTIONAL fesafe Life solver name. It must be one of the following lowercase strings: fesafe.
--emag -emag OPTIONAL cst EMAG solver name. It must be one of the following lowercase strings: cst.
--emag_threads -emag_threads OPTIONAL 1 Number of EMAG solver execution threads.
--emag_cpus -emag_cpus OPTIONAL 1 Number of cpus used by the EMAG solver.
--emag_gpus -emag_gpus OPTIONAL 0 Number of gpus used by the EMAG solver.
--cpus -cpus OPTIONAL 1 Number of threads for the shared memory parallelization used by the optimization system. This flag is equivalent of setting the environment variable FED_OMP_NUM_THREADS.
--sol_cpus -scpus OPTIONAL 1 Number of processors used by the solver. This parameter adds 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.
--sol_args -sargs OPTIONAL <unset> Additional fe-solver command-line arguments. All arguments must be enclosed in quotation marks. Quotation marks and percent signs inside arguments must be escaped. For example:" -arg1 VAR -path \\\"path to file\\\" ", "-arg2 "memory=75%%"
--fe_solver_version -fe_solver_version OPTIONAL <unset> FE Solver version. Should be used in combination with driver.Solver.Version and driver.Solver.AddCallArgs.
--life_solver_version -life_solver_version OPTIONAL <unset> Life Solver version. Should be used in combination with driver.LifeSolver.Version and driver.LifeSolver.AddCallArgs.
--logfile -logfile OPTIONAL TOSCA.OUT Set the name of the log file.
--morph_no_solve -m_no_solve OPTIONAL <unset> Relevant only when running morphing jobs. Suppresses the execution of the FE-solver and generates only the modified input files.
--check_config -c OPTIONAL YES Setting this option controls how Tosca handles errors and warnings regarding the configuration of the job. It can be used to turn errors into warnings or disables them altogether. Note: Not all checks can be turned off or controlled this way. Possible values: YES, WARN, NO.

List of Command-Line Options: Restart

ToscaStructure 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
--loglevel -l OPTIONAL INFO Verbosity Level. The log level for the TOSCA.OUT file. It must be one of the following uppercase strings: QUIET, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE

List of Command-Line Options: Resume

ToscaStructure resume --job|-j <resume_jobname> [--resume_data|-rdata <path_to_resume_data>] [--par|-p <parfile>] [--loglevel|-l <loglevel>] [--solver|-s <solver>] [--ow|-o] [-life LIFE] [-emag EMAG] [-emag_threads EMAG_THREADS] [-emag_cpus EMAG_CPUS] [-emag_gpus EMAG_GPUS] [--cpus|-cpus <cpus>] [--sol_cpus|-scpus <scpus>] [--sol_queues|-sques <sques>] [--sol_args|-sargs <solver arguments>] [-fe_solver_version FE_SOLVER_VERSION] [-life_solver_version LIFE_SOLVER_VERSION] [--logfile|-logfile <logfile>]

Long designation Short designation Usage Default Description
--job -j MANDATORY - Resume job name and the name of the job directory.
--resume_data -rdata OPTIONAL <path_to_resume_data> Absolute path to the directory containing all the required files for resuming an optimization. If not provided, it is assumed that the resume par file lies in the same directory as the resume data.
--par -p OPTIONAL <jobname>.par Par file. Full or relative path to the parameter file with or without extension. If this option is missing, the parameter file is named <jobname>.par.
--loglevel -l OPTIONAL INFO Verbosity Level. The log level for the TOSCA.OUT file. It must be one of the following uppercase strings: QUIET, CRITICAL, ERROR, WARNING, NOTICE, INFO, DEBUG, TRACE.
--solver -s OPTIONAL abaqus Solver name. It is one of the following lowercase strings: abaqus, ansys, mscnastran, cosmos.
--ow -o OPTIONAL <unset> Overwrite flag. Indicates whether the job directory is deleted if it exists. If not set, the job directory is archived if exists
--life -life OPTIONAL fesafe Life solver name. It must be one of the following lowercase strings: fesafe.
--emag -emag OPTIONAL cst EMAG solver name. It must be one of the following lowercase strings: cst.
--emag_threads -emag_threads OPTIONAL 1 Number of EMAG solver execution threads.
--emag_cpus -emag_cpus OPTIONAL 1 Number of cpus used by the EMAG solver.
--emag_gpus -emag_gpus OPTIONAL 0 Number of gpus used by the EMAG solver.
--cpus -cpus OPTIONAL 1 Number of threads for the shared memory parallelization used by the optimization system. This flag is equivalent of setting the environment variable FED_OMP_NUM_THREADS.
--sol_cpus -scpus OPTIONAL 1 Number of processors used by the solver. This parameter adds 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.
--sol_args -sargs OPTIONAL <unset> Additional fe-solver command-line arguments. All arguments must be enclosed in quotation marks. Quotation marks and percent signs inside arguments must be escaped. For example:" -arg1 VAR -path \\\"path to file\\\" ", "-arg2 "memory=75%%"
--fe_solver_version -fe_solver_version OPTIONAL <unset> FE Solver version. Should be used in combination with driver.Solver.Version and driver.Solver.AddCallArgs.
--life_solver_version -life_solver_version OPTIONAL <unset> Life Solver version. Should be used in combination with driver.LifeSolver.Version and driver.LifeSolver.AddCallArgs.
--logfile -logfile OPTIONAL TOSCA.OUT Set the name of the log file.

List of Command-Line Options: Post

ToscaStructure 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 directory name. Full or relative path to the working directory of the job
--par -p OPTIONAL <jobname>.par Parameter file. Full or relative path to a parameter file containing postprocessing commands
--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 must be one of the following: vtfx; sim
--loglevel -l OPTIONAL INFO Verbosity Level. The log level for the TOSCA.OUT file. It must be one of the following uppercase strings: QUIET , CRITICAL , ERROR , WARNING , NOTICE , INFO , DEBUG , TRACE
--ow -o OPTIONAL <unset> Overwrite. If not specified, output files are versioned (add _nnn suffix)
--logfile -logfile OPTIONAL TOSCA_POST.OUT Set the name of the logfile.

List of Command-Line Options: Information

ToscaStructure 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
--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
--ow -o OPTIONAL <unset> Overwrite. If not specified, output files are versioned (add _nnn suffix)

The --job name is mandatory. All other parameters are optional. A default solver can be entered in the configuration file. Otherwise, --solver must be set. If only the job name is given, the name of the parameter file is derived automatically (jobname.par) and the name of the analysis file is extracted from the FEM_INPUT command in the parameter file.

Remark:

For backwards compatibility command-line parameters might be given with a single minus, for example,


ToscaStructure.[bat|sh] -input_1 option_1 ... [-input_n option_n]

Examples

  • Default: ToscaStructure optimize -j <path_to_par> -s abaqus -sol_cpus 1 -l INFO -cpus 1 -r vtfx
  • Typical user call: ToscaStructure -j <jobdir>
  • Typical resume user call: ToscaStructure resume -j <jobdir> -rdata <resumedatadir>
  • Typical parallel user call: ToscaStructure -j <jobdir> -scpus 4
  • Typical mscnastran call with 4 cpus: ToscaStructure -j <jobdir> -s mscnastran -scpus 4
  • Typical debug call: ToscaStructure -j <jobdir> -l DEBUG -o
  • Typical report on-demand: ToscaStructure post -j <jobdir> -r
  • Multiformat report on-demand: ToscaStructure post -j <jobdir> -r vtfx sim
  • Execute all post tools: ToscaStructure post -j <jobdir> -s -r vtfx sim
  • Dump global configuration: ToscaStructure info
  • Dump configuration for a job without running the job: ToscaStructure info -j <path_to_par>