technical:recipes:gromacs-plumed

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:gromacs-plumed [2024-05-12 14:18] – [VALET Package Definition] bkangtechnical:recipes:gromacs-plumed [2024-05-12 15:03] (current) – [Scaling] bkang
Line 119: Line 119:
  
 vpkg_require cmake/default openmpi/4.1.5:intel-oneapi-2023 vpkg_require cmake/default openmpi/4.1.5:intel-oneapi-2023
 +
 +PREFIX="${G_INSTALL_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="$BASE_BUILD_FLAGS -DGMX_GPU=SYCL"
 +#    -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="double"
 + build_flags="${build_flags} -DGMX_DOUBLE=on"
 +    else
 +        build_dir="single"
 +        build_flags="${build_flags} -DGMX_DOUBLE=off"
 +    fi
 +    if [ $MPI -eq 0 ]; then
 +        build_dir="${build_dir}-thread"
 +        build_flags="${build_flags} -DGMX_MPI=off -DGMX_THREAD_MPI=on -DCMAKE_DISABLE_FIND_PACKAGE_MPI=on"
 +        CC=icx CXX=icpx FC=ifx
 +    else
 +        build_dir="${build_dir}-mpi"
 +        build_flags="${build_flags} -DGMX_MPI=on -DGMX_THREAD_MPI=off"
 + CC=mpicc CXX=mpicxx FC=mpifort
 +    fi
 +    [ -d "build-${build_dir}" ] && rm -rf "build-${build_dir}"
 +    mkdir "build-${build_dir}" ; pushd "build-${build_dir}"
 +    CC=$CC CXX=$CXX FC=$FC \
 +        cmake \
 +     -DCMAKE_INSTALL_PREFIX="${PREFIX}/${build_dir}" \
 +            $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.
 +##
 +#             DOUBLE?    MPI?
 +#build_variant 0          0
 +#build_variant 1          0
 +#build_variant 0          1
 +build_variant 1          1
 +
 +</file>
 +
 +<file make SWMGR-build.sh.caviness>
 +#!/bin/bash -l
 +
 +vpkg_require cmake/default openmpi/4.1.4:intel-oneapi-2023
  
 PREFIX="${G_INSTALL_PREFIX}" PREFIX="${G_INSTALL_PREFIX}"
Line 219: Line 290:
 The //package section// of the definition file includes items that apply to all versions/variants of the software: The //package section// of the definition file includes items that apply to all versions/variants of the software:
 <code yaml> <code yaml>
-quantum-espresso+Gromacs_Plumed
-    prefix: /home/user/sw/quantum-espresso +    prefix: /home/user/sw/Gromacs_Plumed/Gromacs 
-    description: quantum-espresso +    description: Gromacs_Plumed 
-    url: "https://www.quantum-espresso.org/"+    url: "https://www.gromacs.org/"
 </code> </code>
-The //package identifier// is the top-level key in the document — ''quantum-espresso'' — and the value of ''$QE_BASEDIR'' is the value of the ''prefix'' key in this section.  The URL and description are information taken from the official quantum-espresso web site.+The //package identifier// is the top-level key in the document — ''Gromacs_Plumed'' — and the value of ''$GP_BASEDIR'' is the value of the ''prefix'' key in this section.  The URL and description are information taken from the official Gromacs web site.
  
 ==== Versions ==== ==== Versions ====
Line 230: Line 301:
 The ''versions'' key is used to provide a list of the versions/variants of the software: The ''versions'' key is used to provide a list of the versions/variants of the software:
 <code yaml> <code yaml>
-quantum-espresso+gromacs-plumed
-    prefix: /home/user/sw/quantum-espresso +    prefix: /home/user/sw/Gromacs_Plumed/Gromacs 
-    description: quantum-espresso +    description: Gromacs_Plumed 
-    url: "https://www.quantum-espresso.org/"+    url: "https://www.gromacs.org/
 +     
 +    default-version: "v2022.5"
          
     versions:     versions:
