Commit 26f9fc70 authored by Reazul Hoque's avatar Reazul Hoque Committed by Mathieu Faverge

Added changes for distributed(incomplete)

parent 84ba1099
......@@ -88,12 +88,12 @@ void MORSE_TASK_zgemm(const MORSE_option_t *options,
sizeof(int), &n, VALUE,
sizeof(int), &k, VALUE,
sizeof(MORSE_Complex64_t), &alpha, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT | morse_parsec_get_arena_index(A),
sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INPUT,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INPUT | morse_parsec_get_arena_index(B),
sizeof(int), &ldb, VALUE,
sizeof(MORSE_Complex64_t), &beta, VALUE,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
sizeof(int), &ldc, VALUE,
0);
}
......@@ -84,12 +84,12 @@ void MORSE_TASK_zher2k(const MORSE_option_t *options,
sizeof(int), &n, VALUE,
sizeof(int), &k, VALUE,
sizeof(MORSE_Complex64_t), &alpha, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT | morse_parsec_get_arena_index(A),
sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INPUT,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INPUT | morse_parsec_get_arena_index(B),
sizeof(int), &ldb, VALUE,
sizeof(double), &beta, VALUE,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
sizeof(int), &ldc, VALUE,
0);
}
......@@ -79,10 +79,10 @@ void MORSE_TASK_zherk(const MORSE_option_t *options,
sizeof(int), &n, VALUE,
sizeof(int), &k, VALUE,
sizeof(double), &alpha, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT | morse_parsec_get_arena_index(A),
sizeof(int), &lda, VALUE,
sizeof(double), &beta, VALUE,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
sizeof(int), &ldc, VALUE,
0);
}
......
......@@ -65,7 +65,7 @@ void MORSE_TASK_zplghe( const MORSE_option_t *options,
sizeof(double), &bump, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), OUTPUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), OUTPUT | morse_parsec_get_arena_index(A) | AFFINITY,
sizeof(int), &lda, VALUE,
sizeof(int), &bigM, VALUE,
sizeof(int), &m0, VALUE,
......
......@@ -65,7 +65,7 @@ void MORSE_TASK_zplgsy( const MORSE_option_t *options,
sizeof(MORSE_Complex64_t), &bump, VALUE,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), OUTPUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), OUTPUT | morse_parsec_get_arena_index(A) | AFFINITY,
sizeof(int), &lda, VALUE,
sizeof(int), &bigM, VALUE,
sizeof(int), &m0, VALUE,
......
......@@ -60,7 +60,7 @@ void MORSE_TASK_zpotrf(const MORSE_option_t *options,
PARSEC_dtd_taskpool, CORE_zpotrf_parsec, options->priority, "potrf",
sizeof(MORSE_enum), &uplo, VALUE,
sizeof(int), &n, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INOUT | morse_parsec_get_arena_index(A) | AFFINITY,
sizeof(int), &lda, VALUE,
sizeof(int), &iinfo, VALUE,
0);
......
......@@ -79,12 +79,12 @@ void MORSE_TASK_zsyr2k(const MORSE_option_t *options,
sizeof(int), &n, VALUE,
sizeof(int), &k, VALUE,
sizeof(MORSE_Complex64_t), &alpha, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT | morse_parsec_get_arena_index(A),
sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INPUT,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INPUT | morse_parsec_get_arena_index(B),
sizeof(int), &ldb, VALUE,
sizeof(MORSE_Complex64_t), &beta, VALUE,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
sizeof(int), &ldc, VALUE,
0);
}
......@@ -73,10 +73,10 @@ void MORSE_TASK_zsyrk(const MORSE_option_t *options,
sizeof(int), &n, VALUE,
sizeof(int), &k, VALUE,
sizeof(MORSE_Complex64_t), &alpha, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT | morse_parsec_get_arena_index(A),
sizeof(int), &lda, VALUE,
sizeof(MORSE_Complex64_t), &beta, VALUE,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( C, MORSE_Complex64_t, Cm, Cn ), INOUT | morse_parsec_get_arena_index(C) | AFFINITY,
sizeof(int), &ldc, VALUE,
0);
}
......@@ -71,9 +71,9 @@ void MORSE_TASK_ztrsm(const MORSE_option_t *options,
sizeof(int), &m, VALUE,
sizeof(int), &n, VALUE,
sizeof(MORSE_Complex64_t), &alpha, VALUE,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT,
PASSED_BY_REF, RTBLKADDR( A, MORSE_Complex64_t, Am, An ), INPUT | morse_parsec_get_arena_index(A),
sizeof(int), &lda, VALUE,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT | AFFINITY,
PASSED_BY_REF, RTBLKADDR( B, MORSE_Complex64_t, Bm, Bn ), INOUT | morse_parsec_get_arena_index(A) | AFFINITY,
sizeof(int), &ldb, VALUE,
0);
}
......@@ -11,6 +11,7 @@
#include "chameleon_parsec.h"
#include <parsec/data.h>
#include <parsec/datatype.h>
#include <parsec/data_dist/matrix/matrix.h>
#include <parsec/arena.h>
static int parsec_global_arena_index = 0;
......@@ -39,6 +40,10 @@ struct morse_parsec_desc_s {
int arena_index;
};
int morse_parsec_get_arena_index(const MORSE_desc_t *desc) {
return ((morse_parsec_desc_t *)desc->schedopt)->arena_index;
}
static void
morse_parsec_key_to_coordinates(parsec_data_collection_t *data_collection, parsec_data_key_t key,
int *m, int *n)
......@@ -225,10 +230,26 @@ void RUNTIME_desc_create( MORSE_desc_t *mdesc )
parsec_dtd_data_collection_init(data_collection);
/*dplasma_add2arena_tile( parsec_dtd_arenas[0],
mdesc->mb*mdesc->nb*sizeof(MORSE_Complex64_t),
PARSEC_ARENA_ALIGNMENT_SSE,
parsec_datatype_double_complex_t, mdesc->mb ); */
/* arena init */
/* taskpool init to bypass a requirement of PaRSEC */
#if defined(CHAMELEON_USE_MPI)
parsec_dtd_taskpool_new();
/* Internal limitation of PaRSEC */
assert(parsec_global_arena_index < 16);
pdesc->arena_index = parsec_global_arena_index++;
parsec_datatype_t datatype;
switch(mdesc->dtyp) {
case MorseInteger: datatype = parsec_datatype_int32_t; break;
case MorseRealFloat: datatype = parsec_datatype_float_t; break;
case MorseRealDouble: datatype = parsec_datatype_double_t; break;
case MorseComplexFloat: datatype = parsec_datatype_complex_t; break;
case MorseComplexDouble: datatype = parsec_datatype_double_complex_t; break;
default: morse_fatal_error("MORSE_Element_Size", "undefined type"); break;
}
parsec_matrix_add2arena_tile( parsec_dtd_arenas[pdesc->arena_index], datatype, mdesc->mb*mdesc->nb*MORSE_Element_Size(mdesc->dtyp) );
#endif
/* /\* Overwrite the leading dimensions to store the padding *\/ */
/* mdesc->llm = mdesc->mb * mdesc->lmt; */
/* mdesc->lln = mdesc->nb * mdesc->lnt; */
......
......@@ -20,6 +20,8 @@
struct morse_parsec_desc_s;
typedef struct morse_parsec_desc_s morse_parsec_desc_t;
int morse_parsec_get_arena_index(const MORSE_desc_t *desc);
/*
* Access to block pointer and leading dimension
*/
......
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