CMakeLists.txt 7.79 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
add_test(NAME solver_test000_serial_inner_mptiluc             COMMAND $<TARGET_FILE:solver_test000> 0 inner_mptiluc)
49
add_test(NAME solver_test000_serial_inner_mlmptiluc             COMMAND $<TARGET_FILE:solver_test000> 0 inner_mlmptiluc)
Kirill Terekhov's avatar
Kirill Terekhov committed
50

51
add_test(NAME solver_test000_serial_inner_mptilu2             COMMAND $<TARGET_FILE:solver_test000> 0 inner_mptilu2)
Kirill Terekhov's avatar
Kirill Terekhov committed
52 53


Kirill Terekhov's avatar
Kirill Terekhov committed
54
if(USE_SOLVER_PETSC)
55
add_test(NAME solver_test000_serial_petsc                      COMMAND $<TARGET_FILE:solver_test000> 0 petsc)
56 57
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
58 59
endif()

Dmitry Bagaev's avatar
Dmitry Bagaev committed
60
if(USE_SOLVER_TRILINOS AND USE_MPI)
61 62 63 64
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
65 66 67
endif()

if(USE_SOLVER_ANI)
68
add_test(NAME solver_test000_serial_ani COMMAND $<TARGET_FILE:solver_test000> 0 ani)
Kirill Terekhov's avatar
Kirill Terekhov committed
69 70
endif()

Dmitry Bagaev's avatar
Dmitry Bagaev committed
71 72 73 74
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
75 76
if( USE_MPI )
if( EXISTS ${MPIEXEC} )
77 78 79
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
80

81 82 83
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
84

85 86 87
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
88

89 90 91 92
add_test(NAME solver_test000_parallel_normal_inner_mlmptiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 inner_mlmptiluc)
add_test(NAME solver_test000_parallel_permute1_inner_mlmptiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 inner_mlmptiluc)
add_test(NAME solver_test000_parallel_permute2_inner_mlmptiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 inner_mlmptiluc)

93 94 95
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
96

Kirill Terekhov's avatar
Kirill Terekhov committed
97
if(USE_SOLVER_PETSC)
98
add_test(NAME solver_test000_parallel_normal_petsc             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 petsc)
99 100
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
101 102 103 104 105
#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)
106 107 108
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
109

110 111 112
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
113

114 115 116
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
117 118 119 120 121

#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
122 123 124 125 126

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
127 128 129 130
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
131 132
endif()
endif()