mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 22:00:33 +05:00
mpi
This commit is contained in:
parent
d950e91a73
commit
35b373ba36
@ -1,5 +1,3 @@
|
|||||||
#define NGSOLVE
|
|
||||||
|
|
||||||
#ifdef PARALLEL
|
#ifdef PARALLEL
|
||||||
|
|
||||||
#include "dlfcn.h"
|
#include "dlfcn.h"
|
||||||
@ -73,6 +71,7 @@ void Parallel_Exit();
|
|||||||
namespace netgen {
|
namespace netgen {
|
||||||
extern AutoPtr<Mesh> mesh;
|
extern AutoPtr<Mesh> mesh;
|
||||||
extern VisualSceneMesh vsmesh;
|
extern VisualSceneMesh vsmesh;
|
||||||
|
extern Flags parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace netgen;
|
using namespace netgen;
|
||||||
@ -90,23 +89,14 @@ 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);
|
||||||
|
|
||||||
// testout = new ostream(0);
|
if (parameters.StringFlagDefined ("testout"))
|
||||||
testout = new ofstream (string("testout_proc") + id );
|
testout = new ofstream (string("testout_proc") + id );
|
||||||
|
|
||||||
|
|
||||||
while ( true )
|
while ( true )
|
||||||
{
|
{
|
||||||
#ifdef SCALASCA
|
|
||||||
#pragma pomp inst begin (message)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// MyMPI_Recv ( message, 0, MPI_TAG_CMD );
|
|
||||||
message = MyMPI_RecvCmd();
|
message = MyMPI_RecvCmd();
|
||||||
|
|
||||||
#ifdef SCALASCA
|
|
||||||
#pragma pomp inst end (message)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
if ( message.compare(0, 3, "ngs") == 0 )
|
if ( message.compare(0, 3, "ngs") == 0 )
|
||||||
{
|
{
|
||||||
// PrintMessage ( 1, "Starting NgSolve routine ", message ) ;
|
// PrintMessage ( 1, "Starting NgSolve routine ", message ) ;
|
||||||
|
Loading…
Reference in New Issue
Block a user