Skip to content

Commit 82ea34f

Browse files
Added mumps.h in linear_algebra and mumps_testing directory (ready for review)
1 parent fafef65 commit 82ea34f

20 files changed

+2321047
-0
lines changed

.gitignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@
1010
test/fdapde_test
1111
test/.cache
1212
test/build/
13+
14+
# Mumps testing
15+
mumps_testing/mumps_fdapde_test
16+
mumps_testing/.cache
17+
mumps_testing/build/
18+
mumps_testing/data/build/
19+
mumps_testing/test_output.log
20+
21+
!mumps_testing/CMakeLists.txt
22+
!mumps_testing/user_config.cmake
23+
!mumps_testing/data/CMakeLists.txt
24+
25+
1326
build/
1427
CMakeFiles/
1528
.DS_Store

fdaPDE/linear_algebra/mumps.h

Lines changed: 1226 additions & 0 deletions
Large diffs are not rendered by default.

mumps_testing/CMakeLists.txt

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(MUMPS_TESTING CXX Fortran)
4+
5+
set(CMAKE_CXX_STANDARD 23)
6+
7+
set(CMAKE_CXX_FLAGS "-O -fopenmp -Wno-deprecated-declarations")
8+
set(CMAKE_Fortran_FLAGS "-O -fopenmp")
9+
10+
find_package(MPI REQUIRED)
11+
find_package(OpenMP REQUIRED)
12+
13+
# Fetch the user defined directories
14+
include(${CMAKE_SOURCE_DIR}/user_config.cmake)
15+
16+
# Define library directories
17+
set(IEIGENDIR "${EIGENDIR}")
18+
set(LPORDDIR "${MUMPSDIR}/PORD/lib")
19+
set(IDMUMPSDIR "${MUMPSDIR}/include")
20+
set(LDMUMPSDIR "${MUMPSDIR}/lib")
21+
22+
# Define library variables
23+
set(LIBS_DMUMPS "dmumps" "mumps_common")
24+
set(LIBS_SCOTCH "ptesmumps" "ptscotch" "ptscotcherr")
25+
set(LIBS_METIS "parmetis" "metis")
26+
set(LIBS_PORD "pord")
27+
set(LIBS_LAPACK "lapack")
28+
set(LIBS_SCALAPACK "scalapack-openmpi")
29+
set(LIBS_BLAS "blas")
30+
set(LIBS_OTHERS "pthread" "stdc++")
31+
32+
# enable testing functionality using gtest
33+
include(FetchContent)
34+
FetchContent_Declare(
35+
googletest
36+
# version 1.14.0
37+
URL https://github.com/google/googletest/archive/f8d7d77c06936315286eb55f8de22cd23c188571.zip
38+
)
39+
40+
# For Windows: Prevent overriding the parent project's compiler/linker settings
41+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
42+
FetchContent_MakeAvailable(googletest)
43+
44+
enable_testing()
45+
46+
add_executable(mumps_fdapde_test main.cpp)
47+
set_target_properties(mumps_fdapde_test PROPERTIES LINKER_LANGUAGE Fortran)
48+
49+
target_include_directories(mumps_fdapde_test PRIVATE
50+
${IEIGENDIR}
51+
${IDMUMPSDIR}
52+
${MPI_INCLUDE_PATH}
53+
)
54+
55+
target_link_directories(mumps_fdapde_test PRIVATE
56+
${LSCOTCHDIR}
57+
${LPORDDIR}
58+
${LMETISDIR}
59+
${LDMUMPSDIR}
60+
)
61+
62+
target_link_libraries(mumps_fdapde_test PRIVATE
63+
${LIBS_DMUMPS}
64+
${LIBS_SCOTCH}
65+
${LIBS_METIS}
66+
${LIBS_PORD}
67+
${LIBS_LAPACK}
68+
${LIBS_SCALAPACK}
69+
${LIBS_BLAS}
70+
${LIBS_OTHERS}
71+
MPI::MPI_Fortran
72+
MPI::MPI_CXX
73+
OpenMP::OpenMP_CXX
74+
gtest_main
75+
)
76+
77+
add_test(NAME mumps_fdapde_test
78+
COMMAND $<TARGET_FILE:mumps_fdapde_test>
79+
)
80+
81+
include(GoogleTest)
82+
gtest_discover_tests(mumps_fdapde_test)

mumps_testing/data/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.14)
2+
3+
project(MatrixGenerator CXX)
4+
5+
set(CMAKE_CXX_STANDARD 23)
6+
7+
add_executable(MatrixGenerator src/matrix_generator.cpp)
8+
9+
include(${CMAKE_SOURCE_DIR}/../user_config.cmake)
10+
11+
target_include_directories(MatrixGenerator PRIVATE ${IEIGENDIR})
12+
13+

0 commit comments

Comments
 (0)