mirror of
https://github.com/NGSolve/netgen.git
synced 2025-03-03 16:35:39 +05:00
batchmode fixes
This commit is contained in:
parent
27f8e452fd
commit
6650faaaf3
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user