Grid-schedulers can be used to schedule Madymo solver jobs. Grid scheduling prevents, amongst others, CPU overload of machine(s) and/or launch failures as no sufficient suitable license features are available within the license file, either directly or within a scheduled (overnight) set of solver runs. There are many grid-schedulers on the market, each having their own configuration options. For that reason, configuration of grid-schedulers is not covered in Simcenter Madymo installation instructions. This article provides some background information and suggestions for IT administrators on how to extract license requirement information from the Simcenter Madymo solver models to be launched through a grid-scheduler.
General introduction
Grid-schedulers can be used to schedule Madymo solver jobs. Grid scheduling prevents, amongst others, CPU overload of machine(s) and/or launch failures as no sufficient suitable license features are available within the license file, either directly or within a scheduled (overnight) set of solver runs.
There are many grid-schedulers on the market, each having their own configuration options. For that reason, configuration of grid-schedulers is not covered in Simcenter Madymo installation instructions.
This article provides some background information and suggestions for IT administrators on how to extract license requirement information from the Simcenter Madymo solver models to be launched through a grid-scheduler.
The current Madymo license can contain tokens, modules or a combination of token and module features. Note 1: Madymo tokens are not equivalent to Simcenter tokens. Note 2: License draw of solver runs is not affected by the nr of CPU’s allocated nor whether it is run in SMP or MPP mode. Madymo tokens are floating by default. Tokens are available for solver runs as well as for Workspace pre/post tools. Modules are typically floating too. Modules are only available for solver runs. If both tokens and modules are available in a license file, the order of check-out is first modules, then tokens. This means that license modules are consumed/exhausted before tokens are checked out.
To be able to decide whether a new solver job can be launched, the grid-scheduler needs to know what license features are available within the license, what features are currently in use/checked out and what license features are needed for the next job in queue.
For Simcenter Madymo, the license draw depends on the model content. The reprint file contains license features required for that model; however, that info is not available before running the simulation.
License file content
The license content is part of the decision whether to launch or pause a job by the grid-scheduler.
The Simcenter Madymo license can contain (a combination of):
An example of Simcenter Madymo features of a license file containing 1000 tokens, 1 Solver/MB + FE + AirbagUP module and 1 Solver/AirbagGasflowDynamics module is shown underneath. It shows 1000 instances of 'sc_md_token' and 1 instance of the Solver features 'sc_md_so_madymo3d' (MB solver), 'sc_md_so_fem' (FE solver), 'sc_md_so_fem_airbag' (airbag solver – uniform pressure only) and 'sc_md_so_gasflow' (airbag gas flow solver). Note: Only increment lines of the license file example are listed.
Licensed crash dummy, human body and impactor models work with tokens only and require 20 tokens each. Workspace pre/post tools also work with tokens only and require (maximum) 14 tokens each. Detailing on this token draw out of scope of this article.
Checking on the actual license availability
To obtain the actual availability of licenses for each license feature for the grid-scheduler, the license.log file could be assessed (either directly or via an external tool). Information on license availability (totals issued and in use) can also be extracted using the license management tool lmutil, by using the option 'lmstat'.
Note that lmutil is included in the Siemens license server installers. The actual availability of licenses can be called with the following command (Windows example here):
"C:\Program Files\Siemens\License Server\lmutil.exe" lmstat -c portnumber@hostname_lic_server -a
Below a lmutil license status output example is shown where no license features are in use/checked out.
Another lmutil lmstat license status output example with one instance of XMADgic and MADPost running, is shown below. It shows that 28 tokens are in use, of a total of 1000 tokens available. 14 (1 + 8 + 5) tokens for XMADgic and 14 tokens for MADPost. The solver module licenses are not in use in this example. Also note that 'sc_md_ws_xmadgic' (editor only) checks out one single (token) license, which is not explicitly mentioned in the listing.
Another lmutil lmstat license status output example is shown below, now with a combination of tokens and modules in use. In this example two simulations are running while one instance of XMADgic (editor + viewer) is active and one instance of MADPost is active.
Checking on license needs for running a submitted Solver job
As mentioned, the required license features for running a solver job depend on the model content and as such, a simulation would need to be run to enable identifying license requirements from the reprint file.
Running a "Null Run" via XMADgic or equivalently, launching a solver job with -parse option on the command line, does not require any licenses to be checked out. Nevertheless, the reprint file still contains license feature information, which can be extracted and fed to the grid-scheduler as input for a "launch-or-pause" decision.
A "Null Run" can also be performed by manually setting TIME_END equal to the TIME_START in the XML input file before running the job. This will typically be needed for coupling runs (co-simulation), as the -parse option is supported for stand-alone solver runs only.
Some examples of license information from reprint files are given below. The first example shows the license information resulting from running 'a_frontalel_scaled_dab.xml' (example model found in the Simcenter Madymo Solver install directories). Reprint file info from a "Null Run":
As can be seen, the required license features are listed in the reprint file, but it is not shown whether modules or tokens would be checked out for enabling the solver features in a full run.
Now when launching the simulation as a normal run ('Submit’ in XMADgic or job launch on command line without the -parse option), the actual license check-outs are printed in the reprint file as well. What license check-outs are eventually made (modules and/or tokens), depends on the license content specified in the license file. In the first of the two examples below, the solver features are enabled with module check-outs and the frontal dummy models feature is enabled with the check-out of 20 tokens. In the second example, the solver and frontal dummy model features are all enabled with token check-outs (100 tokens in total).
In summary, the license feature needs for a Madymo job can be extracted from reprint file produced with a Null Run. Examples of license features are "MADYMO/Solver (Multibody)", "MADYMO/Solver (FEM)", "MADYMO/Solver (Airbag)" and "MADYMO/Dummy Models/Frontal)". This information, combined with the actual (remaining) license availability (modules, tokens) that can be extracted with lmutil license management tool, could be used to feed a grid-scheduler with the necessary license information to enable it to decide on whether a job can be launched or should be kept in queue until a next check for sufficient features is done.
Some remaining remarks
Solver job launching from within XMADgic
In a ‘single user’ environment, XMADgic can easily be set to act as a baseline job-scheduler, as the maximum number of concurrent solver jobs can be set by the user in the Options menu.
By setting the value to 1 only one job at a time is launched. A larger number can be set and kept in line with how many concurrent jobs the license file would enable. Note: License check-outs of Workspace tools are not evaluated for this XMADgic solver job "launch-or-pause" decision.
In XMADgic the option 'Show Run Details' under the Execute menu shows an actualized listing of all jobs running and queued. The 'Refresh' option actualizes the listing and removes finished jobs from the list.
Environment variable for job queueing
Section 5.4 in the installation manual describes the environment variable MADLIC_QUEUE_MAX_MINUTES. For the set time (in minutes), every minute a check
is done to see if the required license feature has become available. Note that this option should be used with caution, as conflicts could occur during check-outs of multiple concurrent runs.
Filename or RUNID approach
When the license feature requirements are known for common/recurring solver jobs, a customer may consider including a ‘string’ in the XML filename (or inside the file, in the RUNID or in any other specific DESCRIPTION attribute or COMMENT element) that informs the grid-scheduler on the license feature requirements for this model. With scripting, this information could then be extracted to feed it to the grid-scheduler.
As an example, the number of tokens needed could be specified in the XML file like this: "PassengerAirbag_tokens_80.xml".
Or in the RUNID in the XML file, it could look like this:
Options file for license control
An options file can be added/configured within the license file by the administrator to manage features and/or user restrictions on license usage. The options file is referred to in the VENDOR line in the license file (see example below). More information on the Options file is given in the license documentation.
VENDOR saltd saltd OPTIONS="C:\ProgramData\Siemens\LicenseServer\ActiveLicenses\OptionsFile.opt" PORT=29001
Please contact your local Simcenter Madymo support organization for further questions/details on grid-scheduler input.