Skip to content

Commit

Permalink
Merge 1cc8052 into 8250342
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiangrimberg authored Sep 20, 2023
2 parents 8250342 + 1cc8052 commit 295b242
Show file tree
Hide file tree
Showing 88 changed files with 20,156 additions and 55,212 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,6 @@ PackConstructorInitializers: BinPack
QualifierAlignment: Left
ShortNamespaceLines: 0
SpacesBeforeTrailingComments: 2
StatementMacros: ['PalacePragmaOmp']
TypenameMacros: ['CEED_QFUNCTION']
UseTab: Never
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ project(palace-superbuild LANGUAGES CXX C VERSION 0.11.2)
set(PALACE_WITH_64BIT_INT OFF CACHE BOOL "Use 64 bit integers")
set(PALACE_WITH_64BIT_BLAS_INT OFF CACHE BOOL "Use ILP64 BLAS/LAPACK interface instead of LP64 (not recommended)")
set(PALACE_WITH_OPENMP OFF CACHE BOOL "Use OpenMP")
set(PALACE_WITH_LIBCEED ON CACHE BOOL "Build with libCEED library for high-order partial assembly support")
set(PALACE_WITH_GSLIB ON CACHE BOOL "Build with GSLIB library for high-order field interpolation")

set(PALACE_BUILD_EXTERNAL_DEPS ON CACHE BOOL "Build external third-party dependency libraries")
Expand All @@ -29,7 +28,7 @@ set(PALACE_WITH_STRUMPACK OFF CACHE BOOL "Build with STRUMPACK sparse direct sol
set(PALACE_WITH_MUMPS OFF CACHE BOOL "Build with MUMPS sparse direct solver")
set(PALACE_WITH_SLEPC ON CACHE BOOL "Build with SLEPc eigenvalue solver")
set(PALACE_WITH_ARPACK OFF CACHE BOOL "Build with ARPACK eigenvalue solver")
set(PALACE_WITH_LIBXSMM ON CACHE BOOL "Build with LIBXSMM backend when libCEED is enabled")
set(PALACE_WITH_LIBXSMM ON CACHE BOOL "Build with LIBXSMM backend for libCEED")

set(ANALYZE_SOURCES_CLANG_TIDY OFF CACHE BOOL "Run static analysis checks using clang-tidy")
set(ANALYZE_SOURCES_CPPCHECK OFF CACHE BOOL "Run static analysis checks using cppcheck")
Expand Down Expand Up @@ -118,10 +117,8 @@ if(PALACE_WITH_GSLIB)
endif()

# Add libCEED (always built as part of Palace)
if(PALACE_WITH_LIBCEED)
message(STATUS "==================== Configuring libCEED dependency ====================")
include(ExternalLibCEED)
endif()
message(STATUS "==================== Configuring libCEED dependency ====================")
include(ExternalLibCEED)

# Add MFEM (always built as part of Palace)
message(STATUS "====================== Configuring MFEM dependency =====================")
Expand Down
4 changes: 2 additions & 2 deletions cmake/ExternalGitTags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ set(EXTERN_LIBCEED_GIT_BRANCH
"Git branch for external libCEED build"
)
set(EXTERN_LIBCEED_GIT_TAG
"f9358d07c5045932a84606d10f4be92eafaca9fd" CACHE STRING # main @ 08/07/2023
"5b89cb6732d9042822ce9e837fca204cc7224f5f" CACHE STRING # main @ 09/20/2023
"Git tag for external libCEED build"
)

Expand Down Expand Up @@ -132,7 +132,7 @@ set(EXTERN_MFEM_GIT_BRANCH
"Git branch for external MFEM build"
)
set(EXTERN_MFEM_GIT_TAG
"1ccb31fde641a96c9fd2920bc123c35eee31d476" CACHE STRING # master @ 08/27/2023
"d063a4a02e34a8d1a7616a1d78a63fcc382105db" CACHE STRING # master @ 09/19/2023
"Git tag for external MFEM build"
)

Expand Down
14 changes: 2 additions & 12 deletions cmake/ExternalLibCEED.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set(LIBCEED_OPTIONS
"CC=${CMAKE_C_COMPILER}"
"OPT=${LIBCEED_C_FLAGS}"
"STATIC="
"VERBOSE=1"
)

# Configure OpenMP
Expand Down Expand Up @@ -73,7 +72,8 @@ message(STATUS "LIBCEED_OPTIONS: ${LIBCEED_OPTIONS_PRINT}")

# Add OpenMP support to libCEED
set(LIBCEED_PATCH_FILES
"${CMAKE_SOURCE_DIR}/extern/patch/libCEED/patch_openmp.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/libCEED/patch_gpu_restriction_dev.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/libCEED/patch_hcurl_hdiv_basis.diff"
)

include(ExternalProject)
Expand All @@ -92,13 +92,3 @@ ExternalProject_Add(libCEED
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} ${LIBCEED_OPTIONS} install
TEST_COMMAND ""
)

