Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
technical:recipes:gromacs-plumed [2024-05-12 13:41] – [Compilation and Installation: Plumed-patched Gromacs] bkang | technical:recipes:gromacs-plumed [2024-05-12 15:03] (current) – [Scaling] bkang | ||
---|---|---|---|
Line 93: | Line 93: | ||
[user@login00.darwin Gromacs]$ G_SRC_PREFIX=" | [user@login00.darwin Gromacs]$ G_SRC_PREFIX=" | ||
[user@login00.darwin Gromacs]$ mkdir -m $GP_BASEDIR_PRIVS " | [user@login00.darwin Gromacs]$ mkdir -m $GP_BASEDIR_PRIVS " | ||
+ | [user@login00.darwin Gromacs]$ G_BUILDDIR=" | ||
+ | [user@login00.darwin Gromacs]$ mkdir -m $GP_BASEDIR_PRIVS " | ||
[user@login00.darwin Gromacs]$ cd " | [user@login00.darwin Gromacs]$ cd " | ||
+ | </ | ||
+ | Hear, we patch Plumed on Gromacs. | ||
+ | <code bash> | ||
+ | [user@login00.darwin gromacs-2022.5]$ plumed patch -p --static | ||
+ | </ | ||
- | [user@login00.darwin plumed-2.8.3]$ vpkg_devrequire openmpi/4.1.5:intel-oneapi-2023 | + | Select 4: |
- | [user@login00.darwin plumed-2.8.3]$ ./configure --prefix=$P_INSTALL_PREFIX | + | <code bash> |
- | [user@login00.darwin plumed-2.8.3]$ make | + | 1) gromacs-2019.6 5) gromacs-4.5.7 9) qespresso-5.0.2 |
- | [user@login00.darwin plumed-2.8.3]$ make install | + | 2) gromacs-2020.7 6) namd-2.12 10) qespresso-6.2 |
+ | 3) gromacs-2021.7 7) namd-2.13 | ||
+ | 4) gromacs-2022.5 8) namd-2.14 | ||
</ | </ | ||
- | Our current working directory is now the source directory. | ||
- | Here, we create '' | ||
- | <file make sourceme.sh> | ||
- | TPATH=" | ||
- | export PATH=" | ||
- | export LIBRARY_PATH=" | ||
- | export LD_LIBRARY_PATH=" | ||
- | export PLUMED_KERNEL=" | ||
- | export PLUMED_VIMPATH=" | ||
- | export PYTHONPATH=" | ||
- | export CPATH="$TPATH/include/:$CPATH” | + | <code bash> |
- | export INCLUDE="$TPATH/include/:$INCLUDE” | + | [user@login00.darwin gromacs-2022.5]$ cd "$G_BUILDDIR" |
+ | </code> | ||
+ | Our current working directory is now the //build root//. | ||
+ | Here, we create '' | ||
+ | <file make SWMGR-build.sh.darwin> | ||
+ | #!/bin/bash -l | ||
+ | |||
+ | vpkg_require cmake/ | ||
+ | |||
+ | PREFIX=" | ||
+ | |||
+ | CPU_GMX_SIMD=AVX2_256 | ||
+ | |||
+ | BASE_BUILD_FLAGS=" | ||
+ | -DCMAKE_BUILD_TYPE=Release | ||
+ | -DGMX_SIMD=${CPU_GMX_SIMD} | ||
+ | -DGMX_FFT_LIBRARY=mkl | ||
+ | -DMKL_MPI=openmpi | ||
+ | -DBUILD_SHARED_LIBS=OFF | ||
+ | -DGMX_PREFER_STATIC_LIBS=ON | ||
+ | " | ||
+ | # BASE_BUILD_FLAGS=" | ||
+ | # -DMKL_INCLUDE_DIR=$MKLROOT/include | ||
+ | # -DMKL_LIBRARIES=-mkl=sequential | ||
+ | #" | ||
+ | |||
+ | build_variant() | ||
+ | { | ||
+ | local DBL=$1 MPI=$2 | ||
+ | local build_dir="" | ||
+ | local build_flags="" | ||
+ | |||
+ | if [ $DBL -ne 0 ]; then | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | else | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | fi | ||
+ | if [ $MPI -eq 0 ]; then | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | CC=icx CXX=icpx FC=ifx | ||
+ | else | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | CC=mpicc CXX=mpicxx FC=mpifort | ||
+ | fi | ||
+ | [ -d " | ||
+ | mkdir " | ||
+ | CC=$CC CXX=$CXX FC=$FC \ | ||
+ | cmake \ | ||
+ | -DCMAKE_INSTALL_PREFIX=" | ||
+ | $BASE_BUILD_FLAGS $build_flags \ | ||
+ | ../.. | ||
+ | if [ $? -eq 0 ]; then | ||
+ | make -j 20 | ||
+ | if [ $? -eq 0 ]; then | ||
+ | make install | ||
+ | fi | ||
+ | fi | ||
+ | popd | ||
+ | } | ||
+ | |||
+ | ## | ||
+ | ## SYCL only supports single precision. | ||
+ | ## | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | build_variant 1 1 | ||
</ | </ | ||
+ | <file make SWMGR-build.sh.caviness> | ||
+ | #!/bin/bash -l | ||
+ | |||
+ | vpkg_require cmake/ | ||
+ | |||
+ | PREFIX=" | ||
+ | |||
+ | CPU_GMX_SIMD=AVX2_256 | ||
+ | |||
+ | BASE_BUILD_FLAGS=" | ||
+ | -DCMAKE_BUILD_TYPE=Release | ||
+ | -DGMX_SIMD=${CPU_GMX_SIMD} | ||
+ | -DGMX_FFT_LIBRARY=mkl | ||
+ | -DMKL_MPI=openmpi | ||
+ | -DBUILD_SHARED_LIBS=OFF | ||
+ | -DGMX_PREFER_STATIC_LIBS=ON | ||
+ | " | ||
+ | # BASE_BUILD_FLAGS=" | ||
+ | # -DMKL_INCLUDE_DIR=$MKLROOT/ | ||
+ | # -DMKL_LIBRARIES=-mkl=sequential | ||
+ | #" | ||
+ | |||
+ | build_variant() | ||
+ | { | ||
+ | local DBL=$1 MPI=$2 | ||
+ | local build_dir="" | ||
+ | local build_flags="" | ||
+ | |||
+ | if [ $DBL -ne 0 ]; then | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | else | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | fi | ||
+ | if [ $MPI -eq 0 ]; then | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | CC=icx CXX=icpx FC=ifx | ||
+ | else | ||
+ | build_dir=" | ||
+ | build_flags=" | ||
+ | CC=mpicc CXX=mpicxx FC=mpifort | ||
+ | fi | ||
+ | [ -d " | ||
+ | mkdir " | ||
+ | CC=$CC CXX=$CXX FC=$FC \ | ||
+ | cmake \ | ||
+ | -DCMAKE_INSTALL_PREFIX=" | ||
+ | $BASE_BUILD_FLAGS $build_flags \ | ||
+ | ../.. | ||
+ | if [ $? -eq 0 ]; then | ||
+ | make -j 20 | ||
+ | if [ $? -eq 0 ]; then | ||
+ | make install | ||
+ | fi | ||
+ | fi | ||
+ | popd | ||
+ | } | ||
+ | |||
+ | ## | ||
+ | ## SYCL only supports single precision. | ||
+ | ## | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | build_variant 1 1 | ||
+ | |||
+ | </ | ||
- | Executing the script. | + | Executing the script |
<code bash> | <code bash> | ||
- | [user@login00.darwin | + | [user@login00.darwin |
</ | </ | ||
===== VALET Package Definition ===== | ===== VALET Package Definition ===== | ||
- | With this version of quantum espresso | + | With this version of Gromacs_Plumed |
<code bash> | <code bash> | ||
[user@login00.darwin build]$ vpkg_rollback all | [user@login00.darwin build]$ vpkg_rollback all | ||
[user@login00.darwin build]$ cd | [user@login00.darwin build]$ cd | ||
- | [user@login00.darwin ~]$ echo $QE_BASEDIR | + | [user@login00.darwin ~]$ echo $GP_BASEDIR |
- | / | + | / |
</ | </ | ||
Since this build was done in the user's home directory, they were personal copies of the software and should use a //VALET package definition file// stored in '' | Since this build was done in the user's home directory, they were personal copies of the software and should use a //VALET package definition file// stored in '' | ||
Line 149: | Line 290: | ||
The //package section// of the definition file includes items that apply to all versions/ | The //package section// of the definition file includes items that apply to all versions/ | ||
<code yaml> | <code yaml> | ||
- | quantum-espresso: | + | Gromacs_Plumed: |
- | prefix: / | + | prefix: / |
- | description: | + | description: |
- | url: " | + | url: " |
</ | </ | ||
- | The //package identifier// | + | The //package identifier// |
==== Versions ==== | ==== Versions ==== | ||
Line 160: | Line 301: | ||
The '' | The '' | ||
<code yaml> | <code yaml> | ||
- | quantum-espresso: | + | gromacs-plumed: |
- | prefix: / | + | prefix: / |
- | description: | + | description: |
- | url: " | + | url: " |
+ | |||
+ | default-version: | ||
| | ||
versions: | versions: | ||
- | "v7.3": | + | "v2022.5": |
- | description: | + | prefix: " |
+ | description: | ||
dependencies: | dependencies: | ||
- | | + | - openmpi/ |
</ | </ | ||
<WRAP center round tip 80%> | <WRAP center round tip 80%> | ||
- | The version identifier '' | + | The version identifier '' |
The implicit behavior is overridden by providing a '' | The implicit behavior is overridden by providing a '' | ||
Line 181: | Line 325: | ||
It is a good idea to specify which version definition should act as the default. | It is a good idea to specify which version definition should act as the default. | ||
- | <file yaml quantum-espresso.vpkg_yaml.darwin> | + | <file yaml gromacs-plumed.vpkg_yaml.darwin> |
- | quantum-espresso: | + | gromacs-plumed: |
- | prefix: / | + | prefix: / |
- | description: | + | description: |
- | url: " | + | url: " |
| | ||
- | default-version: | + | default-version: |
| | ||
versions: | versions: | ||
- | "v7.3": | + | "v2022.5": |
- | description: | + | prefix: " |
+ | description: | ||
dependencies: | dependencies: | ||
- | | + | - openmpi/ |
</ | </ | ||
- | <file yaml quantum-espresso.vpkg_yaml.caviness> | + | <file yaml gromacs-plumed.vpkg_yaml.caviness> |
- | quantum-espresso: | + | gromacs-plumed: |
- | prefix: / | + | prefix: / |
- | description: | + | description: |
- | url: " | + | url: " |
- | + | ||
- | default-version: | + | |
| | ||
+ | default-version: | ||
+ | | ||
versions: | versions: | ||
- | "v7.3": | + | "v2022.5": |
- | description: | + | prefix: " |
+ | description: | ||
dependencies: | dependencies: | ||
- | | + | - openmpi/ |
</ | </ | ||
- | saved at '' | + | saved at '' |
==== Checking the definition file ==== | ==== Checking the definition file ==== | ||
Line 217: | Line 363: | ||
The package definition file can be checked for proper syntax using the VALET command '' | The package definition file can be checked for proper syntax using the VALET command '' | ||
<code bash> | <code bash> | ||
- | [user@login00.darwin ~]$ vpkg_check " | + | [user@login00.darwin ~]$ vpkg_check " |
- | / | + | / |
- | [quantum-espresso] { | + | [gromacs-plumed] { |
contexts: all | contexts: all | ||
actions: { | actions: { | ||
- | | + | |
} | } | ||
- | https:// | + | https:// |
- | | + | |
- | prefix: /work/user/sw/quantum-espresso | + | prefix: /home/user/sw/Gromacs_Plumed/ |
- | source file: / | + | source file: / |
- | default version: | + | default version: |
versions: { | versions: { | ||
- | [quantum-espresso/v7.3] { | + | [gromacs-plumed/v2022.5] { |
contexts: all | contexts: all | ||
dependencies: | dependencies: | ||
openmpi/ | openmpi/ | ||
} | } | ||
- | | + | |
- | prefix: /work/user/sw/quantum-espresso/v7.3 | + | prefix: /home/user/sw/Gromacs_Plumed/ |
+ | standard paths: { | ||
+ | bin: / | ||
+ | lib: / | ||
+ | man: / | ||
+ | include: / | ||
+ | } | ||
} | } | ||
} | } | ||
Line 246: | Line 398: | ||
==== Runtime environment ==== | ==== Runtime environment ==== | ||
- | To load **quantum-espresso** 7.3 into the runtime environment, | + | To load **Gromacs_Plumed** v2022.5 into the runtime environment, |
<code bash> | <code bash> | ||
- | [user@login00.darwin ~]$ vpkg_require | + | [user@login00.darwin ~]$ vpkg_require |
Adding dependency `binutils/ | Adding dependency `binutils/ | ||
Adding dependency `gcc/ | Adding dependency `gcc/ | ||
Line 254: | Line 406: | ||
Adding dependency `ucx/ | Adding dependency `ucx/ | ||
Adding dependency `openmpi/ | Adding dependency `openmpi/ | ||
- | Adding package `quantum-espresso/v7.3` to your environment | + | Adding package `gromacs-plumed/v2022.5` to your environment |
- | [user@login00.darwin ~]$ which pw.x | + | [user@login00.darwin ~]$ which gmx_mpi_d |
- | ~/sw/quantum-espresso/v7.3/bin/pw.x | + | ~/sw/Gromacs_Plumed/Gromacs/ |
</ | </ | ||
===== Scaling ===== | ===== Scaling ===== | ||
- | This is the wall time for the structure relaxation | + | This is the wall time for MD run of 41057 atom, and nsteps=10000 |
- | {{: | + | {{: |