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.
This commit is contained in:
rfbgo 2022-10-27 15:59:06 -06:00 committed by GitHub
parent 3e966f2547
commit 67585fe13e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 @@ def setup_build_environment(self, spack_env):
"-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: