Commit 071d5ae1 authored by Tony Delarue's avatar Tony Delarue Committed by Mathieu Faverge
Browse files

Manage the output for a distributed SPM

parent 5632fb1c
......@@ -392,33 +392,19 @@ bcscInit( const spmatrix_t *spm,
pastix_int_t initAt,
pastix_bcsc_t *bcsc )
{
spmatrix_t *spmg;
double time = 0.;
if ( spm->loc2glob == NULL ) {
spmg = (spmatrix_t *)spm;
}
#if defined(PASTIX_WITH_MPI)
else {
pastix_print(solvmtx->clustnum, 0, "bcscInit: the SPM has to be centralized for the moment\n");
spmg = spmGather( spm, -1 );
}
#endif
assert( ord->baseval == 0 );
assert( ord->vertnbr == spmg->n );
assert( ord->vertnbr == spm->n );
clockStart(time);
#if defined(PASTIX_WITH_MPI)
assert( spm->loc2glob == NULL );
#endif
bcsc_init_centralized( spmg, ord, solvmtx, initAt, bcsc );
bcsc_init_centralized( spm, ord, solvmtx, initAt, bcsc );
clockStop(time);
if( spmg != spm ) {
spmExit(spmg);
memFree_null( spmg );
}
return time;
}
......
......@@ -85,7 +85,8 @@ int
pastix_subtask_spm2bcsc( pastix_data_t *pastix_data,
spmatrix_t *spm )
{
double time;
spmatrix_t *spmg = NULL;
double time;
/*
* Check parameters
......@@ -143,12 +144,30 @@ pastix_subtask_spm2bcsc( pastix_data_t *pastix_data,
MALLOC_INTERN( pastix_data->bcsc, 1, pastix_bcsc_t );
time = bcscInit( spm,
if ( spm->loc2glob == NULL ) {
spmg = spm;
}
#if defined(PASTIX_WITH_MPI)
else {
if ( pastix_data->iparm[IPARM_VERBOSE] > PastixVerboseNot ) {
pastix_print(pastix_data->procnum, 0, "bcscInit: the SPM has to be centralized for the moment\n");
}
spmg = spmGather( spm, -1 );
}
#endif
time = bcscInit( spmg,
pastix_data->ordemesh,
pastix_data->solvmatr,
(pastix_data->iparm[IPARM_FACTORIZATION] == PastixFactLU), /*&& (! pastix_data->iparm[IPARM_ONLY_REFINE]) )*/
pastix_data->bcsc );
/* Free the gathered spm */
if ( spmg != spm ) {
spmExit( spmg );
memFree_null( spmg );
}
if ( pastix_data->iparm[IPARM_VERBOSE] > PastixVerboseNot ) {
pastix_print( pastix_data->inter_node_procnum, 0, OUT_BCSC_TIME, time );
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment