technical:recipes:ls-dyna

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
technical:recipes:ls-dyna [2024-06-07 12:33] – [Open MPI install] freytechnical:recipes:ls-dyna [2024-06-07 12:51] (current) – [VALET package definition] frey
Line 21: Line 21:
 For this example, LS-DYNA will be installed in a workgroup's storage.  The base path ''$WORKDIR'' will be referenced in this recipe, which implies that prior to installation the ''workgroup'' command was used to spawn a workgroup shell.  The recipe assumes version R15.0.2 and the variants mentioned above. For this example, LS-DYNA will be installed in a workgroup's storage.  The base path ''$WORKDIR'' will be referenced in this recipe, which implies that prior to installation the ''workgroup'' command was used to spawn a workgroup shell.  The recipe assumes version R15.0.2 and the variants mentioned above.
  
-===== Directory Organization =====+===== Directory organization =====
  
 The LS-DYNA software packages must be downloaded to the cluster.  To facilitate that, a directory must be created to hold those files.  Rather than type-out the full path every time, the variable ''LS_DYNA_PREFIX'' will be set to the base directory containing LS-DYNA software: The LS-DYNA software packages must be downloaded to the cluster.  To facilitate that, a directory must be created to hold those files.  Rather than type-out the full path every time, the variable ''LS_DYNA_PREFIX'' will be set to the base directory containing LS-DYNA software:
Line 171: Line 171:
 To make this version of Open MPI available to your LS-DYNA installs, a VALET package definition file should be created.  The text ''<OPENMPI-INSTALL-DIR>'' should be replaced with the base installation path used above (e.g. ''/work/group/sw/openmpi''). To make this version of Open MPI available to your LS-DYNA installs, a VALET package definition file should be created.  The text ''<OPENMPI-INSTALL-DIR>'' should be replaced with the base installation path used above (e.g. ''/work/group/sw/openmpi'').
  
-<WRAP center round alert 60%>+<WRAP center round alert 80%>
 If the workgroup already has an existing ''${WORKDIR}/sw/valet/openmpi.vpkg_yaml'' file, the new version should be added to that file:  do not simply overwrite the file with the content shown below! If the workgroup already has an existing ''${WORKDIR}/sw/valet/openmpi.vpkg_yaml'' file, the new version should be added to that file:  do not simply overwrite the file with the content shown below!
 </WRAP> </WRAP>
Line 182: Line 182:
     url:                 http://www.open-mpi.org/     url:                 http://www.open-mpi.org/
     prefix:              <OPENMPI-INSTALL-DIR>     prefix:              <OPENMPI-INSTALL-DIR>
- 
-    actions: 
-        - action:          set 
-          variable:        MPICC 
-          value:           mpicc 
-          development-env: true 
- 
-        - action:          set 
-          variable:        MPICXX 
-          value:           mpic++ 
-          development-env: true 
- 
-        - action:          set 
-          variable:        MPIFC 
-          value:           mpifort 
-          development-env: true 
- 
-        - action:          set 
-          variable:        MPIF77 
-          value:           mpif77 
-          development-env: true 
- 
-        - action:          set 
-          variable:        MPIF90 
-          value:           mpif90 
-          development-env: true 
- 
     versions:     versions:
- 
         "4.0.5:intel19,ls-dyna":         "4.0.5:intel19,ls-dyna":
             description:     Open MPI 4.0.5 for LS-DYNA, Intel 2019             description:     Open MPI 4.0.5 for LS-DYNA, Intel 2019
Line 225: Line 197:
     url:                 http://www.open-mpi.org/     url:                 http://www.open-mpi.org/
     prefix:              <OPENMPI-INSTALL-DIR>     prefix:              <OPENMPI-INSTALL-DIR>
 +    versions:
 +        "4.0.5:intel19,ls-dyna":
 +            description:     Open MPI 4.0.5 for LS-DYNA, Intel 2019
 +            dependencies:
 +                - intel/2019
 +</file>
  
-    actions: +===== VALET package definition =====
-        - action:          set +
-          variable:        MPICC +
-          value:           mpicc +
-          development-env: true+
  
-        action:          set +With the necessary dependencies satisfied, a VALET package definition for LS-DYNA can be created.  Assuming this is the first time LS-DYNA is being installed, the file will need to be created as it appears below; if versions/variants are added in the future, that file should be augmented with just the new version/variant information.  The ''<LS_DYNA_PREFIX>'' text must be replaced in the package definition with the value of that environment variable that was assigned at the beginning of this recipe:
-          variable:        MPICXX +
-          value:           mpic++ +
-          development-env: true+
  
