Commit f70a60af authored by PRUVOST Florent's avatar PRUVOST Florent

chameleon: cblas/lapacke headers should not be duplicated, factorize error...

chameleon: cblas/lapacke headers should not be duplicated, factorize error message if cblas/lapacke function are called in simu mode
parent 4e34d0be
......@@ -133,19 +133,19 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
endif()
if (CHAMELEON_SCHED_STARPU)
message("-- ${BoldGreen}CHAMELEON_SCHED_STARPU is set to ON: CHAMELEON uses StarPU runtime\n"
" To use CHAMELEON with Quark runtime: set CHAMELEON_SCHED_QUARK to ON\n"
" To use CHAMELEON with PaRSEC runtime: set CHAMELEON_SCHED_PARSEC to ON\n"
" (CHAMELEON_SCHED_STARPU will be disabled)${ColourReset}")
" To use CHAMELEON with Quark runtime: set CHAMELEON_SCHED_QUARK to ON\n"
" To use CHAMELEON with PaRSEC runtime: set CHAMELEON_SCHED_PARSEC to ON\n"
" (CHAMELEON_SCHED_STARPU will be disabled)${ColourReset}")
elseif(CHAMELEON_SCHED_QUARK)
message("-- ${BoldGreen}CHAMELEON_SCHED_QUARK is set to ON: CHAMELEON uses Quark runtime\n"
" To use CHAMELEON with StarPU runtime: set CHAMELEON_SCHED_STARPU to ON\n"
" To use CHAMELEON with PaRSEC runtime: set CHAMELEON_SCHED_PARSEC to ON\n"
" (CHAMELEON_SCHED_QUARK will be disabled)${ColourReset}")
" To use CHAMELEON with StarPU runtime: set CHAMELEON_SCHED_STARPU to ON\n"
" To use CHAMELEON with PaRSEC runtime: set CHAMELEON_SCHED_PARSEC to ON\n"
" (CHAMELEON_SCHED_QUARK will be disabled)${ColourReset}")
elseif(CHAMELEON_SCHED_PARSEC)
message("-- ${BoldGreen}CHAMELEON_SCHED_PARSEC is set to ON: CHAMELEON uses PaRSEC runtime\n"
" To use CHAMELEON with StarPU runtime: set CHAMELEON_SCHED_STARPU to ON\n"
" To use CHAMELEON with Quark runtime: set CHAMELEON_SCHED_QUARK to ON\n"
" (CHAMELEON_SCHED_PARSEC will be disabled)${ColourReset}")
" To use CHAMELEON with StarPU runtime: set CHAMELEON_SCHED_STARPU to ON\n"
" To use CHAMELEON with Quark runtime: set CHAMELEON_SCHED_QUARK to ON\n"
" (CHAMELEON_SCHED_PARSEC will be disabled)${ColourReset}")
endif()
# Check that one, and only one, SCHED option is set to ON
......@@ -498,15 +498,15 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
else (NOT CHAMELEON_SIMULATION)
message("${BoldBlue}Simulation mode of CHAMELEON is activated (CHAMELEON_SIMULATION=ON)."
"\nThis mode allows you to simulate execution of algorithms with StarPU compiled with SimGrid."
"\nTo do so, we provide some perfmodels in the simucore/perfmodels/ directory of CHAMELEON sources."
"\nThe resulting directory where to find perfmodels is: ${CMAKE_CURRENT_SOURCE_DIR}/simucore/perfmodels."
"\nTo use these perfmodels, please set your STARPU_HOME environment variable to ${CMAKE_CURRENT_SOURCE_DIR}/simucore/perfmodels."
"\nFinally, you need to set your STARPU_HOSTNAME environment variable to the name of the machine to simulate."
"For example: STARPU_HOSTNAME=mirage."
"\nNote that only POTRF kernels with block sizes of 320 or 960 (simple and double precision) on mirage machine are available for now."
"\nDatabase of models is subject to change, it should be enrich in a near future.${ColourReset}")
message(STATUS "${BoldBlue}Simulation mode of CHAMELEON is activated (CHAMELEON_SIMULATION=ON)."
"\n This mode allows you to simulate execution of algorithms with StarPU compiled with SimGrid."
"\n To do so, we provide some perfmodels in the simucore/perfmodels/ directory of CHAMELEON sources."
"\n The resulting directory where to find perfmodels is: ${CMAKE_CURRENT_SOURCE_DIR}/simucore/perfmodels."
"\n To use these perfmodels, please set your STARPU_HOME environment variable to ${CMAKE_CURRENT_SOURCE_DIR}/simucore/perfmodels."
"\n Finally, you need to set your STARPU_HOSTNAME environment variable to the name of the machine to simulate."
"\n For example: STARPU_HOSTNAME=mirage."
"\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}")
if (CHAMELEON_USE_CUDA)
set(CHAMELEON_USE_CUDA OFF)
......@@ -516,16 +516,16 @@ if (MORSE_DISTRIB_DIR OR EXISTS "${CMAKE_SOURCE_DIR}/cmake_modules/")
endif ()
if (CHAMELEON_USE_MAGMA)
set(CHAMELEON_USE_MAGMA OFF)
message("${BoldBlue}CHAMELEON_USE_MAGMA is set to ON but we turn it OFF."
" Because we are compiling the simulation mode (CHAMELEON_SIMULATION=ON),"
" we do not need to link with MAGMA.${ColourReset}")
message(STATUS "${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}")
endif ()
if (CHAMELEON_ENABLE_TESTING)
set(CHAMELEON_ENABLE_TESTING OFF)
message("${BoldBlue}CHAMELEON_ENABLE_TESTING is set to ON but we turn it OFF."
" Because we are compiling the simulation mode (CHAMELEON_SIMULATION=ON),"
" there is no sense in compiling testing drivers that are used to check"
" numerical correctness of algorithms and kernels.${ColourReset}")
message(STATUS "${BoldBlue}CHAMELEON_ENABLE_TESTING is set to ON but we turn it OFF."
"\n Because we are compiling the simulation mode (CHAMELEON_SIMULATION=ON),"
"\n there is no sense in compiling testing drivers that are used to check"
"\n numerical correctness of algorithms and kernels.${ColourReset}")
endif ()
# Simulation mode: we depend on SimGrid
......
......@@ -32,31 +32,17 @@ set(SIMUCBLAS_SRCS
simucblas.c
)
# Define the list of headers
# --------------------------
set(SIMUCBLAS_HDRS
cblas.h
)
# include directories
# -------------------
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Force generation of headers
# ---------------------------
add_custom_target(simucblas_include ALL SOURCES ${SIMUCBLAS_HDRS})
# Compile step
# ------------
add_library(simucblas ${SIMUCBLAS_SRCS})
add_dependencies(simucblas simucblas_include)
# this library is theoreticaly independent from coreblas but in order to avoid
# the duplication of cblas headers in here we rely on the ones lying in
# coreblas/include
add_dependencies(simucblas coreblas_include)
set_property(TARGET simucblas PROPERTY LINKER_LANGUAGE Fortran)
# installation
# ------------
install(FILES ${SIMUCBLAS_HDRS}
DESTINATION include/chameleon/simucore/simucblas)
install(TARGETS simucblas
DESTINATION lib)
......
This diff is collapsed.
This diff is collapsed.
......@@ -29,33 +29,17 @@ set(SIMULAPACKE_SRCS
simulapacke.c
)
# Define the list of headers
# --------------------------
set(SIMULAPACKE_HDRS
lapacke.h
lapacke_config.h
lapacke_mangling.h
)
# include directories
# -------------------
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_BINARY_DIR})
# Force generation of headers
# ---------------------------
add_custom_target(simulapacke_include ALL SOURCES ${SIMULAPACKE_HDRS})
# Compile step
# ------------
add_library(simulapacke ${SIMULAPACKE_SRCS})
add_dependencies(simulapacke simulapacke_include)
# this library is theoreticaly independent from coreblas but in order to avoid
# the duplication of lapacke headers in here we rely on the ones lying in
# coreblas/include
add_dependencies(simulapacke coreblas_include)
set_property(TARGET simulapacke PROPERTY LINKER_LANGUAGE Fortran)
# installation
# ------------
install(FILES ${SIMULAPACKE_HDRS}
DESTINATION include/chameleon/simucore/simulapacke)
install(TARGETS simulapacke
DESTINATION lib)
......
This diff is collapsed.
/**
*
* @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 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file lapacke_config.h
*
* MORSE lapacke header for simulation mode
*
* @version 1.0.0
* @comment This is a copy of lapacke_config.h from lapack 3.5.0
* @author Florent Pruvost
* @date 2014-10-01
*
**/
#ifndef _LAPACKE_CONFIG_H_
#define _LAPACKE_CONFIG_H_
#ifdef __cplusplus
#if defined(LAPACK_COMPLEX_CPP)
#include <complex>
#endif
extern "C" {
#endif /* __cplusplus */
#include <stdlib.h>
#ifndef lapack_int
#if defined(LAPACK_ILP64)
#define lapack_int long
#else
#define lapack_int int
#endif
#endif
#ifndef lapack_logical
#define lapack_logical lapack_int
#endif
#ifndef LAPACK_COMPLEX_CUSTOM
#if defined(LAPACK_COMPLEX_STRUCTURE)
typedef struct { float real, imag; } _lapack_complex_float;
typedef struct { double real, imag; } _lapack_complex_double;
#define lapack_complex_float _lapack_complex_float
#define lapack_complex_double _lapack_complex_double
#define lapack_complex_float_real(z) ((z).real)
#define lapack_complex_float_imag(z) ((z).imag)
#define lapack_complex_double_real(z) ((z).real)
#define lapack_complex_double_imag(z) ((z).imag)
#elif defined(LAPACK_COMPLEX_C99)
#include <complex.h>
#define lapack_complex_float float _Complex
#define lapack_complex_double double _Complex
#define lapack_complex_float_real(z) (creal(z))
#define lapack_complex_float_imag(z) (cimag(z))
#define lapack_complex_double_real(z) (creal(z))
#define lapack_complex_double_imag(z) (cimag(z))
#elif defined(LAPACK_COMPLEX_CPP)
#define lapack_complex_float std::complex<float>
#define lapack_complex_double std::complex<double>
#define lapack_complex_float_real(z) ((z).real())
#define lapack_complex_float_imag(z) ((z).imag())
#define lapack_complex_double_real(z) ((z).real())
#define lapack_complex_double_imag(z) ((z).imag())
#else
#include <complex.h>
#define lapack_complex_float float _Complex
#define lapack_complex_double double _Complex
#define lapack_complex_float_real(z) (creal(z))
#define lapack_complex_float_imag(z) (cimag(z))
#define lapack_complex_double_real(z) (creal(z))
#define lapack_complex_double_imag(z) (cimag(z))
#endif
lapack_complex_float lapack_make_complex_float( float re, float im );
lapack_complex_double lapack_make_complex_double( double re, double im );
#endif
#ifndef LAPACK_malloc
#define LAPACK_malloc( size ) malloc( size )
#endif
#ifndef LAPACK_free
#define LAPACK_free( p ) free( p )
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* _LAPACKE_CONFIG_H_ */
#ifndef LAPACK_HEADER_INCLUDED
#define LAPACK_HEADER_INCLUDED
/* Mangling for Fortran global symbols without underscores. */
#define LAPACK_GLOBAL(name,NAME) name##_
/* Mangling for Fortran global symbols with underscores. */
#define LAPACK_GLOBAL_(name,NAME) name##_
/* Mangling for Fortran module symbols without underscores. */
#define LAPACK_MODULE(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name
/* Mangling for Fortran module symbols with underscores. */
#define LAPACK_MODULE_(mod_name,name, mod_NAME,NAME) __##mod_name##_MOD_##name
#endif
This diff is collapsed.
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