if(PALACE_WITH_LIBXSMM)
if(PALACE_BUILD_EXTERNAL_DEPS)
include(GNUInstallDirs)
set(_LIBXSMM_LIBRARIES ${CMAKE_INSTALL_PREFIX}/lib/libxsmm${CMAKE_SHARED_LIBRARY_SUFFIX})
else()
set(_LIBXSMM_LIBRARIES "-lxsmm")
endif()
set(LIBCEED_EXTRA_LIBRARIES ${_LIBXSMM_LIBRARIES} CACHE STRING "List of extra library files for libCEED")
endif()
22 changes: 1 addition & 21 deletions cmake/ExternalMFEM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ if(PALACE_BUILD_EXTERNAL_DEPS)
else()
set(MFEM_DEPENDENCIES)
endif()
if(PALACE_WITH_LIBCEED)
list(APPEND MFEM_DEPENDENCIES libCEED)
endif()
if(PALACE_WITH_GSLIB)
list(APPEND MFEM_DEPENDENCIES gslib)
endif()
Expand Down Expand Up @@ -70,6 +67,7 @@ list(APPEND MFEM_OPTIONS
"-DMFEM_USE_ZLIB=${PALACE_MFEM_WITH_ZLIB}"
"-DMFEM_USE_LIBUNWIND=${PALACE_MFEM_WITH_LIBUNWIND}"
"-DMFEM_USE_METIS_5=YES"
"-DMFEM_USE_CEED=NO"
)
if(PALACE_WITH_STRUMPACK OR PALACE_WITH_MUMPS)
list(APPEND MFEM_OPTIONS
Expand All @@ -86,20 +84,6 @@ if(NOT "${BLAS_LAPACK_LIBRARIES}" STREQUAL "")
)
endif()

# MFEM with libCEED is always built internally
if(PALACE_WITH_LIBCEED)
list(APPEND MFEM_OPTIONS
"-DMFEM_USE_CEED=YES"
"-DCEED_DIR=${CMAKE_INSTALL_PREFIX}"
)
if(NOT "${LIBCEED_EXTRA_LIBRARIES}" STREQUAL "")
list(APPEND MFEM_OPTIONS
"-DlibCEED_REQUIRED_LIBRARIES=${LIBCEED_EXTRA_LIBRARIES}"
# "-DlibCEED_REQUIRED_PACKAGES=BLAS"
)
endif()
endif()

# MFEM with GSLIB is always built internally
if(PALACE_WITH_GSLIB)
list(APPEND MFEM_OPTIONS
Expand Down Expand Up @@ -254,11 +238,7 @@ set(MFEM_PATCH_FILES
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_fecoll_vdim_fix.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_stateless_doftrans_threadsafe.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_global_variables_threadsafe.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_assembly_cleanup_prereqs.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_legacy_features_cleanup.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_integ_getrule_interface.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_mfem_device_fixes.diff"
"${CMAKE_SOURCE_DIR}/extern/patch/mfem/patch_pa_libceed_dev.diff"
)

include(ExternalProject)
Expand Down
2 changes: 1 addition & 1 deletion cmake/ExternalPalace.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#

# Force build order
set(PALACE_DEPENDENCIES mfem)
set(PALACE_DEPENDENCIES mfem libCEED)
if(PALACE_BUILD_EXTERNAL_DEPS)
list(APPEND PALACE_DEPENDENCIES json fmt eigen)
if(PALACE_WITH_SLEPC)
Expand Down
2 changes: 1 addition & 1 deletion extern/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if(PALACE_WITH_ARPACK)
endif()

# Add LIBXSMM (for libCEED)
if(PALACE_WITH_LIBCEED AND PALACE_WITH_LIBXSMM)
if(PALACE_WITH_LIBXSMM)
message(STATUS "==================== Configuring LIBXSMM dependency ====================")
include(ExternalLIBXSMM)
endif()
Expand Down
Loading

0 comments on commit 295b242

Please sign in to comment.