forked from pghysels/STRUMPACK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
586 lines (530 loc) · 20.4 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
cmake_minimum_required(VERSION 2.8)
project(STRUMPACK CXX C Fortran)
## Metis is required for now
# option(STRUMPACK_USE_METIS "Build with support for Metis" ON)
option(STRUMPACK_USE_MPI "Build with MPI support" ON)
option(STRUMPACK_USE_PARMETIS "Build with support for ParMetis" OFF)
option(STRUMPACK_USE_SCOTCH "Build with support for Scotch/PTScotch" OFF)
option(STRUMPACK_USE_OPENMP "Use OpenMP for on-node threading tasking" ON)
option(STRUMPACK_USE_PAPI "Build with support for PAPI monitoring" OFF)
option(STRUMPACK_USE_COMBBLAS "Use CombBLAS for weighted matching" OFF)
option(STRUMPACK_COUNT_FLOPS "Build with flop counters" ON)
option(STRUMPACK_TASK_TIMERS "Build with timers for internal routines" OFF)
option(STRUMPACK_BUILD_TESTS "Build the tests" ON)
option(STRUMPACK_DEV_TESTING "Enable extensive testing" OFF)
option(STRUMPACK_C_INTERFACE "Build the C interface" ON)
if(NOT STRUMPACK_USE_MPI)
if(STRUMPACK_USE_PARMETIS)
message(STATUS "Disabling ParMetis. ParMetis requires MPI support,"
" but compiling without MPI support! ")
set(STRUMPACK_USE_PARMETIS OFF)
endif()
endif()
set(STRUMPACK_VERSION_MAJOR 2)
set(STRUMPACK_VERSION_MINOR 3)
set(STRUMPACK_VERSION_PATCH 0)
set(STRUMPACK_VERSION_FULL
"${STRUMPACK_VERSION_MAJOR}.${STRUMPACK_VERSION_MINOR}")
if(STRUMPACK_USE_COMBBLAS)
set(CMAKE_CXX_STANDARD 14)
else()
set(CMAKE_CXX_STANDARD 11)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED on)
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("-std=c++14" COMPILER_SUPPORTS_CXX14)
if(COMPILER_SUPPORTS_CXX14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
elseif(COMPILER_SUPPORTS_CXX11)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
check_cxx_compiler_flag("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()
if (STRUMPACK_USE_MPI)
find_package(MPI REQUIRED)
if(MPI_C_FOUND)
message(STATUS "Found C mpi compiler: " "${MPI_C_COMPILER}")
include_directories(${MPI_C_INCLUDE_PATH})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MPI_C_COMPILE_FLAGS}" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MPI_C_LINK_FLAGS}" )
set(LIBS ${LIBS} ${MPI_C_LIBRARIES})
endif()
if(MPI_CXX_FOUND)
message(STATUS "Found C++ mpi compiler: " "${MPI_CXX_COMPILER}")
include_directories(${MPI_CXX_INCLUDE_PATH})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MPI_CXX_COMPILE_FLAGS}" )
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${MPI_CXX_LINK_FLAGS}" )
set(LIBS ${LIBS} ${MPI_CXX_LIBRARIES})
endif()
if(MPI_Fortran_FOUND)
message(STATUS "Found Fortran mpi compiler: " "${MPI_Fortran_COMPILER}")
include_directories(${MPI_Fortran_INCLUDE_PATH})
set(CMAKE_Fortran_FLAGS
"${CMAKE_Fortran_FLAGS} ${MPI_Fortran_COMPILE_FLAGS}" )
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${MPI_Fortran_LINK_FLAGS}" )
set(LIBS ${LIBS} ${MPI_Fortran_LIBRARIES})
endif()
endif()
include(FortranCInterface)
FortranCInterface_HEADER(${PROJECT_BINARY_DIR}/StrumpackFortranCInterface.h
MACRO_NAMESPACE "FC_")
include_directories(${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/src)
FortranCInterface_VERIFY(CXX)
if(STRUMPACK_USE_OPENMP)
include(FindOpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
message(STATUS "OpenMP specification date: " "${OpenMP_CXX_SPEC_DATE}")
# if(OpenMP_CXX_SPEC_DATE VERSION_GREATER_EQUAL 201307)
# message(STATUS "Compiler claims to support OpenMP 4.0")
message(STATUS "Checking for support of OpenMP task dependencies")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
check_cxx_source_compiles(
"#include <iostream>
int main() {
int x=0, y=5;
#pragma omp parallel
#pragma omp single
{
#pragma omp task depend(inout:x) depend(out:y)
{ y = x; x += 3; }
#pragma omp task depend(in:x) depend(out:y)
{ y = 3 * x; }
}
return 0;
}" STRUMPACK_USE_OPENMP_TASK_DEPEND)
if (STRUMPACK_USE_OPENMP_TASK_DEPEND)
message(STATUS "Enabling OpenMP tasks with dependencies.")
else()
message(STATUS "Compiler claims to support OpenMP 4.0,"
" but failed to compile a test code with task dependencies."
" STRUMPACK will not use OpenMP tasks with dependencies.")
endif()
# endif()
# if(OpenMP_CXX_SPEC_DATE VERSION_GREATER_EQUAL 201511)
# message(STATUS "Compiler claims to support OpenMP 4.5")
message(STATUS "Checking for support of OpenMP taskloop")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_CXX_FLAGS}")
check_cxx_source_compiles(
"#include <iostream>
int main() {
#pragma omp parallel
#pragma omp single
#pragma omp taskloop
for (int i=0; i<100; i++) std::cout << \"hello\" << std::endl;
return 0;
}" STRUMPACK_USE_OPENMP_TASKLOOP)
if (STRUMPACK_USE_OPENMP_TASKLOOP)
message(STATUS "Enabling OpenMP taskloop construct")
else()
message(STATUS "Compiler claims to support OpenMP 4.5,"
" but failed to compile a taskloop test code."
" STRUMPACK will not use the OpenMP taskloop construct.")
endif()
else()
message(WARNING "WARNING: Could not detect OpenMP compiler
support, will proceed without OpenMP!")
endif()
else()
message(STATUS "Building STRUMPACK without OpenMP support.")
check_cxx_compiler_flag("-Wno-unknown-pragmas"
COMPILER_SUPPORTS_NOPRAGMA_WARNING)
if (COMPILER_SUPPORTS_NOPRAGMA_WARNING)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
endif()
endif()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_package(Threads)
if(CMAKE_USE_PTHREADS_INIT)
message(STATUS "Found PTHREADS library")
set(LIBS ${LIBS} ${CMAKE_THREAD_LIBS_INIT})
else()
message(WARNING
"WARNING: Could not find a PTHREADS library,"
" might be needed by Scotch !!!!")
endif()
if(DEFINED BLAS_LIBRARIES)
set(LIBS ${LIBS} ${BLAS_LIBRARIES})
else()
find_package(BLAS)
if(BLAS_FOUND)
message(STATUS "Found BLAS library: " "${BLAS_LIBRARIES}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${BLAS_LINKER_FLAGS}")
set(LIBS ${LIBS} ${BLAS_LIBRARIES})
else()
message(WARNING "WARNING: Could not find a BLAS library !!!!!!!!!!!\n"
"Note that on some machines (like Cray's)"
" BLAS is linked in by the compiler wrapper")
endif()
endif()
if(DEFINED LAPACK_LIBRARIES)
set(LIBS ${LIBS} ${LAPACK_LIBRARIES})
else()
find_package(LAPACK)
if(LAPACK_FOUND)
message(STATUS "Found LAPACK library: " "${LAPACK_LIBRARIES}")
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} ${LAPACK_LINKER_FLAGS}")
set(LIBS ${LIBS} ${LAPACK_LIBRARIES})
else()
message(WARNING "WARNING: Could not find a LAPACK library !!!!!!!!!\n"
"Note that on some machines (like Cray's)"
" LAPACK is linked in by the compiler wrapper")
endif()
endif()
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/Modules/")
if (STRUMPACK_USE_MPI)
if(DEFINED SCALAPACK_LIBRARIES)
set(LIBS ${LIBS} ${SCALAPACK_LIBRARIES})
include_directories(${SCALAPACK_INCLUDES})
else()
find_package(SCALAPACK)
if(SCALAPACK_FOUND)
set(LIBS ${LIBS} ${SCALAPACK_LIBRARIES})
include_directories(${SCALAPACK_INCLUDES})
else()
message(WARNING
"WARNING: Could not find a ScaLAPACK/BLACS library !!!!!!!!\n"
"Note that on some machines (like Cray's)"
" ScaLAPACK is linked in by the compiler wrapper")
endif()
endif()
endif()
if(STRUMPACK_USE_PAPI)
find_package(PAPI)
set(LIBS ${LIBS} ${PAPI_LIBRARIES})
include_directories(${PAPI_INCLUDES})
if(NOT PAPI_FOUND)
message(FATAL_ERROR
"Could not find PAPI!"
"Set the PAPIDIR environtment variable,"
"or set specify PAPI_INCLUDES and PAPI_LIBRARIES."
"Get PAPI from http://icl.cs.utk.edu/papi/")
endif()
else()
message(STATUS "Building STRUMPACK without PAPI support.")
endif()
if (STRUMPACK_USE_MPI)
if(STRUMPACK_USE_COMBBLAS)
set(LIBS ${LIBS} ${COMBBLAS_LIBRARIES})
include_directories(${COMBBLAS_INCLUDES})
message(STATUS "Combinatorial BLAS support enabled")
endif()
if(STRUMPACK_USE_PARMETIS)
find_package(ParMetis)
set(LIBS ${LIBS} ${PARMETIS_LIBRARIES})
include_directories(${PARMETIS_INCLUDES})
if(NOT PARMETIS_FOUND)
message(FATAL_ERROR
"Could not find ParMETIS!"
"Get ParMetis from http://glaros.dtc.umn.edu/gkhome/metis/parmetis/overview")
endif()
else()
message(STATUS "Building STRUMPACK without ParMetis support.")
endif()
endif()
# at the moment, Metis is required to build STRUMPACK
find_package(Metis)
set(LIBS ${LIBS} ${METIS_LIBRARIES})
include_directories(${METIS_INCLUDES})
if(METIS_FOUND)
message(STATUS "Found Metis library\n")
else()
message(FATAL_ERROR
"Could not find Metis (required)!"
"Get Metis from http://glaros.dtc.umn.edu/gkhome/metis/metis/overview\n")
endif()
if(STRUMPACK_USE_SCOTCH)
find_package(Scotch)
set(LIBS ${LIBS} ${SCOTCH_LIBRARIES})
include_directories(${SCOTCH_INCLUDES})
else()
message(STATUS "Building STRUMPACK without Scotch/PTScotch support.")
endif()
message(STATUS "Linking with: " "${LIBS}")
message(STATUS "Implicit C libs: " "${CMAKE_C_IMPLICIT_LINK_LIBRARIES}")
message(STATUS "Implicit CXX libs: " "${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES}")
message(STATUS "Implicit Fortran libs: "
"${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}")
foreach(arg ${LIBS})
set(STRUMPACK_ALL_LIBS "${STRUMPACK_ALL_LIBS} ${arg}")
endforeach(arg ${LIBS})
# foreach(arg ${CMAKE_C_IMPLICIT_LINK_LIBRARIES})
# set(STRUMPACK_ALL_LIBS "${STRUMPACK_ALL_LIBS} -l${arg}")
# endforeach(arg ${CMAKE_C_IMPLICIT_LINK_LIBRARIES})
# foreach(arg ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
# set(STRUMPACK_ALL_LIBS "${STRUMPACK_ALL_LIBS} -l${arg}")
# endforeach(arg ${CMAKE_CXX_IMPLICIT_LINK_LIBRARIES})
foreach(arg ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
set(STRUMPACK_ALL_LIBS "${STRUMPACK_ALL_LIBS} -l${arg}")
endforeach(arg ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES})
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(STRUMPACK_ALL_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
set(STRUMPACK_ALL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
else()
set(STRUMPACK_ALL_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
set(STRUMPACK_ALL_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
endif()
set(LIBSRC
src/StrumpackParameters.cpp
src/misc/TaskTimer.cpp)
if(STRUMPACK_C_INTERFACE)
list(APPEND LIBSRC src/StrumpackSparseSolver.cpp)
endif()
set(LIBSRCDENSE
src/dense/BLASLAPACKOpenMPTask.cpp
src/dense/lapack/sgeqp3tol.f src/dense/lapack/dgeqp3tol.f
src/dense/lapack/cgeqp3tol.f src/dense/lapack/zgeqp3tol.f
src/dense/lapack/sgeqrfmod.f src/dense/lapack/dgeqrfmod.f
src/dense/lapack/cgeqrfmod.f src/dense/lapack/zgeqrfmod.f
src/dense/lapack/sgeqr2mod.f src/dense/lapack/dgeqr2mod.f
src/dense/lapack/cgeqr2mod.f src/dense/lapack/zgeqr2mod.f
src/dense/lapack/slaqpsmod.f src/dense/lapack/dlaqpsmod.f
src/dense/lapack/claqpsmod.f src/dense/lapack/zlaqpsmod.f
src/dense/lapack/slaqp2mod.f src/dense/lapack/dlaqp2mod.f
src/dense/lapack/claqp2mod.f src/dense/lapack/zlaqp2mod.f
src/dense/lapack/sgetrfmod.f src/dense/lapack/dgetrfmod.f
src/dense/lapack/cgetrfmod.f src/dense/lapack/zgetrfmod.f
src/dense/lapack/sgetf2mod.f src/dense/lapack/dgetf2mod.f
src/dense/lapack/cgetf2mod.f src/dense/lapack/zgetf2mod.f
src/dense/lapack/sorglqmod.f src/dense/lapack/dorglqmod.f
src/dense/lapack/cunglqmod.f src/dense/lapack/zunglqmod.f
src/dense/lapack/sorgl2mod.f src/dense/lapack/dorgl2mod.f
src/dense/lapack/cungl2mod.f src/dense/lapack/zungl2mod.f
src/dense/lapack/slarfbmod.f src/dense/lapack/dlarfbmod.f
src/dense/lapack/clarfbmod.f src/dense/lapack/zlarfbmod.f
src/dense/lapack/slarftmod.f src/dense/lapack/dlarftmod.f
src/dense/lapack/clarftmod.f src/dense/lapack/zlarftmod.f
src/dense/lapack/slarfmod.f src/dense/lapack/dlarfmod.f
src/dense/lapack/clarfmod.f src/dense/lapack/zlarfmod.f
src/dense/lapack/sgelqfmod.f src/dense/lapack/dgelqfmod.f
src/dense/lapack/cgelqfmod.f src/dense/lapack/zgelqfmod.f
src/dense/lapack/sgelq2mod.f src/dense/lapack/dgelq2mod.f
src/dense/lapack/cgelq2mod.f src/dense/lapack/zgelq2mod.f
src/dense/lapack/cgeqp3mod.f src/dense/lapack/dgeqp3mod.f
src/dense/lapack/sgeqp3mod.f src/dense/lapack/zgeqp3mod.f)
set(LIBSRCSPARSE
src/sparse/rcm/rcm.f
src/sparse/rcm/degree.f
src/sparse/rcm/fnroot.f
src/sparse/rcm/genrcm.f
src/sparse/rcm/rootls.f
src/sparse/strumpack_mc64ad.c)
if(STRUMPACK_USE_MPI)
list(APPEND LIBSRCDENSE
src/dense/lapack/pcgeqpfmod.f src/dense/lapack/pdgeqpfmod.f
src/dense/lapack/psgeqpfmod.f src/dense/lapack/pzgeqpfmod.f)
list(APPEND LIBSRCSPARSE
src/sparse/MUMPS/ana_orderings.F)
endif()
add_library(strumpack ${LIBSRC} ${LIBSRCSPARSE} ${LIBSRCDENSE})
target_link_libraries(strumpack ${LIBS})
install(TARGETS strumpack LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
configure_file(${CMAKE_SOURCE_DIR}/src/StrumpackConfig.hpp.in
${PROJECT_BINARY_DIR}/StrumpackConfig.hpp)
install(FILES
${PROJECT_BINARY_DIR}/StrumpackFortranCInterface.h
${PROJECT_BINARY_DIR}/StrumpackConfig.hpp
src/StrumpackSparseSolver.h
src/StrumpackSparseSolver.hpp
src/StrumpackOptions.hpp
src/StrumpackParameters.hpp
DESTINATION include)
install(FILES
src/misc/TaskTimer.hpp
src/misc/RandomWrapper.hpp
src/misc/Tools.hpp
DESTINATION include/misc)
install(FILES
src/dense/DenseMatrix.hpp
src/dense/BLASLAPACKOpenMPTask.hpp
src/dense/BLASLAPACKWrapper.hpp
DESTINATION include/dense)
install(FILES
src/sparse/BiCGStab.hpp
src/sparse/CSRGraph.hpp
src/sparse/CSRMatrix.hpp
src/sparse/CompressedSparseMatrix.hpp
src/sparse/ETree.hpp
src/sparse/EliminationTree.hpp
src/sparse/FrontalMatrix.hpp
src/sparse/FrontalMatrixDense.hpp
src/sparse/FrontalMatrixHSS.hpp
src/sparse/FrontalMatrixBLR.hpp
src/sparse/GMRes.hpp
src/sparse/GeometricReordering.hpp
src/sparse/IterativeRefinement.hpp
src/sparse/MatrixReordering.hpp
src/sparse/MetisReordering.hpp
src/sparse/Redistribute.hpp
src/sparse/ScotchReordering.hpp
src/sparse/RCMReordering.hpp
src/sparse/SeparatorTree.hpp
DESTINATION include/sparse)
install(FILES
src/HSS/HSSMatrix.hpp
src/HSS/HSSMatrix.factor.hpp
src/HSS/HSSMatrix.compress.hpp
src/HSS/HSSMatrix.compress_stable.hpp
src/HSS/HSSMatrix.extract.hpp
src/HSS/HSSBasisID.hpp
src/HSS/HSSMatrix.Schur.hpp
src/HSS/HSSMatrix.apply.hpp
src/HSS/HSSMatrix.solve.hpp
src/HSS/HSSExtra.hpp
src/HSS/HSSMatrixBase.hpp
src/HSS/HSSPartitionTree.hpp
src/HSS/HSSOptions.hpp
DESTINATION include/HSS)
install(FILES
src/BLR/BLRMatrix.hpp
src/BLR/BLROptions.hpp
DESTINATION include/BLR)
if(STRUMPACK_USE_MPI)
install(FILES
src/StrumpackSparseSolverMPI.hpp
src/StrumpackSparseSolverMPIDist.hpp
DESTINATION include)
install(FILES
src/misc/MPIWrapper.hpp
DESTINATION include/misc)
install(FILES
src/dense/DistributedMatrix.hpp
src/dense/DistributedVector.hpp
src/dense/ScaLAPACKWrapper.hpp
src/dense/BLACSGrid.hpp
DESTINATION include/dense)
install(FILES
src/sparse/BiCGStabMPI.hpp
src/sparse/CSRMatrixMPI.hpp
src/sparse/EliminationTreeMPI.hpp
src/sparse/EliminationTreeMPIDist.hpp
src/sparse/FrontalMatrixDenseMPI.hpp
src/sparse/FrontalMatrixHSSMPI.hpp
src/sparse/FrontalMatrixMPI.hpp
src/sparse/FrontalMatrixBLRMPI.hpp
src/sparse/GMResMPI.hpp
src/sparse/GeometricReorderingMPI.hpp
src/sparse/IterativeRefinementMPI.hpp
src/sparse/MatrixReorderingMPI.hpp
src/sparse/PTScotchReordering.hpp
src/sparse/ParMetisReordering.hpp
src/sparse/ProportionallyDistributedSparseMatrix.hpp
src/sparse/Redistribute.hpp
src/sparse/ExtendAdd.hpp
src/sparse/mumps_symqamd.hpp
DESTINATION include/sparse)
install(FILES
src/HSS/HSSMatrixMPI.hpp
src/HSS/HSSMatrixMPI.apply.hpp
src/HSS/HSSMatrixMPI.compress.hpp
src/HSS/HSSMatrixMPI.factor.hpp
src/HSS/HSSMatrixMPI.extract.hpp
src/HSS/HSSMatrixMPI.extract_blocks.hpp
src/HSS/HSSMatrixMPI.solve.hpp
src/HSS/HSSExtraMPI.hpp
src/HSS/HSSBasisIDMPI.hpp
src/HSS/DistSamples.hpp
src/HSS/DistElemMult.hpp
src/HSS/HSSMatrixMPI.compress_stable.hpp
src/HSS/HSSMatrixMPI.Schur.hpp
src/HSS/BlockCyclic2BlockRow.hpp
DESTINATION include/HSS)
install(FILES
src/BLR/BLRMatrixMPI.hpp
DESTINATION include/BLR)
endif()
if(STRUMPACK_USE_COMBBLAS)
install(FILES
src/sparse/AWPMCombBLAS.hpp
DESTINATION include/sparse)
endif()
set(CPACK_GENERATOR "TGZ")
set(CPACK_PACKAGE_VERSION_MAJOR ${STRUMPACK_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${STRUMPACK_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${STRUMPACK_VERSION_PATCH})
include(CPack)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file(${CMAKE_SOURCE_DIR}/doc/doxygen/doxygen.dox.in
${CMAKE_BINARY_DIR}/doxygen.dox @ONLY)
add_custom_target(doc
${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/doxygen.dox
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Generating API documentation with doxygen" VERBATIM)
endif(DOXYGEN_FOUND)
if(STRUMPACK_C_INTERFACE)
set(C_EXAMPLES "sexample dexample cexample zexample")
endif()
# build an example makefile
if(STRUMPACK_USE_MPI)
set(STRUMPACK_C_COMPILER "${MPI_C_COMPILER}")
set(STRUMPACK_CXX_COMPILER "${MPI_CXX_COMPILER}")
set(MPI_EXAMPLES "testPoisson2dMPI testPoisson2dMPIDist testPoisson3dMPIDist testMMdouble testMMdoubleMPI testMMdoubleMPIDist testMMdouble64 testMMdoubleMPIDist64 testMMfloat testMMfloatMPIDist")
else()
set(STRUMPACK_C_COMPILER "${CMAKE_C_COMPILER}")
set(STRUMPACK_CXX_COMPILER "${CMAKE_CXX_COMPILER}")
endif()
configure_file(${CMAKE_SOURCE_DIR}/examples/Makefile.in
${CMAKE_SOURCE_DIR}/examples/Makefile @ONLY)
# copy the examples and Makefile to the build directory as well
configure_file(${CMAKE_SOURCE_DIR}/examples/Makefile
${CMAKE_BINARY_DIR}/examples/Makefile COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/pde900.mtx
${CMAKE_BINARY_DIR}/examples/pde900.mtx COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/README
${CMAKE_BINARY_DIR}/examples/README COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testPoisson2d.cpp
${CMAKE_BINARY_DIR}/examples/testPoisson2d.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testPoisson3d.cpp
${CMAKE_BINARY_DIR}/examples/testPoisson3d.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMdouble.cpp
${CMAKE_BINARY_DIR}/examples/testMMdouble.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMdouble64.cpp
${CMAKE_BINARY_DIR}/examples/testMMdouble64.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMfloat.cpp
${CMAKE_BINARY_DIR}/examples/testMMfloat.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/mtx2bin.cpp
${CMAKE_BINARY_DIR}/examples/mtx2bin.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/bin2mtx.cpp
${CMAKE_BINARY_DIR}/examples/bin2mtx.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/MLkernel.cpp
${CMAKE_BINARY_DIR}/examples/MLkernel.cpp COPYONLY)
if(STRUMPACK_C_INTERFACE)
configure_file(${CMAKE_SOURCE_DIR}/examples/sexample.c
${CMAKE_BINARY_DIR}/examples/sexample.c COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/dexample.c
${CMAKE_BINARY_DIR}/examples/dexample.c COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/cexample.c
${CMAKE_BINARY_DIR}/examples/cexample.c COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/zexample.c
${CMAKE_BINARY_DIR}/examples/zexample.c COPYONLY)
endif()
if(STRUMPACK_USE_MPI)
configure_file(${CMAKE_SOURCE_DIR}/examples/testPoisson2dMPI.cpp
${CMAKE_BINARY_DIR}/examples/testPoisson2dMPI.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testPoisson2dMPIDist.cpp
${CMAKE_BINARY_DIR}/examples/testPoisson2dMPIDist.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testPoisson3dMPIDist.cpp
${CMAKE_BINARY_DIR}/examples/testPoisson3dMPIDist.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMdoubleMPI.cpp
${CMAKE_BINARY_DIR}/examples/testMMdoubleMPI.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMdoubleMPIDist.cpp
${CMAKE_BINARY_DIR}/examples/testMMdoubleMPIDist.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMdoubleMPIDist64.cpp
${CMAKE_BINARY_DIR}/examples/testMMdoubleMPIDist64.cpp COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/examples/testMMfloatMPIDist.cpp
${CMAKE_BINARY_DIR}/examples/testMMfloatMPIDist.cpp COPYONLY)
endif()
if(STRUMPACK_BUILD_TESTS)
include(CTest)
add_subdirectory(test)
endif()