Commit 7255c7c4 authored by PRUVOST Florent's avatar PRUVOST Florent

Re-work the cmake for simulation mode:

    - use (starpu_cpu_func_t) 1 trick, same as cuda_func
    - cpu funtions are not defined anymore avoiding the dependency to coreblas
    - add #if !defined(CHAMELEON_SIMULATION) where it is needed
    - remove dependency to the coreblas library (become useless)
    - remove useless simucblas, simulapacke libraries
    - remove CHAMELEON_SIMULATION_MAGMA cmake variable and definition
      - keep using CHAMELEON_USE_CUDA and CHAMELEON_USE_MAGMA to consider CUDA kernels
      - this avoid to introduce useless new variables
    - work on messages
parent 73bdfe23
......@@ -3,7 +3,7 @@
# @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-2016 Inria. All rights reserved.
# @copyright (c) 2012-2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
......@@ -235,14 +235,6 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
message("-- ${BoldGreen}CHAMELEON_SIMULATION is set to OFF, turn it ON to use"
" SIMULATION mode (only with StarPU compiled with SimGrid)${ColourReset}")
endif()
option(CHAMELEON_SIMULATION_MAGMA "Enable cuda/magma kernels in simulation mode" OFF)
if (CHAMELEON_SIMULATION_MAGMA)
message("-- ${BoldGreen}CHAMELEON_SIMULATION_MAGMA is set to ON, turn it OFF to disable CUDA/MAGMA kernels in "
" SIMULATION mode${ColourReset}")
else()
message("-- ${BoldGreen}CHAMELEON_SIMULATION_MAGMA is set to OFF, turn it ON to enable CUDA/MAGMA kernels in "
" SIMULATION mode${ColourReset}")
endif()
endif()
# Initially we need to generate files for different precisions
......@@ -554,44 +546,48 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
"\n Note that only POTRF kernels with block sizes of 320 or 960 (simple and double precision) on mirage machine are available for now."
"\n Database of models is subject to change, it should be enrich in a near future.${ColourReset}")
message("-- ${Blue}Add definition CHAMELEON_SIMULATION"
" - Activate simulation mode in Chameleon (to use with StarPU+SimGrid)${ColourReset}")
add_definitions(-DCHAMELEON_SIMULATION)
add_subdirectory(simucore)
# Guard against mis-used simulation mode
# if (CHAMELEON_SIMULATION)
# if(NOT DEFINED CHAMELEON_SIMULATION_CUDA)
# message(FATAL_ERROR "${BoldBlue}In simulation mode"
# "\n CHAMELEON_USE_CUDA and CHAMELEON_USE_MAGMA must be set to"
# "\n ensure that the user is aware of the version to be used."
# "\n If Chameleon's kernels are available for NVIDIA CUDA GPUs and"
# "\n if the according perfmodels are available in STARPU_HOME then"
# "\n use CHAMELEON_USE_CUDA=ON else set CHAMELEON_USE_CUDA=OFF."
# "\n The same idea is applicable with MAGMA.${ColourReset}")
# endif()
# if(NOT DEFINED CHAMELEON_SIMULATION_MAGMA)
# message(FATAL_ERROR "${BoldBlue}In simulation mode"
# "\n CHAMELEON_USE_CUDA and CHAMELEON_USE_MAGMA must be set to"
# "\n ensure that the user is aware of the version to be used."
# "\n If Chameleon's MAGMA kernels are available for NVIDIA CUDA"
# "\n GPUs and if the according perfmodels are available in"
# "\n STARPU_HOME then use CHAMELEON_USE_MAGMA=ON else set"
# "\n CHAMELEON_USE_MAGMA=OFF.${ColourReset}")
# endif()
# endif()
if(NOT DEFINED CHAMELEON_USE_CUDA)
message(FATAL_ERROR "${BoldBlue}"
"In simulation mode CHAMELEON_USE_CUDA and CHAMELEON_USE_MAGMA should be set to"
" ensure that the user is aware of the version to be used. If Chameleon's"
" kernels are available for NVIDIA CUDA GPUs and if the according"
" perfmodels are available in STARPU_HOME then use CHAMELEON_USE_CUDA=ON"
" else set CHAMELEON_USE_CUDA=OFF. The same idea is applicable with MAGMA."
"${ColourReset}")
endif()
if(NOT CHAMELEON_USE_MAGMA)
message(WARNING "${BoldBlue}"
"In simulation mode CHAMELEON_USE_CUDA and CHAMELEON_USE_MAGMA should be set to"
" ensure that the user is aware of the version to be used. If Chameleon's"
" MAGMA kernels are available for NVIDIA CUDA GPUs and if the according"
" perfmodels are available in STARPU_HOME then use CHAMELEON_USE_MAGMA=ON"
" else set CHAMELEON_USE_MAGMA=OFF.${ColourReset}")
endif()
# Add CUDA definition if required
if (CHAMELEON_USE_CUDA)
add_definitions(-DCHAMELEON_USE_CUDA)
# Add MAGMA definition if required
if (CHAMELEON_USE_MAGMA)
add_definitions(-DCHAMELEON_USE_MAGMA)
endif()
endif()
if (NOT CHAMELEON_SCHED_STARPU)
message(FATAL_ERROR "Simulation mode of Chameleon only works with"
"\n the StarPU runtime. Please use CHAMELEON_SCHED_STARPU=ON.")
endif()
if (CHAMELEON_USE_CUDA)
set(CHAMELEON_USE_CUDA OFF)
message("-- ${BoldBlue}CHAMELEON_USE_CUDA is set to ON but we turn it OFF."
"\n Because we are compiling the simulation mode (CHAMELEON_SIMULATION=ON),"
"\n we do not need to link with CUDA.${ColourReset}")
endif ()
if (CHAMELEON_USE_MAGMA)
set(CHAMELEON_USE_MAGMA OFF)
message("-- ${BoldBlue}CHAMELEON_USE_MAGMA is set to ON but we turn it OFF."
"\n Because we are compiling the simulation mode (CHAMELEON_SIMULATION=ON),"
"\n we do not need to link with MAGMA.${ColourReset}")
if (CHAMELEON_ENABLE_EXAMPLE)
set(CHAMELEON_ENABLE_EXAMPLE OFF)
message("-- ${BoldBlue}CHAMELEON_ENABLE_EXAMPLE is set to ON but we turn it OFF.")
endif ()
if (CHAMELEON_ENABLE_TESTING)
set(CHAMELEON_ENABLE_TESTING OFF)
......@@ -603,7 +599,7 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
# Simulation mode: we depend on SimGrid
find_package(SIMGRID REQUIRED)
# CHAMELEON depends on MPI
#-------------------------
if (CHAMELEON_USE_MPI)
......@@ -1014,24 +1010,6 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
include_directories(${CMAKE_CURRENT_BINARY_DIR}/include)
###############################################################################
# simucore libraries #
######################
if ( CHAMELEON_SIMULATION )
add_subdirectory(simucore)
message("-- ${Blue}Add definition CHAMELEON_SIMULATION"
" - Activate simulation mode in Chameleon (to use with StarPU+SimGrid)${ColourReset}")
add_definitions(-DCHAMELEON_SIMULATION)
endif()
if ( CHAMELEON_SIMULATION_MAGMA )
message("-- ${Blue}Add definition CHAMELEON_SIMULATION_MAGMA"
" - Activate magma kernels in simulation mode${ColourReset}")
add_definitions(-DCHAMELEON_SIMULATION_MAGMA)
endif()
#------------------------------------------------------------------------------
###############################################################################
# Coreblas library (kernels for CPUs) #
#######################################
......@@ -1074,7 +1052,6 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
enable_testing()
include(CTest)
#enable_testing()
# Necessary to compile executables (temporary)
# should use SystemDetection.cmake module?
......
......@@ -130,7 +130,6 @@ CHAMELEON_ENABLE_TRACING=ON|OFF (default OFF)
CHAMELEON_SCHED_STARPU=ON|OFF (default ON)
CHAMELEON_SCHED_QUARK=ON|OFF (default OFF)
CHAMELEON_SIMULATION=ON|OFF (default OFF)
CHAMELEON_SIMULATION_MAGMA=ON|OFF (default OFF)
Libraries detected with an official cmake module (see module files in CMAKE_ROOT/Modules/):
CUDA - MPI - Threads
......
......@@ -3,7 +3,7 @@
# @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-2016 Inria. All rights reserved.
# @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
......@@ -57,7 +57,6 @@ set(dep_message "${dep_message}"
"\n"
" Trace ...............: ${CHAMELEON_ENABLE_TRACING}\n"
" Simulation mode .....: ${CHAMELEON_SIMULATION}\n"
" Magma Simulation mode: ${CHAMELEON_SIMULATION_MAGMA}\n"
"\n"
" Binaries to build\n"
" documentation ........: ${CHAMELEON_ENABLE_DOCS}\n"
......@@ -70,6 +69,7 @@ foreach (_dep ${CHAMELEON_DEP})
set(dep_message "${dep_message}"
" ${_dep}\n")
endforeach ()
string(REGEX REPLACE ";" " " CHAMELEON_DEFINITIONS_LIST "${CHAMELEON_DEFINITIONS_LIST}")
set(dep_message "${dep_message}"
"\n"
" Definitions: ${CHAMELEON_DEFINITIONS_LIST}\n")
......
......@@ -3,7 +3,7 @@
# @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-2016 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
......@@ -249,8 +249,6 @@ endif(HAVE_ISO_C_BINDING)
# Compile step
# ------------
add_library(chameleon ${CHAMELEON_SRCS} ${CHAMELEON_SRCSF})
target_link_libraries(chameleon coreblas)
if(CHAMELEON_SCHED_STARPU)
target_link_libraries(chameleon chameleon_starpu)
list(INSERT CHAMELEON_DEP 0 -lchameleon_starpu)
......@@ -261,6 +259,9 @@ elseif(CHAMELEON_SCHED_QUARK)
target_link_libraries(chameleon chameleon_quark)
list(INSERT CHAMELEON_DEP 0 -lchameleon_quark)
endif()
if (NOT CHAMELEON_SIMULATION)
target_link_libraries(chameleon coreblas)
endif()
list(INSERT CHAMELEON_DEP 0 -lchameleon)
add_dependencies(chameleon
......@@ -268,6 +269,9 @@ add_dependencies(chameleon
coreblas_include
control_include
)
if (NOT CHAMELEON_SIMULATION)
add_dependencies(chameleon coreblas_include)
endif()
set_property(TARGET chameleon PROPERTY LINKER_LANGUAGE Fortran)
set_property(TARGET chameleon PROPERTY Fortran_MODULE_DIRECTORY "${CMAKE_BINARY_DIR}/include")
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -71,7 +71,7 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgelqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -118,7 +118,7 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
MorseUpper, A->mb, A->nb, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, A->mb, A->nb,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -79,7 +79,7 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgelqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -129,7 +129,7 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
MorseUpper, tempkm, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkm, tempNn,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -72,7 +72,7 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -119,7 +119,7 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
MorseLower, A->mb, A->nb, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, A->mb, A->nb,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -77,7 +77,7 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -130,7 +130,7 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
MorseLower, tempMm, A->nb, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, A->nb,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -64,7 +64,7 @@ void morse_pzgetrf_incpiv(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV,
RUNTIME_options_init(&options, morse, sequence, request);
ib = MORSE_IB;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
h_work_size = sizeof(MORSE_Complex64_t)*( 2*ib + 2*L->nb )*2*A->mb;
d_work_size = sizeof(MORSE_Complex64_t)*( ib )*2*A->mb;
#else
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -77,7 +77,7 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
ws_worker = A->nb * ib;
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmlq = A->nb * ib
......@@ -124,7 +124,7 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -75,7 +75,7 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -147,7 +147,7 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -77,7 +77,7 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
ws_worker = A->nb * ib;
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -126,7 +126,7 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -77,7 +77,7 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -153,7 +153,7 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -79,7 +79,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->mb * ib;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmlq = A->mb * ib
......@@ -115,7 +115,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkm, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkm,
......@@ -180,7 +180,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkm, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkm,
......@@ -231,7 +231,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......@@ -266,7 +266,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -77,7 +77,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmlq = A->nb * ib
......@@ -118,7 +118,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......@@ -230,7 +230,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......@@ -307,7 +307,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......@@ -346,7 +346,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -79,7 +79,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -115,7 +115,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......@@ -182,7 +182,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......@@ -235,7 +235,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkn, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkn, tempkmin,
......@@ -270,7 +270,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkn, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkn, tempkmin,
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -77,7 +77,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -117,7 +117,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -232,7 +232,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -311,7 +311,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -349,7 +349,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
#if defined(CHAMELEON_USE_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......
......@@ -47,7 +47,7 @@
/** ****************************************************************************
* Implementation headers
**/
#if defined(CHAMELEON_USE_CUDA)
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
#include <cuda.h>
#include <cuda_runtime.h>
#include <cuda_runtime_api.h>
......@@ -58,7 +58,7 @@
#endif
#endif
#if defined(CHAMELEON_USE_OPENCL)
#if defined(CHAMELEON_USE_OPENCL) && !defined(CHAMELEON_SIMULATION)
#include <OpenCL/cl.h>
#endif
......@@ -70,7 +70,7 @@
/** ****************************************************************************
* Linear Algebra headers
**/
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
#include <magma.h>
#endif
......@@ -88,7 +88,7 @@
#include "morse.h"
#include "coreblas/include/coreblas.h"
#if defined(CHAMELEON_USE_CUDA)
#if defined(CHAMELEON_USE_CUDA) && !defined(CHAMELEON_SIMULATION)
#include "cudablas/include/cudablas.h"
#endif
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -240,7 +240,9 @@ int MORSE_Disable(MORSE_enum option)
morse->progress_enabled = MORSE_FALSE;
break;
case MORSE_GEMM3M:
#if !defined(CHAMELEON_SIMULATION)
set_coreblas_gemm3m_enabled(0);
#endif
break;
case MORSE_PARALLEL_MODE:
morse->parallel_enabled = MORSE_FALSE;
......
......@@ -3,7 +3,7 @@
* @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-2016 Inria. All rights reserved.
* @copyright (c) 2012-2015 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -111,7 +111,7 @@ int MORSE_InitPar(int ncpus, int ncudas, int nthreads_per_worker)
}
# endif
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
magma_init();
#endif
RUNTIME_init_scheduler( morse, ncpus, ncudas, nthreads_per_worker );
......@@ -142,7 +142,7 @@ int MORSE_Finalize(void)
RUNT