pumi: sim version check, meshes via submodule, ctest (#14597)
* pumi: sim version check, meshes via submodule, ctest * Apply suggestions from code review Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com> * pumi: update comment on master version string * pumi: description of simmodsuite_version_check variant * pumi: add white space to variant description Co-authored-by: Adam J. Stewart <ajstewart426@gmail.com>
This commit is contained in:
parent
bd60e0f137
commit
488e25ea34
@ -24,10 +24,8 @@ class Pumi(CMakePackage):
|
|||||||
# We will use the scorec/core master branch as the 'nightly' version
|
# We will use the scorec/core master branch as the 'nightly' version
|
||||||
# of pumi in spack. The master branch is more stable than the
|
# of pumi in spack. The master branch is more stable than the
|
||||||
# scorec/core develop branch and we perfer not to expose spack users
|
# scorec/core develop branch and we perfer not to expose spack users
|
||||||
# to the added instability. The spack version string is 'develop' since
|
# to the added instability.
|
||||||
# it compares greater than a numbered version (e.g., 2.1.0). The spack
|
version('master', submodules=True, branch='master')
|
||||||
# version string 'master' compares less than a numbered version.
|
|
||||||
version('develop', branch='master')
|
|
||||||
version('2.2.1', commit='cd826205db21b8439026db1f6af61a8ed4a18564') # tag 2.2.1
|
version('2.2.1', commit='cd826205db21b8439026db1f6af61a8ed4a18564') # tag 2.2.1
|
||||||
version('2.2.0', commit='8c7e6f13943893b2bc1ece15003e4869a0e9634f') # tag 2.2.0
|
version('2.2.0', commit='8c7e6f13943893b2bc1ece15003e4869a0e9634f') # tag 2.2.0
|
||||||
version('2.1.0', commit='840fbf6ec49a63aeaa3945f11ddb224f6055ac9f')
|
version('2.1.0', commit='840fbf6ec49a63aeaa3945f11ddb224f6055ac9f')
|
||||||
@ -41,6 +39,9 @@ class Pumi(CMakePackage):
|
|||||||
description="Enable Simmetrix SimModSuite Support: 'base' enables "
|
description="Enable Simmetrix SimModSuite Support: 'base' enables "
|
||||||
"the minimum set of functionality, 'kernels' adds CAD kernel "
|
"the minimum set of functionality, 'kernels' adds CAD kernel "
|
||||||
"support to 'base', and 'full' enables all functionality.")
|
"support to 'base', and 'full' enables all functionality.")
|
||||||
|
variant('simmodsuite_version_check', default=True,
|
||||||
|
description="Enable check of Simmetrix SimModSuite version. "
|
||||||
|
"Disable the check for testing new versions.")
|
||||||
|
|
||||||
depends_on('mpi')
|
depends_on('mpi')
|
||||||
depends_on('cmake@3:', type='build')
|
depends_on('cmake@3:', type='build')
|
||||||
@ -69,7 +70,10 @@ def cmake_args(self):
|
|||||||
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
|
'-DCMAKE_Fortran_COMPILER=%s' % spec['mpi'].mpifc,
|
||||||
'-DPUMI_FORTRAN_INTERFACE=%s' %
|
'-DPUMI_FORTRAN_INTERFACE=%s' %
|
||||||
('ON' if '+fortran' in spec else 'OFF'),
|
('ON' if '+fortran' in spec else 'OFF'),
|
||||||
'-DMDS_ID_TYPE=%s' % ('long' if '+int64' in spec else 'int')
|
'-DMDS_ID_TYPE=%s' % ('long' if '+int64' in spec else 'int'),
|
||||||
|
'-DSKIP_SIMMETRIX_VERSION_CHECK=%s' %
|
||||||
|
('ON' if '~simmodsuite_version_check' in spec else 'OFF'),
|
||||||
|
'-DMESHES=%s' % join_path(self.stage.source_path, 'pumi_meshes')
|
||||||
]
|
]
|
||||||
if self.spec.satisfies('simmodsuite=base'):
|
if self.spec.satisfies('simmodsuite=base'):
|
||||||
args.append('-DENABLE_SIMMETRIX=ON')
|
args.append('-DENABLE_SIMMETRIX=ON')
|
||||||
@ -82,3 +86,11 @@ def cmake_args(self):
|
|||||||
mpi_id = spec['mpi'].name + spec['mpi'].version.string
|
mpi_id = spec['mpi'].name + spec['mpi'].version.string
|
||||||
args.append('-DSIM_MPI=' + mpi_id)
|
args.append('-DSIM_MPI=' + mpi_id)
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
@run_after('build')
|
||||||
|
@on_package_attributes(run_tests=True)
|
||||||
|
def check(self):
|
||||||
|
"""Run ctest after building project."""
|
||||||
|
|
||||||
|
with working_dir(self.build_directory):
|
||||||
|
ctest(parallel=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user