Commit cf02f68e authored by Mathieu Faverge's avatar Mathieu Faverge

Cleanup extra dependencies and extra tests in cmakelists.txt files

parent 4a754cec
......@@ -39,96 +39,53 @@ set(LTM_SOURCES
# ------------------------------------------
unset(libs_for_ltm)
list(APPEND libs_for_ltm
chameleon
chameleon
coreblas
${LAPACKE_LIBRARIES}
)
if(CHAMELEON_SCHED_STARPU)
list(APPEND libs_for_ltm
chameleon_starpu
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_ltm
chameleon_parsec
${PARSEC_LIBRARIES_DEP}
)
link_directories(${PARSEC_LIBRARY_DIRS_DEP})
elseif(CHAMELEON_SCHED_QUARK)
list(APPEND libs_for_ltm
chameleon_quark
${QUARK_LIBRARIES}
)
link_directories(${QUARK_LIBRARY_DIRS})
endif()
# specific compilation for step0 because we potentially want to use
# multithreaded BLAS and LAPACK libraries for this step
unset(libs_for_step0)
if(NOT CHAMELEON_SIMULATION)
if(CHAMELEON_USE_CUDA)
list(APPEND libs_for_ltm
cudablas)
endif()
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
list(APPEND libs_for_step0 ${libs_for_ltm})
list(APPEND libs_for_ltm
coreblas
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
list(APPEND libs_for_step0
${libs_for_ltm}
${CBLAS_LIBRARIES}
)
if(LAPACK_PAR_LIBRARIES)
list(APPEND libs_for_step0
${LAPACK_PAR_LIBRARIES}
)
if( BLA_VENDOR MATCHES "Intel10_64lp*" OR BLA_VENDOR MATCHES "ACML*")
if(BLAS_PAR_LIBRARIES)
set(CBLAS_LIBRARIES "${BLAS_PAR_LIBRARIES}")
endif()
if(LAPACK_PAR_LIBRARIES)
set(LAPACKE_LIBRARIES "${LAPACK_PAR_LIBRARIES}")
endif()
endif()
if (BLAS_PAR_LIBRARIES AND LAPACK_PAR_LIBRARIES)
list(APPEND libs_for_step0
coreblas
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_PAR_LIBRARIES}
${BLAS_PAR_LIBRARIES}
${EXTRA_LIBRARIES}
)
else()
list(APPEND libs_for_step0
coreblas
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
endif ()
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_step0
${LAPACK_SEQ_LIBRARIES}
)
endif()
list(APPEND libs_for_ltm ${EXTRA_LIBRARIES})
list(APPEND libs_for_step0 ${EXTRA_LIBRARIES})
if(BLAS_PAR_LIBRARIES)
list(APPEND libs_for_step0
${BLAS_PAR_LIBRARIES}
)
else()
list(APPEND libs_for_step0
${BLAS_SEQ_LIBRARIES}
)
endif()
list(APPEND libs_for_step0
${EXTRA_LIBRARIES}
)
list(APPEND libs_for_ltm
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
# message(STATUS "libs examples: ${libs_for_ltm}")
foreach(_ltm ${LTM_SOURCES})
......
......@@ -19,7 +19,13 @@
# @date 2016-08-23
#
###
if (NOT CHAMELEON_SCHED_STARPU)
message(ERROR "This directory should not be included if CHAMELEON_SCHED_STARPU is not enabled")
endif()
if(CHAMELEON_SIMULATION)
message(ERROR "This directory should not be included if CHAMELEON_SIMULATION is enabled")
endif()
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
......@@ -34,42 +40,20 @@ set(OOC_SOURCES
unset(libs_for_ooc)
list(APPEND libs_for_ooc
chameleon
chameleon_starpu
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
if(NOT CHAMELEON_SIMULATION)
if(CHAMELEON_USE_CUDA)
list(APPEND libs_for_ooc
cudablas)
endif()
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
list(APPEND libs_for_ooc
coreblas
${LAPACKE_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_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_ooc ${EXTRA_LIBRARIES})
endif()
list(APPEND libs_for_ooc
${LAPACKE_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
# message(STATUS "libs examples: ${libs_for_ooc}")
foreach(_ooc ${OOC_SOURCES})
......
......@@ -102,27 +102,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Define what libraries we have to link with
# ------------------------------------------
unset(libs_for_tests)
list(APPEND libs_for_tests chameleon)
if(CHAMELEON_SCHED_STARPU)
list(APPEND libs_for_tests
chameleon_starpu
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_tests
chameleon_parsec
${PARSEC_LIBRARIES_DEP}
)
link_directories(${PARSEC_LIBRARY_DIRS_DEP})
elseif(CHAMELEON_SCHED_QUARK)
list(APPEND libs_for_tests
chameleon_quark
${QUARK_LIBRARIES}
)
link_directories(${QUARK_LIBRARY_DIRS})
endif()
list(APPEND libs_for_tests
chameleon
)
if(NOT CHAMELEON_SIMULATION)
......@@ -141,7 +123,6 @@ if(NOT CHAMELEON_SIMULATION)
${LAPACK_LIBRARIES}
${CBLAS_LIBRARIES}
${BLAS_LIBRARIES}
${EXTRA_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
......@@ -150,12 +131,13 @@ if(NOT CHAMELEON_SIMULATION)
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
else()
list(APPEND libs_for_tests ${EXTRA_LIBRARIES})
endif()
list(APPEND libs_for_tests
hqr
${EXTRA_LIBRARIES}
)
# message("LAPACKE_LIBRARY_DIRS: ${LAPACKE_LIBRARY_DIRS}")
# message("LAPACK_LIBRARY_DIRS: ${LAPACK_LIBRARY_DIRS}")
# message("CBLAS_LIBRARY_DIRS: ${CBLAS_LIBRARY_DIRS}")
......
......@@ -16,7 +16,7 @@
# Univ. of Tennessee,
# King Abdullah Univesity of Science and Technology
# Univ. of California Berkeley,
# Univ. of Colorado Denver.
# Univ. of Colorado Denver.
#
# @version 0.9.0
# @author Cedric Castagnede
......@@ -44,7 +44,7 @@ set(SCLNTST slaord.f)
set(DZLNTST dlaord.f)
set(SLINTST
set(SLINTST
schkaa.f
schkge.f serrge.f sdrvge.f
serrvx.f
......@@ -105,7 +105,7 @@ set(CLINTST
cgeequ.f claqge.f
cpoequ.f claqsy.f cpocon.f clacn2.f clatrs.f csrscl.f
clascl.f claset.f clatms.f clartg.f clatm1.f clarnd.f clarot.f clanhe.f claqhe.f
claror.f clagsy.f clagge.f
claror.f clagsy.f clagge.f
claipd.f csbmv.f
clauum.f ctrtri.f
clauu2.f ctrti2.f
......@@ -129,7 +129,7 @@ set(ZLINTST
zgeequ.f zlaqge.f
zpoequ.f zlaqsy.f zpocon.f zlacn2.f zlatrs.f zdrscl.f
zlascl.f zlaset.f zlatms.f zlartg.f zlatm1.f zlarnd.f zlarot.f zlanhe.f zlaqhe.f
zlaror.f zlagsy.f zlagge.f
zlaror.f zlagsy.f zlagge.f
zlaipd.f zsbmv.f
zlauum.f ztrtri.f
zlauu2.f ztrti2.f
......@@ -140,24 +140,22 @@ set(ZLINTST
# Define what libraries we have to link with
# ------------------------------------------
set(libs_for_tests "chameleon")
# TODO: Check for name of following libraries (it certainly changed between morse and new_chameleon)
if(MORSE_SCHED_STARPU)
list(APPEND libs_for_tests chameleon_starpu)
list(APPEND libs_for_tests ${STARPU_LIBRARIES_DEP})
list(APPEND libs_for_tests coreblas)
elseif(MORSE_SCHED_QUARK)
list(APPEND libs_for_tests chameleon_starpu)
list(APPEND libs_for_tests ${QUARK_LIBRARIES})
list(APPEND libs_for_tests coreblas)
endif()
foreach(_dep LAPACKE LAPACK CBLAS BLAS CUDA MPI DL)
if(HAVE_${_dep})
list(APPEND libs_for_tests ${${_dep}_LIBRARY})
endif()
endforeach()
set(libs_for_tests chameleon)
list(APPEND libs_for_tests
${LAPACKE_LIBRARIES}
${TMG_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${EXTRA_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
link_directories(${TMG_LIBRARY_DIRS})
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
list(APPEND libs_for_tests ${CMAKE_Fortran_FLAGS})
list(APPEND libs_for_tests ${CMAKE_Fortran_LDFLAGS})
......@@ -165,28 +163,28 @@ list(APPEND libs_for_tests ${CMAKE_Fortran_LDFLAGS})
# Define precisions to compile
# ----------------------------
if(BUILD_SINGLE)
if(CHAMELEON_PREC_S)
add_executable(morse_xlintsts ${ALINTST} ${SLINTST} ${SCLNTST})
set_property(TARGET morse_xlintsts PROPERTY LINKER_LANGUAGE Fortran)
target_link_libraries(morse_xlintsts ${libs_for_tests})
install(TARGETS morse_xlintsts DESTINATION ${CMAKE_INSTALL_PREFIX}/testing/lin)
endif()
if(BUILD_DOUBLE)
if(CHAMELEON_PREC_S)
add_executable(morse_xlintstd ${ALINTST} ${DLINTST} ${DZLNTST})
set_property(TARGET morse_xlintstd PROPERTY LINKER_LANGUAGE Fortran)
target_link_libraries(morse_xlintstd ${libs_for_tests})
install(TARGETS morse_xlintstd DESTINATION ${CMAKE_INSTALL_PREFIX}/testing/lin)
endif()
if(BUILD_COMPLEX)
if(CHAMELEON_PREC_C)
add_executable(morse_xlintstc ${ALINTST} ${CLINTST} ${SCLNTST})
set_property(TARGET morse_xlintstc PROPERTY LINKER_LANGUAGE Fortran)
target_link_libraries(morse_xlintstc ${libs_for_tests})
install(TARGETS morse_xlintstc DESTINATION ${CMAKE_INSTALL_PREFIX}/testing/lin)
endif()
if(BUILD_COMPLEX16)
if(CHAMELEON_PREC_Z)
add_executable(morse_xlintstz ${ALINTST} ${ZLINTST} ${DZLNTST})
set_property(TARGET morse_xlintstz PROPERTY LINKER_LANGUAGE Fortran)
target_link_libraries(morse_xlintstz ${libs_for_tests})
......
......@@ -163,47 +163,26 @@ if(NOT CHAMELEON_SIMULATION)
list(APPEND libs_for_timings chameleon_timing)
endif()
list(APPEND libs_for_timings chameleon)
list(APPEND libs_for_timings
chameleon
)
# Add dependency toward StarPU for StarPU specific calls
if(CHAMELEON_SCHED_STARPU)
list(APPEND libs_for_timings
chameleon_starpu
${STARPU_LIBRARIES_DEP}
list(APPEND libs_for_timings
${STARPU_LIBRARIES_DEP}
)
link_directories(${STARPU_LIBRARY_DIRS})
elseif(CHAMELEON_SCHED_PARSEC)
list(APPEND libs_for_timings
chameleon_parsec
${PARSEC_LIBRARIES_DEP}
)
link_directories(${PARSEC_LIBRARY_DIRS_DEP})
elseif(CHAMELEON_SCHED_QUARK)
list(APPEND libs_for_timings
chameleon_quark
${QUARK_LIBRARIES}
)
link_directories(${QUARK_LIBRARY_DIRS})
link_directories(${STARPU_LIBRARY_DIRS})
endif()
if(NOT CHAMELEON_SIMULATION)
if(CHAMELEON_USE_CUDA)
list(APPEND libs_for_timings
cudablas)
endif()
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
list(APPEND libs_for_timings
coreblas
${LAPACKE_LIBRARIES}
${TMG_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
${LIBHQR_LIBRARIES}
${EXTRA_LIBRARIES}
${LAPACKE_LIBRARIES}
${TMG_LIBRARIES}
${CBLAS_LIBRARIES}
${LAPACK_SEQ_LIBRARIES}
${BLAS_SEQ_LIBRARIES}
)
link_directories(${LAPACKE_LIBRARY_DIRS})
......@@ -211,14 +190,14 @@ if(NOT CHAMELEON_SIMULATION)
link_directories(${LAPACK_LIBRARY_DIRS})
link_directories(${CBLAS_LIBRARY_DIRS})
link_directories(${BLAS_LIBRARY_DIRS})
link_directories(${LIBHQR_LIBRARY_DIRS})
else()
list(APPEND libs_for_timings${EXTRA_LIBRARIES})
endif()
list(APPEND libs_for_timings
hqr
${EXTRA_LIBRARIES}
)
# message("BLAS_SEQ_LIBRARIES: ${BLAS_SEQ_LIBRARIES}")
# message("CBLAS_LIBRARIES: ${CBLAS_LIBRARIES}")
# message("LAPACK_SEQ_LIBRARIES: ${LAPACK_SEQ_LIBRARIES}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment