parallel output

This commit is contained in:
Joachim Schoeberl 2012-09-03 09:50:08 +00:00
parent 20ff8f9869
commit 910b336d7b
2 changed files with 9 additions and 1 deletions

View File

@ -146,10 +146,15 @@ namespace netgen
#endif
*/
if (id == 0)
(*mycout) << s << flush;
/*
if ( ntasks == 1 )
(*mycout) << s << flush;
else
(*mycout) << "p" << id << ": " << s << flush ;
*/
}
DLL_HEADER void MyError(const char * ch)

View File

@ -1180,9 +1180,12 @@ namespace netgen
//Destination for messages, errors, ...
DLL_HEADER void Ng_PrintDest(const char * s)
{
#ifdef PARALLEL
int id = 0;
MPI_Comm_rank(MPI_COMM_WORLD, &id);
if (id == 0) (*mycout) << s << flush;
if (id != 0) return;
#endif PARALLEL
(*mycout) << s << flush;
}