LS-DYNA

Rescale provides an easy command-line interface for running LS-DYNA jobs. Here, we will discuss the commands for running LS-DYNA in the three different solver modes:

  • Shared Memory Parallel (SMP)
  • Distributed Memory Parallel (DMP)
    aka Message Passing Parallel (MPP)
  • Hybrid MPP

Each solver has different argument requirements in order to execute successfully. The examples below will show templates for the three different solver modes where:

-i is the input file argument

-p is the precision floating point

-n is DMP rank argument

-s is SMP thread argument

Note: For the examples below, please replace with the input file name including extension. Be sure to remove the brackets < >.

SMP Mode

If you want to run in SMP mode, configure your job on a single node of hardware. This will automatically run the job as SMP. If you would like to force SMP mode with multiple cores then follow this command template:

ls-dyna -s $RESCALE_CORES_PER_SLOT -i <input-file> -p <precision>

Notice here, we use the RESCALE_CORES_PER_SLOT environment variable as the number of SMP threads which is always the number of cores of your single-node cluster.

DMP Mode

If you want to run in DMP only, the job can be run with the command:

ls-dyna -i <input-file> -p <precision>

Notice, in this case, the number of DMP ranks will be taken from the hardware selection automatically.

The command for single precision is:

ls-dyna -i <input-file> -p single

The command for double precision is:

ls-dyna -i <input-file> -p double

Hybrid Mode

The command to specify a hybrid parallelization configuration is:

ls-dyna -n <dmp-ranks> -s <smp-threads/dmp-rank> -i <input-file> -p <precision> -a <options>

where

-n is DMP rank argument

-s is SMP thread argument

For example, if you launch a job with 16 cores (16 smp threads), you can specify a hybrid parallelization configuration by having 8 nodes (dmp ranks) with 2 cores/threads (16/8 = 2) each: -n 8 -s 2

The full command for LS-DYNA jobs is as follows:

ls-dyna -n <dmp-ranks> -s <smp-threads/dmp-rank> -i <input-file> -p <precision> -a <options>

Additional command line options may be used by adding the -a flag to the command line. These extra arguments will be directly passed into the LS-DYNA executable.

If there is a need for you to specify the memory usage for a particular run, for example:

ls-dyna -i input.k -p single -a "memory=600m memory2=60m"

or

ls-dyna -i input.k -p single -a "memory=30000 memory2=20000 p=my-pfile"

memory: Memory used by the head processor to initially decompose the model

memory2: Memory used by all the processors to solve the decomposed problem (including head node)

A pfile may be used by adding the -a flag to the command line. For example:

ls-dyna -i input.k -p single -a "p=my-pfile"

First, you’ll need to SSH into your running cluster.

Once you are on the bash interface of the virtual machine, please navigate into the correct folder using cd work/shared. Next please enter the following command echo <switch> > d3kil, replacing <switch> with the switch command you wish to execute. For example: echo sw2 > d3kil

Please note that the d3kil file will be consumed and removed once it is executed.

Here is the list of sense switches and its response for LS-DYNA:

  • sw1 – A restart file is written and LS-DYNA terminates (cluster will shutdown)
  • sw2 – LS-DYNA responds with time and cycle numbers (output in ls-dyna.log)
  • sw3 – A restart file is written and LS-DYNA continues
  • sw4 – A plot state is written and LS-DYNA continues
  • swa – LS-DYNA flushes all output i/o buffers
  • stop/quit – halt execution (cluster will shutdown)

If you need to use a version of LS-DYNA that is not in the dropdown menu, you can upload the build files along with your input files on a Rescale job and run as a Custom Version.

Please ensure that the build of LS-DYNA is:

  • 64 bit linux
  • mpp version

The steps are as follows:

  • Download the custom build files to your computer
  • Go to the folder where the build files are located
  • Identify the executable and rename it.

For custom builds to work, the executable has to be renamed to lsdyna-CUSTOM.<mpi-flavor>-mpp-<precision>. An example would be: lsdyna-CUSTOM.platformmpi-mpp-single. Please make sure that your custom build corresponds with the mpi flavor you have named, or your job will fail.

dyna custom download files.ef2b68eb

On the Rescale platform, upload the build files along with the input files to the job​

dyna custom upload files.bb67e1be
  • On the Software page, select ​​LS-DYNA
  • Under Version, select ​Custom Version/Revision
dyna custom select version.fb42d87a
  • ​​​In the command window, specify:
​​​​export DEFAULT_MPIFLAVOR=intelmpils-dyna -v <custom-version> -i <input> -p <precision> -a <other args>

​​​​​​​​For example:​​​​

​​​​export DEFAULT_MPIFLAVOR=intelmpi​​​​ls-dyna -v CUSTOM -i YarisD_V2g_shock_abs_load_01.k -p double -a memory=600m memory2=60m swapping=yes

​​​​​​​​In this example:

MPI flavor for the custom build is Intel mpi
Input file is YarisD_V2g_shock_abs_load_01.k​​​​​
​​​​Precision is double​​​​​​​​​
memory is Memory (MB) used by the head processor to initially decompose the model​​​​​​​​​
​​​​memory2 is Memory (MB) used by all the processors to solve the decomposed problem (including head node)​​​​​​​​​
​​​​Replace these fields in the command window to suit your job.​​​​​​​​​

dyna custom command.f0947a86

Your job will now run on your custom LS-DYNA version.