Skip to content

Commit

Permalink
Improve outpu appearance.
Browse files Browse the repository at this point in the history
  • Loading branch information
Algiane committed Oct 28, 2024
1 parent 2989cd5 commit 5d67c1f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 20 deletions.
14 changes: 7 additions & 7 deletions src/libparmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ int PMMG_parmmglib_post(PMMG_pParMesh parmesh) {
tim = 1;
chrono(ON,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
fprintf( stdout,"\n -- PHASE 3 : MESH PACKED UP\n" );
fprintf( stdout,"\n -- PHASE 3 : MESH PACKED UP\n" );
}

ier = PMMG_bdryBuild ( parmesh );
Expand Down Expand Up @@ -1647,7 +1647,7 @@ int PMMG_parmmglib_post(PMMG_pParMesh parmesh) {
chrono(OFF,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
printim(ctim[tim].gdif,stim);
fprintf( stdout," -- PHASE 3 COMPLETED. %s\n",stim );
fprintf( stdout," -- PHASE 3 COMPLETED. %s\n",stim );
}

break;
Expand All @@ -1657,7 +1657,7 @@ int PMMG_parmmglib_post(PMMG_pParMesh parmesh) {
tim = 1;
chrono(ON,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
fprintf( stdout,"\n -- PHASE 3 : MERGE MESHES OVER PROCESSORS\n" );
fprintf( stdout,"\n -- PHASE 3 : MERGE MESHES OVER PROCESSORS\n" );
}

ier = PMMG_merge_parmesh( parmesh );
Expand All @@ -1674,15 +1674,15 @@ int PMMG_parmmglib_post(PMMG_pParMesh parmesh) {
chrono(OFF,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
printim(ctim[tim].gdif,stim);
fprintf( stdout," -- PHASE 3 COMPLETED. %s\n",stim );
fprintf( stdout," -- PHASE 3 COMPLETED. %s\n",stim );
}

/** Boundaries reconstruction: by all the procs if the merge has failed,
* only by proc 0 if the merge has succeed. */
tim = 2;
chrono(ON,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
fprintf( stdout,"\n -- PHASE 4 : MESH PACKED UP\n" );
fprintf( stdout,"\n -- PHASE 4 : MESH PACKED UP\n" );
}

if ( (!iresult) || (!parmesh->myrank) ) {
Expand All @@ -1705,7 +1705,7 @@ int PMMG_parmmglib_post(PMMG_pParMesh parmesh) {
chrono(OFF,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
printim(ctim[tim].gdif,stim);
fprintf( stdout," -- PHASE 4 COMPLETED. %s\n",stim );
fprintf( stdout," -- PHASE 4 COMPLETED. %s\n",stim );
}
}
}
Expand Down Expand Up @@ -1906,7 +1906,7 @@ int PMMG_parmmg_distributed(PMMG_pParMesh parmesh) {
chrono(OFF,&(ctim[tim]));
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
printim(ctim[tim].gdif,stim);
fprintf(stdout," -- PHASE 1 COMPLETED. %s\n",stim);
fprintf(stdout," -- PHASE 1 COMPLETED. %s\n",stim);
}

/** Remeshing */
Expand Down
18 changes: 12 additions & 6 deletions src/ls_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,12 @@ int PMMG_snpval_ls(PMMG_pParMesh parmesh,MPI_Comm comm) {
if ( !pt->v[0] ) continue;
if ( pt->tag & MG_OVERLAP) continue; // Ignore overlap tetra
if ( pt->qual < MMG5_EPS ) {
fprintf(stdout, " PROC %d - Bad qual=%f < 1e-6 at tetra=%d \n", parmesh->myrank,pt->qual,k);

if ( parmesh->ddebug ) {
fprintf(stdout, " ## Info: %s: rank %d: tetra %d has bad qual (%f < 1e-6)\n",
__func__,parmesh->myrank,k,pt->qual);
}

for (i=0; i<4; i++) {
ip = pt->v[i];
if ( sol->m[ip] < 1000.0*MMG5_EPS ) break;
Expand Down Expand Up @@ -1686,7 +1691,7 @@ int PMMG_snpval_ls(PMMG_pParMesh parmesh,MPI_Comm comm) {
(-100.0*MMG5_EPS) : sol->m[k];

if ( parmesh->ddebug ) {
fprintf(stderr, " ## Warning: %s: rank %d - snapping value at "
fprintf(stderr, " ## Warning: %s: rank %d: snapping value at "
"vertex %d, s=%d, tmp=%f, sol=%f \n",__func__,
parmesh->myrank,k,p0->s,tmp[k],sol->m[k]);
}
Expand All @@ -1713,8 +1718,8 @@ int PMMG_snpval_ls(PMMG_pParMesh parmesh,MPI_Comm comm) {
// if (p0->tag & MG_PARBDY) continue;
if ( p0->flag == 1 ) {
if ( parmesh->ddebug ) {
fprintf(stdout, " ## Info: %s: rank %d - call MMG3D_ismaniball:\n"
" Tetra=%d, Point=%d, maniball=%d \n",
fprintf(stdout, " ## Info: %s: rank %d: call MMG3D_ismaniball:\n"
" Tetra=%d, Point=%d, maniball=%d \n",
__func__,parmesh->myrank,k,ip,MMG3D_ismaniball(mesh,sol,k,i));
}
if ( !MMG3D_ismaniball(mesh,sol,k,i) ) {
Expand Down Expand Up @@ -1823,8 +1828,9 @@ int PMMG_snpval_ls(PMMG_pParMesh parmesh,MPI_Comm comm) {

// }

// if ( (abs(mesh->info.imprim) > 5 || mesh->info.ddebug) && ns+ncg > 0 )
fprintf(stdout," PROC %d - %8" MMG5_PRId " points snapped, %" MMG5_PRId " corrected\n",parmesh->myrank,ns,ncg);
if ( (parmesh->info.imprim > PMMG_VERB_DETQUAL || parmesh->ddebug) && ns+ncg > 0 )
fprintf(stdout," rank %d: %8" MMG5_PRId " points snapped, %" MMG5_PRId
" corrected\n",parmesh->myrank,ns,ncg);

/* Reset point flags */
for (k=1; k<=mesh->np; k++)
Expand Down
14 changes: 7 additions & 7 deletions src/overlap_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ int PMMG_create_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
}

if ( parmesh->info.imprim > PMMG_VERB_STEPS )
fprintf(stdout,"\n Create Overlap.\n");
fprintf(stdout," Create Overlap\n");

/* Creation of overlap works only when there is one group */
/* Ensure only one group on each proc */
Expand Down Expand Up @@ -712,7 +712,7 @@ int PMMG_create_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
}

if ( parmesh->info.imprim > PMMG_VERB_ITWAVES )
fprintf(stdout, " part %d sends %d pts and %d tetra to part %d\n",
fprintf(stdout, " part %d sends %d pts and %d tetra to part %d\n",
color_in,npTot_in2out,ntTot_in2out,color_out);

/* Reset memory*/
Expand Down Expand Up @@ -784,8 +784,8 @@ int PMMG_create_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
PMMG_DEL_MEM(parmesh,int_comm->intvalues,int,"intvalues");

if ( parmesh->info.imprim > PMMG_VERB_ITWAVES )
fprintf(stdout, " part %d has %d pts and %d tetras after overlap creation\n",
color_in,mesh->np,mesh->ne);
fprintf(stdout, " part %d has %d pts and %d tetras after overlap creation\n",
color_in,mesh->np,mesh->ne);

return 1;
}
Expand All @@ -809,7 +809,7 @@ int PMMG_delete_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
int i;

if ( parmesh->info.imprim > PMMG_VERB_STEPS ) {
fprintf(stdout,"\n Delete Overlap.\n");
fprintf(stdout," Delete Overlap\n");
}

if ( !parmesh->ngrp ) {
Expand Down Expand Up @@ -838,8 +838,8 @@ int PMMG_delete_overlap(PMMG_pParMesh parmesh, MPI_Comm comm) {
MMG3D_delPt(mesh,i);
}

if ( parmesh->info.imprim > PMMG_VERB_VERSION )
fprintf(stdout, " part %d has %d pts and %d tetras after overlap deletion\n",
if ( parmesh->info.imprim > PMMG_VERB_ITWAVES )
fprintf(stdout, " part %d has %d pts and %d tetras after overlap deletion\n",
parmesh->myrank,mesh->np,mesh->ne);

return 1;
Expand Down

0 comments on commit 5d67c1f

Please sign in to comment.