CMakeLists.txt 4.63 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
59
60
61
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_K3BIILU2.*$")
    add_test(NAME solver_test002_serial_k3biilu2 COMMAND $<TARGET_FILE:solver_test002> k3biilu2 20)
endif()

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

Kirill Terekhov's avatar
Kirill Terekhov committed
69
if(USE_SOLVER_PETSC)
70
add_test(NAME solver_test002_serial_petsc                      COMMAND $<TARGET_FILE:solver_test002>  petsc 20)
Kirill Terekhov's avatar
Kirill Terekhov committed
71
72
73
endif()


74
if(USE_SOLVER_ANI)
75
add_test(NAME solver_test002_serial_ani COMMAND $<TARGET_FILE:solver_test002>  ani 20)
76
77
78
79
endif()

if( USE_MPI )
if( EXISTS ${MPIEXEC} )
80
81
82
83
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
84

Kirill Terekhov's avatar
Kirill Terekhov committed
85
if(USE_SOLVER_TRILINOS)
86
87
88
89
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)
90
91
endif()

Kirill Terekhov's avatar
Kirill Terekhov committed
92
93

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

Dmitry Bagaev's avatar
Dmitry Bagaev committed
97
98
99
100
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_FCBIILU2.*$")
    add_test(NAME solver_test002_parallel_fcbiilu2 COMMAND $<TARGET_FILE:solver_test002> fcbiilu2 20)
endif()

Dmitry Bagaev's avatar
Dmitry Bagaev committed
101
102
103
104
if(SOLVER_DEFINITIONS MATCHES "^.*HAVE_SOLVER_K3BIILU2.*$")
    add_test(NAME solver_test002_parallel_k3biilu2 COMMAND $<TARGET_FILE:solver_test002> k3biilu2 20)
endif()

105
106
endif()
endif()