From ed11bb8c2ffdbba3409ba84369283df58e6f2fe1 Mon Sep 17 00:00:00 2001 From: Rocco Meli Date: Mon, 1 Jul 2024 10:00:52 +0200 Subject: [PATCH] CP2K 2024.1 (zen2) (#115) CP2K uenv with version 2024.1 for Eiger. elpa and inetel-oneapi-mkl are standard packages from Spack containing the latest updates. --- config.yaml | 2 + docs/uenv-cp2k.md | 4 + recipes/cp2k/2024.1/mc/compilers.yaml | 5 + recipes/cp2k/2024.1/mc/config.yaml | 6 + recipes/cp2k/2024.1/mc/environments.yaml | 36 +++ recipes/cp2k/2024.1/mc/modules.yaml | 21 ++ .../mc/repo/packages/cosma/fj-ssl2.patch | 104 +++++++ .../mc/repo/packages/cosma/mpi-view.patch | 13 + .../2024.1/mc/repo/packages/cosma/package.py | 135 ++++++++ .../mc/repo/packages/costa/mpi-view.patch | 13 + .../2024.1/mc/repo/packages/costa/package.py | 77 +++++ .../mc/repo/packages/elpa/fujitsu.patch | 65 ++++ .../2024.1/mc/repo/packages/elpa/package.py | 234 ++++++++++++++ .../repo/packages/intel-oneapi-mkl/package.py | 287 ++++++++++++++++++ 14 files changed, 1002 insertions(+) create mode 100644 recipes/cp2k/2024.1/mc/compilers.yaml create mode 100644 recipes/cp2k/2024.1/mc/config.yaml create mode 100644 recipes/cp2k/2024.1/mc/environments.yaml create mode 100644 recipes/cp2k/2024.1/mc/modules.yaml create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/cosma/fj-ssl2.patch create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/cosma/mpi-view.patch create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/cosma/package.py create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/costa/mpi-view.patch create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/costa/package.py create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/elpa/fujitsu.patch create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/elpa/package.py create mode 100644 recipes/cp2k/2024.1/mc/repo/packages/intel-oneapi-mkl/package.py diff --git a/config.yaml b/config.yaml index a8c498a3..5a344e17 100644 --- a/config.yaml +++ b/config.yaml @@ -76,9 +76,11 @@ uenvs: "2024.1": recipes: gh200: 2024.1/gh200 + zen2: 2024.1/mc deploy: santis: [gh200] todi: [gh200] + eiger: [zen2] develop: False icon-wcp: "v1": diff --git a/docs/uenv-cp2k.md b/docs/uenv-cp2k.md index 5d48145a..cb0d96b3 100644 --- a/docs/uenv-cp2k.md +++ b/docs/uenv-cp2k.md @@ -49,6 +49,10 @@ ninja -j 32 `cp2k@2024.1` does not support compiling for `cuda_arch=90`. Use `-DCP2K_WITH_GPU=A100` instead. +!!! note + + On `x86` we deploy with `intel-oneapi-mkl`. Add `-DCP2K_SCALAPACK_VENDOR=MKL` to the CMake invocation. + See [CP2K `README_cmake.md`](https://github.com/cp2k/cp2k/blob/master/README_cmake.md) for more details. [CP2K]: https://www.cp2k.org/ diff --git a/recipes/cp2k/2024.1/mc/compilers.yaml b/recipes/cp2k/2024.1/mc/compilers.yaml new file mode 100644 index 00000000..0dca2adf --- /dev/null +++ b/recipes/cp2k/2024.1/mc/compilers.yaml @@ -0,0 +1,5 @@ +bootstrap: + spec: gcc@12 +gcc: + specs: + - gcc@12.3 diff --git a/recipes/cp2k/2024.1/mc/config.yaml b/recipes/cp2k/2024.1/mc/config.yaml new file mode 100644 index 00000000..1b34060d --- /dev/null +++ b/recipes/cp2k/2024.1/mc/config.yaml @@ -0,0 +1,6 @@ +name: cp2k +store: /user-environment +spack: + repo: https://github.com/spack/spack.git + commit: v0.22.0 +modules: True diff --git a/recipes/cp2k/2024.1/mc/environments.yaml b/recipes/cp2k/2024.1/mc/environments.yaml new file mode 100644 index 00000000..35fb39ac --- /dev/null +++ b/recipes/cp2k/2024.1/mc/environments.yaml @@ -0,0 +1,36 @@ +cp2k: + compiler: + - toolchain: gcc + spec: gcc@12.3 + unify: true + specs: + - cmake + - ninja + - intel-oneapi-mkl +cluster +gfortran mpi_family=mpich threads=openmp + - libxc + - libint + - spglib + - spla ^intel-oneapi-mkl + - elpa ^intel-oneapi-mkl + # COSMA dependencies (need to be in the develop view) + - costa ^intel-oneapi-mkl + - cosma ^intel-oneapi-mkl + # SIRIUS dependencies (need to be in the develop view) + - hdf5 + - spfft ^intel-oneapi-mkl + - sirius ~memory_pool ^intel-oneapi-mkl + # cuda_arch=90 not yet supported by DBCSR and CP2K + - dbcsr ^intel-oneapi-mkl + - cp2k@2024.1 +libxc +libint +spglib +cosma +spla +elpa +sirius lmax=5 build_system=cmake ^intel-oneapi-mkl + variants: + - +mpi + - +openmp + - build_type=Release + mpi: + spec: cray-mpich + views: + develop: + link: roots + exclude: ["cp2k"] + cp2k: + link: roots diff --git a/recipes/cp2k/2024.1/mc/modules.yaml b/recipes/cp2k/2024.1/mc/modules.yaml new file mode 100644 index 00000000..910cda25 --- /dev/null +++ b/recipes/cp2k/2024.1/mc/modules.yaml @@ -0,0 +1,21 @@ +modules: + prefix_inspections: + bin: + - PATH + lib: + - LD_LIBRARY_PATH + lib64: + - LD_LIBRARY_PATH + + default: + arch_folder: false + roots: + tcl: /user-environment/modules + tcl: + all: + autoload: none + hash_length: 0 + exclude_implicits: true + exclude: ['%gcc@7.5.0', 'gcc %gcc@7.5.0'] + projections: + all: '{name}/{version}' diff --git a/recipes/cp2k/2024.1/mc/repo/packages/cosma/fj-ssl2.patch b/recipes/cp2k/2024.1/mc/repo/packages/cosma/fj-ssl2.patch new file mode 100644 index 00000000..3e09383d --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/cosma/fj-ssl2.patch @@ -0,0 +1,104 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1fd1e55..41a041b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -19,7 +19,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS "YES") # always write compile_commands.json + + set(COSMA_GPU_BACKENDS_LIST "CUDA" "ROCM") + set(COSMA_SCALAPACK_LIST "OFF" "MKL" "CRAY_LIBSCI" "CUSTOM") +-set(COSMA_BLAS_LIST "auto" "MKL" "OPENBLAS" "CRAY_LIBSCI" "CUSTOM" "BLIS" "ATLAS" "CUDA" "ROCM" "OFF") ++set(COSMA_BLAS_LIST "auto" "MKL" "SSL2" "OPENBLAS" "CRAY_LIBSCI" "CUSTOM" "BLIS" "ATLAS" "CUDA" "ROCM" "OFF") + option(COSMA_WITH_TESTS "Generate the test target." ON) + option(COSMA_WITH_APPS "Generate the miniapp targets." ON) + option(COSMA_WITH_BENCHMARKS "Generate the benchmark targets." ON) +@@ -45,7 +45,7 @@ if (COSMA_BLAS MATCHES "CUDA|ROCM") + set(COSMA_GPU_BACKEND ${COSMA_BLAS}) + else() + if(COSMA_BLAS STREQUAL "OFF") +- message(FATAL_ERROR "A Blas implementation is needed when running on CPU only: choices are : auto, MKL, OPENBLAS, CRAY_LIBSCI, CUSTOM, BLIS, ATLAS, FLEXIBLAS, ARMPL, GenericBLAS") ++ message(FATAL_ERROR "A Blas implementation is needed when running on CPU only: choices are : auto, MKL, SSL2, OPENBLAS, CRAY_LIBSCI, CUSTOM, BLIS, ATLAS, FLEXIBLAS, ARMPL, GenericBLAS") + else() + set(COSMA_BLAS_VENDOR ${COSMA_BLAS}) + endif() +@@ -190,6 +190,7 @@ install(FILES "${cosma_BINARY_DIR}/cosmaConfig.cmake" + "${cosma_BINARY_DIR}/cosmaConfigVersion.cmake" + "${cosma_BINARY_DIR}/cosmaConfigVersion.cmake" + "${cosma_SOURCE_DIR}/cmake/FindMKL.cmake" ++ "${cosma_SOURCE_DIR}/cmake/FindSSL2.cmake" + "${cosma_SOURCE_DIR}/cmake/FindBlas.cmake" + "${cosma_SOURCE_DIR}/cmake/FindSCALAPACK.cmake" + "${cosma_SOURCE_DIR}/cmake/FindOPENBLAS.cmake" +diff --git a/cmake/FindBlas.cmake b/cmake/FindBlas.cmake +index aef956c..3c47561 100644 +--- a/cmake/FindBlas.cmake ++++ b/cmake/FindBlas.cmake +@@ -14,6 +14,7 @@ endif() + set(COSMA_BLAS_VENDOR_LIST + "auto" + "MKL" ++ "SSL2" + "OPENBLAS" + "FLEXIBLAS" + "ARMPL" +diff --git a/cmake/FindSSL2.cmake b/cmake/FindSSL2.cmake +new file mode 100644 +index 0000000..f0e11bf +--- /dev/null ++++ b/cmake/FindSSL2.cmake +@@ -0,0 +1,56 @@ ++#.rst: ++# FindSSL2 ++# ----------- ++# ++# This module tries to find the SSL2 library. ++# ++# The following variables are set ++# ++# :: ++# ++# SSL2_FOUND - True if ssl2 is found ++# SSL2_LIBRARIES - The required libraries ++# SSL2_INCLUDE_DIRS - The required include directory ++# ++# The following import target is created ++# ++# :: ++# ++# SSL2::ssl2 ++ ++#set paths to look for library from ROOT variables.If new policy is set, find_library() automatically uses them. ++# if(NOT POLICY CMP0074) ++set(_SSL2_PATHS ${SSL2_ROOT} ++ $ENV{SSL2_ROOT} ++ $ENV{SSL2ROOT} ++ $ENV{SSL2_DIR} ++ $ENV{SSL2DIR}) ++# endif() ++ ++find_library( ++ COSMA_SSL2_LINK_LIBRARIES ++ NAMES "fjlapackex" ++ HINTS ${_SSL2_PATHS} ++ PATH_SUFFIXES "lib64" ++) ++find_path( ++ COSMA_SSL2_INCLUDE_DIRS ++ NAMES "cblas.h" ++ HINTS ${_SSL2_PATHS} ++ PATH_SUFFIXES "include" ++) ++ ++# check if found ++include(FindPackageHandleStandardArgs) ++find_package_handle_standard_args(SSL2 REQUIRED_VARS COSMA_SSL2_INCLUDE_DIRS COSMA_SSL2_LINK_LIBRARIES) ++ ++# add target to link against ++if(NOT TARGET cosma::BLAS::SSL2::ssl2) ++ add_library(cosma::BLAS::SSL2::ssl2 INTERFACE IMPORTED) ++ add_library(cosma::BLAS::SSL2::blas ALIAS cosma::BLAS::SSL2::ssl2) ++endif() ++set_property(TARGET cosma::BLAS::SSL2::ssl2 PROPERTY INTERFACE_LINK_LIBRARIES ${COSMA_SSL2_LINK_LIBRARIES}) ++set_property(TARGET cosma::BLAS::SSL2::ssl2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${COSMA_SSL2_INCLUDE_DIRS}) ++ ++# prevent clutter in cache ++MARK_AS_ADVANCED(SSL2_FOUND SSL2_LIBRARIES SSL2_INCLUDE_DIRS) diff --git a/recipes/cp2k/2024.1/mc/repo/packages/cosma/mpi-view.patch b/recipes/cp2k/2024.1/mc/repo/packages/cosma/mpi-view.patch new file mode 100644 index 00000000..ef6a2857 --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/cosma/mpi-view.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/cosmaConfig.cmake.in b/cmake/cosmaConfig.cmake.in +index cf7038f..1527c53 100644 +--- a/cmake/cosmaConfig.cmake.in ++++ b/cmake/cosmaConfig.cmake.in +@@ -11,7 +11,7 @@ if(NOT TARGET cosma::cosma) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH}) + + set(MKL_ROOT "@MKL_ROOT@") +- set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@") ++ # set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@") + set(MPI_DETERMINE_LIBRARY_VERSION TRUE) + find_package(MPI COMPONENTS "CXX" REQUIRED) + diff --git a/recipes/cp2k/2024.1/mc/repo/packages/cosma/package.py b/recipes/cp2k/2024.1/mc/repo/packages/cosma/package.py new file mode 100644 index 00000000..78c162ce --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/cosma/package.py @@ -0,0 +1,135 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack.package import * + + +class Cosma(CMakePackage): + """ + Distributed Communication-Optimal Matrix-Matrix Multiplication Library + """ + + maintainers("haampie", "kabicm", "teonnik", "simonpintarelli", "mtaillefumier") + homepage = "https://github.com/eth-cscs/COSMA" + url = "https://github.com/eth-cscs/COSMA/archive/refs/tags/v2.6.6.tar.gz" + git = "https://github.com/eth-cscs/COSMA.git" + + license("BSD-3-Clause") + + # note: The default archives produced with github do not have the archives + # of the submodules. + version("master", branch="master", submodules=False) + version("2.6.6", sha256="1604be101e77192fbcc5551236bc87888d336e402f5409bbdd9dea900401cc37") + version("2.6.5", sha256="10d9b7ecc1ce44ec5b9e0c0bf89278a63029912ec3ea99661be8576b553ececf") + version("2.6.4", sha256="6d7bd5e3005874af9542a329c93e7ccd29ca1a5573dae27618fac2704fa2b6ab") + version("2.6.3", sha256="c2a3735ea8f860930bea6706d968497d72a1be0498c689b5bc4a951ffc2d1146") + version("2.6.2", sha256="2debb5123cc35aeebc5fd2f8a46cfd6356d1e27618c9bb57129ecd09aa400940") + version("2.6.1", sha256="69aa6634a030674f0d9be61e7b0bf0dc17acf0fc9e7a90b40e3179e2254c8d67") + version("2.5.1", sha256="085b7787597374244bbb1eb89bc69bf58c35f6c85be805e881e1c0b25166c3ce") + version("2.5.0", sha256="7f68bb0ee5c80f9b8df858afcbd017ad4ed87ac09439d13d7d890844dbdd3d54") + version("2.4.0", sha256="5714315ce06d48037f86cfee2d7f19340643fee95e9d7f1e92dc1b623b67e395") + version("2.3.0", sha256="0c01c2deb5a0cd177952178350188a62c42ce55e604d7948ac472f55bf0d4815") + version("2.2.0", sha256="1eb92a98110df595070a12193b9221eecf9d103ced8836c960f6c79a2bd553ca") + version("2.0.7", sha256="8d70bfcbda6239b6a8fbeaca138790bbe58c0c3aa576879480d2632d4936cf7e") + version("2.0.2", sha256="4f3354828bc718f3eef2f0098c3bdca3499297497a220da32db1acd57920c68d") + + # We just need the libraries of cuda and rocm, so no need to extend + # CudaPackage or ROCmPackage. + variant("cuda", default=False, description="Build with cuBLAS support") + variant("rocm", default=False, description="Build with rocBLAS support") + variant("scalapack", default=False, description="Build with ScaLAPACK API") + variant("shared", default=True, description="Build the shared library version") + variant("tests", default=False, description="Build tests") + variant("apps", default=False, description="Build miniapp") + variant("profiling", default=False, description="Enable profiling") + variant("gpu_direct", default=False, description="GPU aware MPI") + + with when("+cuda"): + variant("nccl", default=False, description="Use cuda nccl") + + with when("+rocm"): + variant("rccl", default=False, description="Use rocm rccl") + + depends_on("cmake@3.22:", type="build") + depends_on("mpi@3:") + depends_on("blas", when="~cuda ~rocm") + depends_on("scalapack", when="+scalapack") + depends_on("cuda", when="+cuda") + depends_on("rocblas", when="+rocm") + depends_on("nccl", when="+nccl") + depends_on("rccl", when="+rccl") + + with when("@2.6.3:"): + depends_on("tiled-mm@2.2:+cuda", when="+cuda") + depends_on("tiled-mm@2.2:+rocm", when="+rocm") + + with when("@2.6.1:2.6.2"): + depends_on("tiled-mm@2.0+rocm", when="+rocm") + depends_on("tiled-mm@2.0+cuda", when="+cuda") + + with when("@2.6.1:"): + depends_on("costa") + depends_on("costa+scalapack", when="+scalapack") + depends_on("cxxopts", when="+apps") + depends_on("cxxopts", when="+tests") + depends_on("semiprof", when="+profiling") + depends_on("costa+profiling", when="+profiling") + + patch("fj-ssl2.patch", when="^fujitsu-ssl2") + patch("mpi-view.patch") + + def setup_build_environment(self, env): + if "+cuda" in self.spec: + env.set("CUDA_PATH", self.spec["cuda"].prefix) + + def cosma_blas_cmake_arg(self): + query_to_cmake_arg = [ + ("+cuda", "CUDA"), + ("+rocm", "ROCM"), + ("^intel-mkl", "MKL"), + ("^intel-oneapi-mkl", "MKL"), + ("^cray-libsci", "CRAY_LIBSCI"), + ("^netlib-lapack", "CUSTOM"), + ("^openblas", "OPENBLAS"), + ("^fujitsu-ssl2", "SSL2"), + ] + + if self.version >= Version("2.4.0"): + query_to_cmake_arg.extend( + [("^blis", "BLIS"), ("^amdblis", "BLIS"), ("^atlas", "ATLAS")] + ) + + for query, cmake_arg in query_to_cmake_arg: + if query in self.spec: + return cmake_arg + + return "CUSTOM" + + def cosma_scalapack_cmake_arg(self): + spec = self.spec + + if "~scalapack" in spec: + return "OFF" + elif "^intel-mkl" in spec or "^intel-oneapi-mkl" in spec: + return "MKL" + elif "^cray-libsci" in spec: + return "CRAY_LIBSCI" + + return "CUSTOM" + + def cmake_args(self): + return [ + self.define_from_variant("COSMA_WITH_TESTS", "tests"), + self.define_from_variant("COSMA_WITH_APPS", "apps"), + self.define_from_variant("COSMA_WITH_NCCL", "nccl"), + self.define_from_variant("COSMA_WITH_RCCL", "rccl"), + self.define_from_variant("COSMA_WITH_GPU_AWARE_MPI", "gpu_direct"), + self.define_from_variant("COSMA_WITH_PROFILING", "profiling"), + self.define("COSMA_WITH_BENCHMARKS", False), + self.define("COSMA_BLAS", self.cosma_blas_cmake_arg()), + self.define("COSMA_SCALAPACK", self.cosma_scalapack_cmake_arg()), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + ] diff --git a/recipes/cp2k/2024.1/mc/repo/packages/costa/mpi-view.patch b/recipes/cp2k/2024.1/mc/repo/packages/costa/mpi-view.patch new file mode 100644 index 00000000..be6d7060 --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/costa/mpi-view.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/costaConfig.cmake.in b/cmake/costaConfig.cmake.in +index 8fae534..d744c90 100644 +--- a/cmake/costaConfig.cmake.in ++++ b/cmake/costaConfig.cmake.in +@@ -10,7 +10,7 @@ include(CMakeFindDependencyMacro) + set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH}) + + set(MKL_ROOT "@MKL_ROOT@") +-set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@") ++#set(MPI_CXX_COMPILER "@MPI_CXX_COMPILER@") + + set(MPI_DETERMINE_LIBRARY_VERSION TRUE) + set(COSTA_SCALAPACK "@COSTA_SCALAPACK@") diff --git a/recipes/cp2k/2024.1/mc/repo/packages/costa/package.py b/recipes/cp2k/2024.1/mc/repo/packages/costa/package.py new file mode 100644 index 00000000..6b78f17c --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/costa/package.py @@ -0,0 +1,77 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + + +from spack.package import * + + +class Costa(CMakePackage): + """ + Distributed Communication-Optimal Matrix Transpose and Reshuffle Library + Based on the paper: https://arxiv.org/abs/2106.06601 + """ + + maintainers("haampie", "kabicm", "RMeli", "mtaillefumier") + homepage = "https://github.com/eth-cscs/COSTA" + git = "https://github.com/eth-cscs/COSTA.git" + + license("BSD-3-Clause") + + # note: The default archives produced with github do not have the archives + # of the submodules. + version("master", branch="master", submodules=True) + version("2.2.2", sha256="e87bc37aad14ac0c5922237be5d5390145c9ac6aef0350ed17d86cb2d994e67c") + version("2.2.1", sha256="aa8aa2a4a79de094f857c22293825de270ff72becd6bd736ff9f2dd8c192446d") + version("2.2", sha256="3e7333f012af76ec3508276ea90800313f6136504667021fe229e710bf6acdc7") + version("2.1", sha256="c1e86452415083f7470b292d93ec60708b7c8dbafc2bac383636bb4b28135866") + version("2.0", sha256="de250197f31f7d23226c6956a687c3ff46fb0ff6c621a932428236c3f7925fe4") + + variant("scalapack", default=False, description="Build with ScaLAPACK API") + variant("shared", default=True, description="Build shared libraries") + variant("profiling", default=False, description="Enable profiling") + variant("tests", default=False, description="Enable tests") + variant("apps", default=False, description="Enable miniapp") + variant("benchmarks", default=False, description="Enable benchmarks") + + depends_on("cmake@3.22:", type="build") + depends_on("mpi@3:") + depends_on("scalapack", when="+scalapack") + depends_on("cxxopts", when="+apps") + depends_on("cxxopts", when="+tests") + depends_on("semiprof", when="+profiling") + + patch("mpi-view.patch") + + def url_for_version(self, version): + if version == Version("2.0"): + return "https://github.com/eth-cscs/COSTA/releases/download/v{0}/COSTA-v{1}.tar.gz".format( + version, version + ) + return "https://github.com/eth-cscs/COSTA/archive/refs/tags/v{0}.tar.gz".format(version) + + def setup_build_environment(self, env): + return + + def costa_scalapack_cmake_arg(self): + spec = self.spec + + if "~scalapack" in spec: + return "OFF" + elif "^intel-mkl" in spec or "^intel-oneapi-mkl" in spec: + return "MKL" + elif "^cray-libsci" in spec: + return "CRAY_LIBSCI" + + return "CUSTOM" + + def cmake_args(self): + return [ + self.define_from_variant("COSTA_WITH_BENCHMARKS", "benchmarks"), + self.define_from_variant("COSTA_WITH_APPS", "apps"), + self.define_from_variant("COSTA_WITH_TESTS", "tests"), + self.define_from_variant("COSTA_WITH_PROFILING", "profiling"), + self.define_from_variant("BUILD_SHARED_LIBS", "shared"), + self.define("COSTA_SCALAPACK", self.costa_scalapack_cmake_arg()), + ] diff --git a/recipes/cp2k/2024.1/mc/repo/packages/elpa/fujitsu.patch b/recipes/cp2k/2024.1/mc/repo/packages/elpa/fujitsu.patch new file mode 100644 index 00000000..d3600cf6 --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/elpa/fujitsu.patch @@ -0,0 +1,65 @@ +From 8bda2149e4398bb6e6b66e601151966c91f9ec78 Mon Sep 17 00:00:00 2001 +From: m-shunji +Date: Wed, 13 Sep 2023 17:58:26 +0900 +Subject: [PATCH] Fix compile error in disabling openmp + +--- + src/elpa_impl_math_template.F90 | 6 +++--- + test/Fortran/test_autotune.F90 | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/elpa_impl_math_template.F90 b/src/elpa_impl_math_template.F90 +index f87a0ad..b41c0c3 100644 +--- a/src/elpa_impl_math_template.F90 ++++ b/src/elpa_impl_math_template.F90 +@@ -888,10 +888,10 @@ + #endif + #ifdef COMPLEXCASE + #ifdef DOUBLE_PRECISION_COMPLEX +- & !bind(C, name="elpa_solve_tridiagonal_dc") ++ bind(C, name="elpa_solve_tridiagonal_dc") + #endif + #ifdef SINGLE_PRECISION_COMPLEX +- & !bind(C, name="elpa_solve_tridiagonal_fc") ++ bind(C, name="elpa_solve_tridiagonal_fc") + #endif + #endif + +@@ -913,4 +913,4 @@ + &ELPA_IMPL_SUFFIX& + & (self, d, e, q, error) + end subroutine +- +\ No newline at end of file ++ +diff --git a/test/Fortran/test_autotune.F90 b/test/Fortran/test_autotune.F90 +index 4662564..5355ab3 100644 +--- a/test/Fortran/test_autotune.F90 ++++ b/test/Fortran/test_autotune.F90 +@@ -312,8 +312,8 @@ program test + status = check_correctness_analytic(na, nev, ev, z, nblk, myid, np_rows, np_cols, my_prow, my_pcol, & + .true., .true., print_times=.false.) + a(:,:) = as(:,:) +- call e%autotune_print_state(tune_state) +- call e%autotune_save_state(tune_state, "saved_state_"//trim(iter_string)//".txt") ++ call e%autotune_print_state(tune_state, error_elpa) ++ call e%autotune_save_state(tune_state, "saved_state_"//trim(iter_string)//".txt", error_elpa) + end do + + !! set and print the autotuned-settings +-- +1.8.3.1 +diff --git a/manual_cpp b/manual_cpp +index 6f74a79..dbdfc65 100755 +--- a/manual_cpp ++++ b/manual_cpp +@@ -46,7 +46,7 @@ elif len(files) == 0: + elif len(files) == 1: + file, = files + +-tmp_filename = "manually_preprocessed_" + file.replace("/", "_") ++tmp_filename = "manually_preprocessed_" + file.replace("/", "_").replace("-", "_") + + try: + output = args.index("-o") + diff --git a/recipes/cp2k/2024.1/mc/repo/packages/elpa/package.py b/recipes/cp2k/2024.1/mc/repo/packages/elpa/package.py new file mode 100644 index 00000000..83685156 --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/elpa/package.py @@ -0,0 +1,234 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +import os + +from spack.package import * + +# +# Please note that you can open issues on the github page of ELPA: +# https://github.com/marekandreas/elpa/issues +# + + +class Elpa(AutotoolsPackage, CudaPackage, ROCmPackage): + """Eigenvalue solvers for Petaflop-Applications (ELPA)""" + + homepage = "https://elpa.mpcdf.mpg.de/" + url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2015.11.001/elpa-2015.11.001.tar.gz" + git = "https://gitlab.mpcdf.mpg.de/elpa/elpa.git" + + license("LGPL-3.0-only") + + version("master", branch="master") + + version( + "2024.03.001", sha256="41c6cbf56d2dac26443faaba8a77307d261bf511682a64b96e24def77c813622" + ) + version( + "2023.11.001-patched", + sha256="62ee109afc06539507f459c08b958dc4db65b757dbd77f927678c77f7687415e", + url="https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/2023.11.001/elpa-2023.11.001-patched.tar.gz", + ) + version( + "2023.05.001", sha256="ec64be5d6522810d601a3b8e6a31720e3c3eb4af33a434d8a64570d76e6462b6" + ) + version( + "2022.11.001", sha256="75db3ac146f9a6a1598e3418ddcab2be2f40a30ef9ec4c00a3b5d3808c99c430" + ) + version( + "2021.11.001", sha256="fb361da6c59946661b73e51538d419028f763d7cb9dacf9d8cd5c9cd3fb7802f" + ) + version( + "2021.05.002_bugfix", + sha256="deabc48de5b9e4b2f073d749d335c8f354a7ce4245b643a23b7951cd6c90224b", + ) + version( + "2021.05.001", sha256="a4f1a4e3964f2473a5f8177f2091a9da5c6b5ef9280b8272dfefcbc3aad44d41" + ) + + variant("openmp", default=True, description="Activates OpenMP support") + variant("mpi", default=True, description="Activates MPI support") + + with when("@2021.11.001:"): + variant( + "autotune", default=False, description="Enables autotuning for matrix restribution" + ) + variant( + "gpu_streams", default=True, when="+cuda", description="Activates GPU streams support" + ) + + patch("fujitsu.patch", when="%fj") + + depends_on("autoconf@2.71:", type="build", when="@master") + depends_on("automake", type="build", when="@master") + + depends_on("blas") + depends_on("lapack") + depends_on("mpi", when="+mpi") + depends_on("scalapack", when="+mpi") + depends_on("rocblas", when="+rocm") + depends_on("libtool", type="build") + depends_on("python@3:", type="build") + depends_on("scalapack", when="+autotune") + + # Force openmp propagation on some providers of blas/lapack, as adviced by docs + # https://gitlab.mpcdf.mpg.de/elpa/elpa/-/blob/master/documentation/PERFORMANCE_TUNING.md?ref_type=heads#builds-with-openmp-enabled + with when("+openmp"): + requires("^openblas threads=openmp", when="^[virtuals=blas,lapack] openblas") + requires("^intel-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-mkl") + requires( + "^intel-oneapi-mkl threads=openmp", when="^[virtuals=blas,lapack] intel-oneapi-mkl" + ) + requires( + "^intel-parallel-studio threads=openmp", + when="^[virtuals=blas,lapack] intel-parallel-studio", + ) + + # fails to build due to broken type-bound procedures in OMP parallel regions + conflicts( + "+openmp", + when="@2021.05.001: %gcc@:7", + msg="ELPA-2021.05.001+ requires GCC-8+ for OpenMP support", + ) + conflicts("+mpi", when="+rocm", msg="ROCm support and MPI are not yet compatible") + conflicts( + "+gpu_streams", + when="@:2023.11.001-patched +openmp", + msg="GPU streams currently not supported in combination with OpenMP", + ) + + def url_for_version(self, version): + return "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/{0}/elpa-{0}.tar.gz".format( + str(version) + ) + + # override default implementation which returns static lib + @property + def libs(self): + libname = "libelpa_openmp" if "+openmp" in self.spec else "libelpa" + return find_libraries(libname, root=self.prefix, shared=True, recursive=True) + + @property + def headers(self): + suffix = "_openmp" if self.spec.satisfies("+openmp") else "" + + # upstream sometimes adds tarball suffixes not part of the internal version + elpa_version = str(self.spec.version) + for vsuffix in ("_bugfix", "-patched"): + if elpa_version.endswith(vsuffix): # implementation of py3.9 removesuffix + elpa_version = elpa_version[: -len(vsuffix)] + + incdir = os.path.join( + self.spec.prefix.include, + "elpa{suffix}-{version}".format(suffix=suffix, version=elpa_version), + ) + + hlist = find_all_headers(incdir) + hlist.directories = [incdir] + return hlist + + build_directory = "spack-build" + parallel = False + + def configure_args(self): + spec = self.spec + options = [] + + options += self.with_or_without("mpi") + + # New options use the "-kernels" suffix + kernels = "-kernels" if spec.satisfies("@2023.11:") else "" + + # TODO: --disable-sse-assembly, --enable-sparc64, --enable-neon-arch64 + # Don't include vsx; as of 2022.05 it fails (reported upstream). + # Altivec SSE intrinsics are used anyway. + simd_features = ["sse", "avx", "avx2", "avx512", "sve128", "sve256", "sve512"] + + for feature in simd_features: + msg = "--enable-{0}" if feature in spec.target else "--disable-{0}" + options.append(msg.format(feature + kernels)) + + if spec.target.family != "x86_64": + options.append("--disable-sse-assembly") + + if "%aocc" in spec or "%fj" in spec: + options.append("--disable-shared") + options.append("--enable-static") + + # If no features are found, enable the generic ones + if not any(f in spec.target for f in simd_features): + options.append("--enable-generic" + kernels) + + if self.compiler.name == "gcc": + options.extend(["CFLAGS=-O3", "FCFLAGS=-O3 -ffree-line-length-none"]) + + if "%aocc" in spec: + options.extend(["FCFLAGS=-O3", "CFLAGS=-O3"]) + + if "%fj" in spec: + options.append("--disable-Fortran2008-features") + options.append("--enable-FUGAKU") + if "+openmp" in spec: + options.extend(["FCFLAGS=-Kparallel"]) + + cuda_flag = "nvidia-gpu" + if "+cuda" in spec: + prefix = spec["cuda"].prefix + # Can't yet be changed to the new option --enable-nvidia-gpu-kernels + # https://github.com/marekandreas/elpa/issues/55 + options.append(f"--enable-{cuda_flag}") + options.append("--with-cuda-path={0}".format(prefix)) + options.append("--with-cuda-sdk-path={0}".format(prefix)) + + if spec.satisfies("+gpu_streams"): + options.append("--enable-gpu-streams=nvidia") + + cuda_arch = spec.variants["cuda_arch"].value[0] + + if cuda_arch != "none": + options.append( + "--with-{0}-compute-capability=sm_{1}".format(cuda_flag.upper(), cuda_arch) + ) + else: + options.append(f"--disable-{cuda_flag}" + kernels) + + if "+rocm" in spec: + # Can't yet be changed to the new option --enable-amd-gpu-kernels + # https://github.com/marekandreas/elpa/issues/55 + options.append("--enable-amd-gpu") + options.append("CXX={0}".format(self.spec["hip"].hipcc)) + + if spec.satisfies("+gpu_streams"): + options.append("--enable-gpu-streams=amd") + + elif "@2021.05.001:" in self.spec: + options.append("--disable-amd-gpu" + kernels) + + options += self.enable_or_disable("openmp") + + # Additional linker search paths and link libs + ldflags = [spec["blas"].libs.search_flags, spec["lapack"].libs.search_flags, "-lstdc++"] + libs = [spec["lapack"].libs.link_flags, spec["blas"].libs.link_flags] + + options += [f'LDFLAGS={" ".join(ldflags)}', f'LIBS={" ".join(libs)}'] + + if "+mpi" in self.spec: + options += [ + "CC={0}".format(spec["mpi"].mpicc), + "CXX={0}".format(spec["mpi"].mpicxx), + "FC={0}".format(spec["mpi"].mpifc), + "SCALAPACK_LDFLAGS={0}".format(spec["scalapack"].libs.joined()), + ] + + if "+autotune" in self.spec: + options.append("--enable-autotune-redistribute-matrix") + # --enable-autotune-redistribute-matrix requires --enable-scalapack-tests as well + options.append("--enable-scalapack-tests") + + options.append("--disable-silent-rules") + options.append("--without-threading-support-check-during-build") + + return options diff --git a/recipes/cp2k/2024.1/mc/repo/packages/intel-oneapi-mkl/package.py b/recipes/cp2k/2024.1/mc/repo/packages/intel-oneapi-mkl/package.py new file mode 100644 index 00000000..986b5847 --- /dev/null +++ b/recipes/cp2k/2024.1/mc/repo/packages/intel-oneapi-mkl/package.py @@ -0,0 +1,287 @@ +# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from os.path import dirname, isdir + +from spack.package import * + + +@IntelOneApiPackage.update_description +class IntelOneapiMkl(IntelOneApiLibraryPackage): + """Intel oneAPI Math Kernel Library (Intel oneMKL; formerly Intel Math + Kernel Library or Intel MKL), is a library of optimized math + routines for science, engineering, and financial + applications. Core math functions include BLAS, LAPACK, + ScaLAPACK, sparse solvers, fast Fourier transforms, and vector + math. + + """ + + maintainers("rscohn2") + + homepage = ( + "https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html" + ) + + version( + "2024.2.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cdff21a5-6ac7-4b41-a7ec-351b5f9ce8fd/l_onemkl_p_2024.2.0.664_offline.sh", + sha256="f1f46f5352c197a9840e08fc191a879dad79ebf742fe782e386ba8006f262f7a", + expand=False, + ) + version( + "2024.1.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/2f3a5785-1c41-4f65-a2f9-ddf9e0db3ea0/l_onemkl_p_2024.1.0.695_offline.sh", + sha256="b121bc70d3493ef1fbd05f077b1cd27ac4eb2fd1099f44e9f4b8a1366995fb92", + expand=False, + ) + version( + "2024.0.0", + url="https://registrationcenter-download.intel.com/akdlm//IRC_NAS/86d6a4c1-c998-4c6b-9fff-ca004e9f7455/l_onemkl_p_2024.0.0.49673_offline.sh", + sha256="2a3be7d01d75ba8cc3059f9a32ae72e5bfc93e68e72e94e79d7fa6ea2f7814de", + expand=False, + ) + version( + "2023.2.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/adb8a02c-4ee7-4882-97d6-a524150da358/l_onemkl_p_2023.2.0.49497_offline.sh", + sha256="4a0d93da85a94d92e0ad35dc0fc3b3ab7f040bd55ad374c4d5ec81a57a2b872b", + expand=False, + ) + version( + "2023.1.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/cd17b7fe-500e-4305-a89b-bd5b42bfd9f8/l_onemkl_p_2023.1.0.46342_offline.sh", + sha256="cc28c94cab23c185520b93c5a04f3979d8da6b4c90cee8c0681dd89819d76167", + expand=False, + ) + version( + "2023.0.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19138/l_onemkl_p_2023.0.0.25398_offline.sh", + sha256="0d61188e91a57bdb575782eb47a05ae99ea8eebefee6b2dfe20c6708e16e9927", + expand=False, + ) + version( + "2022.2.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/19038/l_onemkl_p_2022.2.1.16993_offline.sh", + sha256="eedd4b795720de776b1fc5f542ae0fac37ec235cdb567f7c2ee3182e73e3e59d", + expand=False, + ) + version( + "2022.2.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18898/l_onemkl_p_2022.2.0.8748_offline.sh", + sha256="07d7caedd4b9f025c6fd439a0d2c2f279b18ecbbb63cadb864f6c63c1ed942db", + expand=False, + ) + version( + "2022.1.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18721/l_onemkl_p_2022.1.0.223_offline.sh", + sha256="4b325a3c4c56e52f4ce6c8fbb55d7684adc16425000afc860464c0f29ea4563e", + expand=False, + ) + version( + "2022.0.2", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18483/l_onemkl_p_2022.0.2.136_offline.sh", + sha256="134b748825a474acc862bb4a7fada99741a15b7627cfaa6ba0fb05ec0b902b5e", + expand=False, + ) + version( + "2022.0.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18444/l_onemkl_p_2022.0.1.117_offline.sh", + sha256="22afafbe2f3762eca052ac21ec40b845ff2f3646077295c88c2f37f80a0cc160", + expand=False, + ) + version( + "2021.4.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/18222/l_onemkl_p_2021.4.0.640_offline.sh", + sha256="9ad546f05a421b4f439e8557fd0f2d83d5e299b0d9bd84bdd86be6feba0c3915", + expand=False, + ) + version( + "2021.3.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17901/l_onemkl_p_2021.3.0.520_offline.sh", + sha256="a06e1cdbfd8becc63440b473b153659885f25a6e3c4dcb2907ad9cd0c3ad59ce", + expand=False, + ) + version( + "2021.2.0", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17757/l_onemkl_p_2021.2.0.296_offline.sh", + sha256="816e9df26ff331d6c0751b86ed5f7d243f9f172e76f14e83b32bf4d1d619dbae", + expand=False, + ) + version( + "2021.1.1", + url="https://registrationcenter-download.intel.com/akdlm/IRC_NAS/17402/l_onemkl_p_2021.1.1.52_offline.sh", + sha256="818b6bd9a6c116f4578cda3151da0612ec9c3ce8b2c8a64730d625ce5b13cc0c", + expand=False, + ) + + variant("gfortran", default=False, description="Compatibility with GNU Fortran") + + variant("shared", default=True, description="Builds shared library") + variant("ilp64", default=False, description="Build with ILP64 support") + variant( + "cluster", default=False, description="Build with cluster support: scalapack, blacs, etc" + ) + variant( + "mpi_family", + default="none", + values=("none", "mpich", "openmpi"), + description="MPI family", + multi=False, + ) + + variant( + "threads", + default="none", + description="Multithreading support", + values=("openmp", "tbb", "none"), + multi=False, + ) + + requires( + "%clang", + "%gcc", + "%intel", + "%oneapi", + policy="one_of", + when="threads=openmp", + msg="MKL with OpenMP threading requires GCC, clang, or Intel compilers", + ) + + depends_on("tbb") + # cluster libraries need mpi + depends_on("mpi", when="+cluster") + + # If a +cluster then mpi_family must be set + with when("+cluster"): + conflicts("mpi_family=none") + requires("mpi_family=mpich", when="^intel-oneapi-mpi") + requires("mpi_family=mpich", when="^intel-mpi") + requires("mpi_family=mpich", when="^mpich") + requires("mpi_family=mpich", when="^mvapich") + requires("mpi_family=mpich", when="^mvapich2") + requires("mpi_family=mpich", when="^cray-mpich") + requires("mpi_family=openmpi", when="^openmpi") + requires("mpi_family=openmpi", when="^hpcx-mpi") + + provides("fftw-api@3") + provides("scalapack", when="+cluster") + provides("mkl") + provides("lapack", "blas") + + @run_after("install") + def fixup_installation(self): + # fixup missing path in mkl cmake files. This issue was new in + # 2024.0.0 and expected to be fixed in the next release. + if self.spec.satisfies("@2024.0.0"): + # cannot use spack patch because this is applied to the + # installed mkl, not sources + filter_file( + 'PATH_SUFFIXES "lib"', + 'PATH_SUFFIXES "lib" "../../compiler/latest/lib"', + self.component_prefix.lib.cmake.mkl.join("MKLConfig.cmake"), + backup=False, + ) + + @property + def v2_layout_versions(self): + return "@2024:" + + @property + def component_dir(self): + return "mkl" + + @property + def libs(self): + shared = self.spec.satisfies("+shared") + + libs = self._find_mkl_libs(shared) + + system_libs = find_system_libraries(["libpthread", "libm", "libdl"]) + if shared: + return libs + system_libs + else: + return IntelOneApiStaticLibraryList(libs, system_libs) + + def setup_dependent_build_environment(self, env, dependent_spec): + # Only if environment modifications are desired (default is +envmods) + if self.spec.satisfies("+envmods"): + env.set("MKLROOT", self.component_prefix) + # 2023.1.0 has the pkgconfig files in lib/pkgconfig, 2021.3.0 has them in + # tools/pkgconfig, just including both in PKG_CONFIG_PATH + env.append_path("PKG_CONFIG_PATH", self.component_prefix.lib.pkgconfig) + env.append_path("PKG_CONFIG_PATH", self.component_prefix.tools.pkgconfig) + + def _find_mkl_libs(self, shared): + libs = [] + + if self.spec.satisfies("+cluster"): + libs.extend([self._xlp64_lib("libmkl_scalapack"), "libmkl_cdft_core"]) + + # Explicit variant for compatibility with gfortran, otherwise + # support intel fortran. Be aware that some dependencies may + # be using this logic and other dependencies might be using + # cmake for the library list and they have to be consistent. + # https://github.com/spack/spack/pull/43673 for discussion + if self.spec.satisfies("+gfortran"): + depends_on("fortran", type="build") + libs.append(self._xlp64_lib("libmkl_gf")) + else: + libs.append(self._xlp64_lib("libmkl_intel")) + + if self.spec.satisfies("threads=tbb"): + libs.append("libmkl_tbb_thread") + elif self.spec.satisfies("threads=openmp"): + if self.spec.satisfies("%oneapi") or self.spec.satisfies("%intel"): + libs.append("libmkl_intel_thread") + else: + libs.append("libmkl_gnu_thread") + else: + libs.append("libmkl_sequential") + + libs.append("libmkl_core") + + if self.spec.satisfies("+cluster"): + if self.spec.satisfies("mpi_family=mpich"): + libs.append(self._xlp64_lib("libmkl_blacs_intelmpi")) + elif self.spec.satisfies("mpi_family=openmpi"): + libs.append(self._xlp64_lib("libmkl_blacs_openmpi")) + + lib_path = ( + self.component_prefix.lib if self.v2_layout else self.component_prefix.lib.intel64 + ) + lib_path = lib_path if isdir(lib_path) else dirname(lib_path) + + # resolved_libs is populated as follows + # MKL-related + MPI-related + threading-related + resolved_libs = find_libraries(libs, lib_path, shared=shared) + + # Add MPI libraries for cluster support. If MPI is not in the + # spec, then MKL is externally installed and application must + # link with MPI libaries. If MPI is in spec, but there are no + # libraries, then the package (e.g. hpcx-mpi) relies on the + # compiler wrapper to add the libraries. + try: + if self.spec.satisfies("+cluster ^mpi"): + resolved_libs = resolved_libs + self.spec["mpi"].libs + except spack.error.NoLibrariesError: + pass + + if self.spec.satisfies("threads=openmp"): + resolved_libs += self.openmp_libs() + return resolved_libs + + def _xlp64_lib(self, lib): + return lib + ("_ilp64" if self.spec.satisfies("+ilp64") else "_lp64") + + @run_after("install") + def fixup_prefix(self): + # The motivation was to provide a more standard layout so mkl + # would be more likely to work as a virtual dependence. I am + # not sure if this mechanism is useful and it became a problem + # for mpi so disabling for v2_layout. + if self.v2_layout: + return + self.symlink_dir(self.component_prefix.include, self.prefix.include) + self.symlink_dir(self.component_prefix.lib, self.prefix.lib)