Page tree
Skip to end of metadata
Go to start of metadata

LS-DYNA, a general purpose transient dynamic finite element program capable of simulating complex real world problems. LS-DYNA Applications include:

  • Crashworthiness simulations 
  • Occupant safety analyses 
  • Metal Forming 
  • Metal Cutting 
  • Biomedical applications 
  • Blast loading 
  • Fluid-structure interaction
  • Earthquake engineering 
  • CFD 

LS-Dyna is a product of Livermore Software Technology Corp (LSTC).

Usage

To set up your paths for using lsdyna you must load the lsdyna module

module load lsdyna

If you wish to use this specific version of lsdyna do

module load lsdyna/R7.0.0

For more details on using modules see our modules help guide.

Examples of LS-Dyna files can be found on Raijin in /apps/lsdyna/971-500/examples/. Here is an example of how to run one of the examples. Please note, for jobs submitted to normalbw / expressbw queues,  executables built for broad well architecture, lsdyna_d_bw and lsdyna_s_bw, are available in module lsdyna/R9.1.0-mpp.

 

Create a pbs script file for the job, called pbs_airbag.sh

#!/bin/bash
#PBS -l walltime=20:00
#PBS -l mem=1024mb
#PBS -l jobfs=1gb
#PBS -l ncpus=4
#PBS -l software=lsdyna
#PBS -l wd

module load lsdyna/R7.0.0

# set up the environment file
# ---  edit or remove these lines at your peril ---
#overhead in 500MB
export ESTIMATED_OVERHEAD=`expr 500 \* 1024 \* 1024`
export MEMORY_FOR_CALC=`expr $PBS_VMEM - $ESTIMATED_OVERHEAD`
export MEMORY_IN_WORDS=`expr $MEMORY_FOR_CALC  / 8`
# ---  end of setup ---

cp airbag.deploy.k $PBS_JOBFS
cd $PBS_JOBFS
mpirun lsdyna_d I=airbag.deploy.k D=D3DUMP MEMORY=$MEMORY_IN_WORDS > output 2>&1

# Copy the last restart file back
cp `ls -C1dt D3DUMP*|head -1` $PBS_O_WORKDIR
rm D3DUMP*

# Copy the rest of the output back
cp * $PBS_O_WORKDIR

Note that the job executes in the jobfs scratch space. This is because LS-Dyna is quite severe on I/O systems due to the way it writes files. So, we suggest copying all the files into the jobfs space, and then copying them back at the end of the job.

Execute the job using the using the pbs command 

qsub pbs_airbag.sh

Check the file output (as directed in the pbs script), and the lsdyna file messag for any indication of problems.

You may find it necessary to increase the amount of overhead from 500Mb if you get "vmem exceeded" errors but are sure that you are providing sufficient memory to run the job.


Ls-dyna MPP

For running MPP version of ls-dyna we recommend setting Memory1 and Memory2 parameters, as shown below.

 

#!/bin/bash
#PBS -l walltime=20:00:00
#PBS -l mem=30GB
#PBS -l jobfs=1gb
#PBS -l ncpus=16
#PBS -l software=lsdyna
#PBS -l wd

module load lsdyna/R9.1.0-mpp

# set up the environment file
# ---  edit or remove these lines at your peril ---
#overhead in 2GB
ESTIMATED_OVERHEAD=2000
M2=$(( ($PBS_VMEM / 1024 / 1024 - $ESTIMATED_OVERHEAD)/$(($PBS_NCPUS +1)) ))
M2=$(( $M2 / 8 ))
M1=$(( $M2 *2 ))
# ---  end of setup ---

cp airbag.deploy.k $PBS_JOBFS
cd $PBS_JOBFS
mpirun lsdyna_d I=airbag.deploy.k D=D3DUMP MEMORY1="$M1"M MEMORY2="$M2"M > output 2>&1

# Copy the last restart file back
cp `ls -C1dt D3DUMP*|head -1` $PBS_O_WORKDIR
rm D3DUMP*

# Copy the rest of the output back
cp * $PBS_O_WORKDIR

 

Explicit Method

For explicit solutions in metal forming simulations it may be possible to set the MEMORY to a small value, the default may do, and add the following line to the batch job script:

export LSTC_MEMORY=auto

Use this option with care though as it is not supported for all routines.

Parallel Execution

The example above is set for 4 cpus. However, timings should be performed on smaller numbers of cpus to ensure that the class of problem is benefiting from the extra cpus. Merely testing the %CPU figure under nqstat is not sufficient.

Compiling User Defined Functions

The Makefile and object files and libraries required to build LSDyna with a user defined functions are available in /apps/lsdyna/<version>/objects/usermat_{bw}-s(d) for single(double) precision on {broadwell} nodes. 

Copy these to your own directory to build.

You will still need the lsdyna module with the corresponding version loaded to access the license.

License requirements

LS-Dyna is for academic use only. Users needed access to lsdyna for academic purposes must request membership of the lsdyna software group.