CMakeLists.txt 4.3 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
47
add_test(NAME solver_test002_serial_inner_ilu2                 COMMAND $<TARGET_FILE:solver_test002>  inner_ilu2 20)
add_test(NAME solver_test002_serial_inner_ddpqiluc               COMMAND $<TARGET_FILE:solver_test002>  inner_ddpqiluc2 20)
48
if(HAVE_SOLVER_MPTILUC2)
49
add_test(NAME solver_test002_serial_inner_mptiluc               COMMAND $<TARGET_FILE:solver_test002>  inner_mptiluc 20)
50
endif()
Kirill Terekhov's avatar
Kirill Terekhov committed
51
if(HAVE_SOLVER_MPTILU2)
52
add_test(NAME solver_test002_serial_inner_mptilu2               COMMAND $<TARGET_FILE:solver_test002>  inner_mptilu2 20)
53
endif()
Dmitry Bagaev's avatar
Dmitry Bagaev committed
54
55
56
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_FCBIILU2.*$")
    add_test(NAME solver_test002_serial_fcbiilu2 COMMAND $<TARGET_FILE:solver_test002> fcbiilu2 20)
endif()
57

Dmitry Bagaev's avatar
Dmitry Bagaev committed
58
if(USE_SOLVER_TRILINOS AND USE_MPI)
59
60
61
62
add_test(NAME solver_test002_serial_trilinos_aztec             COMMAND $<TARGET_FILE:solver_test002>  trilinos_aztec 20)
add_test(NAME solver_test002_serial_trilinos_belos             COMMAND $<TARGET_FILE:solver_test002>  trilinos_belos 20)
add_test(NAME solver_test002_serial_trilinos_ml                COMMAND $<TARGET_FILE:solver_test002>  trilinos_ml 20)
add_test(NAME solver_test002_serial_trilinos_ifpack            COMMAND $<TARGET_FILE:solver_test002>  trilinos_ifpack 20)
63
64
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
65
if(USE_SOLVER_PETSC)
66
add_test(NAME solver_test002_serial_petsc                      COMMAND $<TARGET_FILE:solver_test002>  petsc 20)
Kirill Terekhov's avatar
Kirill Terekhov committed
67
68
69
endif()


70
if(USE_SOLVER_ANI)
71
add_test(NAME solver_test002_serial_ani COMMAND $<TARGET_FILE:solver_test002>  ani 20)
72
73
74
75
endif()

if( USE_MPI )
if( EXISTS ${MPIEXEC} )
76
77
78
79
add_test(NAME solver_test002_parallel_inner_ilu2        COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  inner_ilu2 20)
add_test(NAME solver_test002_parallel_inner_ddpqiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  inner_ddpqiluc2 20)
add_test(NAME solver_test002_parallel_inner_mptiluc      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  inner_mptiluc 20)
add_test(NAME solver_test002_parallel_inner_mptilu2      COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  inner_mptilu2 20)
Kirill Terekhov's avatar
Kirill Terekhov committed
80

Kirill Terekhov's avatar
Kirill Terekhov committed
81
if(USE_SOLVER_TRILINOS)
82
83
84
85
add_test(NAME solver_test002_parallel_trilinos_aztec    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  trilinos_aztec 20)
add_test(NAME solver_test002_parallel_trilinos_belos    COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  trilinos_belos 20)
add_test(NAME solver_test002_parallel_trilinos_ml       COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  trilinos_ml 20)
add_test(NAME solver_test002_parallel_trilinos_ifpack   COMMAND ${MPIEXEC} -np 4 $<TARGET_FILE:solver_test002>  trilinos_ifpack 20)
86
87
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
88
89

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

Dmitry Bagaev's avatar
Dmitry Bagaev committed
93
94
95
96
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_FCBIILU2.*$")
    add_test(NAME solver_test002_parallel_fcbiilu2 COMMAND $<TARGET_FILE:solver_test002> fcbiilu2 20)
endif()

97
98
endif()
endif()