diff options
author | Daniel Ahlin <50445206+danielahlin@users.noreply.github.com> | 2023-04-13 03:19:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 19:19:42 -0600 |
commit | 49fe67572e2d3f632ed686957fb9187ebb275b1e (patch) | |
tree | 6d5bcd15781dee1c88c16ef8c6fbd8d30a03c086 | |
parent | ced6353e141e2028473abc591adfecf08d797189 (diff) | |
download | spack-49fe67572e2d3f632ed686957fb9187ebb275b1e.tar.gz spack-49fe67572e2d3f632ed686957fb9187ebb275b1e.tar.bz2 spack-49fe67572e2d3f632ed686957fb9187ebb275b1e.tar.xz spack-49fe67572e2d3f632ed686957fb9187ebb275b1e.zip |
gromacs: Intel oneapi 2023 fixes (#36555)
* gromacs: oneapi@2023 - g++-dependency and MKL path
Fixes to build with oneapi@2023 and MKL 2023.
* Depend on gcc and add GMX_GPLUSPLUS_PATH to it
* MKL seems to be picked up without explicit directives
and the old directives fails (at least for my tests) with MKL
2023.
* gromacs: oneapi@2023 fix - address style errors
* gromacs: add danielahlin as maintainer
Adding danielahlin as maintainer as discussed in https://github.com/spack/spack/pull/36555#issuecomment-1496224128 and https://github.com/spack/spack/pull/36555#issuecomment-1504682712
* Update package.py
---------
Co-authored-by: Christoph Junghans <christoph.junghans@gmail.com>
Co-authored-by: Christoph Junghans <junghans@lanl.gov>
Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
-rw-r--r-- | var/spack/repos/builtin/packages/gromacs/package.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 68fcd7c693..70b7f5e023 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -26,7 +26,7 @@ class Gromacs(CMakePackage, CudaPackage): url = "https://ftp.gromacs.org/gromacs/gromacs-2022.2.tar.gz" list_url = "https://ftp.gromacs.org/gromacs" git = "https://gitlab.com/gromacs/gromacs.git" - maintainers("junghans", "marvinbernhardt") + maintainers("danielahlin", "eirrgang", "junghans") version("main", branch="main") version("master", branch="main", deprecated=True) @@ -243,6 +243,7 @@ class Gromacs(CMakePackage, CudaPackage): depends_on("sycl", when="+sycl") depends_on("lapack", when="+lapack") depends_on("blas", when="+blas") + depends_on("gcc", when="%oneapi") depends_on("hwloc@1.0:1", when="+hwloc@2016:2018") depends_on("hwloc", when="+hwloc@2019:") @@ -426,6 +427,9 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): if self.spec.satisfies("@2020:"): options.append("-DGMX_INSTALL_LEGACY_API=ON") + if self.spec.satisfies("%oneapi"): + options.append("-DGMX_GPLUSPLUS_PATH=%s/g++" % self.spec["gcc"].prefix.bin) + if "+double" in self.spec: options.append("-DGMX_DOUBLE:BOOL=ON") @@ -570,10 +574,13 @@ class CMakeBuilder(spack.build_systems.cmake.CMakeBuilder): # fftw-api@3 is provided by intel-mkl or intel-parllel-studio # we use the mkl interface of gromacs options.append("-DGMX_FFT_LIBRARY=mkl") - options.append("-DMKL_INCLUDE_DIR={0}".format(self.spec["mkl"].headers.directories[0])) - # The 'blas' property provides a minimal set of libraries - # that is sufficient for fft. Using full mkl fails the cmake test - options.append("-DMKL_LIBRARIES={0}".format(self.spec["blas"].libs.joined(";"))) + if not self.spec["mkl"].satisfies("@2023:"): + options.append( + "-DMKL_INCLUDE_DIR={0}".format(self.spec["mkl"].headers.directories[0]) + ) + # The 'blas' property provides a minimal set of libraries + # that is sufficient for fft. Using full mkl fails the cmake test + options.append("-DMKL_LIBRARIES={0}".format(self.spec["blas"].libs.joined(";"))) else: # we rely on the fftw-api@3 options.append("-DGMX_FFT_LIBRARY=fftw3") |