summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate deVelder <ndeveld@sandia.gov>2022-05-20 11:27:47 -0600
committerGitHub <noreply@github.com>2022-05-20 10:27:47 -0700
commit580f9ec86e07da96bd7547fb05562db167a15d44 (patch)
tree56f43cd787a3d5e842c8766c96721996f52374e1
parent0b0920bc9047cbf3d4e8d8f1641af718b35ae31c (diff)
downloadspack-580f9ec86e07da96bd7547fb05562db167a15d44.tar.gz
spack-580f9ec86e07da96bd7547fb05562db167a15d44.tar.bz2
spack-580f9ec86e07da96bd7547fb05562db167a15d44.tar.xz
spack-580f9ec86e07da96bd7547fb05562db167a15d44.zip
Add newer openfast versions and preliminary OpenMP compile support (#30752)
* Add version 3.0 and 3.1 and prelim OpenMP support * Fix flag handler missing spec variable * Use self.compiler.openmp_flag instead of -fopenmp * Fix whitespace
-rw-r--r--var/spack/repos/builtin/packages/openfast/package.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/openfast/package.py b/var/spack/repos/builtin/packages/openfast/package.py
index fe77e738a2..ee0b621768 100644
--- a/var/spack/repos/builtin/packages/openfast/package.py
+++ b/var/spack/repos/builtin/packages/openfast/package.py
@@ -16,6 +16,8 @@ class Openfast(CMakePackage):
version('develop', branch='dev')
version('master', branch='main')
+ version('3.1.0', tag='v3.1.0')
+ version('3.0.0', tag='v3.0.0')
version('2.6.0', tag='v2.6.0')
version('2.5.0', tag='v2.5.0')
version('2.4.0', tag='v2.4.0')
@@ -35,6 +37,8 @@ class Openfast(CMakePackage):
description="Enable C++ bindings")
variant('pic', default=True,
description="Position independent code")
+ variant('openmp', default=False,
+ description="Enable OpenMP support")
# Dependencies for OpenFAST Fortran
depends_on('blas')
@@ -86,7 +90,20 @@ class Openfast(CMakePackage):
'-DHDF5_USE_STATIC_LIBRARIES=ON',
])
+ if '+openmp' in spec:
+ options.extend([
+ '-DOPENMP:BOOL=ON',
+ ])
+
if 'darwin' in spec.architecture:
options.append('-DCMAKE_MACOSX_RPATH:BOOL=ON')
return options
+
+ def flag_handler(self, name, flags):
+ spec = self.spec
+ if name in ['cflags', 'cxxflags', 'cppflags', 'fflags']:
+ if '+openmp' in spec:
+ flags.append(self.compiler.openmp_flag)
+ return (None, flags, None)
+ return(flags, None, None)