-        - action:          set +<code bash> 
-          variable:        MPIFC +$ echo $LS_DYNA_PREFIX 
-          value:           mpifort +/work/group/sw/ls-dyna 
-          development-env: true+</code>
  
-        action:          set +The ''<LSTC-LICENSE-SERVER-NAME>'' text must be replaced with the IP address or DNS name of the computer that services the LSTC LS-DYNA license that was purchased.
-          variable:        MPIF77 +
-          value:           mpif77 +
-          development-env: true+
  
-        action:          set +<file yaml ls-dyna.vpkg_yaml> 
-          variable:        MPIF90 +ls-dyna: 
-          value:           mpif90 +    prefix: <LS_DYNA_PREFIX> 
-          development-envtrue+    url: http://www.lstc.com/ 
 +    description: general-purpose finite element program simulating complex real world problems 
 + 
 +    actions: 
 +        - variable: LSTC_LICENSE 
 +          action: set 
 +          value: network 
 +        - variable: LSTC_LICENSE_SERVER 
 +          action: set 
 +          value: <LSTC-LICENSE-SERVER-NAME> 
 +        - variable: LSTC_INTERNAL_CLIENT 
 +          action: set 
 +          value: off 
 +        - variable: LSTC_ROOT 
 +          action: set 
 +          value: ${VALET_PATH_PREFIX} 
 +        bindir: ${VALET_PATH_PREFIX} 
 + 
 +    default-version: "15.0.2:double,hybrid,avx2"
  
     versions:     versions:
  
-        "4.0.5:intel19,ls-dyna": +        "15.0.2:single,hybrid,avx2": 
-            description:     Open MPI 4.0.5 for LS-DYNAIntel 2019+            description: 15.0.2, single-precisionHybrid (SMP+MPP), AVX2 
 +            prefix: 15.0.2/avx2/hyb/single
             dependencies:             dependencies:
-                - intel/2019+                - openmpi/4.0.5:intel19,ls-dyna 
 +        "15.0.2:double,hybrid,avx2": 
 +            description: 15.0.2, double-precision, Hybrid (SMP+MPP), AVX2 
 +            prefix: 15.0.2/avx2/hyb/double 
 +            dependencies: 
 +                - openmpi/4.0.5:intel19,ls-dyna
 </file> </file>
 +
 +Loading one of these packages into the shell environment makes the ''ls-dyna'' command (the symlink created during install) available:
 +
 +<code bash>
 +$ vpkg_require ls-dyna/single,hybrid,avx2
 +Adding dependency `intel/2019u5` to your environment
 +Adding dependency `libfabric/1.17.1` to your environment
 +Adding dependency `openmpi/4.0.5:intel19,ls-dyna` to your environment
 +Adding package `ls-dyna/15.0.2:single,avx2,hybrid` to your environment
 +
 +$ which ls-dyna
 +/work/group/sw/ls-dyna/15.0.2/avx2/hyb/single/ls-dyna
 +</code>
 +
 +===== Running jobs =====
 +
 +On the Caviness/DARWIN cluster, LS-DYNA computation must be submitted as a Slurm job.  The variants installed here use Open MPI, so the job script template at ''/opt/templates/slurm/generic/mpi/openmpi/openmpi.qs'' is a starting point for LS-DYNA jobs.  As in all cases for parallel jobs:
 +
 +  * The number of Slurm //tasks// represent the MPI ranks for a hybrid or MPP variant of LS-DYNA
 +  * The number of CPUs per Slurm task represent the Open MP threads for an smp or hybrid variant of LS-DYNA
 +
 +Follow the comments in the script header to determine which flags to alter and how to do so.  The script template must be altered to add the desired version/variant of LS-DYNA to the job environment:
 +
 +<code>
 +#
 +# [EDIT] Do any pre-processing, staging, environment setup with VALET
 +#        or explicit changes to PATH, LD_LIBRARY_PATH, etc.
 +#
 +vpkg_require ls-dyna/15.0.2:single,hybrid,avx2
 +</code>
 +
 +Toward the end of the job script template, the LS-DYNA program is run:
 +
 +<code>
 +#
 +# [EDIT] Execute your MPI program
 +#
 +${UD_MPIRUN} ls-dyna i=my_model.k
 +mpi_rc=$?
 +</code>
  • technical/recipes/ls-dyna.1717777981.txt.gz
  • Last modified: 2024-06-07 12:33
  • by frey