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

View File

@ -235,7 +235,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
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
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
METASOURCES = AUTO

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -280,10 +280,9 @@ void ParallelRun()
&wx, &wy, &ww, &wh,
&bw, &depth);
// cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy
// << ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl;
cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy
<< ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl;
#define VISUAL
#ifdef VISUAL
@ -347,11 +346,11 @@ void ParallelRun()
if (!visinfo)
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 );
cout << "context = " << context << endl;
// glXMakeCurrent (display, curDrawable, context);
glXMakeCurrent (display, curDrawable, context);
#else
@ -360,10 +359,10 @@ void ParallelRun()
context = glXImportContextEXT ( display, contextid );
/*
PrintMessage (1, "GLX-contextid = " , contextid,
" imported context ", context);
*/
// glXMakeCurrent (display, curDrawable, context);
#endif