Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@
ignore = all
update = checkout
branch = master
[submodule "metis/GKlib"]
path = metis/GKlib
url = https://github.com/KarypisLab/GKlib.git
ignore = all
update = checkout
branch = master
[submodule "metis/METIS"]
path = metis/METIS
url = https://github.com/KarypisLab/METIS.git
ignore = all
update = checkout
branch = master
71 changes: 68 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ if(NOT DEFINED CMAKE_SUPPRESS_DEVELOPER_WARNINGS)
set(CMAKE_SUPPRESS_DEVELOPER_WARNINGS 1 CACHE INTERNAL "No dev warnings")
endif()

# build static libraries throughout this tree
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build static libraries" FORCE)

# recommend the appropriate make command
if(WIN32)
set(RECOMMENDED_MAKE "mingw32-make")
Expand Down Expand Up @@ -76,8 +79,67 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
endif()

set(SUPERLU_DIR "${PROJECT_SOURCE_DIR}/superlu")
set(SUPERLU_PATCHES_DIR "${PROJECT_SOURCE_DIR}/superlu_patches")
set(SUPERLU_MT_DIR "${PROJECT_SOURCE_DIR}/superlu_mt")
set(SUPERLU_PATCHES_DIR "${PROJECT_SOURCE_DIR}/superlu_mt_patches")
set(SUPERLU_MT_PATCHES_DIR "${PROJECT_SOURCE_DIR}/superlu_mt_patches")
set(METIS_DIR "${PROJECT_SOURCE_DIR}/metis/METIS")
set(GKLIB_DIR "${PROJECT_SOURCE_DIR}/metis/GKlib")
set(METIS_PATCHES_DIR "${PROJECT_SOURCE_DIR}/metis/metis_patches")

if(NOT DEFINED TPL_ENABLE_METISLIB)
set(TPL_ENABLE_METISLIB ON CACHE BOOL "Enable METIS for SuperLU")
endif()
if(TPL_ENABLE_METISLIB)
if(NOT EXISTS "${GKLIB_DIR}/CMakeLists.txt")
message(FATAL_ERROR "The GKlib submodule was not downloaded.")
endif()
if(NOT EXISTS "${METIS_DIR}/CMakeLists.txt")
message(FATAL_ERROR "The METIS submodule was not downloaded.")
endif()

message(STATUS "Applying patches to METIS...")
file(GLOB_RECURSE METIS_PATCH_FILES RELATIVE "${METIS_PATCHES_DIR}" "${METIS_PATCHES_DIR}/*")

foreach(file IN LISTS METIS_PATCH_FILES)
set(src "${METIS_PATCHES_DIR}/${file}")
set(dst "${METIS_DIR}/${file}")

get_filename_component(dst_dir "${dst}" DIRECTORY)
file(MAKE_DIRECTORY "${dst_dir}")

message(STATUS " Patching: ${file}")
file(COPY "${src}" DESTINATION "${dst_dir}")
endforeach()

message(STATUS "METIS patched.")

set(SHARED OFF CACHE BOOL "Build vendored GKlib/METIS as static libraries" FORCE)
set(GKLIB_BUILD_APPS OFF CACHE BOOL "Build GKlib applications" FORCE)
set(METIS_BUILD_PROGRAMS OFF CACHE BOOL "Build METIS command line programs" FORCE)
set(GKLIB_PATH "${GKLIB_DIR}" CACHE PATH "GKlib source directory" FORCE)

add_subdirectory("${GKLIB_DIR}" "${CMAKE_BINARY_DIR}/metis/GKlib")
add_subdirectory("${METIS_DIR}" "${CMAKE_BINARY_DIR}/metis/METIS")

