Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
technical:recipes:ls-dyna [2024-06-07 11:28] – [Directory Organization] frey | technical: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' | For this example, LS-DYNA will be installed in a workgroup' | ||
- | ====== Directory | + | ===== Directory |
- | The LS-DYNA software packages must be downloaded to the cluster. | + | The LS-DYNA software packages must be downloaded to the cluster. |
<code bash> | <code bash> | ||
- | $ mkdir -p " | + | $ LS_DYNA_PREFIX=" |
+ | $ mkdir -p " | ||
</ | </ | ||
Line 32: | Line 33: | ||
<code bash> | <code bash> | ||
- | $ wget --directory-prefix=" | + | $ wget --directory-prefix=" |
| | ||
'< | '< | ||
Line 46: | Line 47: | ||
<code bash> | <code bash> | ||
- | $ ls -l "${WORKDIR}/sw/ls-dyna/ | + | $ ls -l "${LS_DYNA_PREFIX}/ |
total 234420 | total 234420 | ||
-rw-r--r-- 1 user group 140454912 Apr 7 22:15 ls-dyna_hyb_d_R15_0_2_x64_centos79_ifort190_avx2_openmpi405.tgz_extractor.sh | -rw-r--r-- 1 user group 140454912 Apr 7 22:15 ls-dyna_hyb_d_R15_0_2_x64_centos79_ifort190_avx2_openmpi405.tgz_extractor.sh | ||
Line 60: | Line 61: | ||
<code bash> | <code bash> | ||
- | $ mkdir -p "${WORKDIR}/sw/ls-dyna/ | + | $ mkdir -p "${LS_DYNA_PREFIX}/ |
</ | </ | ||
- | ====== Install a variant | + | ==== Install a variant ==== |
The single-precision variant is installed by changing to its subdirectory (created above) and running the appropriate installation extractor: | The single-precision variant is installed by changing to its subdirectory (created above) and running the appropriate installation extractor: | ||
<code bash> | <code bash> | ||
- | $ pushd "${WORKDIR}/sw/ls-dyna/ | + | $ pushd "${LS_DYNA_PREFIX}/ |
- | $ sh "${WORKDIR}/sw/ls-dyna/ | + | $ sh "${LS_DYNA_PREFIX}/ |
</ | </ | ||
Line 97: | Line 98: | ||
This variant of LS-DYNA R15.0.2 is now installed, but there are underlying prerequisites to its usability: | This variant of LS-DYNA R15.0.2 is now installed, but there are underlying prerequisites to its usability: | ||
- | ====== Install additional variants | + | ==== Install additional variants ==== |
- | For each additional variant of R15.0.2, the steps above are repeated with the appropriate modifications to the paths and file names. | + | For each additional variant of R15.0.2, the steps above are repeated with the appropriate modifications to the paths and file names. |
+ | ===== Prerequisites ===== | ||
+ | |||
+ | As mentioned, the variants installed in this recipe are built atop Open MPI. As the file names indicate (and as documented in the R15.0.2 release notes), Open MPI 4.0.5 and the Intel 2019 compiler were used to build the two variants in question. | ||
+ | |||
+ | ==== Open MPI install ==== | ||
+ | |||
+ | The procedure is presented as succinctly as possible and starts with setup of the directories and unpacking of the source code: | ||
+ | |||
+ | <code bash> | ||
+ | $ mkdir -p " | ||
+ | $ wget --directory-prefix=" | ||
+ | https:// | ||
+ | $ mkdir -p " | ||
+ | $ pushd " | ||
+ | $ tar -xf " | ||
+ | $ cd openmpi-4.0.5 | ||
+ | $ mkdir build-intel19-ls-dyna | ||
+ | $ cd build-intel19-ls-dyna | ||
+ | $ vpkg_rollback | ||
+ | </ | ||
+ | |||
+ | For Caviness, the OFI libfabric communications library is used | ||
+ | |||
+ | <code bash> | ||
+ | $ vpkg_devrequire intel/2019 libfabric/ | ||
+ | $ ../ | ||
+ | --with-lustre --with-io-romio-flags=--with-file-system=ufs+nfs+lustre \ | ||
+ | --with-libfabric=" | ||
+ | CC=icc CXX=icpc FC=ifort | ||
+ | </ | ||
+ | |||
+ | versus the OS-provided UCX library used on DARWIN | ||
+ | |||
+ | <code bash> | ||
+ | $ vpkg_devrequire intel/2019 | ||
+ | $ ../ | ||
+ | --with-hwloc=/ | ||
+ | --with-pmix=/ | ||
+ | --with-libevent=/ | ||
+ | --with-lustre \ | ||
+ | --with-io-romio-flags=" | ||
+ | CC=icc CXX=icpc FC=ifort | ||
+ | </ | ||
+ | |||
+ | If the configuration is successful, the software can be built and installed (this will take some time): | ||
+ | |||
+ | <code bash> | ||
+ | $ make | ||
+ | $ make install | ||
+ | $ vpkg_rollback | ||
+ | $ popd | ||
+ | </ | ||
+ | |||
+ | There are likely local configuration details associated with Open MPI that are effected via the Open MPI configuration files. | ||
+ | |||
+ | <code bash> | ||
+ | $ cp -f / | ||
+ | </ | ||
+ | |||
+ | versus on DARWIN | ||
+ | |||
+ | <code bash> | ||
+ | $ cp -f / | ||
+ | </ | ||
+ | |||
+ | === VALET package definition === | ||
+ | |||
+ | To make this version of Open MPI available to your LS-DYNA installs, a VALET package definition file should be created. | ||
+ | |||
+ | <WRAP center round alert 80%> | ||
+ | If the workgroup already has an existing '' | ||
+ | </ | ||
+ | |||
+ | For the configuration made on Caviness above: | ||
+ | |||
+ | <file yaml openmpi.vpkg_yaml> | ||
+ | openmpi: | ||
+ | description: | ||
+ | url: | ||
+ | prefix: | ||
+ | versions: | ||
+ | " | ||
+ | description: | ||
+ | dependencies: | ||
+ | - intel/2019 | ||
+ | - libfabric/ | ||
+ | </ | ||
+ | |||
+ | On DARWIN, the file is slightly different. | ||
+ | |||
+ | <file yaml openmpi.vpkg_yaml> | ||
+ | openmpi: | ||
+ | description: | ||
+ | url: | ||
+ | prefix: | ||
+ | versions: | ||
+ | " | ||
+ | description: | ||
+ | dependencies: | ||
+ | - intel/2019 | ||
+ | </ | ||
+ | |||
+ | ===== VALET package definition ===== | ||
+ | |||
+ | With the necessary dependencies satisfied, a VALET package definition for LS-DYNA can be created. | ||
+ | |||
+ | <code bash> | ||
+ | $ echo $LS_DYNA_PREFIX | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | The ''< | ||
+ | |||
+ | <file yaml ls-dyna.vpkg_yaml> | ||
+ | ls-dyna: | ||
+ | prefix: < | ||
+ | url: http:// | ||
+ | description: | ||
+ | |||
+ | actions: | ||
+ | - variable: LSTC_LICENSE | ||
+ | action: set | ||
+ | value: network | ||
+ | - variable: LSTC_LICENSE_SERVER | ||
+ | action: set | ||
+ | value: < | ||
+ | - variable: LSTC_INTERNAL_CLIENT | ||
+ | action: set | ||
+ | value: off | ||
+ | - variable: LSTC_ROOT | ||
+ | action: set | ||
+ | value: ${VALET_PATH_PREFIX} | ||
+ | - bindir: ${VALET_PATH_PREFIX} | ||
+ | |||
+ | default-version: | ||
+ | |||
+ | versions: | ||
+ | |||
+ | " | ||
+ | description: | ||
+ | prefix: 15.0.2/ | ||
+ | dependencies: | ||
+ | - openmpi/ | ||
+ | " | ||
+ | description: | ||
+ | prefix: 15.0.2/ | ||
+ | dependencies: | ||
+ | - openmpi/ | ||
+ | </ | ||
+ | |||
+ | Loading one of these packages into the shell environment makes the '' | ||
+ | |||
+ | <code bash> | ||
+ | $ vpkg_require ls-dyna/ | ||
+ | Adding dependency `intel/ | ||
+ | Adding dependency `libfabric/ | ||
+ | Adding dependency `openmpi/ | ||
+ | Adding package `ls-dyna/ | ||
+ | |||
+ | $ which ls-dyna | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | ===== Running jobs ===== | ||
+ | |||
+ | On the Caviness/ | ||
+ | |||
+ | * 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/ | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # [EDIT] Do any pre-processing, | ||
+ | # or explicit changes to PATH, LD_LIBRARY_PATH, | ||
+ | # | ||
+ | vpkg_require ls-dyna/ | ||
+ | </ | ||
+ | |||
+ | Toward the end of the job script template, the LS-DYNA program is run: | ||
+ | |||
+ | < | ||
+ | # | ||
+ | # [EDIT] Execute your MPI program | ||
+ | # | ||
+ | ${UD_MPIRUN} ls-dyna i=my_model.k | ||
+ | mpi_rc=$? | ||
+ | </ |