CMakeLists.txt 5.9 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 27 28 29 30
endif()
if(USE_SOLVER_PETSC)
  message("linking solver_test000 with PETSc")
  target_link_libraries(solver_test000 ${PETSC_LIBRARIES})
endif()
if(USE_SOLVER_TRILINOS)
  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


add_test(NAME solver_test000_serial_inner_ilu2                 COMMAND $<TARGET_FILE:solver_test000> 0 0)
Kirill Terekhov's avatar
Kirill Terekhov committed
46 47 48 49 50 51
add_test(NAME solver_test000_serial_inner_ddpqiluc             COMMAND $<TARGET_FILE:solver_test000> 0 1)

if( HAVE_SOLVER_MPTILUC2 )
add_test(NAME solver_test000_serial_inner_mptiluc             COMMAND $<TARGET_FILE:solver_test000> 0 8)
endif()

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


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

61
if(USE_SOLVER_TRILINOS)
Kirill Terekhov's avatar
Kirill Terekhov committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
add_test(NAME solver_test000_serial_trilinos_aztec             COMMAND $<TARGET_FILE:solver_test000> 0 3)
add_test(NAME solver_test000_serial_trilinos_ifpack            COMMAND $<TARGET_FILE:solver_test000> 0 4)
add_test(NAME solver_test000_serial_trilinos_ml                COMMAND $<TARGET_FILE:solver_test000> 0 5)
add_test(NAME solver_test000_serial_trilinos_belos             COMMAND $<TARGET_FILE:solver_test000> 0 6)
endif()

if(USE_SOLVER_ANI)
add_test(NAME solver_test000_serial_ani COMMAND $<TARGET_FILE:solver_test000> 2 0 7)
endif()

if( USE_MPI )
if( EXISTS ${MPIEXEC} )
add_test(NAME solver_test000_parallel_normal_inner_ilu2        COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 0)
add_test(NAME solver_test000_parallel_permute1_inner_ilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 0)
add_test(NAME solver_test000_parallel_permute2_inner_ilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 0)

Kirill Terekhov's avatar
Kirill Terekhov committed
78 79 80 81
add_test(NAME solver_test000_parallel_normal_inner_ddpqiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 1)
add_test(NAME solver_test000_parallel_permute1_inner_ddpqiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 1)
add_test(NAME solver_test000_parallel_permute2_inner_ddpqiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 1)

Kirill Terekhov's avatar
Kirill Terekhov committed
82 83 84
add_test(NAME solver_test000_parallel_normal_inner_mptiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 8)
add_test(NAME solver_test000_parallel_permute1_inner_mptiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 8)
add_test(NAME solver_test000_parallel_permute2_inner_mptiluc    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 8)
Kirill Terekhov's avatar
Kirill Terekhov committed
85

Kirill Terekhov's avatar
Kirill Terekhov committed
86 87 88 89
add_test(NAME solver_test000_parallel_normal_inner_mptilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 9)
add_test(NAME solver_test000_parallel_permute1_inner_mptilu2    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 9)
add_test(NAME solver_test000_parallel_permute2_inner_mptilu2    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 9)

Kirill Terekhov's avatar
Kirill Terekhov committed
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
if(USE_SOLVER_PETSC)
add_test(NAME solver_test000_parallel_normal_petsc             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 2)
#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)
add_test(NAME solver_test000_parallel_normal_trilinos_aztec    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 3)
add_test(NAME solver_test000_parallel_permute1_trilinos_aztec  COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 3)
add_test(NAME solver_test000_parallel_permute2_trilinos_aztec  COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 3)

add_test(NAME solver_test000_parallel_normal_trilinos_ifpack   COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 4)
add_test(NAME solver_test000_parallel_permute1_trilinos_ifpack COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 4)
add_test(NAME solver_test000_parallel_permute2_trilinos_ifpack COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 4)

add_test(NAME solver_test000_parallel_normal_trilinos_ml       COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 0 5)
add_test(NAME solver_test000_parallel_permute1_trilinos_ml     COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 1 5)
add_test(NAME solver_test000_parallel_permute2_trilinos_ml     COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test000> 2 5)

#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()
endif()
endif()