Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c59ea2d5 authored by THIBAULT Samuel's avatar THIBAULT Samuel
Browse files

Fix getting starpu_mpi maximum tag

parent 040ae4a0
No related branches found
No related tags found
1 merge request!93Fix getting starpu_mpi maximum tag
...@@ -39,23 +39,27 @@ chameleon_starpu_tag_init( int user_tag_width, ...@@ -39,23 +39,27 @@ chameleon_starpu_tag_init( int user_tag_width,
int user_tag_sep ) int user_tag_sep )
{ {
if (!_tag_mpi_initialized_) { if (!_tag_mpi_initialized_) {
int *tag_ub = NULL;
int ok = 0; int ok = 0;
uintptr_t tag_ub;
tag_width = user_tag_width; tag_width = user_tag_width;
tag_sep = user_tag_sep; tag_sep = user_tag_sep;
#if defined(HAVE_STARPU_MPI_COMM_GET_ATTR) #if defined(HAVE_STARPU_MPI_COMM_GET_ATTR)
starpu_mpi_comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, &tag_ub, &ok); int64_t *tag_ub_p = NULL;
starpu_mpi_comm_get_attr(MPI_COMM_WORLD, STARPU_MPI_TAG_UB, &tag_ub_p, &ok);
tag_ub = *tag_ub_p;
#else #else
MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, &tag_ub, &ok); int *tag_ub_p = NULL;
MPI_Comm_get_attr(MPI_COMM_WORLD, MPI_TAG_UB, &tag_ub_p, &ok);
tag_ub = *tag_ub_p;
#endif #endif
if ( !ok ) { if ( !ok ) {
morse_error("RUNTIME_desc_create", "MPI_TAG_UB not known by StarPU"); morse_error("RUNTIME_desc_create", "MPI_TAG_UB not known by StarPU");
} }
while ( ((uintptr_t)((1UL<<tag_width) - 1) > (uintptr_t)(*tag_ub) ) && while ( ((uintptr_t)((1UL<<tag_width) - 1) > tag_ub ) &&
(tag_width >= TAG_WIDTH_MIN) ) (tag_width >= TAG_WIDTH_MIN) )
{ {
tag_width--; tag_width--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment