parallel netgen

This commit is contained in:
Joachim Schoeberl 2009-01-25 02:54:27 +00:00
parent 5dc124a709
commit 158f5223ba
38 changed files with 4415 additions and 56 deletions

View File

@ -34,9 +34,9 @@ host_triplet = @host@
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
TODO config.guess config.sub depcomp install-sh ltmain.sh \
missing mkinstalldirs
$(top_srcdir)/configure AUTHORS ChangeLog INSTALL NEWS TODO \
config.guess config.sub depcomp install-sh ltmain.sh missing \
mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
@ -118,6 +118,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -51,6 +51,15 @@ AC_ARG_ENABLE([nglib],
[ nglibon=false ])
AC_ARG_ENABLE([parallel],
[ --enable-parallel enable mpi parallelization],
[AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/usr/share/metis/Lib -DMETIS")
AC_SUBST([MPI_LIBS], "-lmetis -L/opt/mpich/ch-p4/lib -lmpich")
]
)
# AC_HEADER_STDC
AC_CONFIG_HEADERS(config.h)

View File

@ -102,6 +102,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -116,6 +116,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -2,7 +2,7 @@ noinst_HEADERS = array.hpp myadt.hpp optmem.hpp sort.hpp table.hpp autodiff.hpp
include_HEADERS = ngexception.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
METASOURCES = AUTO
noinst_LTLIBRARIES = libgeneral.la
libgeneral_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \

View File

@ -123,6 +123,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -235,7 +237,7 @@ 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
include_HEADERS = ngexception.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
METASOURCES = AUTO
noinst_LTLIBRARIES = libgeneral.la
libgeneral_la_SOURCES = array.cpp bitarray.cpp dynamicmem.cpp flags.cpp \

View File

@ -113,6 +113,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -113,6 +113,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -103,6 +103,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -14,8 +14,18 @@
#endif
#include <GL/gl.h>
#include <GL/glu.h>
// parallel
#define GLX_GLXEXT_PROTOTYPES
#include <GL/glx.h>
#include <GL/glxext.h>
#ifndef NOTCL
// #include <togl.h>
// #include "../../togl/togl.h"

View File

@ -116,6 +116,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -115,6 +115,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -1,3 +1,6 @@
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
noinst_HEADERS = adfront2.hpp hpref_quad.hpp meshfunc.hpp ruler3.hpp \
adfront3.hpp findip.hpp findip2.hpp hpref_segm.hpp meshing2.hpp \
specials.hpp bisect.hpp geomsearch.hpp hpref_tet.hpp meshing3.hpp \
@ -8,7 +11,7 @@ clusters.hpp hprefinement.hpp improve3.hpp meshtype.hpp \
hpref_pyramid.hpp meshclass.hpp ruler2.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
METASOURCES = AUTO
noinst_LTLIBRARIES = libmesh.la
libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \

View File

@ -121,6 +121,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -231,6 +233,7 @@ target_alias = @target_alias@
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 = adfront2.hpp hpref_quad.hpp meshfunc.hpp ruler3.hpp \
adfront3.hpp findip.hpp findip2.hpp hpref_segm.hpp meshing2.hpp \
specials.hpp bisect.hpp geomsearch.hpp hpref_tet.hpp meshing3.hpp \
@ -240,7 +243,6 @@ clusters.hpp hprefinement.hpp improve3.hpp meshtype.hpp \
hpref_prism.hpp localh.hpp msghandler.hpp curvedelems.hpp \
hpref_pyramid.hpp meshclass.hpp ruler2.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include
METASOURCES = AUTO
noinst_LTLIBRARIES = libmesh.la
libmesh_la_SOURCES = adfront2.cpp adfront3.cpp bisect.cpp boundarylayer.cpp \

View File

