mirror of
https://github.com/NGSolve/netgen.git
synced 2025-03-04 00:45:40 +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"))
|
if(parameters.GetDefineFlag("batchmode"))
|
||||||
nodisplay = true;
|
nodisplay = true;
|
||||||
if(parameters.GetDefineFlag("solve"))
|
|
||||||
nodisplay = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(parameters.GetDefineFlag("shellmode"))
|
if(parameters.GetDefineFlag("shellmode"))
|
||||||
@ -281,12 +278,7 @@ int main(int argc, char ** argv)
|
|||||||
|
|
||||||
// start event-loop
|
// start event-loop
|
||||||
Tk_MainLoop();
|
Tk_MainLoop();
|
||||||
|
|
||||||
Tcl_DeleteInterp (myinterp);
|
Tcl_DeleteInterp (myinterp);
|
||||||
|
|
||||||
#ifdef PARALLEL
|
|
||||||
MPI_Finalize();
|
|
||||||
#endif
|
|
||||||
Tcl_Exit(0);
|
Tcl_Exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2975,6 +2975,7 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
|
|||||||
Tcl_Interp * interp,
|
Tcl_Interp * interp,
|
||||||
int argc, tcl_const char *argv[])
|
int argc, tcl_const char *argv[])
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
#ifdef PARALLEL
|
#ifdef PARALLEL
|
||||||
int id, rc, ntasks;
|
int id, rc, ntasks;
|
||||||
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
|
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
|
||||||
@ -2982,7 +2983,7 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
|
|||||||
if ( id != 0 )
|
if ( id != 0 )
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (ngsolve_handle)
|
if (ngsolve_handle)
|
||||||
@ -3018,7 +3019,9 @@ void PlayAnimFile(const char* name, int speed, int maxcnt)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PARALLEL
|
#ifdef PARALLEL
|
||||||
MyMPI_SendCmd ("end");
|
if (id == 0) MyMPI_SendCmd ("end");
|
||||||
|
cout << "finalize, id = " << id << endl;
|
||||||
|
MPI_Finalize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mesh.Reset (NULL);
|
mesh.Reset (NULL);
|
||||||
|
@ -80,14 +80,6 @@ using netgen::RegisterUserFormats;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef PARALLEL
|
|
||||||
void Ng_Exit ()
|
|
||||||
{
|
|
||||||
// Parallel_Exit();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void ParallelRun()
|
void ParallelRun()
|
||||||
{
|
{
|
||||||
@ -98,12 +90,10 @@ void ParallelRun()
|
|||||||
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
|
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
|
||||||
MPI_Comm_rank(MPI_COMM_WORLD, &id);
|
MPI_Comm_rank(MPI_COMM_WORLD, &id);
|
||||||
|
|
||||||
bool test = true;
|
|
||||||
|
|
||||||
// testout = new ostream(0);
|
// testout = new ostream(0);
|
||||||
testout = new ofstream (string("testout_proc") + id );
|
testout = new ofstream (string("testout_proc") + id );
|
||||||
|
|
||||||
while ( test )
|
while ( true )
|
||||||
{
|
{
|
||||||
#ifdef SCALASCA
|
#ifdef SCALASCA
|
||||||
#pragma pomp inst begin (message)
|
#pragma pomp inst begin (message)
|
||||||
@ -336,26 +326,18 @@ void ParallelRun()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
else if ( message == "end" )
|
else if ( message == "end" )
|
||||||
{
|
{
|
||||||
test = false;
|
break;
|
||||||
Ng_Exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PrintMessage ( 1, "received unidentified message '" + message + "'\n");
|
PrintMessage ( 1, "received unidentified message '" + message + "'\n");
|
||||||
|
break;
|
||||||
test = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user