Mentions légales du service

Skip to content
Snippets Groups Projects
Commit b877f369 authored by Guillaume Sylvand's avatar Guillaume Sylvand
Browse files

Add new call MORSE_user_tag_size(int user_tag_width, int user_tag_sep)

to change the default values for tag_width(=31) and tag_sep(=24).
Today, it serves only with starPU.
parent fa574726
No related branches found
No related tags found
No related merge requests found
......@@ -581,3 +581,31 @@ int MORSE_Desc_Release (MORSE_desc_t *desc) {
int MORSE_Desc_Getoncpu(MORSE_desc_t *desc) {
return RUNTIME_desc_getoncpu( desc );
}
/** ***************************************************************************
*
* @ingroup Descriptor
*
* MORSE_user_tag_size - Set the sizes for the MPI tags
* Default value: tag_width=31, tag_sep=24, meaning that the MPI tag is stored in 31 bits,
* with 24 bits for the tile tag and 7 for the descriptor.
* This function must be called before any descriptor creation.
*
******************************************************************************
*
* @param[in] user_tag_width
* The new value for tag_width.
*
* @param[in] user_tag_sep
* The new value for tag_sep.
*
******************************************************************************
*
* @return
* \retval none
*
*****************************************************************************/
void MORSE_user_tag_size(int user_tag_width, int user_tag_sep) {
RUNTIME_user_tag_size(user_tag_width, user_tag_sep);
return;
}
......@@ -96,6 +96,7 @@ int MORSE_Desc_Destroy (MORSE_desc_t **desc);
int MORSE_Desc_Acquire (MORSE_desc_t *desc);
int MORSE_Desc_Release (MORSE_desc_t *desc);
int MORSE_Desc_Getoncpu(MORSE_desc_t *desc);
void MORSE_user_tag_size(int, int) ;
/* Workspaces */
int MORSE_Dealloc_Workspace (MORSE_desc_t **desc);
......
......@@ -72,6 +72,7 @@ int RUNTIME_desc_acquire (MORSE_desc_t*);
/* Release the data described by the descriptor to be used by the StarPU tasks again. */
int RUNTIME_desc_release (MORSE_desc_t*);
int RUNTIME_desc_getoncpu (MORSE_desc_t*);
void RUNTIME_user_tag_size (int, int) ;
/*******************************************************************************
* RUNTIME Options
......
......@@ -11,6 +11,11 @@
#include "runtime/parsec/include/morse_parsec.h"
#include <dague/data.h>
void RUNTIME_user_tag_size(int user_tag_width, int user_tag_sep) {
(void)user_tag_width;
(void)user_tag_sep;
}
void *RUNTIME_mat_alloc( size_t size)
{
return malloc(size);
......
......@@ -25,6 +25,11 @@
#include <stdlib.h>
#include "runtime/quark/include/morse_quark.h"
void RUNTIME_user_tag_size(int user_tag_width, int user_tag_sep) {
(void)user_tag_width;
(void)user_tag_sep;
}
void *RUNTIME_mat_alloc( size_t size)
{
return malloc(size);
......
......@@ -28,10 +28,12 @@
#if defined(CHAMELEON_USE_MPI)
/* Take 24 bits for the tile id, and 7 bits for descriptor id */
/* Take 24 bits for the tile id, and 7 bits for descriptor id.
These values can be changed through the call MORSE_user_tag_size(int tag_width, int tag_sep) */
#define TAG_WIDTH_MIN 20
static int tag_width = 31;
static int tag_sep = 24;
static int _tag_mpi_initialized_ = 0;
#ifndef HAVE_STARPU_MPI_DATA_REGISTER
#define starpu_mpi_data_register( handle_, tag_, owner_ ) \
......@@ -49,6 +51,15 @@ static int tag_sep = 24;
#define FOLDED 0
#endif
void RUNTIME_user_tag_size(int user_tag_width, int user_tag_sep) {
if (_tag_mpi_initialized_ == 0) {
tag_width=user_tag_width;
tag_sep=user_tag_sep;
} else
morse_error("RUNTIME_user_tag_size", "must be called before creating any Morse descriptor with MORSE_Desc_create(). The tag sizes will not be modified.");
}
void *RUNTIME_mat_alloc( size_t size)
{
#if defined(CHAMELEON_SIMULATION) && !defined(STARPU_MALLOC_SIMULATION_FOLDED) && !defined(CHAMELEON_USE_MPI)
......@@ -111,8 +122,6 @@ void RUNTIME_desc_create( MORSE_desc_t *desc )
* Check that we are not going over MPI tag limitations
*/
{
static int _tag_mpi_initialized_ = 0;
if (!_tag_mpi_initialized_) {
int *tag_ub = NULL;
int ok = 0;
......
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