diff options
author | rfbgo <109985755+rfbgo@users.noreply.github.com> | 2022-10-27 15:59:06 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-27 14:59:06 -0700 |
commit | 67585fe13eb957e4722c72a66577625a593273aa (patch) | |
tree | 808ba3b620cbe80b179664165f3af295fcdf9044 | |
parent | 3e966f254748d860655db952fe964eeca579b0ca (diff) | |
download | spack-67585fe13eb957e4722c72a66577625a593273aa.tar.gz spack-67585fe13eb957e4722c72a66577625a593273aa.tar.bz2 spack-67585fe13eb957e4722c72a66577625a593273aa.tar.xz spack-67585fe13eb957e4722c72a66577625a593273aa.zip |
Add vasp variant to control shmem compile options (#33531)
Currently the vasp package always enables the use of shmem to reduce algorithm memory usage (see
https://www.vasp.at/wiki/index.php/Precompiler_options). This is great,but on some systems gives compile errors with the interoperability of C and Fortran. This PR makes that shmem flag optional, but retains the
existing default on behavior.
-rw-r--r-- | var/spack/repos/builtin/packages/vasp/package.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/vasp/package.py b/var/spack/repos/builtin/packages/vasp/package.py index 1706aa2843..eac1f0431e 100644 --- a/var/spack/repos/builtin/packages/vasp/package.py +++ b/var/spack/repos/builtin/packages/vasp/package.py @@ -46,6 +46,8 @@ class Vasp(MakefilePackage): "https://github.com/henniggroup/VASPsol", ) + variant("shmem", default=True, description="Enable use_shmem build flag") + depends_on("rsync", type="build") depends_on("blas") depends_on("lapack") @@ -151,8 +153,11 @@ class Vasp(MakefilePackage): "-Davoidalloc", "-Duse_bse_te", "-Dtbdyn", - "-Duse_shmem", ] + + if "+shmem" in spec: + cpp_options.append("-Duse_shmem") + if "%nvhpc" in self.spec: cpp_options.extend(['-DHOST=\\"LinuxPGI\\"', "-DPGI16", "-Dqd_emulate"]) elif "%aocc" in self.spec: |