batchmode fixes

This commit is contained in:
Joachim Schoeberl 2012-06-13 11:37:13 +00:00
parent 27f8e452fd
commit 6650faaaf3
3 changed files with 8 additions and 31 deletions

View File

@ -163,9 +163,6 @@ int main(int argc, char ** argv)
if(parameters.GetDefineFlag("batchmode"))
nodisplay = true;
if(parameters.GetDefineFlag("solve"))
nodisplay = true;
if(parameters.GetDefineFlag("shellmode"))
@ -281,12 +278,7 @@ int main(int argc, char ** argv)
// start event-loop
Tk_MainLoop();
Tcl_DeleteInterp (myinterp);
#ifdef PARALLEL
MPI_Finalize();
#endif
Tcl_Exit(0);
}

View File

@ -2975,6 +2975,7 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
Tcl_Interp * interp,
int argc, tcl_const char *argv[])
{
/*
#ifdef PARALLEL
int id, rc, ntasks;
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
@ -2982,7 +2983,7 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
if ( id != 0 )
return TCL_OK;
#endif
*/
/*
if (ngsolve_handle)
@ -3018,7 +3019,9 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
#endif
#ifdef PARALLEL
MyMPI_SendCmd ("end");
if (id == 0) MyMPI_SendCmd ("end");
cout << "finalize, id = " << id << endl;
MPI_Finalize();
#endif
mesh.Reset (NULL);

View File

@ -80,14 +80,6 @@ using netgen::RegisterUserFormats;
#ifdef PARALLEL
void Ng_Exit ()
{
// Parallel_Exit();
}
#endif
void ParallelRun()
{
@ -98,12 +90,10 @@ void ParallelRun()
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
MPI_Comm_rank(MPI_COMM_WORLD, &id);
bool test = true;
// testout = new ostream(0);
testout = new ofstream (string("testout_proc") + id );
while ( test )
while ( true )
{
#ifdef SCALASCA
#pragma pomp inst begin (message)
@ -336,26 +326,18 @@ void ParallelRun()
else if ( message == "end" )
{
test = false;
Ng_Exit();
break;
}
else
{
PrintMessage ( 1, "received unidentified message '" + message + "'\n");
test = false;
break;
}
}
return;
}