restructure parallel netgen

This commit is contained in:
Joachim Schoeberl 2009-01-25 12:14:08 +00:00
parent 158f5223ba
commit 6054d08eec
10 changed files with 32 additions and 25 deletions

View File

@ -1,4 +1,4 @@
noinst_HEADERS = array.hpp myadt.hpp optmem.hpp sort.hpp table.hpp autodiff.hpp flags.hpp mystring.hpp spbita2d.hpp template.hpp autoptr.hpp hashtabl.hpp netgenout.hpp profiler.hpp stack.hpp bitarray.hpp seti.hpp symbolta.hpp dynamicmem.hpp moveablemem.hpp parthreads.hpp noinst_HEADERS = array.hpp myadt.hpp optmem.hpp sort.hpp table.hpp autodiff.hpp flags.hpp mystring.hpp spbita2d.hpp template.hpp autoptr.hpp hashtabl.hpp netgenout.hpp profiler.hpp stack.hpp bitarray.hpp seti.hpp symbolta.hpp dynamicmem.hpp moveablemem.hpp parthreads.hpp mpi_interface.hpp
include_HEADERS = ngexception.hpp include_HEADERS = ngexception.hpp

View File

@ -235,7 +235,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
noinst_HEADERS = array.hpp myadt.hpp optmem.hpp sort.hpp table.hpp autodiff.hpp flags.hpp mystring.hpp spbita2d.hpp template.hpp autoptr.hpp hashtabl.hpp netgenout.hpp profiler.hpp stack.hpp bitarray.hpp seti.hpp symbolta.hpp dynamicmem.hpp moveablemem.hpp parthreads.hpp noinst_HEADERS = array.hpp myadt.hpp optmem.hpp sort.hpp table.hpp autodiff.hpp flags.hpp mystring.hpp spbita2d.hpp template.hpp autoptr.hpp hashtabl.hpp netgenout.hpp profiler.hpp stack.hpp bitarray.hpp seti.hpp symbolta.hpp dynamicmem.hpp moveablemem.hpp parthreads.hpp mpi_interface.hpp
include_HEADERS = ngexception.hpp include_HEADERS = ngexception.hpp
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
METASOURCES = AUTO METASOURCES = AUTO

View File

@ -15,12 +15,12 @@
namespace netgen // namespace netgen
{ // {
//using namespace netgen; //using namespace netgen;
enum { id = 0 }; enum { id = 0 };
enum { ntasks = 0 }; enum { ntasks = 0 };
} // }
#else // if PARALLEL #else // if PARALLEL
@ -35,8 +35,8 @@ namespace netgen
extern MPI_Group MPI_HIGHORDER_WORLD; extern MPI_Group MPI_HIGHORDER_WORLD;
extern MPI_Comm MPI_HIGHORDER_COMM; extern MPI_Comm MPI_HIGHORDER_COMM;
namespace netgen // namespace netgen
{ // {
extern int id, ntasks; extern int id, ntasks;
template <class T> template <class T>
@ -267,7 +267,7 @@ namespace netgen
// #include "paralleltop.hpp" // #include "paralleltop.hpp"
// #include "parallelinterface.hpp" // #include "parallelinterface.hpp"
} // }
#endif // PARALLEL #endif // PARALLEL

View File

@ -39,8 +39,9 @@ namespace netgen
#include "stack.hpp" #include "stack.hpp"
#include "mystring.hpp" #include "mystring.hpp"
#include "profiler.hpp" #include "profiler.hpp"
#include "netgenout.hpp"
#include "mpi_interface.hpp"
#include "netgenout.hpp"
} }
#endif #endif

View File

@ -1,6 +1,6 @@
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
noinst_HEADERS = parallel.hpp paralleltop.hpp noinst_HEADERS = paralleltop.hpp
noinst_LTLIBRARIES = libparallel.la noinst_LTLIBRARIES = libparallel.la
libparallel_la_SOURCES = parallelmesh.cpp paralleltop.cpp libparallel_la_SOURCES = parallelmesh.cpp paralleltop.cpp

View File

@ -225,7 +225,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
noinst_HEADERS = parallel.hpp paralleltop.hpp noinst_HEADERS = paralleltop.hpp
noinst_LTLIBRARIES = libparallel.la noinst_LTLIBRARIES = libparallel.la
libparallel_la_SOURCES = parallelmesh.cpp paralleltop.cpp libparallel_la_SOURCES = parallelmesh.cpp paralleltop.cpp
all: all-am all: all-am

