Skip to content

Commit

Permalink
Update mumps patch
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcars committed Nov 21, 2024
1 parent 5d4b881 commit 153cf93
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 80 deletions.
2 changes: 1 addition & 1 deletion cmake/ExternalBLASLAPACK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,4 @@ set(BLAS_LAPACK_LIBRARIES ${_BLAS_LAPACK_LIBRARIES} CACHE STRING
)
set(BLAS_LAPACK_INCLUDE_DIRS ${_BLAS_LAPACK_INCLUDE_DIRS} CACHE STRING
"Path to BLAS/LAPACK include directories"
)
)
4 changes: 2 additions & 2 deletions cmake/ExternalGitTags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ set(EXTERN_MFEM_GIT_BRANCH
"Git branch for external MFEM build"
)
set(EXTERN_MFEM_GIT_TAG
"302be130d10f3ac3ecb2d68cedb85c74d405fbf3" CACHE STRING
"7c1a0eb5e3f70ff9d161c9d6e3f228ba2513acca" CACHE STRING
"Git tag for external MFEM build"
)

Expand Down Expand Up @@ -174,7 +174,7 @@ set(EXTERN_PETSC_GIT_BRANCH
"Git branch for external PETSc build"
)
set(EXTERN_PETSC_GIT_TAG
"72c1e49ee3d896ae53f9f914a80b983ec63c03c7" CACHE STRING
"2ad7182b1093845a8c26c56c2f6611a55c3328ce" CACHE STRING
"Git tag for external PETSc build"
)

Expand Down
7 changes: 0 additions & 7 deletions cmake/ExternalSLEPc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,6 @@ endif()
string(REPLACE ";" "; " PETSC_OPTIONS_PRINT "${PETSC_OPTIONS}")
message(STATUS "PETSC_OPTIONS: ${PETSC_OPTIONS_PRINT}")


# A number of patches to MFEM for our use cases
set(PETSC_PATCH_FILES
"${CMAKE_SOURCE_DIR}/extern/patch/PETSc/patch_install.diff"
)

