Use define_from_variant for HiOp package (#23536)
This commit is contained in:
parent
d2cc248192
commit
c2cd597b45
@ -80,65 +80,42 @@ def cmake_args(self):
|
|||||||
'-DLAPACK_LIBRARIES={0}'.format(lapack_blas_libs)
|
'-DLAPACK_LIBRARIES={0}'.format(lapack_blas_libs)
|
||||||
])
|
])
|
||||||
|
|
||||||
args.append('-DHIOP_BUILD_STATIC=ON')
|
args.append(self.define_from_variant('HIOP_BUILD_SHARED', 'shared'))
|
||||||
if '+shared' in spec:
|
args.append(self.define_from_variant('HIOP_USE_MPI', 'mpi'))
|
||||||
args.append('-DHIOP_BUILD_SHARED=ON')
|
args.append(self.define_from_variant('HIOP_DEEPCHECKS', 'deepchecking'))
|
||||||
else:
|
args.append(self.define_from_variant('HIOP_USE_GPU', 'cuda'))
|
||||||
args.append('-DHIOP_BUILD_SHARED=OFF')
|
args.append(self.define_from_variant('HIOP_USE_CUDA', 'cuda'))
|
||||||
|
args.append(self.define_from_variant('HIOP_USE_MAGMA', 'cuda'))
|
||||||
|
args.append(self.define_from_variant('HIOP_USE_RAJA', 'raja'))
|
||||||
|
args.append(self.define_from_variant('HIOP_USE_UMPIRE', 'raja'))
|
||||||
|
args.append(self.define_from_variant('HIOP_WITH_KRON_REDUCTION', 'kron'))
|
||||||
|
args.append(self.define_from_variant('HIOP_SPARSE', 'sparse'))
|
||||||
|
args.append(self.define_from_variant('HIOP_USE_COINHSL', 'sparse'))
|
||||||
|
args.append(self.define_from_variant('HIOP_TEST_WITH_BSUB', 'jsrun'))
|
||||||
|
|
||||||
if '+mpi' in spec:
|
if '+mpi' in spec:
|
||||||
args.append(
|
args.append('-DMPI_HOME={0}'.format(spec['mpi'].prefix))
|
||||||
"-DHIOP_USE_MPI=ON -DMPI_HOME={0}".format(spec['mpi'].prefix))
|
|
||||||
args.append('-DMPI_C_COMPILER={0}'.format(spec['mpi'].mpicc))
|
args.append('-DMPI_C_COMPILER={0}'.format(spec['mpi'].mpicc))
|
||||||
args.append('-DMPI_CXX_COMPILER={0}'.format(spec['mpi'].mpicxx))
|
args.append('-DMPI_CXX_COMPILER={0}'.format(spec['mpi'].mpicxx))
|
||||||
args.append('-DMPI_Fortran_COMPILER={0}'.format(spec['mpi'].mpifc))
|
args.append('-DMPI_Fortran_COMPILER={0}'.format(spec['mpi'].mpifc))
|
||||||
else:
|
|
||||||
args.append("-DHIOP_USE_MPI=OFF")
|
|
||||||
|
|
||||||
if '+deepchecking' in spec:
|
|
||||||
args.append("-DHIOP_DEEPCHECKS=ON")
|
|
||||||
else:
|
|
||||||
args.append("-DHIOP_DEEPCHECKS=OFF")
|
|
||||||
|
|
||||||
# HIP flags are a part of the buildsystem, but full support is not
|
# HIP flags are a part of the buildsystem, but full support is not
|
||||||
# yet ready for public release
|
# yet ready for public release
|
||||||
args.append("-DHIOP_USE_HIP=OFF")
|
args.append("-DHIOP_USE_HIP=OFF")
|
||||||
|
|
||||||
if '+cuda' in spec:
|
if '+cuda' in spec:
|
||||||
args.append("-DHIOP_USE_GPU=ON")
|
|
||||||
|
|
||||||
cuda_arch_list = spec.variants['cuda_arch'].value
|
cuda_arch_list = spec.variants['cuda_arch'].value
|
||||||
cuda_arch = cuda_arch_list[0]
|
cuda_arch = cuda_arch_list[0]
|
||||||
if cuda_arch != 'none':
|
if cuda_arch != 'none':
|
||||||
args.append("-DHIOP_NVCC_ARCH=sm_{0}".format(cuda_arch))
|
args.append("-DHIOP_NVCC_ARCH=sm_{0}".format(cuda_arch))
|
||||||
args.append("-DCMAKE_CUDA_ARCHITECTURES={0}".format(cuda_arch))
|
args.append("-DCMAKE_CUDA_ARCHITECTURES={0}".format(cuda_arch))
|
||||||
args.append("-DHIOP_USE_CUDA=ON")
|
|
||||||
|
|
||||||
args.append('-DHIOP_USE_MAGMA=ON')
|
|
||||||
if '+magma' in spec:
|
if '+magma' in spec:
|
||||||
args.append(
|
args.append(
|
||||||
"-DHIOP_MAGMA_DIR={0}".format(spec['magma'].prefix))
|
"-DHIOP_MAGMA_DIR={0}".format(spec['magma'].prefix))
|
||||||
|
|
||||||
else:
|
|
||||||
args.append("-DHIOP_USE_GPU=OFF")
|
|
||||||
args.append("-DHIOP_USE_CUDA=OFF")
|
|
||||||
args.append("-DHIOP_USE_MAGMA=OFF")
|
|
||||||
|
|
||||||
if '+raja' in spec:
|
|
||||||
args.append("-DHIOP_USE_RAJA=ON")
|
|
||||||
args.append("-DHIOP_USE_UMPIRE=ON")
|
|
||||||
args.append("-Dumpire_DIR={0}".format(spec['umpire'].prefix))
|
|
||||||
args.append("-DRAJA_DIR={0}".format(spec['raja'].prefix))
|
|
||||||
else:
|
|
||||||
args.append("-DHIOP_USE_RAJA=OFF")
|
|
||||||
args.append("-DHIOP_USE_UMPIRE=OFF")
|
|
||||||
|
|
||||||
if '+kron' in spec:
|
if '+kron' in spec:
|
||||||
args.append("-DHIOP_WITH_KRON_REDUCTION=ON")
|
|
||||||
args.append(
|
args.append(
|
||||||
"-DHIOP_UMFPACK_DIR={0}".format(spec['suite-sparse'].prefix))
|
"-DHIOP_UMFPACK_DIR={0}".format(spec['suite-sparse'].prefix))
|
||||||
else:
|
|
||||||
args.append("-DHIOP_WITH_KRON_REDUCTION=OFF")
|
|
||||||
|
|
||||||
# Unconditionally disable strumpack, even when +sparse. This may be
|
# Unconditionally disable strumpack, even when +sparse. This may be
|
||||||
# used in place of COINHSL for sparse interface, however this is not
|
# used in place of COINHSL for sparse interface, however this is not
|
||||||
@ -146,18 +123,7 @@ def cmake_args(self):
|
|||||||
args.append("-DHIOP_USE_STRUMPACK=OFF")
|
args.append("-DHIOP_USE_STRUMPACK=OFF")
|
||||||
|
|
||||||
if '+sparse' in spec:
|
if '+sparse' in spec:
|
||||||
args.append("-DHIOP_SPARSE=ON")
|
|
||||||
args.append("-DHIOP_USE_COINHSL=ON")
|
|
||||||
args.append(
|
args.append(
|
||||||
"-DHIOP_COINHSL_DIR={0}".format(spec['coinhsl'].prefix))
|
"-DHIOP_COINHSL_DIR={0}".format(spec['coinhsl'].prefix))
|
||||||
else:
|
|
||||||
args.append("-DHIOP_SPARSE=OFF")
|
|
||||||
args.append("-DHIOP_USE_COINHSL=OFF")
|
|
||||||
|
|
||||||
# Enable CTest tests to use jsrun for easier testing on IBM systems
|
|
||||||
if '+jsrun' in spec:
|
|
||||||
args.append("-DHIOP_TEST_WITH_BSUB=ON")
|
|
||||||
else:
|
|
||||||
args.append("-DHIOP_TEST_WITH_BSUB=OFF")
|
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
Loading…
Reference in New Issue
Block a user