View File

@ -5,8 +5,6 @@
#include <geometry2d.hpp> #include <geometry2d.hpp>
#include <stlgeom.hpp> #include <stlgeom.hpp>
#include "incvis.hpp"
#include <visual.hpp> #include <visual.hpp>
#include <parallel.hpp> #include <parallel.hpp>

View File

@ -13,7 +13,9 @@ Visualization
*/ */
#ifdef PARALLEL
#define PARALLELGL #define PARALLELGL
#endif
#include "../include/incvis.hpp" #include "../include/incvis.hpp"

View File

@ -1,7 +1,7 @@
#ifndef NOTCL #ifndef NOTCL
#include <mystdlib.h> #include <mystdlib.h>
#include "incvis.hpp"
#include <myadt.hpp> #include <myadt.hpp>
@ -9,6 +9,8 @@
#include <csg.hpp> #include <csg.hpp>
#include <stlgeom.hpp> #include <stlgeom.hpp>
#include <visual.hpp>
#include <parallel.hpp> #include <parallel.hpp>
@ -18,7 +20,6 @@
namespace netgen namespace netgen
{ {
#include "mvdraw.hpp"
@ -897,8 +898,10 @@ namespace netgen
static int timer = NgProfiler::CreateTimer ("Mesh::BuildFilledList"); static int timer = NgProfiler::CreateTimer ("Mesh::BuildFilledList");
NgProfiler::RegionTimer reg (timer); NgProfiler::RegionTimer reg (timer);
cout << "buildilled" << endl;
#ifdef PARALLELGL #ifdef PARALLELGL
cout << "buildfillelist, id = " << id << ", nse = " << mesh -> GetNSE() << endl;
if (id == 0 && ntasks > 1) if (id == 0 && ntasks > 1)
{ {
@ -912,7 +915,10 @@ namespace netgen
MyMPI_Send ("filledlist", dest); MyMPI_Send ("filledlist", dest);
} }
for ( int dest = 1; dest < ntasks; dest++ ) for ( int dest = 1; dest < ntasks; dest++ )
MyMPI_Recv (par_filledlists[dest], dest); {
MyMPI_Recv (par_filledlists[dest], dest);
cout << "proc " << dest << " has drawn to list " << par_filledlists[dest] << endl;
}
if (filledlist) if (filledlist)
glDeleteLists (filledlist, 1); glDeleteLists (filledlist, 1);
@ -951,6 +957,7 @@ namespace netgen
filledlist = glGenLists (1); filledlist = glGenLists (1);
glNewList (filledlist, GL_COMPILE); glNewList (filledlist, GL_COMPILE);
cout << "I am p " << id << " and got filledlist " << filledlist << endl;
bool checkvicinity = (stlgeometry != NULL) && stldoctor.showvicinity; bool checkvicinity = (stlgeometry != NULL) && stldoctor.showvicinity;

View File

@ -280,9 +280,8 @@ void ParallelRun()
&wx, &wy, &ww, &wh, &wx, &wy, &ww, &wh,
&bw, &depth); &bw, &depth);
// cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy
// << ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl; << ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl;
#define VISUAL #define VISUAL
#ifdef VISUAL #ifdef VISUAL
@ -347,11 +346,11 @@ void ParallelRun()
if (!visinfo) if (!visinfo)
cerr << "no VISINFO found" << endl; cerr << "no VISINFO found" << endl;
// context = glXCreateContext( display, visinfo, 0, /* curContext, */ False ); // context = glXCreateContext( display, visinfo, 0, /* curContext, */ False );
context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False ); context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False );
cout << "context = " << context << endl;
glXMakeCurrent (display, curDrawable, context);
// glXMakeCurrent (display, curDrawable, context);
#else #else
@ -360,10 +359,10 @@ void ParallelRun()
context = glXImportContextEXT ( display, contextid ); context = glXImportContextEXT ( display, contextid );
/*
PrintMessage (1, "GLX-contextid = " , contextid, PrintMessage (1, "GLX-contextid = " , contextid,
" imported context ", context); " imported context ", context);
*/
// glXMakeCurrent (display, curDrawable, context); // glXMakeCurrent (display, curDrawable, context);
#endif #endif