summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorrfbgo <109985755+rfbgo@users.noreply.github.com>2022-10-27 15:59:06 -0600
committerGitHub <noreply@github.com>2022-10-27 14:59:06 -0700
commit67585fe13eb957e4722c72a66577625a593273aa (patch)
tree808ba3b620cbe80b179664165f3af295fcdf9044 /var
parent3e966f254748d860655db952fe964eeca579b0ca (diff)
downloadspack-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.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/vasp/package.py7
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: