diff --git a/example/lapack_to_morse/CMakeLists.txt b/example/lapack_to_morse/CMakeLists.txt index 662d24c4fdae152acc21bde57203d49235ef9504..3a343cd371e362e92814f7eab2c81792a6d03fd8 100644 --- a/example/lapack_to_morse/CMakeLists.txt +++ b/example/lapack_to_morse/CMakeLists.txt @@ -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}) diff --git a/example/out_of_core/CMakeLists.txt b/example/out_of_core/CMakeLists.txt index 27bc3ebfe0efd15826374cdec16d6ba7b2884069..22fbc165bdd2d409c92c46995f8d49c4554656f6 100644 --- a/example/out_of_core/CMakeLists.txt +++ b/example/out_of_core/CMakeLists.txt @@ -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}) diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt index ec4430f0cdcaa47d96a368ee1bcee7a7c931f2f0..9eacfad54adecd40525d066cd3c8993cf8715293 100644 --- a/testing/CMakeLists.txt +++ b/testing/CMakeLists.txt @@ -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}") diff --git a/testing/lin/CMakeLists.txt b/testing/lin/CMakeLists.txt index 87d87bd427d30291e7e80b91f8ab49ea6ccb6f51..c20363975e22397581cb8c43395cda8648c51f73 100644 --- a/testing/lin/CMakeLists.txt +++ b/testing/lin/CMakeLists.txt @@ -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}) diff --git a/timing/CMakeLists.txt b/timing/CMakeLists.txt index 69efac99118f506a18c797c330b8d79395839228..3e13f9574d49252305a020b13453accf1c897456 100644 --- a/timing/CMakeLists.txt +++ b/timing/CMakeLists.txt @@ -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}")