Commit 07d767f2 authored by THIBAULT Samuel's avatar THIBAULT Samuel

Add iteration numbers for traces

parent 665853f4
......@@ -706,6 +706,11 @@ if( CHAMELEON_SCHED_STARPU )
set(HAVE_STARPU_IDLE_PREFETCH 1)
message("-- ${Blue}Add definition HAVE_STARPU_IDLE_PREFETCH${ColourReset}")
endif()
check_function_exists(starpu_set_iteration STARPU_SET_ITERATION_FOUND)
if ( STARPU_SET_ITERATION_FOUND )
set(HAVE_STARPU_SET_ITERATION 1)
message("-- ${Blue}Add definition HAVE_STARPU_SET_ITERATION${ColourReset}")
endif()
check_function_exists(starpu_data_wont_use STARPU_DATA_WONT_USE_FOUND)
if ( STARPU_DATA_WONT_USE_FOUND )
set(HAVE_STARPU_DATA_WONT_USE 1)
......
......@@ -115,6 +115,8 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
#endif
for (k = 0; k < minMNT; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -119,6 +119,8 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
#endif
for (k = 0; k < chameleon_min(A->mt, A->nt); k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
for (N = k; N < A->nt; N += BS) {
......
......@@ -110,6 +110,8 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
#endif
for (k = 0; k < minMNT; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -118,6 +118,8 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
K = chameleon_min(A->mt, A->nt);
for (k = 0; k < K; k++) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
for (M = k; M < A->mt; M += BS) {
tempMm = M == A->mt-1 ? A->m-M*A->mb : A->mb;
......
......@@ -78,6 +78,8 @@ void morse_pzgetrf_incpiv(MORSE_desc_t *A, MORSE_desc_t *L, int *IPIV,
morse_zdesc_alloc_diag(*DIAG, A->mb, A->nb, chameleon_min(A->m, A->n), A->nb, 0, 0, chameleon_min(A->m, A->n), A->nb, A->p, A->q);
for (k = 0; k < minMNT; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -54,6 +54,8 @@ void morse_pzgetrf_nopiv(MORSE_desc_t *A,
ib = MORSE_IB;
for (k = 0; k < chameleon_min(A->mt, A->nt); k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -137,6 +137,8 @@ void morse_pzhetrd_he2hb(MORSE_enum uplo,
if (uplo == MorseLower) {
for (k = 0; k < A->nt-1; k++){
RUNTIME_set_iteration(k);
tempkm = k+1 == A->mt-1 ? A->m-(k+1)*A->mb : A->mb;
tempkn = k == A->nt-1 ? A->n- k *A->nb : A->nb;
ldak1 = BLKLDD(A, k+1);
......@@ -290,6 +292,8 @@ void morse_pzhetrd_he2hb(MORSE_enum uplo,
}
else {
for (k = 0; k < A->nt-1; k++){
RUNTIME_set_iteration(k);
tempkn = k+1 == A->nt-1 ? A->n-(k+1)*A->nb : A->nb;
tempkm = k == A->mt-1 ? A->m- k *A->mb : A->mb;
ldak = BLKLDD(A, k);
......
......@@ -71,6 +71,8 @@ void morse_pzpotrf(MORSE_enum uplo, MORSE_desc_t *A,
*/
if (uplo == MorseLower) {
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
......@@ -128,6 +130,8 @@ void morse_pzpotrf(MORSE_enum uplo, MORSE_desc_t *A,
*/
else {
for (k = 0; k < A->nt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -76,6 +76,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZPOTRF
*/
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
......@@ -124,6 +126,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZTRTRI
*/
for (k = 0; k < A->nt; k++) {
RUNTIME_set_iteration(A->nt + k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
for (m = k+1; m < A->mt; m++) {
......@@ -170,6 +174,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZLAUUM
*/
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(2*A->nt + k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
for(n = 0; n < k; n++) {
......@@ -211,6 +217,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZSYMM Right / Lower
*/
for (k = 0; k < C->nt; k++) {
RUNTIME_set_iteration(3*A->nt + k);
tempkn = k == C->nt-1 ? C->n-k*C->nb : C->nb;
ldak = BLKLDD(A, k);
zbeta = k == 0 ? beta : zone;
......@@ -269,6 +277,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZPOTRF
*/
for (k = 0; k < A->nt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
MORSE_TASK_zpotrf(
......@@ -317,6 +327,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZTRTRI
*/
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(A->nt + k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
for (n = k+1; n < A->nt; n++) {
......@@ -363,6 +375,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZLAUUM
*/
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(2*A->nt + k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -406,6 +420,8 @@ void morse_pzpotrimm(MORSE_enum uplo, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_de
* ZSYMM Right / Upper
*/
for (k = 0; k < C->nt; k++) {
RUNTIME_set_iteration(3*A->nt + k);
tempkn = k == C->nt-1 ? C->n-k*C->nb : C->nb;
ldak = BLKLDD(A, k);
zbeta = k == 0 ? beta : zone;
......
......@@ -60,6 +60,8 @@ void morse_pzsytrf(MORSE_enum uplo, MORSE_desc_t *A,
*/
if (uplo == MorseLower) {
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
......@@ -110,6 +112,8 @@ void morse_pzsytrf(MORSE_enum uplo, MORSE_desc_t *A,
*/
else {
for (k = 0; k < A->nt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
MORSE_TASK_zsytrf_nopiv(
......
......@@ -101,6 +101,8 @@ void morse_pztpgqrt( int L,
#endif
for (k = V1->nt-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkm = k == V1->mt-1 ? V1->m-k*V1->mb : V1->mb;
tempkk = k == V1->nt-1 ? V1->n-k*V1->nb : V1->nb;
tempkn = k == Q1->nt-1 ? Q1->n-k*Q1->nb : Q1->nb;
......
......@@ -91,6 +91,8 @@ void morse_pztpqrt( int L, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *T,
RUNTIME_options_ws_alloc( &options, ws_worker, ws_host );
for (k = 0; k < A->nt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -56,6 +56,8 @@ void morse_pztrtri(MORSE_enum uplo, MORSE_enum diag, MORSE_desc_t *A,
*/
if (uplo == MorseLower) {
for (k = 0; k < A->nt; k++) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
for (m = k+1; m < A->mt; m++) {
......@@ -104,6 +106,8 @@ void morse_pztrtri(MORSE_enum uplo, MORSE_enum diag, MORSE_desc_t *A,
*/
else {
for (k = 0; k < A->mt; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
for (n = k+1; n < A->nt; n++) {
......
......@@ -98,6 +98,8 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
#endif
for (k = minMT-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempAkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempAkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
tempkmin = chameleon_min( tempAkn, tempAkm );
......
......@@ -99,6 +99,8 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
K = chameleon_min(A->mt, A->nt);
for (k = K-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
lastRD = 0;
......
......@@ -98,6 +98,8 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
#endif
for (k = minMT-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempAkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
tempAkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
tempkmin = chameleon_min( tempAkn, tempAkm );
......
......@@ -101,6 +101,8 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
K = chameleon_min(A->mt, A->nt);
for (k = K-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
lastRD = 0;
for (RD = BS; RD < A->mt-k; RD *= 2)
......
......@@ -105,6 +105,8 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseNoTrans
*/
for (k = 0; k < minMT; k++) {
RUNTIME_set_iteration(k);
tempkm = k == B->mt-1 ? B->m-k*B->mb : B->mb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -155,6 +157,8 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseConjTrans
*/
for (k = minMT-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkm = k == B->mt-1 ? B->m-k*B->mb : B->mb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -207,6 +211,8 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
* MorseRight / MorseNoTrans
*/
for (k = minMT-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkn = k == B->nt -1 ? B->n -k*B->nb : B->nb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -257,6 +263,8 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
* MorseRight / MorseConjTrans
*/
for (k = 0; k < minMT; k++) {
RUNTIME_set_iteration(k);
tempkn = k == B->nt -1 ? B->n -k*B->nb : B->nb;
tempkmin = k == minMT-1 ? minM-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
......
......@@ -105,6 +105,8 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseNoTrans
*/
for (k = 0; k < K; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
for (N = k; N < A->nt; N += BS) {
......@@ -178,6 +180,8 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseConjTrans
*/
for (k = K-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
lastRD = 0;
......@@ -257,6 +261,8 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
* MorseRight / MorseNoTrans
*/
for (k = K-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
lastRD = 0;
......@@ -332,6 +338,8 @@ void morse_pzunmlqrh(MORSE_enum side, MORSE_enum trans,
* MorseRight / MorseConjTrans
*/
for (k = 0; k < K; k++) {
RUNTIME_set_iteration(k);
tempkm = k == A->mt-1 ? A->m-k*A->mb : A->mb;
ldak = BLKLDD(A, k);
for (N = k; N < A->nt; N += BS) {
......
......@@ -105,6 +105,8 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseConjTrans
*/
for (k = 0; k < minMT; k++) {
RUNTIME_set_iteration(k);
tempkm = k == B->mt-1 ? B->m-k*B->mb : B->mb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -156,6 +158,8 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
*/
else {
for (k = minMT-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkm = k == B->mt-1 ? B->m-k*B->mb : B->mb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -209,6 +213,8 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
else {
if (trans == MorseConjTrans) {
for (k = minMT-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkn = k == B->nt-1 ? B->n-k*B->nb : B->nb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......@@ -261,6 +267,8 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
*/
else {
for (k = 0; k < minMT; k++) {
RUNTIME_set_iteration(k);
tempkn = k == B->nt-1 ? B->n-k*B->nb : B->nb;
tempkmin = k == minMT-1 ? minM-k*A->nb : A->nb;
ldak = BLKLDD(A, k);
......
......@@ -107,6 +107,8 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseConjTrans
*/
for (k = 0; k < K; k++) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
for (M = k; M < A->mt; M += BS) {
tempMm = M == A->mt-1 ? A->m-M*A->mb : A->mb;
......@@ -182,6 +184,8 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
* MorseLeft / MorseNoTrans
*/
for (k = K-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
lastRD = 0;
for (RD = BS; RD < A->mt-k; RD *= 2)
......@@ -262,6 +266,8 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
* MorseRight / MorseConjTrans
*/
for (k = K-1; k >= 0; k--) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
lastRD = 0;
for (RD = BS; RD < A->mt-k; RD *= 2)
......@@ -340,6 +346,8 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
* MorseRight / MorseNoTrans
*/
for (k = 0; k < K; k++) {
RUNTIME_set_iteration(k);
tempkn = k == A->nt-1 ? A->n-k*A->nb : A->nb;
for (M = k; M < A->mt; M += BS) {
tempMm = M == A->mt-1 ? A->m-M*A->mb : A->mb;
......
......@@ -34,6 +34,7 @@
/* StarPU functions */
#cmakedefine HAVE_STARPU_FXT_PROFILING
#cmakedefine HAVE_STARPU_IDLE_PREFETCH
#cmakedefine HAVE_STARPU_SET_ITERATION
#cmakedefine HAVE_STARPU_DATA_WONT_USE
#cmakedefine HAVE_STARPU_MALLOC_ON_NODE_SET_DEFAULT_FLAGS
#cmakedefine HAVE_STARPU_MPI_DATA_REGISTER
......
......@@ -52,6 +52,8 @@ int RUNTIME_rank (MORSE_context_t*);
int RUNTIME_init_scheduler (MORSE_context_t*, int, int, int);
void RUNTIME_finalize_scheduler (MORSE_context_t*);
void RUNTIME_barrier (MORSE_context_t*);
void RUNTIME_set_iteration (MORSE_context_t*, unsigned long iteration);
void RUNTIME_set_subiteration (MORSE_context_t*, unsigned long subiteration);
void RUNTIME_pause (MORSE_context_t*);
void RUNTIME_resume (MORSE_context_t*);
void RUNTIME_comm_rank (int*);
......
......@@ -67,6 +67,20 @@ void RUNTIME_barrier(MORSE_context_t *morse)
return;
}
/*******************************************************************************
* Set iteration numbers for traces
**/
void RUNTIME_set_iteration( MORSE_context_t *morse, unsigned long iteration )
{
(void)morse;
return;
}
void RUNTIME_set_subiteration( MORSE_context_t *morse, unsigned long subiteration )
{
(void)morse;
return;
}
/*******************************************************************************
* To suspend the processing of new tasks by workers
**/
......
......@@ -68,6 +68,20 @@ void RUNTIME_finalize_scheduler(MORSE_context_t *morse)
return;
}
/*******************************************************************************
* Set iteration numbers for traces
**/
void RUNTIME_set_iteration( MORSE_context_t *morse, unsigned long iteration )
{
(void)morse;
return;
}
void RUNTIME_set_subiteration( MORSE_context_t *morse, unsigned long subiteration )
{
(void)morse;
return;
}
/*******************************************************************************
* To suspend the processing of new tasks by workers
**/
......
......@@ -175,6 +175,24 @@ void RUNTIME_barrier( MORSE_context_t *morse )
#endif
}
/*******************************************************************************
* Set iteration numbers for traces
**/
void RUNTIME_set_iteration( MORSE_context_t *morse, unsigned long iteration )
{
(void)morse;
#if defined(HAVE_STARPU_SET_ITERATION)
starpu_set_iteration(iteration);
#endif
}
void RUNTIME_set_subiteration( MORSE_context_t *morse, unsigned long subiteration )
{
(void)morse;
#if defined(HAVE_STARPU_SET_ITERATION)
starpu_set_subiteration(subiteration);
#endif
}
/*******************************************************************************
* To suspend the processing of new tasks by workers
**/
......
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