From 894df4cb84284ab60a76b70fe18166f61daadfb5 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Mon, 14 Feb 2011 13:01:51 +0000 Subject: [PATCH] parallel merges --- config.guess | 58 +++++++--------------------- config.h.in | 3 ++ config.sub | 15 +++++-- configure.ac | 14 ++++--- install-sh | 5 ++- libsrc/csg/Makefile.am | 2 +- libsrc/include/parallelinterface.hpp | 6 --- libsrc/stlgeom/Makefile.am | 2 +- libsrc/visualization/mvdraw.cpp | 11 +----- libsrc/visualization/vsmesh.cpp | 11 +----- ng/Makefile.am | 6 +-- ng/parallelfunc.cpp | 20 +++++----- ng/parallelfunc.hpp | 2 +- ng/parallelinterface.cpp | 10 +++-- 14 files changed, 68 insertions(+), 97 deletions(-) diff --git a/config.guess b/config.guess index da833146..e3a2116a 100755 --- a/config.guess +++ b/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-27' +timestamp='2009-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -656,7 +656,7 @@ EOF # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -822,6 +822,9 @@ EOF [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -882,40 +885,17 @@ EOF m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif @@ -947,7 +927,7 @@ EOF EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; @@ -1001,14 +981,6 @@ EOF elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -1074,7 +1046,7 @@ EOF i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1182,7 +1154,7 @@ EOF rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) diff --git a/config.h.in b/config.h.in index a71eeea9..1b506b31 100644 --- a/config.h.in +++ b/config.h.in @@ -67,6 +67,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION diff --git a/config.sub b/config.sub index a39437d0..eb0389a6 100755 --- a/config.sub +++ b/config.sub @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Free Software Foundation, Inc. -timestamp='2009-04-17' +timestamp='2009-06-11' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -153,6 +153,9 @@ case $os in os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -467,6 +470,10 @@ case $basic_machine in basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; c90) basic_machine=c90-cray os=-unicos @@ -1260,7 +1267,7 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ @@ -1613,7 +1620,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff --git a/configure.ac b/configure.ac index 6eff10dc..35a47b10 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([netgen],[4.9.13],[],[]) +AC_INIT([netgen],[4.9.14-dev],[],[]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_CONFIG_MACRO_DIR([m4]) @@ -25,8 +25,6 @@ AC_PROG_CXX AC_PROG_LIBTOOL LT_INIT - - # OpenCASCADE configuration AC_ARG_ENABLE([occ], @@ -93,6 +91,12 @@ AC_ARG_ENABLE([parallel], AC_SUBST([MPI_LIBS], "-L/usr/lib64/mpi/gcc/openmpi/lib64 -lmpi_cxx -lmetis") ] ) + + +# [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -I/usr/include/mpich2 -I/usr/include/metis -DPARALLEL -I/usr/share/metis/Lib -DMETIS -DVTRACE -I/usr/local/include/vampirtrace") +# AC_SUBST([MPI_LIBS], "-lmetis -L/opt/mpich/ch-p4/lib -lmpich") + +# -lvt -lvt-mpi -lvt-mpi-unify") # [AC_SUBST([MPI_INCLUDES], "-I/opt/mpich/include -DPARALLEL -I/usr/include/metis -DMETIS") # AC_SUBST([MPI_LIBS], " -L/opt/mpich/ch-p4/lib64 -lmpich -lmetis") # [AC_SUBST([MPI_INCLUDES], "-DPARALLEL -DNO_PARALLEL_THREADS -I/opt/mpich/include") @@ -154,7 +158,7 @@ case "${TEA_WINDOWINGSYSTEM}" in ;; x11) AC_SUBST(TOGL_WINDOWINGSYSTEM,TOGL_X11) - TEA_ADD_LIBS([-lGL -lXmu]) + TEA_ADD_LIBS([-lGL]) LIBGLU=-lGLU ;; win32) @@ -212,4 +216,4 @@ AC_MSG_RESULT([ Example programs will be built but not installed. ------------------------------------------------------------------------ -]) \ No newline at end of file +]) diff --git a/install-sh b/install-sh index a5897de6..6781b987 100755 --- a/install-sh +++ b/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2006-12-25.00 +scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -515,5 +515,6 @@ done # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" # End: diff --git a/libsrc/csg/Makefile.am b/libsrc/csg/Makefile.am index dff89620..a09eb358 100644 --- a/libsrc/csg/Makefile.am +++ b/libsrc/csg/Makefile.am @@ -2,7 +2,7 @@ noinst_HEADERS = algprim.hpp csgparser.hpp extrusion.hpp manifold.hpp \ singularref.hpp surface.hpp brick.hpp curve2d.hpp gencyl.hpp \ meshsurf.hpp solid.hpp triapprox.hpp csgeom.hpp edgeflw.hpp geoml.hpp \ polyhedra.hpp specpoin.hpp csg.hpp explicitcurve2d.hpp identify.hpp \ -revolution.hpp spline3d.hpp +revolution.hpp spline3d.hpp vscsg.hpp AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) diff --git a/libsrc/include/parallelinterface.hpp b/libsrc/include/parallelinterface.hpp index ed262e6b..6ccbd501 100644 --- a/libsrc/include/parallelinterface.hpp +++ b/libsrc/include/parallelinterface.hpp @@ -9,12 +9,6 @@ extern "C" { // this interface is 0-base !! -// // these functions have O(N) complexity -// int NgPar_Glob2Loc_SurfEl ( int globnum ) ; -// int NgPar_Glob2Loc_VolEl ( int globnum ) ; -// int NgPar_Glob2Loc_Segm ( int globnum ) ; -// int NgPar_Glob2Loc_Vert ( int globnum ) ; - int NgPar_GetLoc2Glob_VolEl ( int locnum ); diff --git a/libsrc/stlgeom/Makefile.am b/libsrc/stlgeom/Makefile.am index f463bd98..6296628e 100644 --- a/libsrc/stlgeom/Makefile.am +++ b/libsrc/stlgeom/Makefile.am @@ -1,5 +1,5 @@ noinst_HEADERS = meshstlsurface.hpp stlgeom.hpp stlline.hpp \ -stltool.hpp stltopology.hpp +stltool.hpp stltopology.hpp vsstl.hpp AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include $(TCL_INCLUDES) METASOURCES = AUTO diff --git a/libsrc/visualization/mvdraw.cpp b/libsrc/visualization/mvdraw.cpp index f4978250..0f0c53cc 100644 --- a/libsrc/visualization/mvdraw.cpp +++ b/libsrc/visualization/mvdraw.cpp @@ -753,6 +753,7 @@ namespace netgen displname = XDisplayName (0); /* + cout << "Init Parallel GL" << endl; cout << "DisplayName = " << displname << endl; cout << "current display = " << dpy << endl; @@ -764,6 +765,7 @@ namespace netgen cout << "extensionstring = " << glXQueryExtensionsString( dpy, 0 ) << endl; */ + Array request(ntasks); MPI_Status status; for ( int dest = 1; dest < ntasks; dest++ ) @@ -807,13 +809,4 @@ namespace netgen } #endif - - - - - - - - - } diff --git a/libsrc/visualization/vsmesh.cpp b/libsrc/visualization/vsmesh.cpp index 5e9ceae1..ae6036db 100644 --- a/libsrc/visualization/vsmesh.cpp +++ b/libsrc/visualization/vsmesh.cpp @@ -1019,8 +1019,8 @@ namespace netgen glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, matcol); -#ifdef PARALLEL /* +#ifdef PARALLEL if ( el.IsGhost() ) { if ( faceindex == selface ) @@ -1028,15 +1028,8 @@ namespace netgen else glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, mat_coll_transp); } - else - */ - { - if ( faceindex == selface ) - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matcolsel); - else - glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, matcol); - } #endif + */ bool simpletrig = !names && !curv.IsHighOrder(); for (int hi = 0; hi < seia.Size(); hi++) diff --git a/ng/Makefile.am b/ng/Makefile.am index b90e9c86..9971de67 100644 --- a/ng/Makefile.am +++ b/ng/Makefile.am @@ -3,7 +3,7 @@ include_HEADERS = AM_CPPFLAGS = -I$(top_srcdir)/libsrc/include -I$(top_srcdir)/libsrc/interface -DOPENGL -D$(TOGL_WINDOWINGSYSTEM) $(OCCFLAGS) $(TCL_INCLUDES) $(MPI_INCLUDES) $(FFMPEG_INCLUDES) $(JPEGLIB_INCLUDES) bin_PROGRAMS = netgen -netgen_SOURCES = demoview.cpp ngappinit.cpp ngpkg.cpp onetcl.cpp nginterface.cpp nginterface_v2.cpp parallelfunc.cpp parallelinterface.cpp demoview.hpp parallelfunc.hpp togl_1_7.h ng_occ.hpp ng_stl.hpp +netgen_SOURCES = demoview.cpp ngappinit.cpp ngpkg.cpp onetcl.cpp nginterface.cpp nginterface_v2.cpp parallelfunc.cpp parallelinterface.cpp demoview.hpp parallelfunc.hpp togl_1_7.h netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \ @@ -19,13 +19,13 @@ netgen_LDADD = $(top_builddir)/libsrc/visualization/libvisual.a \ $(top_builddir)/libsrc/linalg/libla.la \ $(top_builddir)/libsrc/general/libgen.la \ $(OCCLIBS) -L$(TK_BIN_DIR)/Togl1.7 $(TOGLLIBDIR) -lTogl1.7 $(LIBGLU) $(TK_LIB_SPEC) $(TCL_LIB_SPEC) $(MPI_LIBS) $(FFMPEG_LIBS) $(JPEGLIB_LIBS) $(PKG_LIBS) - +# # $(top_builddir)/libsrc/occ/liboccvis.la # $(top_builddir)/libsrc/occ/libocc.la # add for static linkage of ngsolve: -# /opt/netgen/lib/libngsolve.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngfemng.a /opt/netgen/lib/libngmg.a /opt/netgen/lib/libngla.a /opt/netgen/lib/libngbla.a /opt/netgen/lib/libngstd.a -L/opt/intel/mkl/10.2.1.017/lib/em64t /opt/intel/mkl/10.2.1.017/lib/em64t/libmkl_solver_lp64.a -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core +# /opt/netgen/lib/libngsolve.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngcomp.a /opt/netgen/lib/libngfemng.a /opt/netgen/lib/libngmg.a /opt/netgen/lib/libngla.a /opt/netgen/lib/libngbla.a /opt/netgen/lib/libngstd.a -L/opt/intel/mkl/10.2.1.017/lib/em64t /opt/intel/mkl/10.2.1.017/lib/em64t/libmkl_solver_lp64.a -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core # # diff --git a/ng/parallelfunc.cpp b/ng/parallelfunc.cpp index 3175f10b..1fcdec2d 100644 --- a/ng/parallelfunc.cpp +++ b/ng/parallelfunc.cpp @@ -1,3 +1,5 @@ +#define NGSOLVE + #ifdef PARALLEL #include "dlfcn.h" @@ -53,6 +55,7 @@ void (*NGS_ParallelRun) (const string & message) = NULL; +// extern void NGS_ParallelRun ( const string & message ); namespace netgen { @@ -69,6 +72,7 @@ void Parallel_Exit(); namespace netgen { extern AutoPtr mesh; + extern VisualSceneMesh vsmesh; } using namespace netgen; @@ -245,13 +249,11 @@ void ParallelRun() 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; @@ -331,10 +333,10 @@ void ParallelRun() cerr << "no VISINFO found" << endl; // context = glXCreateContext( display, visinfo, 0, /* curContext, */ False ); - context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False ); - // cout << "context = " << context << endl; - - glXMakeCurrent (display, curDrawable, context); + context = glXCreateContext( display, visinfo, glXImportContextEXT ( display, contextid ), False); + // cout << "context = " << context << endl; + + glXMakeCurrent (display, curDrawable, context); #else @@ -348,7 +350,7 @@ void ParallelRun() " imported context ", context); - // glXMakeCurrent (display, curDrawable, context); + glXMakeCurrent (display, curDrawable, context); #endif // PrintMessage (1, "redraw - init complete"); @@ -371,7 +373,7 @@ void ParallelRun() if (redraw_cmd == "filledlist") { glXMakeCurrent (display, curDrawable, context); - vsmesh.BuildFilledList (0); + vsmesh.BuildFilledList (false); glXMakeCurrent (display, None, NULL); } @@ -394,7 +396,7 @@ void ParallelRun() else if ( message == "end" ) { - PrintMessage (1, "EXIT"); + // PrintMessage (1, "EXIT"); test = false; // end netgen Ng_Exit(); diff --git a/ng/parallelfunc.hpp b/ng/parallelfunc.hpp index fe41ad04..26f2cf3c 100644 --- a/ng/parallelfunc.hpp +++ b/ng/parallelfunc.hpp @@ -9,7 +9,7 @@ void LoadPDEParallel ( const char* filename ); #ifdef NGSOLVE -void NGS_ParallelRun ( const string & message); +// void NGS_ParallelRun ( const string & message); #endif #endif diff --git a/ng/parallelinterface.cpp b/ng/parallelinterface.cpp index 954a1cf9..1abcebd7 100644 --- a/ng/parallelinterface.cpp +++ b/ng/parallelinterface.cpp @@ -5,13 +5,16 @@ #include "../libsrc/include/parallelinterface.hpp" + + namespace netgen { + + extern AutoPtr mesh; +} - - - + // int NgPar_Glob2Loc_SurfEl ( int globnum ) // { // return mesh->GetParallelTopology().Glob2Loc_SurfEl(globnum+1) - 1; @@ -31,7 +34,6 @@ namespace netgen // { // return mesh->GetParallelTopology().Glob2Loc_Vert(globnum+1) -1; // } -} using namespace netgen;