mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
restructure parallel netgen
This commit is contained in:
parent
158f5223ba
commit
6054d08eec
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -5,8 +5,6 @@
|
||||
#include <geometry2d.hpp>
|
||||
#include <stlgeom.hpp>
|
||||
|
||||
#include "incvis.hpp"
|
||||
|
||||
#include <visual.hpp>
|
||||
#include <parallel.hpp>
|
||||
|
||||
|
@ -13,7 +13,9 @@ Visualization
|
||||
|
||||
*/
|
||||
|
||||
#ifdef PARALLEL
|
||||
#define PARALLELGL
|
||||
#endif
|
||||
|
||||
#include "../include/incvis.hpp"
|
||||
|
||||
|
@ -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);
|
||||
cout << "proc " << dest << " has drawn to list " << par_filledlists[dest] << endl;
|
||||
}
|
||||
|
||||
if (filledlist)
|
||||
glDeleteLists (filledlist, 1);
|
||||
@ -951,6 +957,7 @@ 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;
|
||||
|
||||
|
@ -280,9 +280,8 @@ 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
|
||||
@ -349,9 +348,9 @@ void ParallelRun()
|
||||
|
||||
// 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
|
||||
|
Loading…
Reference in New Issue
Block a user