CMakeLists.txt 3.76 KB
Newer Older
Igor Konshin's avatar
Igor Konshin committed
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
project(solver_test002)
set(SOURCE main.cpp)

add_executable(solver_test002 ${SOURCE})

target_link_libraries(solver_test002 inmost)

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

if(USE_SOLVER)
  if(USE_SOLVER_ANI)
	  message("linking solver_test002 with ani3d and BLAS")
	  target_link_libraries(solver_test002 ani3d ${BLAS_LIBRARIES})
    if(BLAS_LINKER_FLAGS)
	    set_target_properties(solver_test002 PROPERTIES LINK_FLAGS "${BLAS_LINKER_FLAGS}")
    endif()
  endif()
  if(USE_SOLVER_PETSC)
	  message("linking solver_test002 with PETSc")
	  target_link_libraries(solver_test002 ${PETSC_LIBRARIES})
  endif()
  if(USE_SOLVER_TRILINOS)
	  message("linking solver_test002 with Trilinos")
	  target_link_libraries(solver_test002 ${Trilinos_LIBRARIES} ${Trilinos_TPL_LIBRARIES})
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
32 33 34 35
  if(USE_SOLVER_METIS)
    message("linking solver_test002 with Metis")
    target_link_libraries(solver_test002 ${METIS_LIBRARIES})
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
36 37 38 39
  if(USE_SOLVER_MONDRIAAN)
    message("linking solver_test002 with Mondriaan")
    target_link_libraries(solver_test002 ${MONDRIAAN_LIBRARIES})
  endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
40 41 42 43
  if(USE_SOLVER_SUPERLU)
    message("linking solver_test002 with SuperLU")
    target_link_libraries(solver_test002 ${SUPERLU_LIBRARIES})
  endif()
Igor Konshin's avatar
Igor Konshin committed
44 45
endif()

46
add_test(NAME solver_test002_serial_inner_ilu2                 COMMAND $<TARGET_FILE:solver_test002>  0 20)
47 48
add_test(NAME solver_test002_serial_inner_ddpqiluc               COMMAND $<TARGET_FILE:solver_test002>  1 20)
if(HAVE_SOLVER_MPTILUC2)
Kirill Terekhov's avatar
Kirill Terekhov committed
49
add_test(NAME solver_test002_serial_inner_mptiluc               COMMAND $<TARGET_FILE:solver_test002>  2 20)
50
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
51
if(HAVE_SOLVER_MPTILU2)
Kirill Terekhov's avatar
Kirill Terekhov committed
52
add_test(NAME solver_test002_serial_inner_mptilu2               COMMAND $<TARGET_FILE:solver_test002>  3 20)
53 54 55
endif()

if(USE_SOLVER_TRILINOS)
Kirill Terekhov's avatar
Kirill Terekhov committed
56 57
add_test(NAME solver_test002_serial_trilinos_aztec             COMMAND $<TARGET_FILE:solver_test002>  4 20)
add_test(NAME solver_test002_serial_trilinos_belos             COMMAND $<TARGET_FILE:solver_test002>  5 20)
58
add_test(NAME solver_test002_serial_trilinos_ml                COMMAND $<TARGET_FILE:solver_test002>  6 20)
Kirill Terekhov's avatar
Kirill Terekhov committed
59
add_test(NAME solver_test002_serial_trilinos_ifpack            COMMAND $<TARGET_FILE:solver_test002>  7 20)
60 61
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
62 63 64 65 66
if(USE_SOLVER_PETSC)
add_test(NAME solver_test002_serial_petsc                      COMMAND $<TARGET_FILE:solver_test002>  8 20)
endif()


67
if(USE_SOLVER_ANI)
Kirill Terekhov's avatar
Kirill Terekhov committed
68
add_test(NAME solver_test002_serial_ani COMMAND $<TARGET_FILE:solver_test002>  9 20)
69 70 71 72 73
endif()

if( USE_MPI )
if( EXISTS ${MPIEXEC} )
add_test(NAME solver_test002_parallel_inner_ilu2        COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  0 20)
74
add_test(NAME solver_test002_parallel_inner_ddpqiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  1 20)
Kirill Terekhov's avatar
Kirill Terekhov committed
75 76
add_test(NAME solver_test002_parallel_inner_mptiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  2 20)
add_test(NAME solver_test002_parallel_inner_mptilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  3 20)
Kirill Terekhov's avatar
Kirill Terekhov committed
77

Kirill Terekhov's avatar
Kirill Terekhov committed
78 79 80 81 82
if(USE_SOLVER_TRILINOS)
add_test(NAME solver_test002_parallel_trilinos_aztec    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  4 20)
add_test(NAME solver_test002_parallel_trilinos_belos    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  5 20)
add_test(NAME solver_test002_parallel_trilinos_ml       COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  6 20)
add_test(NAME solver_test002_parallel_trilinos_ifpack   COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  7 20)
83 84
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
85 86 87

if(USE_SOLVER_PETSC)
add_test(NAME solver_test002_parallel_petsc             COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  8 20)
88
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
89

90 91
endif()
endif()