15 #include "common/common.h"
18 #if !defined(PASTIX_COMMUNICATION_MATRIX)
19 #error "PASTIX_COMMUNICATION_MATRIX option is disabled"
36 solvmtx->
com_vector = calloc( solvmtx->clustnbr,
sizeof(
size_t ) );
71 size_t *com_matrix = NULL;
75 MPI_Comm_rank( solvmtx->solv_comm, &src );
77 com_matrix = malloc( solvmtx->clustnbr * solvmtx->clustnbr *
sizeof(
size_t ) );
80 MPI_Gather( solvmtx->
com_vector, solvmtx->clustnbr, MPI_UNSIGNED_LONG,
81 com_matrix, solvmtx->clustnbr, MPI_UNSIGNED_LONG,
82 0, solvmtx->solv_comm );
90 for ( p = 0; p < solvmtx->clustnbr; p++ ) {
91 fprintf( file,
"R%d, ", p );
93 fprintf( file,
"\n" );
96 for ( i = 0; i < ( solvmtx->clustnbr * solvmtx->clustnbr ); i++ ) {
97 fprintf( file,
"%zu, ", com_matrix[i] );
98 if ( ( ( i + 1 ) % solvmtx->clustnbr ) == 0 ) {
99 fprintf( file,
"\n" );
FILE * pastix_fopenw(const char *dirname, const char *filename, const char *mode)
Open a file in the unique directory of the pastix instance.
Solver column block structure.
void solverComMatrixExit(SolverMatrix *solvmtx)
Free the communication matrix.
void solverComMatrixGather(SolverMatrix *solvmtx)
Gather the volume of communication and save it as a csv.
void solverComMatrixInit(SolverMatrix *solvmtx)
Initialize the communication matrix.