Mentions légales du service

Skip to content
Snippets Groups Projects

Fix issues with the actual spm in order to make it works in distributed

Merged Mathieu Faverge requested to merge faverge/spm:disp/spm_bases into master
1 file
+ 7
32
Compare changes
  • Side-by-side
  • Inline
+ 7
32
@@ -86,9 +86,12 @@ static int (*conversionTable[3][3][6])(spmatrix_t*) = {
* @param[inout] spm
* The sparse matrix to init.
*
* @param[in] comm
* The MPI communicator used for the sparse matrix. MPI_COMM_WORLD by default.
*
*******************************************************************************/
void
spmInit( spmatrix_t *spm )
spmInitDist( spmatrix_t *spm, SPM_Comm comm )
{
spm->mtxtype = SpmGeneral;
spm->flttype = SpmDouble;
@@ -114,7 +117,7 @@ spmInit( spmatrix_t *spm )
spm->values = NULL;
spm->glob2loc = NULL;
spm->comm = MPI_COMM_WORLD;
spm->comm = comm;
#if defined(SPM_WITH_MPI)
MPI_Comm_rank( spm->comm, &(spm->clustnum) );
MPI_Comm_size( spm->comm, &(spm->clustnbr) );
@@ -124,7 +127,6 @@ spmInit( spmatrix_t *spm )
#endif /* defined(SPM_WITH_MPI) */
}
#if defined(SPM_WITH_MPI)
/**
*******************************************************************************
*
@@ -137,37 +139,10 @@ spmInit( spmatrix_t *spm )
*
*******************************************************************************/
void
spmInitDist( spmatrix_t *spm, SPM_Comm comm )
spmInit( spmatrix_t *spm )
{
spm->mtxtype = SpmGeneral;
spm->flttype = SpmDouble;
spm->fmttype = SpmCSC;
spm->gN = -1;
spm->n = 0;
spm->gnnz = -1;
spm->nnz = 0;
spm->gNexp = -1;
spm->nexp = -1;
spm->gnnzexp = -1;
spm->nnzexp = -1;
spm->dof = 1;
spm->dofs = NULL;
spm->layout = SpmColMajor;
spm->colptr = NULL;
spm->rowptr = NULL;
spm->loc2glob = NULL;
spm->values = NULL;
spm->glob2loc = NULL;
spm->comm = comm;
MPI_Comm_rank( comm, &(spm->clustnum) );
MPI_Comm_size( comm, &(spm->clustnbr) );
spmInitDist( spm, MPI_COMM_WORLD );
}
#endif /* defined(SPM_WITH_MPI) */
/**
*******************************************************************************
Loading