Attention une mise à jour du service Gitlab va être effectuée le mardi 18 janvier (et non lundi 17 comme annoncé précédemment) entre 18h00 et 18h30. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes.

CMakeLists.txt 6.07 KB
Newer Older
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
###
#
# @copyright (c) 2009-2014 The University of Tennessee and The University
#                          of Tennessee Research Foundation.
#                          All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 IPB. All rights reserved.
#
###
#
#  @file CMakeLists.txt
#
#  @project MORSE
#  MORSE is a software package provided by:
#     Inria Bordeaux - Sud-Ouest,
#     Univ. of Tennessee,
#     King Abdullah Univesity of Science and Technology
#     Univ. of California Berkeley,
#     Univ. of Colorado Denver.
#
#  @version 1.1.0
#  @author Cedric Castagnede
#  @author Emmanuel Agullo
#  @author Mathieu Faverge
#  @date 13-07-2012
#
###

# Generate the morse auxiliary headers for all possible precisions
# ----------------------------------------------------------------
set(TIMING_AUX_HDRS_GENERATED "")
set(ZHDR
    zauxiliary.h
   )

precisions_rules_py(TIMING_AUX_HDRS_GENERATED "${ZHDR}"
                    PRECISIONS "s;d;c;z;ds;zc" )

set(TIMING_AUX_HDRS
    auxiliary.h
    timing.h
    timing.c
    ${TIMING_AUX_HDRS_GENERATED}
   )

# Force generation of headers
# ---------------------------
add_custom_target(timing_include ALL SOURCES ${TIMING_AUX_HDRS})

# Generate the morse auxiliary sources for all possible precisions
# ----------------------------------------------------------------
set(TIMING_AUX_SRCS_GENERATED "")
set(ZSRC
    zauxiliary.c
   )

precisions_rules_py(TIMING_AUX_SRCS_GENERATED "${ZSRC}"
58
                    PRECISIONS "${CHAMELEON_PRECISION}")
59
60
61
62
63
64

set(TIMING_SRCS
    auxiliary.c
    ${TIMING_AUX_SRCS_GENERATED}
   )

65
# Create libchameleon_timing.a
66
# -----------------------------
67
68
69
add_library(chameleon_timing STATIC ${TIMING_SRCS})
set_property(TARGET chameleon_timing PROPERTY LINKER_LANGUAGE Fortran)
add_dependencies(chameleon_timing timing_include)
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

# Generate the morse testing sources for all possible precisions
# --------------------------------------------------------------
set(TIMINGS "")
set(ZSRC
    ##################
    # BLAS 3
    ##################
    time_zgemm.c
    time_zgemm_tile.c
    time_ztrsm.c
    ##################
    # LAPACK
    ##################
    time_zgels.c
    time_zgels_tile.c
    time_zgeqrf.c
    time_zgeqrf_tile.c
    time_zgetrf_incpiv.c
    time_zgetrf_incpiv_tile.c
    time_zgetrf_nopiv.c
    time_zgetrf_nopiv_tile.c
    #time_zgetrf.c
    #time_zgetrf_tile.c
    time_zposv.c
    time_zposv_tile.c
    time_zpotrf.c
    time_zpotrf_tile.c
    time_zsytrf_tile.c
    time_zpotri_tile.c
    ##################
    # MIXED PRECISION
    ##################
    #time_zcgesv.c
    #time_zcgesv_tile.c
    #time_zcposv.c
    #time_zcposv_tile.c
    ##################
    # OTHERS
    ##################
    time_zlange.c
    time_zlange_tile.c
    #time_zgebrd_tile.c
    #time_zgecfi.c
    #time_zgesvd_tile.c
    #time_zgetrf_reclap.c
    #time_zgetrf_rectil.c
    #time_zheevd_tile.c
    #time_zheev_tile.c
    #time_zhegv_tile.c
    #time_zlapack2tile.c
    #time_zgetri_tile.c
    #time_zgesv.c
    #time_zgesv_tile.c
    time_zgesv_incpiv.c
    time_zgesv_incpiv_tile.c
    time_zgesv_nopiv.c
    time_zgesv_nopiv_tile.c    
   )

precisions_rules_py(TIMINGS "${ZSRC}"
131
                    PRECISIONS "${CHAMELEON_PRECISION}")
