CMakeLists.txt 7.33 KB
Newer Older
Kirill Terekhov's avatar
Kirill Terekhov committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
project(solver_test000)
set(SOURCE main.cpp)

add_executable(solver_test000 ${SOURCE})
target_link_libraries(solver_test000 inmost)

if(USE_MPI)
  message("linking solver_test000 with MPI")
  target_link_libraries(solver_test000 ${MPI_LIBRARIES}) 
  if(MPI_LINK_FLAGS)
    set_target_properties(solver_test000 PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
  endif() 
endif(USE_MPI)


if(USE_SOLVER_ANI)
17
18
19
20
21
  message("linking solver_test000 with ani3d and BLAS")
  target_link_libraries(solver_test000 ani3d ${BLAS_LIBRARIES})
  if(BLAS_LINKER_FLAGS)
    set_target_properties(solver_test000 PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
22
23
24
25
26
endif()
if(USE_SOLVER_PETSC)
  message("linking solver_test000 with PETSc")
  target_link_libraries(solver_test000 ${PETSC_LIBRARIES})
endif()
Dmitry Bagaev's avatar
Dmitry Bagaev committed
27
if(USE_SOLVER_TRILINOS AND USE_MPI)
Kirill Terekhov's avatar
Kirill Terekhov committed
28
29
30
  message("linking solver_test000 with Trilinos")
  target_link_libraries(solver_test000 ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
31
32
33
34
if(USE_SOLVER_METIS)
  message("linking solver_test000 with Metis")
  target_link_libraries(solver_test000 ${METIS_LIBRARIES})
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
35
36
37
38
if(USE_SOLVER_MONDRIAAN)
  message("linking solver_test000 with Mondriaan")
  target_link_libraries(solver_test000 ${MONDRIAAN_LIBRARIES})
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
39
40
41
42
if(USE_SOLVER_SUPERLU)
  message("linking solver_test000 with SuperLU")
  target_link_libraries(solver_test000 ${SUPERLU_LIBRARIES})
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
43
44


45
46
add_test(NAME solver_test000_serial_inner_ilu2                 COMMAND $<TARGET_FILE:solver_test000> 0 inner_ilu2)
add_test(NAME solver_test000_serial_inner_ddpqiluc             COMMAND $<TARGET_FILE:solver_test000> 0 inner_ddpqiluc2)
Kirill Terekhov's avatar
Kirill Terekhov committed
47
48

if( HAVE_SOLVER_MPTILUC2 )
49
add_test(NAME solver_test000_serial_inner_mptiluc             COMMAND $<TARGET_FILE:solver_test000> 0 inner_mptiluc)
Kirill Terekhov's avatar
Kirill Terekhov committed
50
51
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
52
if( HAVE_SOLVER_MPTILU2 )
53
add_test(NAME solver_test000_serial_inner_mptilu2             COMMAND $<TARGET_FILE:solver_test000> 0 inner_mptilu2)
Kirill Terekhov's avatar
Kirill Terekhov committed
54
55
56
endif()


Kirill Terekhov's avatar
Kirill Terekhov committed
57
if(USE_SOLVER_PETSC)
58
add_test(NAME solver_test000_serial_petsc                      COMMAND $<TARGET_FILE:solver_test000> 0 petsc)
59
60
add_test(NAME solver_test000_copy_serial_petsc                      COMMAND $<TARGET_FILE:solver_test000> 0 petsc 1)
add_test(NAME solver_test000_assign_serial_petsc                      COMMAND $<TARGET_FILE:solver_test000> 0 petsc 2)
Kirill Terekhov's avatar
Kirill Terekhov committed
61
62
endif()

Dmitry Bagaev's avatar
Dmitry Bagaev committed
63
if(USE_SOLVER_TRILINOS AND USE_MPI)
64
65
66
67
add_test(NAME solver_test000_serial_trilinos_aztec             COMMAND $<TARGET_FILE:solver_test000> 0 trilinos_aztec)
add_test(NAME solver_test000_serial_trilinos_ifpack            COMMAND $<TARGET_FILE:solver_test000> 0 trilinos_ifpack)
add_test(NAME solver_test000_serial_trilinos_ml                COMMAND $<TARGET_FILE:solver_test000> 0 trilinos_ml)
add_test(NAME solver_test000_serial_trilinos_belos             COMMAND $<TARGET_FILE:solver_test000> 0 trilinos_belos)
Kirill Terekhov's avatar
Kirill Terekhov committed
68
69
70
endif()

if(USE_SOLVER_ANI)
71
add_test(NAME solver_test000_serial_ani COMMAND $<TARGET_FILE:solver_test000> 0 ani)
Kirill Terekhov's avatar
Kirill Terekhov committed
72
73
endif()

Dmitry Bagaev's avatar
Dmitry Bagaev committed
74
75
76
77
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_FCBIILU2.*$")
  add_test(NAME solver_test000_serial_fcbiilu2 COMMAND $<TARGET_FILE:solver_test000> 0 fcbiilu2)
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
78
79
if( USE_MPI )
if( EXISTS ${MPIEXEC} )
80
81
82
add_test(NAME solver_test000_parallel_normal_inner_ilu2        COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 inner_ilu2)
add_test(NAME solver_test000_parallel_permute1_inner_ilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 inner_ilu2)
add_test(NAME solver_test000_parallel_permute2_inner_ilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 inner_ilu2)
Kirill Terekhov's avatar
Kirill Terekhov committed
83

84
85
86
add_test(NAME solver_test000_parallel_normal_inner_ddpqiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 inner_ddpqiluc2)
add_test(NAME solver_test000_parallel_permute1_inner_ddpqiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 inner_ddpqiluc2)
add_test(NAME solver_test000_parallel_permute2_inner_ddpqiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 inner_ddpqiluc2)
Kirill Terekhov's avatar
Kirill Terekhov committed
87

88
89
90
add_test(NAME solver_test000_parallel_normal_inner_mptiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 inner_mptiluc)
add_test(NAME solver_test000_parallel_permute1_inner_mptiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 inner_mptiluc)
add_test(NAME solver_test000_parallel_permute2_inner_mptiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 inner_mptiluc)
Kirill Terekhov's avatar
Kirill Terekhov committed
91

92
93
94
add_test(NAME solver_test000_parallel_normal_inner_mptilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 inner_mptilu2)
add_test(NAME solver_test000_parallel_permute1_inner_mptilu2    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 inner_mptilu2)
add_test(NAME solver_test000_parallel_permute2_inner_mptilu2    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 inner_mptilu2)
Kirill Terekhov's avatar
Kirill Terekhov committed
95

Kirill Terekhov's avatar
Kirill Terekhov committed
96
if(USE_SOLVER_PETSC)
97
add_test(NAME solver_test000_parallel_normal_petsc             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 petsc)
98
99
add_test(NAME solver_test000_copy_parallel_normal_petsc             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 petsc 1)
add_test(NAME solver_test000_assign_parallel_normal_petsc             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 petsc 2)
Kirill Terekhov's avatar
Kirill Terekhov committed
100
101
102
103
104
#add_test(NAME solver_test000_parallel_permute1_petsc           COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 2)
#add_test(NAME solver_test000_parallel_permute2_petsc           COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 2)
endif()

if(USE_SOLVER_TRILINOS)
105
106
107
add_test(NAME solver_test000_parallel_normal_trilinos_aztec    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 trilinos_aztec)
add_test(NAME solver_test000_parallel_permute1_trilinos_aztec  COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 trilinos_aztec)
add_test(NAME solver_test000_parallel_permute2_trilinos_aztec  COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 trilinos_aztec)
Kirill Terekhov's avatar
Kirill Terekhov committed
108

109
110
111
add_test(NAME solver_test000_parallel_normal_trilinos_ifpack   COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 trilinos_ifpack)
add_test(NAME solver_test000_parallel_permute1_trilinos_ifpack COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 trilinos_ifpack)
add_test(NAME solver_test000_parallel_permute2_trilinos_ifpack COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 trilinos_ifpack)
Kirill Terekhov's avatar
Kirill Terekhov committed
112

113
114
115
add_test(NAME solver_test000_parallel_normal_trilinos_ml       COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 trilinos_ml)
add_test(NAME solver_test000_parallel_permute1_trilinos_ml     COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 trilinos_ml)
add_test(NAME solver_test000_parallel_permute2_trilinos_ml     COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 trilinos_ml)
Kirill Terekhov's avatar
Kirill Terekhov committed
116
117
118
119
120

#add_test(NAME solver_test000_parallel_normal_trilinos_belos    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 6)
#add_test(NAME solver_test000_parallel_permute1_trilinos_belos  COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 6)
#add_test(NAME solver_test000_parallel_permute2_trilinos_belos  COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 6)
endif()
Dmitry Bagaev's avatar
Dmitry Bagaev committed
121
122
123
124
125

if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_FCBIILU2.*$")
  add_test(NAME solver_test000_parallel_normal_fcbiilu2             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 fcbiilu2)
endif()

Dmitry Bagaev's avatar
Dmitry Bagaev committed
126
127
128
129
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_K3BIILU2.*$")
  add_test(NAME solver_test000_parallel_normal_k3biilu2             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 k3biilu2)
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
130
131
endif()
endif()