include(ExternalProject)
ExternalProject_Add(petsc
DEPENDS ${PETSC_DEPENDENCIES}
Expand All @@ -112,7 +106,6 @@ ExternalProject_Add(petsc
BUILD_IN_SOURCE TRUE
UPDATE_COMMAND ""
CONFIGURE_COMMAND ./configure ${PETSC_OPTIONS}
PATCH_COMMAND git apply "${PETSC_PATCH_FILES}"
# TEST_COMMAND ${CMAKE_MAKE_PROGRAM} check # Use auto-detected PETSC_DIR/PETSC_ARCH
TEST_COMMAND ""
TEST_BEFORE_INSTALL TRUE
Expand Down
80 changes: 11 additions & 69 deletions extern/patch/mumps/patch_build.diff
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ index 3be37f8..193e8b5 100644
message(STATUS "MUMPS LAPACK_VENDOR: ${LAPACK_VENDOR}")
diff --git a/cmake/FindLAPACK.cmake b/cmake/FindLAPACK.cmake
deleted file mode 100644
index 8647696..0000000
index 9b9d1d0..0000000
--- a/cmake/FindLAPACK.cmake
+++ /dev/null
@@ -1,502 +0,0 @@
@@ -1,501 +0,0 @@
-# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
-# file Copyright.txt or https://cmake.org/licensing for details.
-
Expand Down Expand Up @@ -392,12 +392,11 @@ index 8647696..0000000
-
-# ========== main program
-
-set(lapack_cray false)
-if(DEFINED ENV{CRAYPE_VERSION})
- set(lapack_cray true)
-if(NOT DEFINED LAPACK_CRAY AND DEFINED ENV{CRAYPE_VERSION})
- set(LAPACK_CRAY true)
-endif()
-
-if(NOT (lapack_cray
-if(NOT (LAPACK_CRAY
- OR OpenBLAS IN_LIST LAPACK_FIND_COMPONENTS
- OR Netlib IN_LIST LAPACK_FIND_COMPONENTS
- OR Atlas IN_LIST LAPACK_FIND_COMPONENTS
Expand Down Expand Up @@ -428,7 +427,7 @@ index 8647696..0000000
- openblas_libs()
-elseif(AOCL IN_LIST LAPACK_FIND_COMPONENTS)
- aocl_libs()
-elseif(lapack_cray)
-elseif(LAPACK_CRAY)
- # LAPACK is implicitly part of Cray PE LibSci, use Cray compiler wrapper.
-endif()
-
Expand Down Expand Up @@ -483,14 +482,14 @@ index 8647696..0000000
-endfunction(lapack_check)
-
-# --- Check library links
-if(lapack_cray OR LAPACK_LIBRARY)
-if(LAPACK_CRAY OR LAPACK_LIBRARY)
- lapack_check()
-endif()
-
-
-include(FindPackageHandleStandardArgs)
-
-if(lapack_cray)
-if(LAPACK_CRAY)
- find_package_handle_standard_args(LAPACK HANDLE_COMPONENTS
- REQUIRED_VARS LAPACK_links
- )
Expand Down Expand Up @@ -539,7 +538,7 @@ index 8647696..0000000
-
-mark_as_advanced(LAPACK_LIBRARY LAPACK_INCLUDE_DIR)
diff --git a/cmake/FindSCALAPACK.cmake b/cmake/FindSCALAPACK.cmake
index 9b2e056..166d05f 100644
index e66930a..5fa9d78 100644
--- a/cmake/FindSCALAPACK.cmake
+++ b/cmake/FindSCALAPACK.cmake
@@ -52,8 +52,6 @@ References
Expand All @@ -565,64 +564,7 @@ index 9b2e056..166d05f 100644
list(APPEND CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES} ${MPI_Fortran_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

if(STATIC IN_LIST SCALAPACK_FIND_COMPONENTS AND
@@ -188,40 +183,9 @@ endfunction(scalapack_lib)

# === main

-set(scalapack_cray false)
-if(DEFINED ENV{CRAYPE_VERSION})
- set(scalapack_cray true)
-endif()
-
-if(NOT scalapack_cray)
- if(NOT MKL IN_LIST SCALAPACK_FIND_COMPONENTS AND DEFINED ENV{MKLROOT} AND IS_DIRECTORY "$ENV{MKLROOT}")
- list(APPEND SCALAPACK_FIND_COMPONENTS MKL)
- endif()
-endif()
-
-if(STATIC IN_LIST SCALAPACK_FIND_COMPONENTS)
- set(_orig_suff ${CMAKE_FIND_LIBRARY_SUFFIXES})
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX})
-endif()
-
-if(MKL IN_LIST SCALAPACK_FIND_COMPONENTS OR MKL64 IN_LIST SCALAPACK_FIND_COMPONENTS)
- scalapack_mkl()
-elseif(scalapack_cray)
- # Cray PE has Scalapack build into LibSci. Use Cray compiler wrapper.
-else()
- scalapack_lib()
-endif()
-
-if(STATIC IN_LIST SCALAPACK_FIND_COMPONENTS)
- if(SCALAPACK_LIBRARY)
- set(SCALAPACK_STATIC_FOUND true)
- endif()
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_orig_suff})
-endif()
-
# --- Check that Scalapack links

-if(scalapack_cray OR SCALAPACK_LIBRARY)
+if(SCALAPACK_LIBRARIES)
scalapack_check()
endif()

@@ -229,32 +193,19 @@ endif()

include(FindPackageHandleStandardArgs)

-if(scalapack_cray)
- find_package_handle_standard_args(SCALAPACK HANDLE_COMPONENTS
- REQUIRED_VARS SCALAPACK_links
- )
-else()
- find_package_handle_standard_args(SCALAPACK HANDLE_COMPONENTS
- REQUIRED_VARS SCALAPACK_LIBRARY SCALAPACK_links
- )
-endif()
+find_package_handle_standard_args(SCALAPACK HANDLE_COMPONENTS
+REQUIRED_VARS SCALAPACK_LIBRARIES SCALAPACK_links
+)
@@ -240,20 +235,13 @@ endif()

if(SCALAPACK_FOUND)
# need if _FOUND guard as can't overwrite imported target even if bad
Expand All @@ -644,7 +586,7 @@ index 9b2e056..166d05f 100644

# For MKL, we don't use FindLapack, so define LAPACK::LAPACK as alias
if(MKL_FOUND AND NOT TARGET LAPACK::LAPACK)
@@ -262,5 +213,3 @@ Scalapack include directories: ${SCALAPACK_INCLUDE_DIRS}")
@@ -261,5 +249,3 @@ Scalapack include directories: ${SCALAPACK_INCLUDE_DIRS}")
endif()
endif()
endif()
Expand Down
2 changes: 1 addition & 1 deletion singularity/singularity.def
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ From: rockylinux:9
pkg-config python3 wget zlib

# Install CMake (STRUMPACK requires >= 3.21)
CMAKE_VERSION=3.26.5
CMAKE_VERSION=3.31.0
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-linux-$(uname -m).sh
/bin/bash cmake-$CMAKE_VERSION-* --skip-license --prefix=/usr
rm -rf cmake-*
Expand Down

0 comments on commit 153cf93

Please sign in to comment.