Commit a5be27b8 authored by Mathieu Faverge's avatar Mathieu Faverge

Merge branch 'magma' into 'master'

Magma

Closes #26

See merge request !44
parents f6cad5a7 8a4cf353
......@@ -19,7 +19,7 @@ starpu-simgrid:
- cd build
- . $HOME/spack/share/spack/setup-env.sh
- spack load hwloc && spack load fxt && spack load simgrid && spack load starpu
- cmake .. -DCHAMELEON_SIMULATION=ON -DCHAMELEON_USE_CUDA=ON -DCHAMELEON_USE_MAGMA=OFF -DCHAMELEON_USE_MPI=OFF
- cmake .. -DCHAMELEON_SIMULATION=ON -DCHAMELEON_USE_CUDA=ON -DCHAMELEON_USE_MPI=OFF
- make -j2
- ctest -V
......
......@@ -190,14 +190,6 @@ if (CHAMELEON_ENABLE_CUDA AND NOT CHAMELEON_USE_CUDA)
message("-- ${BoldGreen}CHAMELEON_USE_CUDA is set to OFF, turn it ON to use CUDA (unsupported by Quark)${ColourReset}")
endif()
# Enable MAGMA advanced kernels if CUDA is enabled
cmake_dependent_option(CHAMELEON_USE_MAGMA
"Enable MAGMA Cuda kernels" OFF
"CHAMELEON_USE_CUDA" OFF)
if (CHAMELEON_USE_CUDA AND NOT CHAMELEON_USE_MAGMA)
message("-- ${BoldGreen}CHAMELEON_USE_MAGMA is set to OFF, turn it ON to use MAGMA (only with StarPU)${ColourReset}")
endif()
# Enable FXT if StarPU
option(CHAMELEON_ENABLE_TRACING "Enable tracing support" OFF)
if (NOT CHAMELEON_ENABLE_TRACING)
......@@ -469,43 +461,6 @@ if(NOT CHAMELEON_SIMULATION)
#endif()
endif (CUDA_FOUND)
# CHAMELEON depends on MAGMA gpu kernels
# call our cmake module to test (in cmake_modules)
# change this call position if not appropriated
#----------------------------------------------
if ( CUDA_FOUND AND CHAMELEON_USE_MAGMA )
set(CHAMELEON_MAGMA_VERSION "1.4" CACHE STRING "oldest MAGMA version desired")
find_package(MAGMA ${CHAMELEON_MAGMA_VERSION})
if ( MAGMA_FOUND )
message("-- ${Blue}Add definition CHAMELEON_USE_MAGMA"
" - Use GPU kernels from MAGMA${ColourReset}")
set(CHAMELEON_USE_MAGMA 1)
if(MAGMA_INCLUDE_DIRS)
include_directories(${MAGMA_INCLUDE_DIRS})
endif()
if(MAGMA_LIBRARY_DIRS)
# the RPATH to be used when installing
list(APPEND CMAKE_INSTALL_RPATH "${MAGMA_LIBRARY_DIRS}")
endif()
if (MAGMA_LIBRARIES)
list(INSERT EXTRA_LIBRARIES_CUDA 0 ${MAGMA_LIBRARIES})
endif()
else( MAGMA_FOUND )
if(MORSE_VERBOSE_FIND_PACKAGE)
if (NOT MAGMA_magma.h_DIRS)
Print_Find_Header_Status(magma magma.h)
endif ()
if (NOT MAGMA_magma_LIBRARY)
Print_Find_Library_Status(magma libmagma)
endif ()
else()
message(WARNING "MAGMA library has not been found and MORSE_VERBOSE_FIND_PACKAGE is set to OFF."
" Try to activate MORSE_VERBOSE_FIND_PACKAGE option (-DMORSE_VERBOSE_FIND_PACKAGE=ON) to get some hints for the detection")
endif()
message(FATAL_ERROR "MAGMA library is required but has not been found")
endif( MAGMA_FOUND )
endif()
list(APPEND EXTRA_LIBRARIES ${EXTRA_LIBRARIES_CUDA})
endif(CHAMELEON_USE_CUDA)
......@@ -559,29 +514,17 @@ else (NOT CHAMELEON_SIMULATION)
# Guard against mis-used simulation mode
if(NOT DEFINED CHAMELEON_USE_CUDA)
message(FATAL_ERROR "${BoldBlue}"
"In simulation mode CHAMELEON_USE_CUDA and CHAMELEON_USE_MAGMA should be set to"
"In simulation mode CHAMELEON_USE_CUDA 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."
" else set CHAMELEON_USE_CUDA=OFF."
"${ColourReset}")
endif()
if(NOT DEFINED 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)
set(CHAMELEON_USE_CUDA 1)
# Add MAGMA definition if required
if (CHAMELEON_USE_MAGMA)
set(CHAMELEON_USE_MAGMA 1)
endif()
endif()
if (NOT CHAMELEON_SCHED_STARPU)
......@@ -1034,9 +977,6 @@ if(NOT CHAMELEON_SIMULATION)
if(CHAMELEON_USE_CUDA)
link_directories(${CUDA_LIBRARY_DIRS})
endif()
if(CHAMELEON_USE_MAGMA)
link_directories(${MAGMA_LIBRARY_DIRS})
endif()
endif()
# Save extra dependencies (all required links)
......
......@@ -4,18 +4,19 @@
## # The following are required to uses Dart and the Cdash dashboard
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "Morse-Magma")
set(CTEST_PROJECT_NAME "Chameleon")
set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.inria.fr")
# Shouldn't we change that to Chameleon ?
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=Morse-Magma")
set(CTEST_DROP_SITE_CDASH TRUE)
#--------------------------------------------------------------------
# BUILDNAME variable construction
# This variable will be used to set the build name which will appear
# on the Morse-Magma dashboard http://cdash.inria.fr/CDash/
# This variable will be used to set the build name which will appear
# on the Chameleon dashboard http://cdash.inria.fr/CDash/
#--------------------------------------------------------------------
# Start with the short system name, e.g. "Linux", "FreeBSD" or "Windows"
if(NOT BUILDNAME)
......@@ -38,7 +39,7 @@ if(NOT BUILDNAME)
set(BUILDNAME "${BUILDNAME}-${CMAKE_BUILD_TYPE}")
endif(CMAKE_BUILD_TYPE)
# Specific options of Magma-Morse
# Specific options of Chameleon
if(CHAMELEON_SCHED_QUARK)
set(BUILDNAME "${BUILDNAME}-Quark")
endif(CHAMELEON_SCHED_QUARK)
......
chameleon-???
chameleon-1.0.0
------------------------------------------------------------------------
- MAGMA kernels are no longer supported in Chameleon
- Add SVD/EVD drivers based on parallel first stage, and sequential LAPACK second stage and solve
- Add First stage algorithm fo r the SVD/EVD solvers
- add timing drivers time_zpotrs_tile and time_zgeqrs_tile
......
......@@ -5,18 +5,18 @@
This is a brief discussion about CHAMELEON usage.
For more information, please read the document users_guide.
Compilation of CHAMELEON libraries and executables are done with CMake
Compilation of CHAMELEON libraries and executables are done with CMake
(http://www.cmake.org/). This version has been tested with CMake 2.8.8.
Usage: three steps are required to compile and install CHAMELEON
Usage: three steps are required to compile and install CHAMELEON
1) configure :
> cmake path/to/chameleon -DOPTION1= -DOPTION2= ...
1) configure :
> cmake path/to/chameleon -DOPTION1= -DOPTION2= ...
see the "Options" section to get list of options
see the "Dependencies detection" for details about libraries detection
2) build :
> make
2) build :
> make
do not hesitate to use -j[ncores] option to speedup the compilation
3) install (optional) :
......@@ -37,7 +37,7 @@ lapack : netlib, openblas, eigen or intel mkl
lapacke : netlib, openblas or intel mkl
tmg : netlib, openblas or intel mkl
runtime : quark (http://icl.cs.utk.edu/quark/) or
runtime : quark (http://icl.cs.utk.edu/quark/) or
starpu (http://runtime.bordeaux.inria.fr/StarPU/)
hwloc : (http://www.open-mpi.org/projects/hwloc/)
......@@ -46,7 +46,6 @@ optional libraries
cuda : (https://developer.nvidia.com/cuda-downloads)
cublas : comes with cuda (http://docs.nvidia.com/cuda/cublas/)
magma : (http://icl.cs.utk.edu/magma/) (version 1.6.2 recommended)
mpi : openmpi (http://www.open-mpi.org/)
FxT : linux package (libfxt) or releases here http://download.savannah.gnu.org/releases/fkt/
......@@ -59,19 +58,19 @@ Please look at the distrib/ directory which gives some hints for the installatio
* Dependencies detection *
-------------------------------------------
You have different choices to detect dependencies on your system, either by
setting some environment variables containing paths to the libs and headers or
You have different choices to detect dependencies on your system, either by
setting some environment variables containing paths to the libs and headers or
by specifying them directly at cmake configure. Different cases :
1) detection of dependencies through environment variables:
1) detection of dependencies through environment variables:
- LD_LIBRARY_PATH should contain the list of paths where to find the libraries:
* export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:install/path/to/your/lib
- INCLUDE should contain the list of paths where to find the header files of libraries
* export INCLUDE=$INCLUDE:install/path/to/your/headers
2) detection with user's given paths:
- you can specify the path at cmake configure by invoking
cmake path/to/your/CMakeLists.txt -DLIB_DIR=path/to/your/lib
- you can specify the path at cmake configure by invoking
cmake path/to/your/CMakeLists.txt -DLIB_DIR=path/to/your/lib
where LIB stands for the name of the lib to look for
* example: cmake path/to/your/CMakeLists.txt -DSTARPU_DIR=path/to/starpudir \
-DCBLAS_DIR= ...
......@@ -86,16 +85,15 @@ by specifying them directly at cmake configure. Different cases :
* Options *
-------------------------------------------
You can optionally activate some options at cmake configure (like CUDA, MPI, ...)
You can optionally activate some options at cmake configure (like CUDA, MPI, ...)
invoking cmake path/to/your/CMakeLists.txt -DOPTION1= -DOPTION2= ...
example: cmake /home/toto/chameleon/ -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/home/toto/install/ \
-DCHAMELEON_USE_CUDA=ON \
-DCHAMELEON_USE_MAGMA=ON \
-DCHAMELEON_USE_CUDA=ON \
-DCHAMELEON_USE_MPI=ON \
-DBLA_VENDOR=Intel10_64lp \
-DBLA_VENDOR=Intel10_64lp \
-DSTARPU_DIR=/home/toto/install/starpu-1.1/build/include/starpu/1.1/ \
-DCHAMELEON_ENABLE_TRACING=ON
-DCHAMELEON_ENABLE_TRACING=ON
You can get the full list of options with -L[A][H] options of cmake command
example: cmake -LH /home/toto/chameleon/
......@@ -109,7 +107,7 @@ Some options (non-exhaustive list) :
Basic CMake:
------------
CMAKE_BUILD_TYPE=Debug|Release
CMAKE_INSTALL_PREFIX=path/to/your/install/dir (where headers and libraries will be copied
CMAKE_INSTALL_PREFIX=path/to/your/install/dir (where headers and libraries will be copied
when invoking make install)
Related to specific modules (find_package):
......@@ -120,44 +118,43 @@ STARPU_DIR=...
STARPU_INCDIR=...
STARPU_LIBDIR=...
# same idea can be used for some packages, replace STARPU by one of these:
BLAS - CBLAS - FXT - HWLOC - LAPACK - LAPACKE - MAGMA - QUARK - TMG
BLAS - CBLAS - FXT - HWLOC - LAPACK - LAPACKE - QUARK - TMG
CHAMELEON specific:
--------------------
CHAMELEON_USE_MPI=ON|OFF (default OFF)
CHAMELEON_USE_CUDA=ON|OFF (default OFF)
CHAMELEON_USE_MAGMA=ON|OFF (default OFF)
CHAMELEON_USE_CUDA=ON|OFF (default OFF)
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)
Libraries detected with an official cmake module (see module files in CMAKE_ROOT/Modules/):
CUDA - MPI - Threads
CUDA - MPI - Threads
Libraries detected with our cmake modules (see module files in cmake_modules/morse/find/ directory of CHAMELEON sources):
BLAS - CBLAS - FXT - HWLOC - LAPACK - LAPACKE - MAGMA - QUARK - STARPU - TMG
BLAS - CBLAS - FXT - HWLOC - LAPACK - LAPACKE - QUARK - STARPU - TMG
-------------------------------------------
* Use FxT profiling through StarPU *
-------------------------------------------
StarPU can generate its own trace log files by compiling it with the --with-fxt
option at the configure step (you can have to specify the directory where you
installed FxT by giving --with-fxt=... instead of --with-fxt alone).
By doing so, traces are generated after each execution of a program which uses
StarPU can generate its own trace log files by compiling it with the --with-fxt
option at the configure step (you can have to specify the directory where you
installed FxT by giving --with-fxt=... instead of --with-fxt alone).
By doing so, traces are generated after each execution of a program which uses
StarPU in the directory pointed by the STARPU_FXT_PREFIX environment variable.
example: export STARPU_FXT_PREFIX=/home/toto/fxt_files/
When executing a ./timing/... CHAMELEON program, if it has been enabled
(StarPU compiled with FxT and -DCHAMELEON_ENABLE_TRACING=ON), you can give the option --trace
When executing a ./timing/... CHAMELEON program, if it has been enabled
(StarPU compiled with FxT and -DCHAMELEON_ENABLE_TRACING=ON), you can give the option --trace
to tell the program to generate trace log files.
Finally, to generate the trace file which can be opened with Vite program
(http://vite.gforge.inria.fr/), you have to use the starpu_fxt_tool tool of StarPU.
This tool should be in $STARPU_INSTALL_REPOSITORY/bin.
You can use it to generate the trace file like this:
Finally, to generate the trace file which can be opened with Vite program
(http://vite.gforge.inria.fr/), you have to use the starpu_fxt_tool tool of StarPU.
This tool should be in $STARPU_INSTALL_REPOSITORY/bin.
You can use it to generate the trace file like this:
> path/to/your/install/starpu/bin/starpu_fxt_tool -i prof_filename
There is one file per mpi processus (prof_filename_0, prof_filename_1 ...).
To generate a trace of mpi programs you can call it like this:
......
......@@ -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.1
# @author Cedric Castagnede
......@@ -57,7 +57,7 @@ ENDMACRO(CONVERT_LIBSTYLE_TO_PKGCONFIG)
###
#
# CLEAN_LIB_LIST: clean libraries lists to follow the pkg-config style
# used in GENERATE_PKGCONFIG_FILE
# used in GENERATE_PKGCONFIG_FILE
#
###
MACRO(CLEAN_LIB_LIST _package)
......@@ -96,7 +96,7 @@ MACRO(GENERATE_PKGCONFIG_FILE)
set(CHAMELEON_PKGCONFIG_REQUIRED "")
set(COREBLAS_PKGCONFIG_REQUIRED "")
set(CUDABLAS_PKGCONFIG_REQUIRED "")
# A list of private packages required by this package but not exposed to
# applications
set(CHAMELEON_PKGCONFIG_REQUIRED_PRIVATE "")
......@@ -127,12 +127,6 @@ MACRO(GENERATE_PKGCONFIG_FILE)
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED "coreblas")
if(CHAMELEON_USE_CUDA)
if(CHAMELEON_USE_MAGMA)
list(APPEND CUDABLAS_PKGCONFIG_REQUIRED_PRIVATE magma)
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED_PRIVATE magma)
else()
endif()
list(APPEND CUDABLAS_PKGCONFIG_LIBS_PRIVATE ${CUDA_LIBRARIES})
list(APPEND CHAMELEON_PKGCONFIG_REQUIRED "cudablas")
endif()
......@@ -142,7 +136,7 @@ MACRO(GENERATE_PKGCONFIG_FILE)
if(CHAMELEON_USE_CUDA)
list(APPEND CHAMELEON_PKGCONFIG_LIBS -lcudablas)
endif()
list(APPEND CHAMELEON_PKGCONFIG_LIBS
list(APPEND CHAMELEON_PKGCONFIG_LIBS
-lcoreblas
${EXTRA_LIBRARIES}
)
......@@ -158,7 +152,7 @@ MACRO(GENERATE_PKGCONFIG_FILE)
if(CHAMELEON_USE_CUDA)
CLEAN_LIB_LIST(CUDABLAS)
endif()
# Create .pc file
# ---------------
SET(_output_chameleon_file "${CMAKE_BINARY_DIR}/chameleon.pc")
......
......@@ -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 Florent Pruvost
......@@ -53,7 +53,6 @@ set(dep_message "${dep_message}"
" Kernels specific\n"
" BLAS ................: ${BLAS_VENDOR_FOUND}\n"
" LAPACK...............: ${LAPACK_VENDOR_FOUND}\n"
" MAGMA ...............: ${CHAMELEON_USE_MAGMA}\n"
"\n"
" Trace ...............: ${CHAMELEON_ENABLE_TRACING}\n"
" Simulation mode .....: ${CHAMELEON_SIMULATION}\n"
......
Subproject commit 00aae15be5fd9d9662c9d4bf35453cafe9d66f81
Subproject commit 0a974775b7192227b887dcba77515305083c1f13
......@@ -86,23 +86,6 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
ws_worker = chameleon_max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = chameleon_max( ws_worker, ib * (ib + A->nb) );
/* Host space
*
* zgelqt = ib * A->nb + 3 * ib * ib + A->nb
* ztslqt = 3 * ib * A->nb + ib * ib + A->nb
*/
ws_host = chameleon_max( ws_host, ib * A->nb + 3 * ib * ib + A->nb );
ws_host = chameleon_max( ws_host, 3 * ib * A->nb + ib * ib + A->nb );
#endif
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......
......@@ -87,23 +87,6 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
ws_worker = chameleon_max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = chameleon_max( ws_worker, ib * (ib + A->nb) );
/* Host space
*
* zgelqt = ib * A->nb + 3 * ib * ib + A->nb
* ztslqt = 3 * ib * A->nb + ib * ib + A->nb
*/
ws_host = chameleon_max( ws_host, ib * A->nb + 3 * ib * ib + A->nb );
ws_host = chameleon_max( ws_host, 3 * ib * A->nb + ib * ib + A->nb );
#endif
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......
......@@ -81,23 +81,6 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
ws_worker = chameleon_max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = chameleon_max( ws_worker, ib * (ib + A->nb) );
/* Host space
*
* zgeqrt = ib * (A->mb+3*ib) + A->mb )
* ztsqrt = 2 * ib * (A->nb+ib) + A->nb
*/
ws_host = chameleon_max( ws_host, ib * (A->mb + 3 * ib) + A->mb );
ws_host = chameleon_max( ws_host, 2 * ib * (A->nb + ib) + A->nb );
#endif
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......
......@@ -85,23 +85,6 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
ws_worker = chameleon_max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = chameleon_max( ws_worker, ib * (ib + A->nb) );
/* Host space
*
* zgeqrt = ib * (A->nb+3*ib) + A->nb )
* ztsqrt = 2 * ib * (A->nb+ib) + A->nb
*/
ws_host = chameleon_max( ws_host, ib * (A->mb + 3 * ib) + A->mb );
ws_host = chameleon_max( ws_host, 2 * ib * (A->nb + ib) + A->nb );
#endif
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......
......@@ -64,13 +64,9 @@ 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)
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
h_work_size = sizeof(MORSE_Complex64_t)*( ib*L->nb );
d_work_size = 0;
#endif
RUNTIME_options_ws_alloc( &options, h_work_size, d_work_size );
/* necessary to avoid dependencies between tasks regarding the diag tile */
......
......@@ -85,23 +85,6 @@ void morse_pzhetrd_he2hb(MORSE_enum uplo,
ws_worker = chameleon_max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = chameleon_max( ws_worker, ib * (ib + A->nb) );
/* Host space
*
* zgeqrt = ib * (A->mb+3*ib) + A->mb )
* ztsqrt = 2 * ib * (A->nb+ib) + A->nb
*/
ws_host = chameleon_max( ws_host, ib * (A->mb + 3 * ib) + A->mb );
ws_host = chameleon_max( ws_host, 2 * ib * (A->nb + ib) + A->nb );
#endif
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......
......@@ -54,16 +54,6 @@ void morse_pzpotrf(MORSE_enum uplo, MORSE_desc_t *A,
return;
RUNTIME_options_init(&options, morse, sequence, request);
#ifdef CHAMELEON_USE_MAGMA
if (0) /* Disable the workspace as long as it is is not used (See StarPU codelet) */
{
int nb = MORSE_IB; /* Approximate nb for simulation */
#if !defined(CHAMELEON_SIMULATION)
nb = magma_get_zpotrf_nb(A->nb);
#endif
ws_host = sizeof(MORSE_Complex64_t)*nb*nb;
}
#endif
RUNTIME_options_ws_alloc( &options, 0, ws_host );
/*
......
......@@ -57,17 +57,6 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
return;
RUNTIME_options_init(&options, morse, sequence, request);
#ifdef CHAMELEON_USE_MAGMA
{
#if !defined(CHAMELEON_SIMULATION)
int nb = magma_get_zpotrf_nb(A->nb);
#else
int nb = A->nb;
#endif
RUNTIME_options_ws_alloc( &options, nb*nb, 0 );
}
#endif
/*
* MorseLower
*/
......@@ -489,8 +478,5 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
}
}
#ifdef CHAMELEON_USE_MAGMA
RUNTIME_options_ws_free(&options);
#endif
RUNTIME_options_finalize(&options, morse);
}
......@@ -70,21 +70,6 @@ void morse_pztpqrt( int L, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
ws_worker = chameleon_max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* ztpqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = chameleon_max( ws_worker, ib * (ib + A->nb) );
/* Host space
*
* ztpqrt = 2 * ib * (A->nb+ib) + A->nb
*/
ws_host = chameleon_max( ws_host, ib * (A->mb + 3 * ib) + A->mb );
ws_host = chameleon_max( ws_host, 2 * ib * (A->nb + ib) + A->nb );
#endif
ws_worker *= sizeof(MORSE_Complex64_t);
ws_host *= sizeof(MORSE_Complex64_t);
......
......@@ -69,17 +69,9 @@
#include <mpi.h>
#endif
/** ****************************************************************************
* Linear Algebra headers
**/
#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
#include <magma.h>
#endif
/** ****************************************************************************
* Line to avoid conflict with magma, because, we don't know why
* but lapacke provide a wrong interface of lapack in fortran
* Line to avoid conflict with other linear algebra libraries, because, we
* don't know why but lapacke provide a wrong interface of lapack in fortran
**/
#ifndef LAPACK_NAME
#define LAPACK_NAME(a, b) lapackef77_##a
......
......@@ -42,7 +42,4 @@
#cmakedefine HAVE_STARPU_MPI_COMM_RANK
#cmakedefine HAVE_STARPU_MPI_CACHED_RECEIVE
/* MAGMA functions */
#cmakedefine HAVE_MAGMA_GETRF_INCPIV_GPU
#endif /* CONFIG_H_HAS_BEEN_INCLUDED */
......@@ -110,9 +110,6 @@ int MORSE_InitPar(int ncpus, int ncudas, int nthreads_per_worker)
}
}
# endif
#endif
#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
magma_init();
#endif
RUNTIME_init_scheduler( morse, ncpus, ncudas, nthreads_per_worker );
return MORSE_SUCCESS;
......@@ -142,9 +139,6 @@ int MORSE_Finalize(void)
RUNTIME_barrier(morse);
# endif
RUNTIME_finalize_scheduler( morse );
#if defined(CHAMELEON_USE_MAGMA) && !defined(CHAMELEON_SIMULATION)
magma_finalize();
#endif
#if defined(CHAMELEON_USE_MPI)
if (!morse->mpi_outer_init)
......
......@@ -133,10 +133,6 @@ int morse_alloc_ipiv(int M, int N, MORSE_enum func, int type, MORSE_desc_t **des
NB = MORSE_NB;
IB = MORSE_IB;
#if defined(CHAMELEON_USE_MAGMA)
/* IB *= 2; */
#endif
NT = (N%NB==0) ? (N/NB) : ((N/NB)+1);
MT = (M%NB==0) ? (M/NB) : ((M/NB)+1);
......
......@@ -55,22 +55,23 @@ if( CHAMELEON_USE_CUBLAS_V2 )
)
endif( CHAMELEON_USE_CUBLAS_V2 )
if( CHAMELEON_USE_MAGMA )
set(ZSRC
${ZSRC}
cuda_zgelqt.c
cuda_zgeqrt.c
cuda_zgessm.c
cuda_zgetrf.c
cuda_zlauum.c
cuda_zpotrf.c
cuda_zssssm.c
cuda_ztrtri.c
cuda_ztslqt.c
cuda_ztsqrt.c
cuda_ztstrf.c
)
endif()
# Former MAGMA files that are no longer supported
# if( CHAMELEON_USE_MAGMA )
# set(ZSRC
# ${ZSRC}
# cuda_zgelqt.c
# cuda_zgeqrt.c
# cuda_zgessm.c
# cuda_zgetrf.c
# cuda_zlauum.c
# cuda_zpotrf.c
# cuda_zssssm.c
# cuda_ztrtri.c
# cuda_ztslqt.c
# cuda_ztsqrt.c
# cuda_ztstrf.c
# )
# endif()
precisions_rules_py(
CUDABLAS_SRCS_GENERATED "${ZSRC}"
......@@ -94,9 +95,6 @@ add_dependencies(cudablas cudablas_include)
set_property(TARGET cudablas PROPERTY LINKER_LANGUAGE Fortran)
target_link_libraries(cudablas coreblas ${CUDA_LIBRARIES})
if(CHAMELEON_USE_MAGMA)
target_link_libraries(cudablas ${MAGMA_LIBRARIES})
endif(CHAMELEON_USE_MAGMA)
# installation
# ------------
......
......@@ -65,10 +65,6 @@
#endif /* defined(CHAMELEON_USE_CUBLAS_V2) */
#if defined(CHAMELEON_USE_MAGMA)
#include <magma.h>
#endif
/** ****************************************************************************
* MORSE types and constants
**/
......
......@@ -56,21 +56,6 @@ int CUDA_zttmqr( MORSE_enum side, MORSE_enum trans, int M1, int N1, int M2, int
int CUDA_zunmlqt(MORSE_enum side, MORSE_enum trans, int M, int N, int K, int IB, const cuDoubleComplex *A, int LDA, const cuDoubleComplex *T, int LDT, cuDoubleComplex *C, int LDC, cuDoubleComplex *WORK, int LDWORK, CUBLAS_STREAM_PARAM );
int CUDA_zunmqrt(MORSE_enum side, MORSE_enum trans, int M, int N, int K, int IB, const cuDoubleComplex *A, int LDA, const cuDoubleComplex *T, int LDT, cuDoubleComplex *C, int LDC, cuDoubleComplex *WORK, int LDWORK, CUBLAS_STREAM_PARAM );
#if defined(CHAMELEON_USE_MAGMA)
int CUDA_zgelqt( magma_int_t m, magma_int_t n, magma_int_t nb, magmaDoubleComplex *da, magma_int_t ldda, magmaDoubleComplex *v, magma_int_t ldv, magmaDoubleComplex *dt, magma_int_t lddt, magmaDoubleComplex *t, magma_int_t ldt, magmaDoubleComplex *dd, magmaDoubleComplex *d, magma_int_t ldd, magmaDoubleComplex *tau, magmaDoubleComplex *hwork, magmaDoubleComplex *dwork, CUBLAS_STREAM_PARAM );
int CUDA_zgeqrt( magma_int_t m, magma_int_t n, magma_int_t nb, magmaDoubleComplex *da, magma_int_t ldda, magmaDoubleComplex *v, magma_int_t ldv, magmaDoubleComplex *dt, magma_int_t lddt, magmaDoubleComplex *t, magma_int_t ldt, magmaDoubleComplex *dd, magmaDoubleComplex *d, magma_int_t ldd, magmaDoubleComplex *tau, magmaDoubleComplex *hwork, magmaDoubleComplex *dwork, CUBLAS_STREAM_PARAM );
int CUDA_zgessm( char storev, magma_int_t m, magma_int_t n, magma_int_t k, magma_int_t ib, magma_int_t *ipiv, cuDoubleComplex *dL1, magma_int_t lddl1, cuDoubleComplex *dL, magma_int_t lddl, cuDoubleComplex *dA, magma_int_t ldda, magma_int_t *info );
int CUDA_zgetrf_incpiv( char storev, magma_int_t m, magma_int_t n, magma_int_t ib, cuDoubleComplex *hA, magma_int_t ldha, cuDoubleComplex *dA, magma_int_t ldda, cuDoubleComplex *hL, magma_int_t ldhl, cuDoubleComplex *dL, magma_int_t lddl, magma_int_t *ipiv, cuDoubleComplex *dwork, magma_int_t lddwork, magma_int_t *info );
int CUDA_zgetrf_nopiv( magma_int_t m, magma_int_t n, cuDoubleComplex *dA, magma_int_t ldda, magma_int_t *info );