Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
technical:recipes:ls-dyna [2024-06-07 11:09] – created 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 43: | Line 44: | ||
</ | </ | ||
+ | Downloading (or uploading) both packages, the attic directory now contains: | ||
+ | <code bash> | ||
+ | $ ls -l " | ||
+ | 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 99661023 Apr 7 22:15 ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405.tgz_extractor.sh | ||
+ | </ | ||
+ | |||
+ | In preparation for installing these packages, a hierarchy of directories must be created to hold the variants of R15.0.2. | ||
+ | |||
+ | * to promote a uniform organization between all versions of the software that get installed. | ||
+ | * to make it easy to add missing variants in the future. | ||
+ | |||
+ | The directory name matches the version, 15.0.2, with subdirectories for each option: | ||
+ | |||
+ | <code bash> | ||
+ | $ mkdir -p " | ||
+ | </ | ||
+ | |||
+ | ==== Install a variant ==== | ||
+ | |||
+ | The single-precision variant is installed by changing to its subdirectory (created above) and running the appropriate installation extractor: | ||
+ | |||
+ | <code bash> | ||
+ | $ pushd " | ||
+ | $ sh " | ||
+ | </ | ||
+ | |||
+ | There will be several files in the directory, including the LS-DYNA executable: | ||
+ | |||
+ | <code bash> | ||
+ | $ ls -l | ||
+ | total 154359 | ||
+ | -rwxr-xr-x 1 user group 11402168 Mar 29 18:05 ansyscl | ||
+ | -rwxr-xr-x 1 user group 219543680 Mar 29 18:14 ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405 | ||
+ | -rwxr-xr-x 1 user group 437864 Mar 29 18:14 ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405.l2a | ||
+ | </ | ||
+ | |||
+ | Since the executable has a rather complicated name, a symlink is created so that the command '' | ||
+ | |||
+ | <code bash> | ||
+ | $ ln -s ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405 ls-dyna | ||
+ | $ ls -l | ||
+ | total 154359 | ||
+ | -rwxr-xr-x 1 user group 11402168 Mar 29 18:05 ansyscl | ||
+ | lrwxrwxrwx 1 user group 59 Jun 7 10:40 ls-dyna -> ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405 | ||
+ | -rwxr-xr-x 1 user group 219543680 Mar 29 18:14 ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405 | ||
+ | -rwxr-xr-x 1 user group 437864 Mar 29 18:14 ls-dyna_hyb_s_R15_0_2_x64_centos79_ifort190_avx2_openmpi405.l2a | ||
+ | $ popd | ||
+ | </ | ||
+ | |||
+ | This variant of LS-DYNA R15.0.2 is now installed, but there are underlying prerequisites to its usability: | ||
+ | |||
+ | ==== 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. | ||
+ | |||
+ | ===== 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=$? | ||
+ | </ |