@ -115,6 +115,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -112,6 +112,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -1,3 +1,8 @@
noinst_HEADERS = parallelfunc.hpp parallel.hpp parallelinterface.hpp paralleltop.hpp
AM_CPPFLAGS =
METASOURCES = AUTO
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
noinst_HEADERS = parallel.hpp paralleltop.hpp
noinst_LTLIBRARIES = libparallel.la
libparallel_la_SOURCES = parallelmesh.cpp paralleltop.cpp
# parallelfunc.cpp parallelinterface.cpp parallelinterface.hpp parallelfunc.hpp

View File

@ -14,6 +14,7 @@
@SET_MAKE@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@ -45,8 +46,24 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libparallel_la_LIBADD =
am_libparallel_la_OBJECTS = parallelmesh.lo paralleltop.lo
libparallel_la_OBJECTS = $(am_libparallel_la_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
SOURCES = $(libparallel_la_SOURCES)
DIST_SOURCES = $(libparallel_la_SOURCES)
HEADERS = $(noinst_HEADERS)
ETAGS = etags
CTAGS = ctags
@ -95,6 +112,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -205,12 +224,14 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_HEADERS = parallelfunc.hpp parallel.hpp parallelinterface.hpp paralleltop.hpp
AM_CPPFLAGS =
METASOURCES = AUTO
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include
noinst_HEADERS = parallel.hpp paralleltop.hpp
noinst_LTLIBRARIES = libparallel.la
libparallel_la_SOURCES = parallelmesh.cpp paralleltop.cpp
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .lo .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@ -241,6 +262,47 @@ $(top_srcdir)/configure: $(am__configure_deps)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
@list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
test "$$dir" != "$$p" || dir=.; \
echo "rm -f \"$${dir}/so_locations\""; \
rm -f "$${dir}/so_locations"; \
done
libparallel.la: $(libparallel_la_OBJECTS) $(libparallel_la_DEPENDENCIES)
$(CXXLINK) $(libparallel_la_OBJECTS) $(libparallel_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallelmesh.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/paralleltop.Plo@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.cpp.lo:
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
mostlyclean-libtool:
-rm -f *.lo
@ -322,7 +384,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
all-am: Makefile $(HEADERS)
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs:
install: install-am
install-exec: install-exec-am
@ -350,11 +412,14 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-libtool mostlyclean-am
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
@ -385,12 +450,14 @@ install-ps: install-ps-am
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
mostlyclean-libtool
pdf: pdf-am
@ -405,18 +472,20 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libtool ctags distclean distclean-generic \
distclean-libtool distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-data \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
uninstall-am
clean-libtool clean-noinstLTLIBRARIES ctags distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
pdf pdf-am ps ps-am tags uninstall uninstall-am
# parallelfunc.cpp parallelinterface.cpp parallelinterface.hpp parallelfunc.hpp
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -25,9 +25,10 @@ namespace netgen
#else // if PARALLEL
// #include <mystdlib.h>
#include <meshing.hpp>
#include "incvis.hpp"
#include <mystdlib.h>
#include <myadt.hpp>
// #include <meshing.hpp>
// #include "incvis.hpp"
//#include "parallelfunc.hpp"
@ -263,9 +264,8 @@ namespace netgen
// #include "parallelmesh.hpp"
#include "paralleltop.hpp"
#include "parallelinterface.hpp"
// #include "paralleltop.hpp"
// #include "parallelinterface.hpp"
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
#ifndef FILE_PARALLELTOP
#define FILE_PARALLELTOP
#include <meshing.hpp>
extern int ntasks;
class ParallelMeshTopology

View File

@ -113,6 +113,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@

View File

@ -3,7 +3,7 @@ visual.hpp vssolution.hpp
include_HEADERS = soldata.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
METASOURCES = AUTO
noinst_LIBRARIES = libvisual.a
libvisual_a_SOURCES = meshdoc.cpp mvdraw.cpp stlmeshing.cpp vscsg.cpp \

View File

@ -125,6 +125,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -239,7 +241,7 @@ noinst_HEADERS = meshdoc.hpp mvdraw.hpp vispar.hpp \
visual.hpp vssolution.hpp
include_HEADERS = soldata.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
AM_CPPFLAGS = $(MPI_INCLUDES) -I$(top_srcdir)/libsrc/include -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
METASOURCES = AUTO
noinst_LIBRARIES = libvisual.a
libvisual_a_SOURCES = meshdoc.cpp mvdraw.cpp stlmeshing.cpp vscsg.cpp \

View File

@ -13,6 +13,8 @@ Visualization
*/
#define PARALLELGL
#include "../include/incvis.hpp"
namespace netgen

View File

@ -990,7 +990,6 @@ namespace netgen
CurvedElements & curv = mesh->GetCurvedElements();
int hoplotn = 1 << vispar.subdivisions;
for (int col = 1; col <= 2; col++)
{
if (col == 2)
@ -1791,6 +1790,7 @@ namespace netgen
#ifdef PARALLEL
static float tetcols[][8] =
{
{ 1.0f, 1.0f, 0.0f, 1.0f },

View File

@ -1,9 +1,9 @@
noinst_HEADERS = demoview.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES) $(MPI_INCLUDES)
bin_PROGRAMS = netgen
netgen_SOURCES = demoview.cpp ngappinit.cpp ngpkg.cpp onetcl.cpp nginterface.cpp
netgen_SOURCES = demoview.cpp ngappinit.cpp ngpkg.cpp onetcl.cpp nginterface.cpp parallelfunc.cpp parallelinterface.cpp
netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \
@ -12,12 +12,13 @@ netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \
$(top_builddir)/libsrc/interface/libinterface.la \
$(top_builddir)/libsrc/stlgeom/libstl.la \
$(top_builddir)/libsrc/occ/libocc.la \
$(top_builddir)/libsrc/parallel/libparallel.la \
$(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/gprim/libgprim.la \
$(top_builddir)/libsrc/opti/libopti.la \
$(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la \
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -lGLU $(TK_LIB_SPEC) $(TCL_LIB_SPEC)
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -lGLU $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS)

View File

@ -52,7 +52,8 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
PROGRAMS = $(bin_PROGRAMS)
am_netgen_OBJECTS = demoview.$(OBJEXT) ngappinit.$(OBJEXT) \
ngpkg.$(OBJEXT) onetcl.$(OBJEXT) nginterface.$(OBJEXT)
ngpkg.$(OBJEXT) onetcl.$(OBJEXT) nginterface.$(OBJEXT) \
parallelfunc.$(OBJEXT) parallelinterface.$(OBJEXT)
netgen_OBJECTS = $(am_netgen_OBJECTS)
am__DEPENDENCIES_1 =
netgen_DEPENDENCIES = \
@ -62,13 +63,15 @@ netgen_DEPENDENCIES = \
$(top_builddir)/libsrc/interface/libinterface.la \
$(top_builddir)/libsrc/stlgeom/libstl.la \
$(top_builddir)/libsrc/occ/libocc.la \
$(top_builddir)/libsrc/parallel/libparallel.la \
$(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/gprim/libgprim.la \
$(top_builddir)/libsrc/opti/libopti.la \
$(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
$(am__DEPENDENCIES_1)
netgen_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
$(netgen_LDFLAGS) $(LDFLAGS) -o $@
@ -136,6 +139,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -247,20 +252,21 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
noinst_HEADERS = demoview.hpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES)
netgen_SOURCES = demoview.cpp ngappinit.cpp ngpkg.cpp onetcl.cpp nginterface.cpp
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL $(OCCFLAGS) $(TCL_INCLUDES) $(MPI_INCLUDES)
netgen_SOURCES = demoview.cpp ngappinit.cpp ngpkg.cpp onetcl.cpp nginterface.cpp parallelfunc.cpp parallelinterface.cpp
netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \
$(top_builddir)/libsrc/csg/libcsg.la \
$(top_builddir)/libsrc/geom2d/libgeom2d.la \
$(top_builddir)/libsrc/interface/libinterface.la \
$(top_builddir)/libsrc/stlgeom/libstl.la \
$(top_builddir)/libsrc/occ/libocc.la \
$(top_builddir)/libsrc/parallel/libparallel.la \
$(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/gprim/libgprim.la \
$(top_builddir)/libsrc/opti/libopti.la \
$(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la \
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -lGLU $(TK_LIB_SPEC) $(TCL_LIB_SPEC)
$(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 -lGLU $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS)
dist_bin_SCRIPTS = dialog.tcl menustat.tcl ngicon.tcl ng.tcl \
ngvisual.tcl sockets.tcl drawing.tcl nghelp.tcl ngshell.tcl \
@ -362,6 +368,8 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nginterface.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngpkg.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onetcl.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallelfunc.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parallelinterface.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<

View File

@ -789,8 +789,8 @@ menu .ngmenu.special
menu .ngmenu.help
.ngmenu.help add command -label "Ng Help..." \
-command { help_main }
# .ngmenu.help add command -label "Ng Help..." \
\# -command { help_main }
# .ngmenu.view add checkbutton -variable showsensitivehelp \
# -label "Sensitve Help" \
# -command { sensitivehelpdialog $showsensitivehelp }

View File

@ -27,7 +27,7 @@ MPI_Comm MPI_HIGHORDER_COMM;
#endif
#include "../libsrc/parallel/parallel.hpp"
#include "../libsrc/parallel/parallelfunc.hpp"
#include "parallelfunc.hpp"
namespace netgen

436
ng/parallelfunc.cpp Normal file
View File

@ -0,0 +1,436 @@
#ifdef PARALLEL
#ifdef OCCGEOMETRY
#include <occgeom.hpp>
#endif
// #include <mystdlib.h>
#include <meshing.hpp>
// #include "incvis.hpp"
#include <visual.hpp>
#ifdef PARALLELGL
#ifndef WIN32
#define GLX_GLXEXT_LEGACY
#define GLX_GLXEXT_PROTOTYPES
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h> /* for XA_RGB_DEFAULT_MAP atom */
#include <GL/glx.h>
#include <GL/glxext.h>
#endif
#endif
#include <geometry2d.hpp>
#include <stlgeom.hpp>
// #include <incvis.hpp>
// #include <visual.hpp>
// #include <mystdlib.h>
// #include <myadt.hpp>
// #include <linalg.hpp>
// #include <csg.hpp>
#include <meshing.hpp>
#include "parallel.hpp"
#include "parallelfunc.hpp"
namespace netgen
{
#include "../interface/writeuser.hpp"
extern string ngdir;
#ifdef OPENGL
extern VisualSceneMesh vsmesh;
#endif
}
void Parallel_Exit();
namespace netgen {
extern AutoPtr<Mesh> mesh;
// geometry: either CSG, or, if an other is non-null,
// then the other
extern AutoPtr<CSGeometry> geometry ;
extern STLGeometry * stlgeometry;
extern AutoPtr<SplineGeometry2d> geometry2d ;
#ifdef OCCGEOMETRY
extern OCCGeometry * occgeometry;
#endif
#ifdef ACIS
extern ACISGeometry * acisgeometry;
#endif
}
using namespace netgen;
using netgen::RegisterUserFormats;
#ifdef PARALLEL
void Ng_Exit ()
{
#ifdef NGSOLVE
Parallel_Exit();
#endif
delete stlgeometry;
stlgeometry = NULL;
#ifdef OCCGEOMETRY
delete occgeometry;
occgeometry = 0;
#endif
geometry.Reset (NULL);
geometry2d.Reset (NULL);
// delete testout;
return;
}
#endif
void ParallelRun()
{
string message;
MPI_Status status;
// int id, rc, ntasks;
MPI_Comm_size(MPI_COMM_WORLD, &ntasks);
MPI_Comm_rank(MPI_COMM_WORLD, &id);
bool test = true;
testout = new ofstream (string("testout_proc") + id );
while ( test )
{
#ifdef SCALASCA
#pragma pomp inst begin (message)
#endif
(*testout) << "wait for mess " << endl;
MyMPI_Recv ( message, 0 );
(*testout) << "message " << message << endl;
#ifdef SCALASCA
#pragma pomp inst end (message)
#endif
#ifdef NGSOLVE
if ( message.compare(0, 3, "ngs") == 0 )
{
PrintMessage ( 2, "Starting NgSolve routine ", message ) ;
NGS_ParallelRun (message);
}
else
#endif
if ( message == "mesh" )
{
VT_USER_START ("Mesh::ReceiveParallelMesh");
mesh.Reset( new netgen::Mesh);
mesh->ReceiveParallelMesh();
VT_USER_END ("Mesh::ReceiveParallelMesh");
}
else if ( message == "overlap++" )
{
PrintMessage (1, "overlap++++++");
mesh -> UpdateOverlap();
}
else if ( message == "visualize" )
{
cout << "p" << id << ": ACHTUNG - alles wieder zumachen, sonst geht nix mehr :)" << endl;
cout << "Tcl-disabled" << endl;
/*
// initialize application
Tcl_Interp * myinterp = Tcl_CreateInterp ();
if (Tcl_AppInit (myinterp) == TCL_ERROR)
{
cerr << "Exit Netgen due to initialization problem" << endl;
exit (1);
}
string startfile = ngdir + "/libsrc/parallel/ng_parallel.tcl";
if (verbose)
cout << "Load Tcl-script from " << startfile << endl;
int errcode = Tcl_EvalFile (myinterp, (char*)startfile.c_str());
if (errcode)
{
cout << "Error in Tcl-Script:" << endl;
cout << "result = " << myinterp->result << endl;
cout << "in line " << myinterp->errorLine << endl;
if (myinterp->errorLine == 1)
cout << "\nMake sure to set environment variable NETGENDIR" << endl;
exit (1);
}
// lookup user file formats and insert into format list:
ARRAY<const char*> userformats;
RegisterUserFormats (userformats);
ostringstream fstr;
for (int i = 1; i <= userformats.Size(); i++)
fstr << ".ngmenu.file.filetype add radio -label \""
<< userformats.Get(i) << "\" -variable exportfiletype\n";
Tcl_Eval (myinterp, (char*)fstr.str().c_str());
Tcl_SetVar (myinterp, "exportfiletype", "Neutral Format", 0);
Tk_MainLoop();
Tcl_DeleteInterp (myinterp);
*/
}
#ifdef PARALLELGL
else if ( message == "redraw" )
{
// draw into the same GLX - drawing context
// works on parallel machine, but
// did not manage to get glXImportContextEXT working on Laptop (JS)
string redraw_cmd;
MyMPI_Recv (redraw_cmd, 0);
// PrintMessage (1, "Redraw - ", redraw_cmd);
static string displname;
static int curDrawable, contextid;
static Display * display = NULL;
static GLXContext context;
static XVisualInfo * visinfo = 0;
// if (!display)
if (redraw_cmd == "init")
{
MyMPI_Recv (displname, 0);
MyMPI_Recv (curDrawable, 0);
MyMPI_Recv (contextid, 0);
display = XOpenDisplay (displname.c_str());
/*
PrintMessage (3, "displ - name = ", displname);
PrintMessage (3, "display = ", display,
" display props: ",
" screen w = ", XDisplayWidth (display, 0),
" , h = ", XDisplayHeight (display, 0));
*/
Window win;
int wx, wy;
unsigned int ww, wh, bw, depth;
cout << "got drawable: " << curDrawable << endl;
XGetGeometry(display, curDrawable, &win,
&wx, &wy, &ww, &wh,
&bw, &depth);
// cout << "P" << id << ": window-props: x = " << wx << ", y = " << wy
// << ", w = " << ww << ", h = " << wh << ", depth = " << depth << endl;
#define VISUAL
#ifdef VISUAL
// make a new GLXContext
// first, generate a visual (copied from togl)
int attrib_list[1000];
# define MAX_ATTEMPTS 12
static int ci_depths[MAX_ATTEMPTS] = {
8, 4, 2, 1, 12, 16, 8, 4, 2, 1, 12, 16
};
static int dbl_flags[MAX_ATTEMPTS] = {
0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1
};
/* It may take a few tries to get a visual */
for (int attempt = 0; attempt < MAX_ATTEMPTS; attempt++)
{
int attrib_count = 0;
attrib_list[attrib_count++] = GLX_USE_GL;
/* RGB[A] mode */
attrib_list[attrib_count++] = GLX_RGBA;
attrib_list[attrib_count++] = GLX_RED_SIZE;
attrib_list[attrib_count++] = 1;
attrib_list[attrib_count++] = GLX_GREEN_SIZE;
attrib_list[attrib_count++] = 1;
attrib_list[attrib_count++] = GLX_BLUE_SIZE;
attrib_list[attrib_count++] = 1;
// attrib_list[attrib_count++] = GLX_ALPHA_SIZE;
// attrib_list[attrib_count++] = 1;
attrib_list[attrib_count++] = GLX_DEPTH_SIZE;
attrib_list[attrib_count++] = 1;
attrib_list[attrib_count++] = GLX_DOUBLEBUFFER;
attrib_list[attrib_count++] = None;
visinfo = glXChooseVisual(display, 0,
attrib_list);
if (visinfo) {
/* found a GLX visual! */
// cout << "found VISINFO !!!" << endl;
/*
int hi = 0;
std::cout << "attribs = ";
while (attrib_list[hi] != None)
std::cout << attrib_list[hi++] << " ";
std::cout << std::endl;
*/
break;
}
}
if (!visinfo)
cerr << "no VISINFO found" << endl;
// context = glXCreateContext( display, visinfo, 0, /* curContext, */ False );
context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False );
// glXMakeCurrent (display, curDrawable, context);
#else
// try to get GLXcontext from the master.
// this needs an indirect context (BUT DOES NOT WORK ????)
context = glXImportContextEXT ( display, contextid );
/*
PrintMessage (1, "GLX-contextid = " , contextid,
" imported context ", context);
*/
// glXMakeCurrent (display, curDrawable, context);
#endif
// PrintMessage (1, "redraw - init complete");
int hi = id;
MyMPI_Send (hi, 0);
}
if (redraw_cmd == "broadcast")
{
vsmesh.Broadcast ();
}
if (redraw_cmd == "linelist")
{
glXMakeCurrent (display, curDrawable, context);
vsmesh.BuildLineList();
glXMakeCurrent (display, None, NULL);
}
if (redraw_cmd == "filledlist")
{
glXMakeCurrent (display, curDrawable, context);
vsmesh.BuildFilledList();
glXMakeCurrent (display, None, NULL);
}
if (redraw_cmd == "solsurfellist")
{
glXMakeCurrent (display, curDrawable, context);
vssolution.DrawSurfaceElements();
glXMakeCurrent (display, None, NULL);
}
}
#endif
else if ( message == "end" )
{
PrintMessage (1, "EXIT");
test = false;
// end netgen
Ng_Exit();
}
else
{
PrintMessage ( 1, "received unidentified message '" + message + "'\n");
test = false;
}
}
return;
}
#endif

158
ng/parallelinterface.cpp Normal file
View File

@ -0,0 +1,158 @@
#ifdef PARALLEL
#include <mystdlib.h>
#include <parallel.hpp>
#include <meshing.hpp>
#include "../libsrc/parallel/parallelinterface.hpp"
namespace netgen
{
extern AutoPtr<Mesh> mesh;
using namespace netgen;
// int NgPar_Glob2Loc_SurfEl ( int globnum )
// {
// return mesh->GetParallelTopology().Glob2Loc_SurfEl(globnum+1) - 1;
// }
// int NgPar_Glob2Loc_VolEl ( int globnum )
// {
// return mesh->GetParallelTopology().Glob2Loc_VolEl(globnum+1) - 1;
// }
// int NgPar_Glob2Loc_Segm ( int globnum )
// {
// return mesh->GetParallelTopology().Glob2Loc_Segm(globnum+1) - 1;
// }
// int NgPar_Glob2Loc_Vert ( int globnum )
// {
// return mesh->GetParallelTopology().Glob2Loc_Vert(globnum+1) -1;
// }
int NgPar_GetLoc2Glob_VolEl ( int locnum )
{
return mesh -> GetParallelTopology().GetLoc2Glob_VolEl ( locnum+1) -1;
}
// gibt anzahl an distant pnums zurueck
// * pnums entspricht ARRAY<int[2] >
int NgPar_GetDistantNodeNums ( int nodetype, int locnum, int * distnums )
{
int size;
switch ( nodetype )
{
case 0:
size = mesh->GetParallelTopology().GetDistantPNums( locnum+1, distnums );
break;
case 1:
size = mesh->GetParallelTopology().GetDistantEdgeNums( locnum+1, distnums );
break;
case 2:
size = mesh->GetParallelTopology().GetDistantFaceNums( locnum+1, distnums );
break;
case 3:
size = mesh->GetParallelTopology().GetDistantElNums( locnum+1, distnums );
break;
default:
cerr << "NgPar_GetDistantNodeNums() Unknown nodetype " << nodetype << endl;
size = -1;
}
// 0 - based
for ( int i = 0; i < size; i++ )
distnums[2*i+1]--;
return size;
}
int NgPar_GetNDistantNodeNums ( int nodetype, int locnum )
{
switch ( nodetype )
{
case 0:
return mesh->GetParallelTopology().GetNDistantPNums( locnum+1 );
case 1:
return mesh->GetParallelTopology().GetNDistantEdgeNums( locnum+1 );
case 2:
return mesh->GetParallelTopology().GetNDistantFaceNums( locnum+1 );
case 3:
return mesh->GetParallelTopology().GetNDistantElNums( locnum+1 );
}
return -1;
}
int NgPar_GetDistantPNum ( int proc, int locpnum )
{
return mesh->GetParallelTopology().GetDistantPNum( proc, locpnum+1) - 1;
}
int NgPar_GetDistantEdgeNum ( int proc, int locpnum )
{
return mesh->GetParallelTopology().GetDistantEdgeNum( proc, locpnum+1) - 1;
}
int NgPar_GetDistantFaceNum ( int proc, int locpnum )
{
return mesh->GetParallelTopology().GetDistantFaceNum (proc, locpnum+1 ) - 1;
}
int NgPar_GetDistantElNum ( int proc, int locelnum )
{
return mesh->GetParallelTopology().GetDistantElNum (proc, locelnum+1 ) - 1;
}
bool NgPar_IsExchangeFace ( int fnr )
{
return (mesh->GetParallelTopology().GetNDistantFaceNums( fnr+1 ) > 0);
// return mesh->GetParallelTopology().IsExchangeFace ( fnr+1 );
}
bool NgPar_IsExchangeVert ( int vnum )
{
return (mesh->GetParallelTopology().GetNDistantPNums( vnum+1 ) > 0);
// return mesh->GetParallelTopology().IsExchangeVert ( vnum+1 );
}
bool NgPar_IsExchangeEdge ( int ednum )
{
return (mesh->GetParallelTopology().GetNDistantEdgeNums( ednum+1 ) > 0);
// return mesh->GetParallelTopology().IsExchangeEdge ( ednum+1 );
}
bool NgPar_IsExchangeElement ( int elnum )
{
return (mesh->GetParallelTopology().GetNDistantElNums( elnum+1 ) > 0);
// return mesh->GetParallelTopology().IsExchangeElement ( elnum+1 );
}
void NgPar_PrintParallelMeshTopology ()
{
mesh -> GetParallelTopology().Print ();
}
bool NgPar_IsElementInPartition ( const int elnum, const int dest )
{
return mesh -> GetParallelTopology().IsElementInPartition ( elnum+1, dest );
}
bool NgPar_IsGhostFace ( const int facenum )
{
return mesh -> GetParallelTopology().IsGhostFace ( facenum+1);
}
bool NgPar_IsGhostEdge ( const int edgenum )
{
return mesh -> GetParallelTopology().IsGhostEdge ( edgenum+1);
}
}
#endif

View File

@ -1,6 +1,6 @@
include_HEADERS = nglib.h
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(OCCFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(OCCFLAGS) $(MPI_INCLUDES)
lib_LTLIBRARIES = libnglib.la
libnglib_la_SOURCES = nglib.cpp
@ -10,11 +10,12 @@ libnglib_la_LIBADD = \
$(top_builddir)/libsrc/geom2d/libgeom2d.la \
$(top_builddir)/libsrc/csg/libcsg.la \
$(top_builddir)/libsrc/stlgeom/libstl.la \
$(top_builddir)/libsrc/parallel/libparallel.la \
$(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/gprim/libgprim.la \
$(top_builddir)/libsrc/opti/libopti.la \
$(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la
$(top_builddir)/libsrc/general/libgeneral.la $(MPI_LIBS)
libnglib_la_LDFLAGS = -avoid-version
# -rdynamic

View File

@ -58,16 +58,19 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(includedir)"
libLTLIBRARIES_INSTALL = $(INSTALL)
LTLIBRARIES = $(lib_LTLIBRARIES)
am__DEPENDENCIES_1 =
libnglib_la_DEPENDENCIES = \
$(top_builddir)/libsrc/interface/libinterface.la \
$(top_builddir)/libsrc/geom2d/libgeom2d.la \
$(top_builddir)/libsrc/csg/libcsg.la \
$(top_builddir)/libsrc/stlgeom/libstl.la \
$(top_builddir)/libsrc/parallel/libparallel.la \
$(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/gprim/libgprim.la \
$(top_builddir)/libsrc/opti/libopti.la \
$(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la
$(top_builddir)/libsrc/general/libgeneral.la \
$(am__DEPENDENCIES_1)
am_libnglib_la_OBJECTS = nglib.lo
libnglib_la_OBJECTS = $(am_libnglib_la_OBJECTS)
libnglib_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
@ -141,6 +144,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
@ -252,7 +257,7 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
include_HEADERS = nglib.h
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(OCCFLAGS)
AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(OCCFLAGS) $(MPI_INCLUDES)
lib_LTLIBRARIES = libnglib.la
libnglib_la_SOURCES = nglib.cpp
libnglib_la_LIBADD = \
@ -260,11 +265,12 @@ libnglib_la_LIBADD = \
$(top_builddir)/libsrc/geom2d/libgeom2d.la \
$(top_builddir)/libsrc/csg/libcsg.la \
$(top_builddir)/libsrc/stlgeom/libstl.la \
$(top_builddir)/libsrc/parallel/libparallel.la \
$(top_builddir)/libsrc/meshing/libmesh.la \
$(top_builddir)/libsrc/gprim/libgprim.la \
$(top_builddir)/libsrc/opti/libopti.la \
$(top_builddir)/libsrc/linalg/libla.la \
$(top_builddir)/libsrc/general/libgeneral.la
$(top_builddir)/libsrc/general/libgeneral.la $(MPI_LIBS)
libnglib_la_LDFLAGS = -avoid-version
ng_vol_SOURCES = ng_vol.cpp

View File

@ -29,6 +29,18 @@ namespace netgen {
}
#ifdef PARALLEL
#include <mpi.h>
namespace netgen
{
int id, ntasks;
}
MPI_Group MPI_HIGHORDER_WORLD;
MPI_Comm MPI_HIGHORDER_COMM;
#endif
namespace nglib {
@ -597,4 +609,6 @@ void Render()
}
}

View File

@ -101,6 +101,8 @@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_INCLUDES = @MPI_INCLUDES@
MPI_LIBS = @MPI_LIBS@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@