mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-28 22:00:33 +05:00
parallel output
This commit is contained in:
parent
20ff8f9869
commit
910b336d7b
@ -146,10 +146,15 @@ namespace netgen
|
|||||||
#endif
|
#endif
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (id == 0)
|
||||||
|
(*mycout) << s << flush;
|
||||||
|
|
||||||
|
/*
|
||||||
if ( ntasks == 1 )
|
if ( ntasks == 1 )
|
||||||
(*mycout) << s << flush;
|
(*mycout) << s << flush;
|
||||||
else
|
else
|
||||||
(*mycout) << "p" << id << ": " << s << flush ;
|
(*mycout) << "p" << id << ": " << s << flush ;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
DLL_HEADER void MyError(const char * ch)
|
DLL_HEADER void MyError(const char * ch)
|
||||||
|
@ -1180,9 +1180,12 @@ namespace netgen
|
|||||||
//Destination for messages, errors, ...
|
//Destination for messages, errors, ...
|
||||||
DLL_HEADER void Ng_PrintDest(const char * s)
|
DLL_HEADER void Ng_PrintDest(const char * s)
|
||||||
{
|
{
|
||||||
|
#ifdef PARALLEL
|
||||||
int id = 0;
|
int id = 0;
|
||||||
MPI_Comm_rank(MPI_COMM_WORLD, &id);
|
MPI_Comm_rank(MPI_COMM_WORLD, &id);
|
||||||
if (id == 0) (*mycout) << s << flush;
|
if (id != 0) return;
|
||||||
|
#endif PARALLEL
|
||||||
|
(*mycout) << s << flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user