From 35b373ba36eaf1270409f52f198e63be96a6ff76 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Sat, 16 Jun 2012 12:10:38 +0000 Subject: [PATCH] mpi --- ng/parallelfunc.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/ng/parallelfunc.cpp b/ng/parallelfunc.cpp index b10f3e4e..4f86ea68 100644 --- a/ng/parallelfunc.cpp +++ b/ng/parallelfunc.cpp @@ -1,5 +1,3 @@ -#define NGSOLVE - #ifdef PARALLEL #include "dlfcn.h" @@ -73,6 +71,7 @@ void Parallel_Exit(); namespace netgen { extern AutoPtr mesh; extern VisualSceneMesh vsmesh; + extern Flags parameters; } using namespace netgen; @@ -90,23 +89,14 @@ void ParallelRun() MPI_Comm_size(MPI_COMM_WORLD, &ntasks); MPI_Comm_rank(MPI_COMM_WORLD, &id); - // testout = new ostream(0); - testout = new ofstream (string("testout_proc") + id ); + if (parameters.StringFlagDefined ("testout")) + testout = new ofstream (string("testout_proc") + id ); + while ( true ) { -#ifdef SCALASCA -#pragma pomp inst begin (message) -#endif - - // MyMPI_Recv ( message, 0, MPI_TAG_CMD ); message = MyMPI_RecvCmd(); -#ifdef SCALASCA -#pragma pomp inst end (message) -#endif - - if ( message.compare(0, 3, "ngs") == 0 ) { // PrintMessage ( 1, "Starting NgSolve routine ", message ) ;