set(TPL_METIS_LIBRARIES "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libmetis.a;${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libGKlib.a" CACHE STRING "METIS static libraries" FORCE)
set(TPL_METIS_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/metis/METIS/include" CACHE PATH "METIS include directory" FORCE)

message(STATUS "Applying patches to SUPERLU...")
file(GLOB_RECURSE SUPERLU_PATCH_FILES RELATIVE "${SUPERLU_PATCHES_DIR}" "${SUPERLU_PATCHES_DIR}/*")

foreach(file IN LISTS SUPERLU_PATCH_FILES)
set(src "${SUPERLU_PATCHES_DIR}/${file}")
set(dst "${SUPERLU_DIR}/${file}")

get_filename_component(dst_dir "${dst}" DIRECTORY)
file(MAKE_DIRECTORY "${dst_dir}")

message(STATUS " Patching: ${file}")
file(COPY "${src}" DESTINATION "${dst_dir}")
endforeach()

message(STATUS "SUPERLU patched for METIS")
endif()

set(enable_examples OFF FORCE)
set(enable_tests OFF FORCE)
Expand All @@ -87,10 +149,10 @@ if(USE_SUPERLU_MT)
message(STATUS "Will link against faster SuperLU_MT.")
set(PLAT "_OPENMP" CACHE STRING "threading flavor _PTHREAD/_OPENMP" FORCE)
message(STATUS "Applying patches to SuperLU_MT...")
file(GLOB_RECURSE PATCH_FILES RELATIVE "${SUPERLU_PATCHES_DIR}" "${SUPERLU_PATCHES_DIR}/*")
file(GLOB_RECURSE PATCH_FILES RELATIVE "${SUPERLU_MT_PATCHES_DIR}" "${SUPERLU_MT_PATCHES_DIR}/*")

foreach(file IN LISTS PATCH_FILES)
set(src "${SUPERLU_PATCHES_DIR}/${file}")
set(src "${SUPERLU_MT_PATCHES_DIR}/${file}")
set(dst "${SUPERLU_MT_DIR}/${file}")

# ensure the destination directory exists
Expand Down Expand Up @@ -150,6 +212,9 @@ else()

include_directories("${SUPERLU_DIR}/SRC")
add_subdirectory(${SUPERLU_DIR})
if(TPL_ENABLE_METISLIB)
add_dependencies(superlu metis GKlib)
endif()
set(SLU_DRIVER "${SUPERLU_DIR}/FORTRAN/c_fortran_dgssv.c")
endif()

Expand Down
44 changes: 22 additions & 22 deletions Source/ARPACK/ARPACK_INFO_MSG.f90
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
! ##################################################################################################################################
! Begin MIT license text.
! Begin MIT license text.
! _______________________________________________________________________________________________________
! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)
! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and

! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)

! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
! associated documentation files (the "Software"), to deal in the Software without restriction, including
! without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
! the following conditions:
! The above copyright notice and this permission notice shall be included in all copies or substantial
! portions of the Software and documentation.
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
! THE SOFTWARE.
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
! the following conditions:

! The above copyright notice and this permission notice shall be included in all copies or substantial
! portions of the Software and documentation.

! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
! THE SOFTWARE.
! _______________________________________________________________________________________________________
! End MIT license text.

! End MIT license text.

SUBROUTINE ARPACK_INFO_MSG ( SUBNAME, INFO, IPARAM, LWORKL, NEV, NCV )

Expand Down Expand Up @@ -84,7 +84,7 @@ SUBROUTINE ARPACK_INFO_MSG ( SUBNAME, INFO, IPARAM, LWORKL, NEV, NCV )


IF ((SUBNAME == 'DSAUPD') .OR. (SUBNAME == 'dsaupd')) THEN

IF (INFO == 1) THEN ! MSG( 2)

ERROR_NUM = ' 7101'
Expand Down Expand Up @@ -417,7 +417,7 @@ SUBROUTINE ARPACK_INFO_MSG ( SUBNAME, INFO, IPARAM, LWORKL, NEV, NCV )
! **********************************************************************************************************************************
100 FORMAT(' *INFORMATION: THE FOLLOWING MESSAGE WAS FOUND BY ARPACK SUBR ',A,' CALLED BY ARPACK DRIVER DSBAND IN ',A, &
' SUBR EIG_LANCZOS.' &
,/,14X,' IT RELATES TO AN ERROR, LISTED BELOW, FOR ARPACK "INFO" = ',I6,' IN THE LANCZOS EIGENVALUE METHOD:',/)
,/,14X,' IT RELATES TO AN ERROR, LISTED BELOW, FOR ARPACK "INFO" = ',I6,' IN THE LANCZOS EIGENVALUE METHOD:',/)

710 FORMAT(' *ERROR ',A,': PROGRAMMING ERROR IN SUBROUTINE ',A &
,/,14X,' FOR LANCZOS EIGENVALUE EXTRACTION WITH ARPACK "INFO" = ',I6,':' &
Expand Down
40 changes: 20 additions & 20 deletions Source/EMG/EMG1/CHECK_TE_MATRIX.f90
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
! ##################################################################################################################################
! Begin MIT license text.
! Begin MIT license text.
! _______________________________________________________________________________________________________
! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)
! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and

! Copyright 2022 Dr William R Case, Jr (mystransolver@gmail.com)

! Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
! associated documentation files (the "Software"), to deal in the Software without restriction, including
! without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
! the following conditions:
! The above copyright notice and this permission notice shall be included in all copies or substantial
! portions of the Software and documentation.
! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
! THE SOFTWARE.
! copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
! the following conditions:

! The above copyright notice and this permission notice shall be included in all copies or substantial
! portions of the Software and documentation.

! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
! OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
! AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
! LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
! OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
! THE SOFTWARE.
! _______________________________________________________________________________________________________
! End MIT license text.

! End MIT license text.

SUBROUTINE CHECK_TE_MATRIX ( TE_IN, NAME_IN )

Expand Down
Loading
Loading