-        "v7.3": +        "v2022.5": 
-            description: compiled with Open MPI, Intel compilers, MKL, ScaLAPACK+            prefix: "v2022.5/double-mpi" 
 +            description:  Gromacs patched with Plumed v2.8.3
             dependencies:             dependencies:
-                - openmpi/4.1.5:intel-oneapi-2023+                 - openmpi/4.1.5:intel-oneapi-2023
                                
 </code> </code>
  
 <WRAP center round tip 80%> <WRAP center round tip 80%>
-The version identifier ''v7.3'' is inferred to be the path prefix to the version in question here.  The package's prefix (''/home/user/sw/quantum-espresso'') with the version identifier appended (''/home/user/sw/quantum-espresso/v7.3'') is implicit.+The version identifier ''v7.3'' is inferred to be the path prefix to the version in question here.  The package's prefix (''/home/user/sw/Gromacs_Plumed'') with the version identifier appended (''/home/user/sw/Gromacs_Plumed/Gromacs/v2022.5'') is implicit.
  
 The implicit behavior is overridden by providing a ''prefix'' key in the version definition:  a relative path is appended to the package's prefix, an absolute path is used as-is. The implicit behavior is overridden by providing a ''prefix'' key in the version definition:  a relative path is appended to the package's prefix, an absolute path is used as-is.
Line 251: Line 325:
 It is a good idea to specify which version definition should act as the default.  This yields the following package definition file It is a good idea to specify which version definition should act as the default.  This yields the following package definition file
  
-<file yaml quantum-espresso.vpkg_yaml.darwin> +<file yaml gromacs-plumed.vpkg_yaml.darwin> 
-quantum-espresso+gromacs-plumed
-    prefix: /home/user/sw/quantum-espresso +    prefix: /home/user/sw/Gromacs_Plumed/Gromacs 
-    description: quantum-espresso +    description: Gromacs_Plumed 
-    url: "https://www.quantum-espresso.org/"+    url: "https://www.gromacs.org/"
          
-    default-version: "v7.3"+    default-version: "v2022.5"
          
     versions:     versions:
-        "v7.3": +        "v2022.5": 
-            description: compiled with Open MPI, Intel compilers, MKL, ScaLAPACK+            prefix: "v2022.5/double-mpi" 
 +            description:  Gromacs patched with Plumed v2.8.3
             dependencies:             dependencies:
-                - openmpi/4.1.5:intel-oneapi-2023+                 - openmpi/4.1.5:intel-oneapi-2023
 </file> </file>
  
-<file yaml quantum-espresso.vpkg_yaml.caviness> +<file yaml gromacs-plumed.vpkg_yaml.caviness> 
-quantum-espresso+gromacs-plumed
-    prefix: /home/user/sw/quantum-espresso +    prefix: /home/user/sw/Gromacs_Plumed/Gromacs 
-    description: quantum-espresso +    description: Gromacs_Plumed 
-    url: "https://www.quantum-espresso.org/+    url: "https://www.gromacs.org/"
-     +
-    default-version: "v7.3"+
          
 +    default-version: "v2022.5"
 +        
     versions:     versions:
-        "v7.3": +        "v2022.5": 
-            description: compiled with Open MPI, Intel compilers, MKL, ScaLAPACK+            prefix: "v2022.5/double-mpi" 
 +            description:  Gromacs patched with Plumed v2.8.3
             dependencies:             dependencies:
-                - openmpi/4.1.4:intel-oneapi-2023+                 - openmpi/4.1.4:intel-oneapi-2023
 </file> </file>
  
-saved at ''$VALET_PKG_DIR/quantum-espresso.vpkg_yaml''.+saved at ''$VALET_PKG_DIR/gromacs-plumed.vpkg_yaml''.
  
 ==== Checking the definition file ==== ==== Checking the definition file ====
Line 287: Line 363:
 The package definition file can be checked for proper syntax using the VALET command ''vpkg_check'': The package definition file can be checked for proper syntax using the VALET command ''vpkg_check'':
 <code bash> <code bash>
