Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 410358af authored by LISITO Alycia's avatar LISITO Alycia Committed by Mathieu Faverge
Browse files

zgetrf: Add all_reduce algorithm choice

parent e8051e19
No related branches found
No related tags found
1 merge request!516Clean the getrf permutation
......@@ -98,6 +98,21 @@ CHAMELEON_zgetrf_WS_Alloc( const CHAM_desc_t *A )
chameleon_cleanenv( algostr );
}
{
char *allreduce = chameleon_getenv( "CHAMELEON_GETRF_ALL_REDUCE" );
if ( allreduce != NULL ) {
if ( strcasecmp( allreduce, "cham_spu_tasks" ) == 0 ) {
ws->alg_allreduce = ChamStarPUTasks;
}
else {
chameleon_error( "CHAMELEON_zgetrf_WS_Alloc", "CHAMELEON_GETRF_ALL_REDUCE is not one of chameleon_starpu_tasks, chameleon_starpu, chameleon_starpu_mpi, chameleon_mpi => Switch back to chameleon_starpu_tasks\n" );
ws->alg_allreduce = ChamStarPUTasks;
}
}
chameleon_cleanenv( allreduce );
}
ws->batch_size = chameleon_getenv_get_value_int( "CHAMELEON_GETRF_BATCH_SIZE", 0 );
if ( ws->batch_size > CHAMELEON_BATCH_SIZE ) {
chameleon_warning( "CHAMELEON_BATCH_SIZE", "CHAMELEON_GETRF_BATCH_SIZE must be smaller than CHAMELEON_BATCH_SIZE, please recompile with the right CHAMELEON_BATCH_SIZE, or reduce the CHAMELEON_GETRF_BATCH_SIZE value\n" );
......
......@@ -43,17 +43,18 @@ struct chameleon_pzgemm_s {
* @brief Data structure to handle the GETRF workspaces with partial pivoting
*/
struct chameleon_pzgetrf_s {
cham_getrf_t alg;
int ib; /**< Internal blocking parameter */
int batch_size; /**< Batch size for the panel */
int ringswitch; /**< Define when to switch to ring bcast */
CHAM_desc_t U;
CHAM_desc_t Up; /**< Workspace used for the panel factorization */
CHAM_desc_t Wu; /**< Workspace used for the permutation and update */
CHAM_desc_t Wl; /**< Workspace used the update */
int *proc_involved;
unsigned int involved;
int np_involved;
cham_getrf_t alg;
cham_getrf_allreduce_t alg_allreduce;
int ib; /**< Internal blocking parameter */
int batch_size; /**< Batch size for the panel */
int ringswitch; /**< Define when to switch to ring bcast */
CHAM_desc_t U;
CHAM_desc_t Up; /**< Workspace used for the panel factorization */
CHAM_desc_t Wu; /**< Workspace used for the permutation and update */
CHAM_desc_t Wl; /**< Workspace used the update */
int *proc_involved;
unsigned int involved;
int np_involved;
};
/**
......
......@@ -290,6 +290,13 @@ typedef enum chameleon_getrf_e {
ChamGetrfPPivPerColumn = 3,
} cham_getrf_t;
/**
* @brief Chameleon GETRF all reduce algorithm variants
*/
typedef enum chameleon_getrf_allreduce_e {
ChamStarPUTasks,
} cham_getrf_allreduce_t;
#define ChameleonTrd 1001
#define ChameleonBrd 1002
......
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