132
133
134
135
136
137
138
139
140
141
142

# Add include and link directories
# --------------------------------
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
link_directories(${CMAKE_CURRENT_BINARY_DIR})

# Define what libraries we have to link with
# ------------------------------------------
unset(libs_for_timings)
list(APPEND libs_for_timings
143
144
  chameleon
  chameleon_timing
145
146
)

147
148
if(CHAMELEON_SCHED_STARPU)
    if ( CHAMELEON_USE_MPI )
149
        list(APPEND libs_for_timings
150
          chameleon_starpu
151
152
153
154
          ${STARPU_MPI_LIBRARIES}
        )
    else()
        list(APPEND libs_for_timings
155
          chameleon_starpu
156
157
158
159
          ${STARPU_SHM_LIBRARIES}
        )
    endif()
    link_directories(${STARPU_LIBRARY_DIRS})
160
elseif(CHAMELEON_SCHED_QUARK)
161
    list(APPEND libs_for_timings
162
      chameleon_quark
163
164
165
166
167
      ${QUARK_LIBRARIES}
      )
    link_directories(${QUARK_LIBRARY_DIRS})
endif()

168
if(NOT CHAMELEON_SIMULATION)
169

170
    if(CHAMELEON_USE_CUDA)
171
172
173
174
175
        list(APPEND libs_for_timings
        ${CUDA_LIBRARIES}
        )
        link_directories(${CUDA_LIBRARY_DIRS})
    endif()
176
    if(CHAMELEON_USE_MAGMA)
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
        list(APPEND libs_for_timings
        ${MAGMA_LIBRARIES}
        )
        link_directories(${MAGMA_LIBRARY_DIRS})
    endif()

    list(APPEND libs_for_timings
    coreblas
    ${LAPACKE_LIBRARIES}
    ${CBLAS_LIBRARIES}    
    ${LAPACK_SEQ_LIBRARIES}
    ${BLAS_SEQ_LIBRARIES}
    ${HWLOC_LIBRARIES}
    ${EXTRA_LIBRARIES}
    )
    
    link_directories(${LAPACKE_LIBRARY_DIRS})
    link_directories(${LAPACK_LIBRARY_DIRS})
    link_directories(${CBLAS_LIBRARY_DIRS})
    link_directories(${BLAS_LIBRARY_DIRS})

else()

    list(APPEND libs_for_timings
    coreblas
    simulapacke    
    simucblas
    ${HWLOC_LIBRARIES}
    ${EXTRA_LIBRARIES}
    )
    
endif()

link_directories(${HWLOC_LIBRARY_DIRS})

# message("BLAS_SEQ_LIBRARIES: ${BLAS_SEQ_LIBRARIES}")
# message("CBLAS_LIBRARIES: ${CBLAS_LIBRARIES}")
# message("LAPACK_SEQ_LIBRARIES: ${LAPACK_SEQ_LIBRARIES}")
# message("LAPACKE_LIBRARIES: ${LAPACKE_LIBRARIES}")
# message("HWLOC_LIBRARIES: ${HWLOC_LIBRARIES}")

# message("LAPACKE_LIBRARY_DIRS: ${LAPACKE_LIBRARY_DIRS}")
# message("LAPACK_LIBRARY_DIRS: ${LAPACK_LIBRARY_DIRS}")
# message("CBLAS_LIBRARY_DIRS: ${CBLAS_LIBRARY_DIRS}")
# message("BLAS_LIBRARY_DIRS: ${BLAS_LIBRARY_DIRS}")
# message("HWLOC_LIBRARY_DIRS: ${HWLOC_LIBRARY_DIRS}")

# message(STATUS "libs timings: ${libs_for_timings}")
foreach(_timing ${TIMINGS})
    get_filename_component(_name_exe ${_timing} NAME_WE)
    add_executable(${_name_exe} ${_timing})
    add_dependencies(${_name_exe}
        timing_include
      )
    set_property(TARGET ${_name_exe} PROPERTY LINKER_LANGUAGE Fortran)
    target_link_libraries(${_name_exe} ${libs_for_timings})

    install(TARGETS ${_name_exe}
            DESTINATION ${CMAKE_INSTALL_PREFIX}/timing)
endforeach()

include(CTestLists.cmake)

###
### END CMakeLists.txt
###