From 1a0dc7c65d4e66539134de560fa53935645b7514 Mon Sep 17 00:00:00 2001 From: Sebastian Grimberg Date: Wed, 20 Sep 2023 17:16:29 -0700 Subject: [PATCH] Fixes for Spack and Singularity builds --- palace/cmake/PkgConfigHelpers.cmake | 18 ++++++------------ singularity/singularity.def | 1 - spack/local/packages/palace/package.py | 8 +------- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/palace/cmake/PkgConfigHelpers.cmake b/palace/cmake/PkgConfigHelpers.cmake index 0bb9b88e6..152c112f1 100644 --- a/palace/cmake/PkgConfigHelpers.cmake +++ b/palace/cmake/PkgConfigHelpers.cmake @@ -51,18 +51,14 @@ int main() return 0; } ") - try_run( - LIBCEED_TEST_EXITCODE + try_compile( LIBCEED_TEST_COMPILED - ${LIBCEED_LIB_TEST_DIR} - ${LIBCEED_LIB_TEST_CPP} + SOURCES ${LIBCEED_LIB_TEST_CPP} LINK_LIBRARIES ${_libceed_target} - COMPILE_OUTPUT_VARIABLE LIBCEED_TEST_COMPILE_OUTPUT - RUN_OUTPUT_VARIABLE LIBCEED_TEST_OUTPUT + OUTPUT_VARIABLE LIBCEED_TEST_COMPILE_OUTPUT ) # message(STATUS "LIBCEED_TEST_COMPILE_OUTPUT: ${LIBCEED_TEST_COMPILE_OUTPUT}") - # message(STATUS "LIBCEED_TEST_OUTPUT: ${LIBCEED_TEST_OUTPUT}") - if(LIBCEED_TEST_COMPILED AND LIBCEED_TEST_EXITCODE EQUAL 0) + if(LIBCEED_TEST_COMPILED) # message(STATUS "libCEED test program - Successful") set(${_libceed_test_success} TRUE PARENT_SCOPE) else() @@ -128,8 +124,7 @@ int main() try_run( PETSC_TEST_EXITCODE PETSC_TEST_COMPILED - ${PETSC_LIB_TEST_DIR} - ${PETSC_LIB_TEST_CPP} + SOURCES ${PETSC_LIB_TEST_CPP} LINK_LIBRARIES ${_petsc_target} COMPILE_OUTPUT_VARIABLE PETSC_TEST_COMPILE_OUTPUT RUN_OUTPUT_VARIABLE PETSC_TEST_OUTPUT @@ -208,8 +203,7 @@ int main() try_run( SLEPC_TEST_EXITCODE SLEPC_TEST_COMPILED - ${SLEPC_LIB_TEST_DIR} - ${SLEPC_LIB_TEST_CPP} + SOURCES ${SLEPC_LIB_TEST_CPP} LINK_LIBRARIES ${_slepc_target} COMPILE_OUTPUT_VARIABLE SLEPC_TEST_COMPILE_OUTPUT RUN_OUTPUT_VARIABLE SLEPC_TEST_OUTPUT diff --git a/singularity/singularity.def b/singularity/singularity.def index fa2b46b9a..d789a05f7 100644 --- a/singularity/singularity.def +++ b/singularity/singularity.def @@ -81,7 +81,6 @@ From: rockylinux:9 -DBUILD_SHARED_LIBS:BOOL=TRUE \ -DPALACE_WITH_64BIT_INT:BOOL=FALSE \ -DPALACE_WITH_OPENMP:BOOL=TRUE \ - -DPALACE_WITH_LIBCEED:BOOL=TRUE \ -DPALACE_WITH_GSLIB:BOOL=TRUE \ -DPALACE_WITH_SUPERLU:BOOL=TRUE \ -DPALACE_WITH_STRUMPACK:BOOL=TRUE \ diff --git a/spack/local/packages/palace/package.py b/spack/local/packages/palace/package.py index 700601caf..fab688682 100644 --- a/spack/local/packages/palace/package.py +++ b/spack/local/packages/palace/package.py @@ -21,11 +21,6 @@ class Palace(CMakePackage): variant("shared", default=True, description="Enables the build of shared libraries") variant("int64", default=False, description="Use 64 bit integers") variant("openmp", default=False, description="Use OpenMP") - variant( - "libceed", - default=True, - description="Build with libCEED library for high-order partial assembly support", - ) variant( "gslib", default=True, @@ -38,7 +33,7 @@ class Palace(CMakePackage): variant("mumps", default=False, description="Build with MUMPS sparse direct solver") variant("slepc", default=True, description="Build with SLEPc eigenvalue solver") variant("arpack", default=False, description="Build with ARPACK eigenvalue solver") - variant("libxsmm", default=True, description="Build with LIBXSMM backend when libCEED is enabled") + variant("libxsmm", default=True, description="Build with LIBXSMM backend for libCEED") # Dependencies depends_on("cmake@3.13:", type="build") @@ -119,7 +114,6 @@ def cmake_args(self): self.define_from_variant("BUILD_SHARED_LIBS", "shared"), self.define_from_variant("PALACE_WITH_64BIT_INT", "int64"), self.define_from_variant("PALACE_WITH_OPENMP", "openmp"), - self.define_from_variant("PALACE_WITH_LIBCEED", "libceed"), self.define_from_variant("PALACE_WITH_GSLIB", "gslib"), self.define_from_variant("PALACE_WITH_SUPERLU", "superlu-dist"), self.define_from_variant("PALACE_WITH_STRUMPACK", "strumpack"),