Commit 08e6fdc4 authored by PRUVOST Florent's avatar PRUVOST Florent

fix use of cuda+magma in simulation mode: size of workspace must be consistent...

fix use of cuda+magma in simulation mode: size of workspace must be consistent between real and simu modes
parent e69e4813
......@@ -237,9 +237,12 @@ 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 "
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()
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zgelqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -117,7 +117,7 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, A->mb, A->nb,
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zgelqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -128,7 +128,7 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkm, tempNn,
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -118,7 +118,7 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, A->mb, A->nb,
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
......@@ -127,7 +127,7 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, A->nb,
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_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
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmlq = A->nb * ib
......@@ -123,7 +123,7 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -146,7 +146,7 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......
......@@ -71,7 +71,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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -119,7 +119,7 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......
......@@ -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)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -152,7 +152,7 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......
......@@ -79,7 +79,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmlq = A->nb * ib
......@@ -114,7 +114,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkm,
......@@ -179,7 +179,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkm,
......@@ -230,7 +230,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......@@ -265,7 +265,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), A->mb );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......
......@@ -77,7 +77,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmlq = A->nb * ib
......@@ -117,7 +117,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......@@ -229,7 +229,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......@@ -306,7 +306,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
A(k, N), ldak,
DIAG(k, N), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......@@ -345,7 +345,7 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
A(k, N), ldaN,
DIAG(k, N), ldaN );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......
......@@ -71,7 +71,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -114,7 +114,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......@@ -181,7 +181,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......@@ -234,7 +234,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkn, tempkmin,
......@@ -269,7 +269,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
A(k, k), ldak,
DIAG(k), ldak );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkn, tempkmin,
......
......@@ -77,7 +77,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -116,7 +116,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -231,7 +231,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -310,7 +310,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -348,7 +348,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#endif
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_MAGMA) || defined(CHAMELEON_SIMULATION_MAGMA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......
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