-[user@login00.darwin ~]$ vpkg_check "$VALET_PKG_DIR/quantum-espresso.vpkg_yaml" +[user@login00.darwin ~]$ vpkg_check "$VALET_PKG_DIR/gromacs-plumed.vpkg_yaml" 
-/home/user/.valet/quantum-espresso.vpkg_yaml is OK +/home/user/.valet/gromacs-plumed.vpkg_yaml is OK 
-[quantum-espresso] {+[gromacs-plumed] {
   contexts: all   contexts: all
   actions: {   actions: {
-    QUANTUM_DASH_ESPRESSO_PREFIX=${VALET_PATH_PREFIX} (contexts: development)+    GROMACS_PLUMED_PREFIX=${VALET_PATH_PREFIX} (contexts: development)
   }   }
-  https://www.quantum-espresso.org/ +  https://www.gromacs.org/ 
-  quantum-espresso +  Gromacs_Plumed 
-  prefix: /work/user/sw/quantum-espresso +  prefix: /home/user/sw/Gromacs_Plumed/Gromacs 
-  source file: /home/user/.valet/quantum-espresso.vpkg_yaml +  source file: /home/user/.valet/gromacs-plumed.vpkg_yaml 
-  default version: quantum-espresso/v7.3+  default version: gromacs-plumed/v2022.5
   versions: {   versions: {
-    [quantum-espresso/v7.3] {+    [gromacs-plumed/v2022.5] {
       contexts: all       contexts: all
       dependencies: {       dependencies: {
         openmpi/4.1.5:intel-oneapi-2023         openmpi/4.1.5:intel-oneapi-2023
       }       }
-      compiled with Open MPI, Intel compilers, MKL, ScaLAPACK +      Gromacs patched with Plumed v2.8.3 
-      prefix: /work/user/sw/quantum-espresso/v7.3+      prefix: /home/user/sw/Gromacs_Plumed/Gromacs/v2022.5/double-mpi 
 +      standard paths: { 
 +        bin: /home/user/sw/Gromacs_Plumed/Gromacs/v2022.5/double-mpi/bin 
 +        lib: /home/user/sw/Gromacs_Plumed/Gromacs/v2022.5/double-mpi/lib64 
 +        man: /home/user/sw/Gromacs_Plumed/Gromacs/v2022.5/double-mpi/share/man 
 +        include: /home/user/sw/Gromacs_Plumed/Gromacs/v2022.5/double-mpi/include 
 +      }
     }     }
   }   }
Line 316: Line 398:
 ==== Runtime environment ==== ==== Runtime environment ====
  
-To load **quantum-espresso** 7.into the runtime environment, the ''vpkg_require'' command is used:+To load **Gromacs_Plumed** v2022.into the runtime environment, the ''vpkg_require'' command is used:
 <code bash> <code bash>
-[user@login00.darwin ~]$ vpkg_require quantum-espresso/v7.3+[user@login00.darwin ~]$ vpkg_require gromacs-plumed/v2022.5
 Adding dependency `binutils/2.35.1` to your environment Adding dependency `binutils/2.35.1` to your environment
 Adding dependency `gcc/12.2.0` to your environment Adding dependency `gcc/12.2.0` to your environment
Line 324: Line 406:
 Adding dependency `ucx/1.13.1` to your environment Adding dependency `ucx/1.13.1` to your environment
 Adding dependency `openmpi/4.1.5:intel-oneapi-2023` to your environment Adding dependency `openmpi/4.1.5:intel-oneapi-2023` to your environment
-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/v2022.5/double-mpi/bin/gmx_mpi_d
 </code> </code>
  
 ===== Scaling ===== ===== Scaling =====
  
-This is the wall time for the structure relaxation of silicon with respect to the number of cores. The wall time decreases with an increased number of cores.+This is the wall time for MD run of 41057 atom, and nsteps=10000 with metadynamics by combining Gromacs and Plumed. The wall time decreases with an increased number of cores.
  
-{{:technical:recipes:scale.jpg?400|}}+{{:technical:recipes:scale_gromacs_plumed.jpg?400|}}
  • technical/recipes/gromacs-plumed.1715537896.txt.gz
  • Last modified: 2024-05-12 14:18
  • by bkang