Commit d78337f7 authored by THIBAULT Samuel's avatar THIBAULT Samuel

Add CHAMELEON_SIMULATION_MAGMA option to select whether to enable magma...

Add CHAMELEON_SIMULATION_MAGMA option to select whether to enable magma kernels or not in simulation mode
parent 3b51df95
......@@ -237,6 +237,11 @@ 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 magma kernels in simulation mode" OFF)
if (NOT CHAMELEON_SIMULATION_MAGMA)
message("-- ${BoldGreen}CHAMELEON_SIMULATION_MAGMA is set to OFF, turn it ON to enable MAGMA kernels in "
"SIMULATION mode${ColourReset}")
endif()
endif()
# Initially we need to generate files for different precisions
......@@ -981,6 +986,11 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
" - 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()
#------------------------------------------------------------------------------
......
......@@ -130,6 +130,7 @@ 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
......
......@@ -4,7 +4,7 @@
# of Tennessee Research Foundation.
# All rights reserved.
# @copyright (c) 2012-2014 Inria. All rights reserved.
# @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
# @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
#
###
#
......@@ -56,6 +56,7 @@ 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"
......
......@@ -140,6 +140,10 @@ execution time on any architecture.
This feature should be used to make experiments on the scheduler behaviors and
performances not to produce solutions of linear systems.
@item @option{-DCHAMELEON_SIMULATION_MAGMA=trigger} (default: @code{OFF})
when using simulation mode (see CHAMELEON_SIMULATION), one can decide to enable
the magma kernels or not.
@item @option{-DCHAMELEON_ENABLE_DOCS=trigger} (default: @code{ON})
to control build of the documentation contained in @file{docs/} sub-directory
@item @option{-DCHAMELEON_ENABLE_EXAMPLE=trigger} (default: @code{ON})
......@@ -339,3 +343,6 @@ Note that only POTRF kernels with block sizes of 320 or 960 (simple and double
precision) on mirage machine are available for now.
Database of models is subject to change, it should be enrich in a near future.
@end itemize
One can additionally decide to enable the magma kernels by setting the cmake
option @option{-DCHAMELEON_SIMULATION_MAGMA=ON} .
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -197,7 +197,7 @@ static void cl_zgelqt_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zgelqt, 3, cl_zgelqt_cpu_func, cl_zgelqt_cuda_func, 0)
#else
CODELETS_CPU(zgelqt, 3, cl_zgelqt_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -199,7 +199,7 @@ static void cl_zgeqrt_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zgeqrt, 3, cl_zgeqrt_cpu_func, cl_zgeqrt_cuda_func, 0)
#else
CODELETS_CPU(zgeqrt, 3, cl_zgeqrt_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -165,7 +165,7 @@ static void cl_zgessm_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if (defined(CHAMELEON_USE_MAGMA) && defined(HAVE_MAGMA_GETRF_INCPIV_GPU)) || defined(CHAMELEON_SIMULATION)
#if (defined(CHAMELEON_USE_MAGMA) && defined(HAVE_MAGMA_GETRF_INCPIV_GPU)) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zgessm, 3, cl_zgessm_cpu_func, cl_zgessm_cuda_func, 0)
#else
CODELETS_CPU(zgessm, 3, cl_zgessm_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -232,7 +232,7 @@ static void cl_zgetrf_incpiv_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if (defined(CHAMELEON_USE_MAGMA) && defined(HAVE_MAGMA_GETRF_INCPIV_GPU)) || defined(CHAMELEON_SIMULATION)
#if (defined(CHAMELEON_USE_MAGMA) && defined(HAVE_MAGMA_GETRF_INCPIV_GPU)) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zgetrf_incpiv, 3, cl_zgetrf_incpiv_cpu_func, cl_zgetrf_incpiv_cuda_func, 0)
#else
CODELETS_CPU(zgetrf_incpiv, 3, cl_zgetrf_incpiv_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -144,7 +144,7 @@ static void cl_zgetrf_nopiv_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zgetrf_nopiv, 1, cl_zgetrf_nopiv_cpu_func, cl_zgetrf_nopiv_cuda_func, 0)
#else
CODELETS_CPU(zgetrf_nopiv, 1, cl_zgetrf_nopiv_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -93,7 +93,7 @@ static void cl_zlauum_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zlauum, 1, cl_zlauum_cpu_func, cl_zlauum_cuda_func, 0)
#else
CODELETS_CPU(zlauum, 1, cl_zlauum_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -117,7 +117,7 @@ static void cl_zpotrf_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined CHAMELEON_USE_MAGMA || defined(CHAMELEON_SIMULATION)
#if defined CHAMELEON_USE_MAGMA || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zpotrf, 1, cl_zpotrf_cpu_func, cl_zpotrf_cuda_func, 0)
#else
CODELETS_CPU(zpotrf, 1, cl_zpotrf_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -215,7 +215,7 @@ static void cl_zssssm_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if (defined(CHAMELEON_USE_MAGMA) && defined(HAVE_MAGMA_GETRF_INCPIV_GPU)) || defined(CHAMELEON_SIMULATION)
#if (defined(CHAMELEON_USE_MAGMA) && defined(HAVE_MAGMA_GETRF_INCPIV_GPU)) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zssssm, 4, cl_zssssm_cpu_func, cl_zssssm_cuda_func, 0)
#else
CODELETS_CPU(zssssm, 4, cl_zssssm_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -103,7 +103,7 @@ static void cl_ztrtri_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(ztrtri, 1, cl_ztrtri_cpu_func, cl_ztrtri_cuda_func, 0)
#else
CODELETS_CPU(ztrtri, 1, cl_ztrtri_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -216,7 +216,7 @@ static void cl_ztslqt_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if (defined(CHAMELEON_USE_MAGMA) && 0) || defined(CHAMELEON_SIMULATION)
#if (defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)) && 0
CODELETS(ztslqt, 4, cl_ztslqt_cpu_func, cl_ztslqt_cuda_func, 0)
#else
CODELETS_CPU(ztslqt, 4, cl_ztslqt_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -264,7 +264,7 @@ static void cl_ztsmlq_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(ztsmlq, 5, cl_ztsmlq_cpu_func, cl_ztsmlq_cuda_func, STARPU_CUDA_ASYNC)
#else
CODELETS_CPU(ztsmlq, 5, cl_ztsmlq_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -296,7 +296,7 @@ static void cl_ztsmqr_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(ztsmqr, 5, cl_ztsmqr_cpu_func, cl_ztsmqr_cuda_func, STARPU_CUDA_ASYNC)
#else
CODELETS_CPU(ztsmqr, 5, cl_ztsmqr_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -203,7 +203,7 @@ static void cl_ztsqrt_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(ztsqrt, 4, cl_ztsqrt_cpu_func, cl_ztsqrt_cuda_func, 0)
#else
CODELETS_CPU(ztsqrt, 4, cl_ztsqrt_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -263,7 +263,7 @@ static void cl_ztstrf_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if (defined(CHAMELEON_USE_MAGMA) && 0) || defined(CHAMELEON_SIMULATION)
#if (defined(CHAMELEON_USE_MAGMA) && 0) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(ztstrf, 4, cl_ztstrf_cpu_func, cl_ztstrf_cuda_func, 0)
#else
CODELETS_CPU(ztstrf, 4, cl_ztstrf_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -217,7 +217,7 @@ static void cl_zunmlq_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zunmlq, 4, cl_zunmlq_cpu_func, cl_zunmlq_cuda_func, 0)
#else
CODELETS_CPU(zunmlq, 4, cl_zunmlq_cpu_func)
......
......@@ -4,7 +4,7 @@
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
* @copyright (c) 2012-2014, 2016 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
......@@ -242,7 +242,7 @@ static void cl_zunmqr_cuda_func(void *descr[], void *cl_arg)
/*
* Codelet definition
*/
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
CODELETS(zunmqr, 4, cl_zunmqr_cpu_func, cl_zunmqr_cuda_func, 0)
#else
CODELETS_CPU(zunmqr, 4, cl_zunmqr_cpu_func)
......
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