From c81995a91449293a7d0ebb0e65800e9fb38c7f26 Mon Sep 17 00:00:00 2001
From: Thomas Witkowski <thomas.witkowski@gmx.de>
Date: Thu, 29 Jul 2010 11:29:32 +0000
Subject: [PATCH] Fixed several small problems in the parallel code.

---
 AMDiS/CMakeLists.txt                     |   3 +-
 AMDiS/Makefile.in                        |   1 -
 AMDiS/aclocal.m4                         |  34 +--
 AMDiS/bin/Makefile.am                    |   3 +-
 AMDiS/bin/Makefile.in                    |  17 +-
 AMDiS/configure                          | 208 ++++---------
 AMDiS/libtool                            |  85 +++---
 AMDiS/src/Triangle.cc                    |   5 +
 AMDiS/src/parallel/GlobalMatrixSolver.cc |   5 +-
 AMDiS/src/parallel/MeshDistributor.cc    | 367 ++++++-----------------
 AMDiS/src/parallel/MeshDistributor.h     |  31 +-
 11 files changed, 209 insertions(+), 550 deletions(-)

diff --git a/AMDiS/CMakeLists.txt b/AMDiS/CMakeLists.txt
index b8cfd3eb..d667542d 100644
--- a/AMDiS/CMakeLists.txt
+++ b/AMDiS/CMakeLists.txt
@@ -159,7 +159,8 @@ if(ENABLE_PARALLEL_DOMAIN)
 		${SOURCE_DIR}/parallel/StdMpi.cc
 		${SOURCE_DIR}/parallel/ParallelDebug.cc
 		${SOURCE_DIR}/parallel/GlobalMatrixSolver.cc
-		${SOURCE_DIR}/parallel/MpiHelper.cc)
+		${SOURCE_DIR}/parallel/MpiHelper.cc
+		${SOURCE_DIR}/parallel/ElementObjectData.cc)
 	SET(COMPILEFLAGS "${COMPILEFLAGS} -DHAVE_PARALLEL_DOMAIN_AMDIS=1")
 endif(ENABLE_PARALLEL_DOMAIN)
 
diff --git a/AMDiS/Makefile.in b/AMDiS/Makefile.in
index e7566807..e9c5bf1a 100644
--- a/AMDiS/Makefile.in
+++ b/AMDiS/Makefile.in
@@ -140,7 +140,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PETSC_DIR = @PETSC_DIR@
 RANLIB = @RANLIB@
-SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
diff --git a/AMDiS/aclocal.m4 b/AMDiS/aclocal.m4
index 6cec4be8..c6b83dae 100644
--- a/AMDiS/aclocal.m4
+++ b/AMDiS/aclocal.m4
@@ -1578,27 +1578,10 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-    if AC_TRY_EVAL(ac_compile); then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -4305,9 +4288,6 @@ CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
 # Is the compiler the GNU C compiler?
 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
 # An ERE matcher.
 EGREP=$lt_EGREP
 
@@ -4441,11 +4421,11 @@ striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -4457,7 +4437,7 @@ postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -4537,7 +4517,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
 # Run-time system search path for libraries
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -6373,7 +6353,6 @@ do
     done
   done
 done
-IFS=$as_save_IFS
 lt_ac_max=0
 lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -6406,7 +6385,6 @@ for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
 done
 ])
 SED=$lt_cv_path_SED
-AC_SUBST([SED])
 AC_MSG_RESULT([$SED])
 ])
 
diff --git a/AMDiS/bin/Makefile.am b/AMDiS/bin/Makefile.am
index 470d86ac..384eca0a 100644
--- a/AMDiS/bin/Makefile.am
+++ b/AMDiS/bin/Makefile.am
@@ -32,7 +32,8 @@ if USE_PARALLEL_DOMAIN_AMDIS
   $(SOURCE_DIR)/parallel/MeshDistributor.h $(SOURCE_DIR)/parallel/MeshDistributor.cc \
   $(SOURCE_DIR)/parallel/ParallelDebug.h $(SOURCE_DIR)/parallel/ParallelDebug.cc \
   $(SOURCE_DIR)/parallel/GlobalMatrixSolver.h $(SOURCE_DIR)/parallel/GlobalMatrixSolver.cc \
-  $(SOURCE_DIR)/parallel/MpiHelper.h $(SOURCE_DIR)/parallel/MpiHelper.cc 
+  $(SOURCE_DIR)/parallel/MpiHelper.h $(SOURCE_DIR)/parallel/MpiHelper.cc \
+  $(SOURCE_DIR)/parallel/ElementObjectData.h $(SOURCE_DIR)/parallel/ElementObjectData.cc
   libamdis_la_CXXFLAGS += -DHAVE_PARALLEL_DOMAIN_AMDIS=1
   AMDIS_INCLUDES += -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include
 endif
diff --git a/AMDiS/bin/Makefile.in b/AMDiS/bin/Makefile.in
index 78829121..8b2d9f15 100644
--- a/AMDiS/bin/Makefile.in
+++ b/AMDiS/bin/Makefile.in
@@ -42,7 +42,8 @@ host_triplet = @host@
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@  $(SOURCE_DIR)/parallel/MeshDistributor.h $(SOURCE_DIR)/parallel/MeshDistributor.cc \
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@  $(SOURCE_DIR)/parallel/ParallelDebug.h $(SOURCE_DIR)/parallel/ParallelDebug.cc \
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@  $(SOURCE_DIR)/parallel/GlobalMatrixSolver.h $(SOURCE_DIR)/parallel/GlobalMatrixSolver.cc \
-@USE_PARALLEL_DOMAIN_AMDIS_TRUE@  $(SOURCE_DIR)/parallel/MpiHelper.h $(SOURCE_DIR)/parallel/MpiHelper.cc 
+@USE_PARALLEL_DOMAIN_AMDIS_TRUE@  $(SOURCE_DIR)/parallel/MpiHelper.h $(SOURCE_DIR)/parallel/MpiHelper.cc \
+@USE_PARALLEL_DOMAIN_AMDIS_TRUE@  $(SOURCE_DIR)/parallel/ElementObjectData.h $(SOURCE_DIR)/parallel/ElementObjectData.cc
 
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@am__append_3 = -DHAVE_PARALLEL_DOMAIN_AMDIS=1
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@am__append_4 = -I$(PETSC_DIR)/include -I$(PETSC_DIR)/$(PETSC_ARCH)/include
@@ -85,6 +86,8 @@ am__libamdis_la_SOURCES_DIST = $(SOURCE_DIR)/parallel/StdMpi.h \
 	$(SOURCE_DIR)/parallel/GlobalMatrixSolver.cc \
 	$(SOURCE_DIR)/parallel/MpiHelper.h \
 	$(SOURCE_DIR)/parallel/MpiHelper.cc \
+	$(SOURCE_DIR)/parallel/ElementObjectData.h \
+	$(SOURCE_DIR)/parallel/ElementObjectData.cc \
 	$(PARALLEL_DIR)/ConditionalEstimator.h \
 	$(PARALLEL_DIR)/ConditionalEstimator.cc \
 	$(PARALLEL_DIR)/ConditionalMarker.h \ \
@@ -250,7 +253,8 @@ am__libamdis_la_SOURCES_DIST = $(SOURCE_DIR)/parallel/StdMpi.h \
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@	libamdis_la-MeshDistributor.lo \
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@	libamdis_la-ParallelDebug.lo \
 @USE_PARALLEL_DOMAIN_AMDIS_TRUE@	libamdis_la-GlobalMatrixSolver.lo \
-@USE_PARALLEL_DOMAIN_AMDIS_TRUE@	libamdis_la-MpiHelper.lo
+@USE_PARALLEL_DOMAIN_AMDIS_TRUE@	libamdis_la-MpiHelper.lo \
+@USE_PARALLEL_DOMAIN_AMDIS_TRUE@	libamdis_la-ElementObjectData.lo
 @USE_PARALLEL_AMDIS_FALSE@am__objects_2 = $(am__objects_1)
 @USE_PARALLEL_AMDIS_TRUE@am__objects_2 =  \
 @USE_PARALLEL_AMDIS_TRUE@	libamdis_la-ConditionalEstimator.lo \
@@ -423,7 +427,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PETSC_DIR = @PETSC_DIR@
 RANLIB = @RANLIB@
-SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -790,6 +793,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ElementData.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ElementDofIterator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ElementFileWriter.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-ElementObjectData.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-Estimator.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-FileWriter.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libamdis_la-FiniteElemSpace.Plo@am__quote@
@@ -930,6 +934,13 @@ libamdis_la-MpiHelper.lo: $(SOURCE_DIR)/parallel/MpiHelper.cc
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-MpiHelper.lo `test -f '$(SOURCE_DIR)/parallel/MpiHelper.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/parallel/MpiHelper.cc
 
+libamdis_la-ElementObjectData.lo: $(SOURCE_DIR)/parallel/ElementObjectData.cc
+@am__fastdepCXX_TRUE@	if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-ElementObjectData.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-ElementObjectData.Tpo" -c -o libamdis_la-ElementObjectData.lo `test -f '$(SOURCE_DIR)/parallel/ElementObjectData.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/parallel/ElementObjectData.cc; \
+@am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/libamdis_la-ElementObjectData.Tpo" "$(DEPDIR)/libamdis_la-ElementObjectData.Plo"; else rm -f "$(DEPDIR)/libamdis_la-ElementObjectData.Tpo"; exit 1; fi
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$(SOURCE_DIR)/parallel/ElementObjectData.cc' object='libamdis_la-ElementObjectData.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -c -o libamdis_la-ElementObjectData.lo `test -f '$(SOURCE_DIR)/parallel/ElementObjectData.cc' || echo '$(srcdir)/'`$(SOURCE_DIR)/parallel/ElementObjectData.cc
+
 libamdis_la-ConditionalEstimator.lo: $(PARALLEL_DIR)/ConditionalEstimator.cc
 @am__fastdepCXX_TRUE@	if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libamdis_la_CXXFLAGS) $(CXXFLAGS) -MT libamdis_la-ConditionalEstimator.lo -MD -MP -MF "$(DEPDIR)/libamdis_la-ConditionalEstimator.Tpo" -c -o libamdis_la-ConditionalEstimator.lo `test -f '$(PARALLEL_DIR)/ConditionalEstimator.cc' || echo '$(srcdir)/'`$(PARALLEL_DIR)/ConditionalEstimator.cc; \
 @am__fastdepCXX_TRUE@	then mv -f "$(DEPDIR)/libamdis_la-ConditionalEstimator.Tpo" "$(DEPDIR)/libamdis_la-ConditionalEstimator.Plo"; else rm -f "$(DEPDIR)/libamdis_la-ConditionalEstimator.Tpo"; exit 1; fi
diff --git a/AMDiS/configure b/AMDiS/configure
index 8b1a4c6a..c6071d46 100755
--- a/AMDiS/configure
+++ b/AMDiS/configure
@@ -462,7 +462,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT AMDIS_DEBUG_TRUE AMDIS_DEBUG_FALSE CXX CC AMDIS_INTEL_TRUE AMDIS_INTEL_FALSE AMDIS_OPENMP_TRUE AMDIS_OPENMP_FALSE OPENMP_FLAG MPI_DIR PETSC_DIR USE_PARALLEL_AMDIS_TRUE USE_PARALLEL_AMDIS_FALSE USE_PARALLEL_DOMAIN_AMDIS_TRUE USE_PARALLEL_DOMAIN_AMDIS_FALSE ENABLE_UMFPACK_TRUE ENABLE_UMFPACK_FALSE ENABLE_MKL_TRUE ENABLE_MKL_FALSE DUNE_DIR ENABLE_DUNE_TRUE ENABLE_DUNE_FALSE ENABLE_BOOST_TRUE ENABLE_BOOST_FALSE CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT AMDIS_DEBUG_TRUE AMDIS_DEBUG_FALSE CXX CC AMDIS_INTEL_TRUE AMDIS_INTEL_FALSE AMDIS_OPENMP_TRUE AMDIS_OPENMP_FALSE OPENMP_FLAG MPI_DIR PETSC_DIR USE_PARALLEL_AMDIS_TRUE USE_PARALLEL_AMDIS_FALSE USE_PARALLEL_DOMAIN_AMDIS_TRUE USE_PARALLEL_DOMAIN_AMDIS_FALSE ENABLE_UMFPACK_TRUE ENABLE_UMFPACK_FALSE ENABLE_MKL_TRUE ENABLE_MKL_FALSE DUNE_DIR ENABLE_DUNE_TRUE ENABLE_DUNE_FALSE ENABLE_BOOST_TRUE ENABLE_BOOST_FALSE CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -3967,7 +3967,6 @@ do
     done
   done
 done
-IFS=$as_save_IFS
 lt_ac_max=0
 lt_ac_count=0
 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
@@ -4002,7 +4001,6 @@ done
 fi
 
 SED=$lt_cv_path_SED
-
 echo "$as_me:$LINENO: result: $SED" >&5
 echo "${ECHO_T}$SED" >&6
 
@@ -4443,7 +4441,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4446 "configure"' > conftest.$ac_ext
+  echo '#line 4444 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -5578,7 +5576,7 @@ fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:5581:" \
+echo "$as_me:5579:" \
      "checking for Fortran 77 compiler version" >&5
 ac_compiler=`set X $ac_compile; echo $2`
 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@@ -6641,11 +6639,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6644: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6642: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6648: \$? = $ac_status" >&5
+   echo "$as_me:6646: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -6909,11 +6907,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:6912: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:6910: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:6916: \$? = $ac_status" >&5
+   echo "$as_me:6914: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7013,11 +7011,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7016: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7014: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7020: \$? = $ac_status" >&5
+   echo "$as_me:7018: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -8478,31 +8476,10 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 8485 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -9379,7 +9356,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9382 "configure"
+#line 9359 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9479,7 +9456,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 9482 "configure"
+#line 9459 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -9810,9 +9787,6 @@ CC=$lt_compiler
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
 # An ERE matcher.
 EGREP=$lt_EGREP
 
@@ -9946,11 +9920,11 @@ striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -9962,7 +9936,7 @@ postdeps=$lt_postdeps
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -10042,7 +10016,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
 link_all_deplibs=$link_all_deplibs
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
 # Run-time system search path for libraries
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -11822,11 +11796,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11825: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11799: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:11829: \$? = $ac_status" >&5
+   echo "$as_me:11803: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -11926,11 +11900,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:11929: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:11903: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:11933: \$? = $ac_status" >&5
+   echo "$as_me:11907: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -12458,31 +12432,10 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 12465 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -12866,9 +12819,6 @@ CC=$lt_compiler_CXX
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC_CXX
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
 # An ERE matcher.
 EGREP=$lt_EGREP
 
@@ -13002,11 +12952,11 @@ striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_CXX
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_CXX
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -13018,7 +12968,7 @@ postdeps=$lt_postdeps_CXX
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -13098,7 +13048,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
 link_all_deplibs=$link_all_deplibs_CXX
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
 # Run-time system search path for libraries
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -13520,11 +13470,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13523: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13473: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13527: \$? = $ac_status" >&5
+   echo "$as_me:13477: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13624,11 +13574,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13627: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13577: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13631: \$? = $ac_status" >&5
+   echo "$as_me:13581: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15069,31 +15019,10 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 15076 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -15477,9 +15406,6 @@ CC=$lt_compiler_F77
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC_F77
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
 # An ERE matcher.
 EGREP=$lt_EGREP
 
@@ -15613,11 +15539,11 @@ striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_F77
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_F77
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -15629,7 +15555,7 @@ postdeps=$lt_postdeps_F77
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -15709,7 +15635,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
 link_all_deplibs=$link_all_deplibs_F77
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
 # Run-time system search path for libraries
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -15851,11 +15777,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15854: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15780: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15858: \$? = $ac_status" >&5
+   echo "$as_me:15784: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16119,11 +16045,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16122: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16048: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16126: \$? = $ac_status" >&5
+   echo "$as_me:16052: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -16223,11 +16149,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16226: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16152: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:16230: \$? = $ac_status" >&5
+   echo "$as_me:16156: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17688,31 +17614,10 @@ linux*)
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 17695 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
-
   # Append ld.so.conf contents to the search path
   if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -18096,9 +18001,6 @@ CC=$lt_compiler_GCJ
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC_GCJ
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
 # An ERE matcher.
 EGREP=$lt_EGREP
 
@@ -18232,11 +18134,11 @@ striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_GCJ
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_GCJ
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -18248,7 +18150,7 @@ postdeps=$lt_postdeps_GCJ
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -18328,7 +18230,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
 link_all_deplibs=$link_all_deplibs_GCJ
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
 # Run-time system search path for libraries
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -18580,9 +18482,6 @@ CC=$lt_compiler_RC
 # Is the compiler the GNU C compiler?
 with_gcc=$GCC_RC
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
 # An ERE matcher.
 EGREP=$lt_EGREP
 
@@ -18716,11 +18615,11 @@ striplib=$lt_striplib
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+predep_objects=$lt_predep_objects_RC
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+postdep_objects=$lt_postdep_objects_RC
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -18732,7 +18631,7 @@ postdeps=$lt_postdeps_RC
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method=$lt_deplibs_check_method
@@ -18812,7 +18711,7 @@ variables_saved_for_relink="$variables_saved_for_relink"
 link_all_deplibs=$link_all_deplibs_RC
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 
 # Run-time system search path for libraries
 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
@@ -19736,7 +19635,6 @@ s,@host@,$host,;t t
 s,@host_cpu@,$host_cpu,;t t
 s,@host_vendor@,$host_vendor,;t t
 s,@host_os@,$host_os,;t t
-s,@SED@,$SED,;t t
 s,@EGREP@,$EGREP,;t t
 s,@LN_S@,$LN_S,;t t
 s,@ECHO@,$ECHO,;t t
diff --git a/AMDiS/libtool b/AMDiS/libtool
index 6ccf9e9f..cce11351 100755
--- a/AMDiS/libtool
+++ b/AMDiS/libtool
@@ -30,10 +30,10 @@
 # the same distribution terms that you use for the rest of that program.
 
 # A sed program that does not truncate output.
-SED="/bin/sed"
+SED="/usr/bin/sed"
 
 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="/bin/sed -e 1s/^X//"
+Xsed="/usr/bin/sed -e 1s/^X//"
 
 # The HP-UX ksh and POSIX shell print the target directory to stdout
 # if CDPATH is set.
@@ -44,7 +44,7 @@ available_tags=" CXX F77"
 
 # ### BEGIN LIBTOOL CONFIG
 
-# Libtool was configured on host NWRW15:
+# Libtool was configured on host deimos101:
 
 # Shell to use when invoking shell scripts.
 SHELL="/bin/sh"
@@ -66,12 +66,12 @@ fast_install=yes
 
 # The host system.
 host_alias=
-host=i686-redhat-linux-gnu
+host=x86_64-unknown-linux-gnu
 host_os=linux-gnu
 
 # The build system.
 build_alias=
-build=i686-redhat-linux-gnu
+build=x86_64-unknown-linux-gnu
 build_os=linux-gnu
 
 # An echo program that does not interpret backslashes.
@@ -82,25 +82,22 @@ AR="ar"
 AR_FLAGS="cru"
 
 # A C compiler.
-LTCC="gcc"
+LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
 
 # LTCC compiler flags.
 LTCFLAGS="-g -O2"
 
 # A language-specific compiler.
-CC="gcc"
+CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
 
 # Is the compiler the GNU C compiler?
 with_gcc=yes
 
-gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
-gcc_ver=`gcc -dumpversion`
-
 # An ERE matcher.
 EGREP="grep -E"
 
 # The linker used to build libraries.
-LD="/usr/bin/ld"
+LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
 
 # Whether we need hard or soft links.
 LN_S="ln -s"
@@ -174,7 +171,7 @@ dlopen_self=unknown
 dlopen_self_static=unknown
 
 # Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
+link_static_flag=""
 
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=" -fno-builtin"
@@ -232,11 +229,11 @@ striplib="strip --strip-unneeded"
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+predep_objects=""
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+postdep_objects=""
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -248,7 +245,7 @@ postdeps=""
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+compiler_lib_search_path=""
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method="pass_all"
@@ -328,10 +325,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
 link_all_deplibs=unknown
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=`echo " /u/witkowski/local/lib/i386-redhat-linux/4.1.2/ /u/witkowski/local/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ /lib/i386-redhat-linux/4.1.2/ /lib/ /usr/lib/i386-redhat-linux/4.1.2/ /usr/lib/" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+sys_lib_search_path_spec=" /fastfs/wir/local/lib/x86_64-suse-linux/4.1.2/ /fastfs/wir/local/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/ /usr/lib/gcc/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/ /lib/x86_64-suse-linux/4.1.2/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.1.2/ /usr/lib/../lib64/ /fastfs/wir/local/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../ /lib/ /usr/lib/"
 
 # Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mysql /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib /usr/lib/xulrunner-1.9.2 "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
 
 # Fix the shell variable $srcfile for the compiler.
 fix_srcfile_path=""
@@ -7266,7 +7263,7 @@ disable_libs=static
 # End:
 # ### BEGIN LIBTOOL TAG CONFIG: CXX
 
-# Libtool was configured on host NWRW15:
+# Libtool was configured on host deimos101:
 
 # Shell to use when invoking shell scripts.
 SHELL="/bin/sh"
@@ -7288,12 +7285,12 @@ fast_install=yes
 
 # The host system.
 host_alias=
-host=i686-redhat-linux-gnu
+host=x86_64-unknown-linux-gnu
 host_os=linux-gnu
 
 # The build system.
 build_alias=
-build=i686-redhat-linux-gnu
+build=x86_64-unknown-linux-gnu
 build_os=linux-gnu
 
 # An echo program that does not interpret backslashes.
@@ -7304,25 +7301,22 @@ AR="ar"
 AR_FLAGS="cru"
 
 # A C compiler.
-LTCC="gcc"
+LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
 
 # LTCC compiler flags.
 LTCFLAGS="-g -O2"
 
 # A language-specific compiler.
-CC="g++"
+CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicxx"
 
 # Is the compiler the GNU C compiler?
 with_gcc=yes
 
-gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
-gcc_ver=`gcc -dumpversion`
-
 # An ERE matcher.
 EGREP="grep -E"
 
 # The linker used to build libraries.
-LD="/usr/bin/ld"
+LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
 
 # Whether we need hard or soft links.
 LN_S="ln -s"
@@ -7396,7 +7390,7 @@ dlopen_self=unknown
 dlopen_self_static=unknown
 
 # Compiler flag to prevent dynamic linking.
-link_static_flag="-static"
+link_static_flag=""
 
 # Compiler flag to turn off builtin functions.
 no_builtin_flag=" -fno-builtin"
@@ -7451,11 +7445,11 @@ striplib="strip --strip-unneeded"
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=`echo "/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.1.2/crtbeginS.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+predep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crti.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtbeginS.o"
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=`echo "/usr/lib/gcc/i386-redhat-linux/4.1.2/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../crtn.o" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+postdep_objects="/usr/lib64/gcc/x86_64-suse-linux/4.1.2/crtendS.o /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/crtn.o"
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -7463,11 +7457,11 @@ predeps=""
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
+postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -libverbs -lrt -lnuma -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=`echo "-L/u/witkowski/local/lib -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2 -L/usr/lib/gcc/i386-redhat-linux/4.1.2/../../.." | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+compiler_lib_search_path="-L/usr/lib64 -L/licsoft/libraries/openmpi/1.2.6/64bit/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2 -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/fastfs/wir/local/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib -L/usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../.."
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method="pass_all"
@@ -7547,10 +7541,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
 link_all_deplibs=unknown
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=`echo " /u/witkowski/local/lib/i386-redhat-linux/4.1.2/ /u/witkowski/local/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../i386-redhat-linux/4.1.2/ /usr/lib/gcc/i386-redhat-linux/4.1.2/../../../ /lib/i386-redhat-linux/4.1.2/ /lib/ /usr/lib/i386-redhat-linux/4.1.2/ /usr/lib/" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+sys_lib_search_path_spec=" /fastfs/wir/local/lib/x86_64-suse-linux/4.1.2/ /fastfs/wir/local/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/ /usr/lib/gcc/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/../lib64/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../x86_64-suse-linux/4.1.2/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../lib64/ /lib/x86_64-suse-linux/4.1.2/ /lib/../lib64/ /usr/lib/x86_64-suse-linux/4.1.2/ /usr/lib/../lib64/ /fastfs/wir/local/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc/x86_64-suse-linux/4.1.2/../../../ /lib/ /usr/lib/"
 
 # Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mysql /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib /usr/lib/xulrunner-1.9.2 "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
 
 # Fix the shell variable $srcfile for the compiler.
 fix_srcfile_path=""
@@ -7574,7 +7568,7 @@ include_expsyms=""
 
 # ### BEGIN LIBTOOL TAG CONFIG: F77
 
-# Libtool was configured on host NWRW15:
+# Libtool was configured on host deimos101:
 
 # Shell to use when invoking shell scripts.
 SHELL="/bin/sh"
@@ -7596,12 +7590,12 @@ fast_install=yes
 
 # The host system.
 host_alias=
-host=i686-redhat-linux-gnu
+host=x86_64-unknown-linux-gnu
 host_os=linux-gnu
 
 # The build system.
 build_alias=
-build=i686-redhat-linux-gnu
+build=x86_64-unknown-linux-gnu
 build_os=linux-gnu
 
 # An echo program that does not interpret backslashes.
@@ -7612,7 +7606,7 @@ AR="ar"
 AR_FLAGS="cru"
 
 # A C compiler.
-LTCC="gcc"
+LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
 
 # LTCC compiler flags.
 LTCFLAGS="-g -O2"
@@ -7621,16 +7615,13 @@ LTCFLAGS="-g -O2"
 CC="g77"
 
 # Is the compiler the GNU C compiler?
-with_gcc=yes
-
-gcc_dir=`gcc -print-file-name=. | /bin/sed 's,/\.$,,'`
-gcc_ver=`gcc -dumpversion`
+with_gcc=
 
 # An ERE matcher.
 EGREP="grep -E"
 
 # The linker used to build libraries.
-LD="/usr/bin/ld"
+LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
 
 # Whether we need hard or soft links.
 LN_S="ln -s"
@@ -7762,11 +7753,11 @@ striplib="strip --strip-unneeded"
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
-predep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+predep_objects=""
 
 # Dependencies to place after the objects being linked to create a
 # shared library.
-postdep_objects=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+postdep_objects=""
 
 # Dependencies to place before the objects being linked to create a
 # shared library.
@@ -7778,7 +7769,7 @@ postdeps=""
 
 # The library search path used internally by the compiler when linking
 # a shared library.
-compiler_lib_search_path=`echo "" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+compiler_lib_search_path=""
 
 # Method to check whether dependent libraries are shared objects.
 deplibs_check_method="pass_all"
@@ -7858,10 +7849,10 @@ variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COM
 link_all_deplibs=unknown
 
 # Compile-time system search path for libraries
-sys_lib_search_path_spec=`echo " /u/witkowski/local/lib/i386-redhat-linux/3.4.6/ /u/witkowski/local/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/lib/i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../../i386-redhat-linux/lib/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../i386-redhat-linux/3.4.6/ /usr/lib/gcc/i386-redhat-linux/3.4.6/../../../ /lib/i386-redhat-linux/3.4.6/ /lib/ /usr/lib/i386-redhat-linux/3.4.6/ /usr/lib/" | $SED -e "s@${gcc_dir}@\${gcc_dir}@g;s@${gcc_ver}@\${gcc_ver}@g"`
+sys_lib_search_path_spec=" /fastfs/wir/local/lib/x86_64-suse-linux/3.3.5/ /fastfs/wir/local/lib/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/ /usr/lib/gcc/x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/lib/x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../../x86_64-suse-linux/lib/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../x86_64-suse-linux/3.3.5/ /usr/lib64/gcc-lib/x86_64-suse-linux/3.3.5/../../../ /lib/x86_64-suse-linux/3.3.5/ /lib/ /usr/lib/x86_64-suse-linux/3.3.5/ /usr/lib/"
 
 # Run-time system search path for libraries
-sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/lib/mysql /usr/lib/octave-2.9.9 /usr/lib/qt-3.3/lib /usr/lib/qt4/lib /usr/lib/xulrunner-1.9.2 "
+sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib64/Xaw3d /usr/X11R6/lib64 /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/x86_64-suse-linux/lib /usr/local/lib64 /usr/local/lib /opt/kde3/lib64 /opt/kde3/lib /opt/gnome/lib64 /opt/gnome/lib /lib64 /lib /usr/lib64 /usr/lib /opt/cluster/intel/cce/9.1.042/lib /opt/cluster/intel/fce/9.1.036/lib /opt/cluster/Pathscale3.0/lib/2.9.99 /opt/cluster/Pathscale3.0/lib/2.9.99/32 /work/licsoft/compilers/pgi/linux86-64/6.2/lib /work/licsoft/compilers/pgi/linux86-64/6.2/libso "
 
 # Fix the shell variable $srcfile for the compiler.
 fix_srcfile_path=""
diff --git a/AMDiS/src/Triangle.cc b/AMDiS/src/Triangle.cc
index 703b3458..991f1929 100644
--- a/AMDiS/src/Triangle.cc
+++ b/AMDiS/src/Triangle.cc
@@ -158,6 +158,11 @@ namespace AMDiS {
   {
     FUNCNAME("Triange::getNonVertexDofs()");
 
+    if (bound.subObj == VERTEX)
+      return;
+
+    TEST_EXIT_DBG(bound.subObj == EDGE)("This should not happen!\n");
+
     bool addThisEdge = false;
     BoundaryObject nextBound = bound;
 
diff --git a/AMDiS/src/parallel/GlobalMatrixSolver.cc b/AMDiS/src/parallel/GlobalMatrixSolver.cc
index b950675c..ed69bb60 100644
--- a/AMDiS/src/parallel/GlobalMatrixSolver.cc
+++ b/AMDiS/src/parallel/GlobalMatrixSolver.cc
@@ -285,9 +285,8 @@ namespace AMDiS {
 		petscRowIdx - meshDistributor->getRstart() * nComponents;
 
 	      TEST_EXIT_DBG(localPetscRowIdx >= 0 && localPetscRowIdx < nRankRows)
-		("Should not happen! Wrong r = %d %d %d %d %d\n", 
-		 localPetscRowIdx, meshDistributor->getRstart(), *cursor, 
-		 meshDistributor->mapLocalToGlobal(*cursor), nRankRows);
+		("Should not happen! \n Debug info: localRowIdx = %d   globalRowIndx = %d   petscRowIdx = %d   localPetscRowIdx = %d   rStart = %d   nCompontens = %d   nRankRows = %d\n",
+		 *cursor, meshDistributor->mapLocalToGlobal(*cursor), petscRowIdx, localPetscRowIdx, meshDistributor->getRstart(), nComponents, nRankRows);
 	      
 	      // Traverse all non zero entries in this row.
 	      for (icursor_type icursor = begin<nz>(cursor), 
diff --git a/AMDiS/src/parallel/MeshDistributor.cc b/AMDiS/src/parallel/MeshDistributor.cc
index eb251a0a..154b16c1 100644
--- a/AMDiS/src/parallel/MeshDistributor.cc
+++ b/AMDiS/src/parallel/MeshDistributor.cc
@@ -3,8 +3,6 @@
 #include <fstream>
 #include <boost/lexical_cast.hpp>
 #include <boost/filesystem.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/tuple/tuple_comparison.hpp>
 
 #include "parallel/MeshDistributor.h"
 #include "parallel/ParallelDebug.h"
@@ -172,6 +170,7 @@ namespace AMDiS {
       debug::writeMesh(feSpace, -1, "gr_mesh");
 #endif
 
+      mesh->dofCompress();
       updateLocalGlobalNumbering();
       
       // === Update periodic mapping, if there are periodic boundaries. ===
@@ -991,25 +990,11 @@ namespace AMDiS {
   {
     FUNCNAME("MeshDistributor::createBoundaryDataStructure()");
 
-    // Maps to each vertex dof the set of all elements that include this 
-    // vertex. An element is denoted by a pair of two ints. The first is the
-    // element index, the second int denotes the local vertex index within
-    // the element.
-    std::map<DegreeOfFreedom, std::vector<ElementNeighbour> > vertexElements;
-    std::map<DofEdge, std::vector<ElementNeighbour> > edgeElements;
-    std::map<DofFace, std::vector<ElementNeighbour> > faceElements;
-
-    std::map<DegreeOfFreedom, std::map<int, ElementNeighbour> > vertexInRank;
-    std::map<DofEdge, std::map<int, ElementNeighbour> > edgeInRank;
-    std::map<DofFace, std::map<int, ElementNeighbour> > faceInRank;
+    ElementObjects elObjects(partitionVec);
 
     std::map<int, Element*> elIndexMap;
     std::map<int, int> elIndexTypeMap;
 
-    std::map<DegreeOfFreedom, int> vertexOwner;
-    std::map<DofEdge, int> edgeOwner;
-    std::map<DofFace, int> faceOwner;
-
     std::map<std::pair<DofEdge, DofEdge>, BoundaryType> periodicEdges;
     std::map<std::pair<DofFace, DofFace>, BoundaryType> periodicFaces;
 
@@ -1021,27 +1006,17 @@ namespace AMDiS {
 			  Mesh::CALL_LEAF_EL | Mesh::FILL_NEIGH | Mesh::FILL_BOUND);
     while (elInfo) {
       Element *el = elInfo->getElement();
-
       elIndexMap[el->getIndex()] = el;
       elIndexTypeMap[el->getIndex()] = elInfo->getType();
       
-      for (int i = 0; i < el->getGeo(VERTEX); i++) {
-	DegreeOfFreedom vertex = el->getDOF(i, 0);
-	vertexElements[vertex].push_back(ElementNeighbour(el->getIndex(), i));	
-	vertexOwner[vertex] = std::max(vertexOwner[vertex], partitionVec[el->getIndex()]);
-      }
+      for (int i = 0; i < el->getGeo(VERTEX); i++)
+	elObjects.addVertex(el->getDOF(i, 0), el->getIndex(), i);
 
-      for (int i = 0; i < el->getGeo(EDGE); i++) {
-	DofEdge edge = el->getEdge(i);
-	edgeElements[edge].push_back(ElementNeighbour(el->getIndex(), i));
-	edgeOwner[edge] = std::max(edgeOwner[edge], partitionVec[el->getIndex()]);
-      }
+      for (int i = 0; i < el->getGeo(EDGE); i++)
+	elObjects.addEdge(el->getEdge(i), el->getIndex(), i);      
 
-      for (int i = 0; i < el->getGeo(FACE); i++) {
-	DofFace face = el->getFace(i);
-	faceElements[face].push_back(ElementNeighbour(el->getIndex(), i));
-	faceOwner[face] = std::max(faceOwner[face], partitionVec[el->getIndex()]);
-      }
+      for (int i = 0; i < el->getGeo(FACE); i++)
+	elObjects.addFace(el->getFace(i), el->getIndex(), i);
 
 
       switch (mesh->getDim()) {
@@ -1073,246 +1048,112 @@ namespace AMDiS {
 
     // === PHASE 2 ===
 
-    for (std::map<DegreeOfFreedom, std::vector<ElementNeighbour> >::iterator it = vertexElements.begin();
-	 it != vertexElements.end(); ++it) {
-      for (std::vector<ElementNeighbour>::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
-	int elOwner = partitionVec[it2->elIndex];
-
-	if (it2->elIndex > vertexInRank[it->first][elOwner].elIndex)
-	  vertexInRank[it->first][elOwner] = *it2;
-      }
-    }
-
-
-    for (std::map<DofEdge, std::vector<ElementNeighbour> >::iterator it = edgeElements.begin();
-	 it != edgeElements.end(); ++it) {
-      for (std::vector<ElementNeighbour>::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
-	int elOwner = partitionVec[it2->elIndex];
-
-	if (it2->elIndex > edgeInRank[it->first][elOwner].elIndex)
-	  edgeInRank[it->first][elOwner] = *it2;
-      }
-    }
-
-    for (std::map<DofFace, std::vector<ElementNeighbour> >::iterator it = faceElements.begin();
-	 it != faceElements.end(); ++it) {
-      for (std::vector<ElementNeighbour>::iterator it2 = it->second.begin(); it2 != it->second.end(); ++it2) {
-	int elOwner = partitionVec[it2->elIndex];
-
-	if (it2->elIndex > faceInRank[it->first][elOwner].elIndex)
-	  faceInRank[it->first][elOwner] = *it2;
-      }
-    }
+    elObjects.createRankData();
 
     // === PHASE 3 ===
 
-    for (std::map<DegreeOfFreedom, std::map<int, ElementNeighbour> >::iterator it = vertexInRank.begin(); 
-	 it != vertexInRank.end(); ++it) {
-      if (it->second.count(mpiRank) && it->second.size() > 1) {
-	int owner = vertexOwner[it->first];
-	ElementNeighbour& rankBoundEl = it->second[mpiRank];
-
-	AtomicBoundary bound;	    	    
-	bound.rankObj.el = elIndexMap[rankBoundEl.elIndex];
-	bound.rankObj.elIndex = rankBoundEl.elIndex;
-	bound.rankObj.elType = elIndexTypeMap[rankBoundEl.elIndex];
-	bound.rankObj.subObj = VERTEX;
-	bound.rankObj.ithObj = rankBoundEl.ith;
-
-	if (owner == mpiRank) {
-	  for (std::map<int, ElementNeighbour>::iterator it2 = it->second.begin();
-	       it2 != it->second.end(); ++it2) {
-	    if (it2->first == mpiRank)
-	      continue;
-
-	    bound.neighObj.el = elIndexMap[it2->second.elIndex];
-	    bound.neighObj.elIndex = it2->second.elIndex;
-	    bound.neighObj.elType = -1;
-	    bound.neighObj.subObj = VERTEX;
-	    bound.neighObj.ithObj = it2->second.ith;
-
-	    TEST_EXIT_DBG(rankBoundEl.boundaryIndex == it2->second.boundaryIndex)
-	      ("Should not happen!\n");
-	    
-	    bound.type = rankBoundEl.boundaryIndex;
-
-	    AtomicBoundary& b = myIntBoundary.getNewAtomic(it2->first);
-	    b = bound;
-	    b.rankObj.setReverseMode(b.neighObj, feSpace);
-	  }
+    for (int geoPos = 0; geoPos < mesh->getDim(); geoPos++) {
+      GeoIndex geoIndex = INDEX_OF_DIM(geoPos, mesh->getDim());
 
-	} else {
-	  TEST_EXIT_DBG(it->second.count(owner) == 1)
-	    ("Should not happen!\n");
+      while (elObjects.iterate(geoIndex)) {
+	std::map<int, ElementObjectData>& objData = elObjects.getIterateData();
+	if (objData.count(mpiRank) && objData.size() > 1) {
+	  int owner = elObjects.getIterateOwner();
+	  ElementObjectData& rankBoundEl = objData[mpiRank];
 	  
-	  ElementNeighbour& ownerBoundEl = it->second[owner];
+	  AtomicBoundary bound;	    	    
+	  bound.rankObj.el = elIndexMap[rankBoundEl.elIndex];
+	  bound.rankObj.elIndex = rankBoundEl.elIndex;
+	  bound.rankObj.elType = elIndexTypeMap[rankBoundEl.elIndex];
+	  bound.rankObj.subObj = geoIndex;
+	  bound.rankObj.ithObj = rankBoundEl.ithObject;
+
+ 	  if (geoIndex == FACE)
+ 	    for (int edgeNo = 0; edgeNo < 6; edgeNo++)
+ 	      bound.rankObj.excludedSubstructures.push_back(std::make_pair(EDGE, edgeNo));
 	  
-	  bound.neighObj.el = elIndexMap[ownerBoundEl.elIndex];
-	  bound.neighObj.elIndex = ownerBoundEl.elIndex;
-	  bound.neighObj.elType = -1;
-	  bound.neighObj.subObj = VERTEX;
-	  bound.neighObj.ithObj = ownerBoundEl.ith;
-
-	  TEST_EXIT_DBG(rankBoundEl.boundaryIndex == ownerBoundEl.boundaryIndex)
-	    ("Should not happen!\n");
-
-	  bound.type = rankBoundEl.boundaryIndex;
-
-	  AtomicBoundary& b = otherIntBoundary.getNewAtomic(owner);
-	  b = bound;	 
-	  b.neighObj.setReverseMode(b.rankObj, feSpace);
-	}
-      }
-    }
-
-
-    for (std::map<DofEdge, std::map<int, ElementNeighbour> >::iterator it = edgeInRank.begin(); 
-	 it != edgeInRank.end(); ++it) {
-      if (it->second.count(mpiRank) && it->second.size() > 1) {
-	int owner = edgeOwner[it->first];
-	ElementNeighbour& rankBoundEl = it->second[mpiRank];
-
-	AtomicBoundary bound;	    	    
-	bound.rankObj.el = elIndexMap[rankBoundEl.elIndex];
-	bound.rankObj.elIndex = rankBoundEl.elIndex;
-	bound.rankObj.elType = elIndexTypeMap[rankBoundEl.elIndex];
-	bound.rankObj.subObj = EDGE;
-	bound.rankObj.ithObj = rankBoundEl.ith;
-
-	if (owner == mpiRank) {
-	  for (std::map<int, ElementNeighbour>::iterator it2 = it->second.begin();
-	       it2 != it->second.end(); ++it2) {
-	    if (it2->first == mpiRank)
-	      continue;
-
-	    bound.neighObj.el = elIndexMap[it2->second.elIndex];
-	    bound.neighObj.elIndex = it2->second.elIndex;
-	    bound.neighObj.elType = -1;
-	    bound.neighObj.subObj = EDGE;
-	    bound.neighObj.ithObj = it2->second.ith;
-
-	    TEST_EXIT_DBG(rankBoundEl.boundaryIndex == it2->second.boundaryIndex)
+	  
+	  if (owner == mpiRank) {
+	    for (std::map<int, ElementObjectData>::iterator it2 = objData.begin();
+		 it2 != objData.end(); ++it2) {
+	      if (it2->first == mpiRank)
+		continue;
+	      
+	      bound.neighObj.el = elIndexMap[it2->second.elIndex];
+	      bound.neighObj.elIndex = it2->second.elIndex;
+	      bound.neighObj.elType = -1;
+	      bound.neighObj.subObj = geoIndex;
+	      bound.neighObj.ithObj = it2->second.ithObject;
+	      
+	      TEST_EXIT_DBG(rankBoundEl.boundaryType == it2->second.boundaryType)
+		("Wrong boundary types: %d %d\n",
+		 rankBoundEl.boundaryType,
+		 it2->second.boundaryType);
+	      
+	      bound.type = rankBoundEl.boundaryType;
+	      
+	      AtomicBoundary& b = myIntBoundary.getNewAtomic(it2->first);
+	      b = bound;
+	      b.rankObj.setReverseMode(b.neighObj, feSpace);
+	    }
+	    
+	  } else {
+	    TEST_EXIT_DBG(objData.count(owner) == 1)
 	      ("Should not happen!\n");
 	    
-	    bound.type = rankBoundEl.boundaryIndex;
-
-	    AtomicBoundary& b = myIntBoundary.getNewAtomic(it2->first);
-	    b = bound;
-	    b.rankObj.setReverseMode(b.neighObj, feSpace);
-	  }
-
-	} else {
-	  TEST_EXIT_DBG(it->second.count(owner) == 1)
-	    ("Should not happen!\n");
-	  
-	  ElementNeighbour& ownerBoundEl = it->second[owner];
-	  
-	  bound.neighObj.el = elIndexMap[ownerBoundEl.elIndex];
-	  bound.neighObj.elIndex = ownerBoundEl.elIndex;
-	  bound.neighObj.elType = -1;
-	  bound.neighObj.subObj = EDGE;
-	  bound.neighObj.ithObj = ownerBoundEl.ith;
-
-	  TEST_EXIT_DBG(rankBoundEl.boundaryIndex == ownerBoundEl.boundaryIndex)
-	    ("Should not happen!\n");
-
-	  bound.type = rankBoundEl.boundaryIndex;
-
-	  AtomicBoundary& b = otherIntBoundary.getNewAtomic(owner);
-	  b = bound;	 
-	  b.neighObj.setReverseMode(b.rankObj, feSpace);
-	}
-      }
-    }
-
-
-    for (std::map<DofFace, std::map<int, ElementNeighbour> >::iterator it = faceInRank.begin(); 
-	 it != faceInRank.end(); ++it) {
-      if (it->second.count(mpiRank) && it->second.size() > 1) {
-	int owner = faceOwner[it->first];
-	ElementNeighbour& rankBoundEl = it->second[mpiRank];
-
-	AtomicBoundary bound;	    	    
-	bound.rankObj.el = elIndexMap[rankBoundEl.elIndex];
-	bound.rankObj.elIndex = rankBoundEl.elIndex;
-	bound.rankObj.elType = elIndexTypeMap[rankBoundEl.elIndex];
-	bound.rankObj.subObj = EDGE;
-	bound.rankObj.ithObj = rankBoundEl.ith;
-
-	if (owner == mpiRank) {
-	  for (std::map<int, ElementNeighbour>::iterator it2 = it->second.begin();
-	       it2 != it->second.end(); ++it2) {
-	    if (it2->first == mpiRank)
-	      continue;
-
-	    bound.neighObj.el = elIndexMap[it2->second.elIndex];
-	    bound.neighObj.elIndex = it2->second.elIndex;
+	    ElementObjectData& ownerBoundEl = objData[owner];
+	    
+	    bound.neighObj.el = elIndexMap[ownerBoundEl.elIndex];
+	    bound.neighObj.elIndex = ownerBoundEl.elIndex;
 	    bound.neighObj.elType = -1;
-	    bound.neighObj.subObj = FACE;
-	    bound.neighObj.ithObj = it2->second.ith;
-
-	    TEST_EXIT_DBG(rankBoundEl.boundaryIndex == it2->second.boundaryIndex)
-	      ("Should not happen!\n");
+	    bound.neighObj.subObj = geoIndex;
+	    bound.neighObj.ithObj = ownerBoundEl.ithObject;
 	    
-	    bound.type = rankBoundEl.boundaryIndex;
-
-	    AtomicBoundary& b = myIntBoundary.getNewAtomic(it2->first);
-	    b = bound;
-	    b.rankObj.setReverseMode(b.neighObj, feSpace);
+	    TEST_EXIT_DBG(rankBoundEl.boundaryType == ownerBoundEl.boundaryType)
+	      ("Should not happen: %d %d\n", 
+	       rankBoundEl.boundaryType, ownerBoundEl.boundaryType);
+	    
+	    bound.type = rankBoundEl.boundaryType;
+	    
+	    AtomicBoundary& b = otherIntBoundary.getNewAtomic(owner);
+	    b = bound;	 
+	    b.neighObj.setReverseMode(b.rankObj, feSpace);
 	  }
-
-	} else {
-	  TEST_EXIT_DBG(it->second.count(owner) == 1)
-	    ("Should not happen!\n");
-	  
-	  ElementNeighbour& ownerBoundEl = it->second[owner];
-	  
-	  bound.neighObj.el = elIndexMap[ownerBoundEl.elIndex];
-	  bound.neighObj.elIndex = ownerBoundEl.elIndex;
-	  bound.neighObj.elType = -1;
-	  bound.neighObj.subObj = FACE;
-	  bound.neighObj.ithObj = ownerBoundEl.ith;
-
-	  TEST_EXIT_DBG(rankBoundEl.boundaryIndex == ownerBoundEl.boundaryIndex)
-	    ("Should not happen!\n");
-
-	  bound.type = rankBoundEl.boundaryIndex;
-
-	  AtomicBoundary& b = otherIntBoundary.getNewAtomic(owner);
-	  b = bound;	 
-	  b.neighObj.setReverseMode(b.rankObj, feSpace);
 	}
       }
     }
-
+    
+    
     // === PHASE 4 ===
 
     for (std::map<std::pair<DofEdge, DofEdge>, BoundaryType>::iterator it = periodicEdges.begin();
 	 it != periodicEdges.end(); ++it) {
-      int perEdgeOwner0 = edgeOwner[it->first.first];
-      int perEdgeOwner1 = edgeOwner[it->first.second];
+      int perEdgeOwner0 = elObjects.getOwner(it->first.first);
+      int perEdgeOwner1 = elObjects.getOwner(it->first.second);
 
       if (perEdgeOwner0 == mpiRank) {
 	TEST_EXIT_DBG(perEdgeOwner0 != perEdgeOwner1)("Should not happen!\n");
-	TEST_EXIT_DBG(edgeElements[it->first.first].size() == 1)("Should not happen!\n");
-	TEST_EXIT_DBG(edgeElements[it->first.second].size() == 1)("Should not happen!\n");
+	TEST_EXIT_DBG(elObjects.getElements(it->first.first).size() == 1)
+	  ("Should not happen!\n");
+	TEST_EXIT_DBG(elObjects.getElements(it->first.second).size() == 1)
+	  ("Should not happen!\n");
 
 	int otherElementRank = perEdgeOwner1;
-	ElementNeighbour& perEdgeEl0 = edgeElements[it->first.first][0];
-	ElementNeighbour& perEdgeEl1 = edgeElements[it->first.second][0];
+	ElementObjectData& perEdgeEl0 = elObjects.getElements(it->first.first)[0];
+	ElementObjectData& perEdgeEl1 = elObjects.getElements(it->first.second)[0];
 
 	AtomicBoundary bound;	    	    
 	bound.rankObj.el = elIndexMap[perEdgeEl0.elIndex];
 	bound.rankObj.elIndex = perEdgeEl0.elIndex;
 	bound.rankObj.elType = elIndexTypeMap[perEdgeEl0.elIndex];
 	bound.rankObj.subObj = EDGE;
-	bound.rankObj.ithObj = perEdgeEl0.ith;
+	bound.rankObj.ithObj = perEdgeEl0.ithObject;
 
 	bound.neighObj.el = elIndexMap[perEdgeEl1.elIndex];
 	bound.neighObj.elIndex = perEdgeEl1.elIndex;
 	bound.neighObj.elType = -1;
 	bound.neighObj.subObj = EDGE;
-	bound.neighObj.ithObj = perEdgeEl1.ith;
+	bound.neighObj.ithObj = perEdgeEl1.ithObject;
 
 	bound.type = it->second;
 	
@@ -1325,7 +1166,7 @@ namespace AMDiS {
 	  b.neighObj.setReverseMode(b.rankObj, feSpace);
 
 	for (int i = 0; i < 2; i++) {
-	  int ithDofRankObj = bound.rankObj.el->getVertexOfEdge(perEdgeEl0.ith, i);
+	  int ithDofRankObj = bound.rankObj.el->getVertexOfEdge(perEdgeEl0.ithObject, i);
 	  DegreeOfFreedom dof = bound.rankObj.el->getDOF(ithDofRankObj, 0);
 	  
 	  int ithDofNeighObj = -1;	  
@@ -1379,7 +1220,7 @@ namespace AMDiS {
     DofContainer rankDofs, rankAllDofs;
     DofToRank boundaryDofs;
 
-    createDofMemberInfo(partitionDofs, rankDofs, rankAllDofs, boundaryDofs, vertexDof);
+    createDofMemberInfo(partitionDofs, rankDofs, rankAllDofs, boundaryDofs);
 
     nRankDofs = rankDofs.size();
     nOverallDofs = partitionDofs.size();
@@ -1558,39 +1399,18 @@ namespace AMDiS {
     ElementDofIterator elDofIt(feSpace);
     DofSet rankDofSet;
     
-    // The vertexDof list must be recreated from the scratch. Otherwise, it is possible
-    // that it maps dofs, that were removed (this is also possible, if the mesh was
-    // refined, e.g., center dofs of an element are not dofs of the children).
-    DofToBool oldVertexDof = vertexDof;
-    vertexDof.clear();
-
     TraverseStack stack;
     ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_LEAF_EL);
     while (elInfo) {
       elDofIt.reset(elInfo->getElement());
       do {
 	rankDofSet.insert(elDofIt.getDofPtr());
-	vertexDof[elDofIt.getDofPtr()] = false;
       } while(elDofIt.next());
 
       elInfo = stack.traverseNext(elInfo);
     }
 
 
-    elInfo = stack.traverseFirst(mesh, 0, Mesh::CALL_EL_LEVEL);
-    while (elInfo) {
-      Element *element = elInfo->getElement();     
-      elDofIt.reset(element);
-      elDofIt.reset(elInfo->getElement());
-      do {
- 	if (elDofIt.getCurrentPos() == 0) 
-	  vertexDof[elDofIt.getDofPtr()] = true;
-      } while(elDofIt.next());
-      
-      elInfo = stack.traverseNext(elInfo);
-    }
-
-
     DofContainer rankDofs;
     for (DofSet::iterator it = rankDofSet.begin(); it != rankDofSet.end(); ++it)
       rankDofs.push_back(*it);    
@@ -1739,10 +1559,8 @@ namespace AMDiS {
     debug::getAllDofs(feSpace, testDofs);
     for (std::set<const DegreeOfFreedom*>::iterator it = testDofs.begin();
 	 it != testDofs.end(); ++it) {
-      MSG("DOF %d:   mapLocalGlobalDofs = %d   vertexDof = %d    isRankDof = %d\n", **it, 
-	  mapLocalGlobalDofs[**it], 
-	  vertexDof[*it],
-	  isRankDof[**it]);
+      MSG("DOF %d:   mapLocalGlobalDofs = %d   isRankDof = %d\n", **it, 
+	  mapLocalGlobalDofs[**it], isRankDof[**it]);
     }
 #endif
 #endif
@@ -1801,14 +1619,12 @@ namespace AMDiS {
   void MeshDistributor::createDofMemberInfo(DofToPartitions& partitionDofs,
 					    DofContainer& rankOwnedDofs,
 					    DofContainer& rankAllDofs,
-					    DofToRank& boundaryDofs,
-					    DofToBool& isVertexDof)
+					    DofToRank& boundaryDofs)
   {
     partitionDofs.clear();
     rankOwnedDofs.clear();
     rankAllDofs.clear();
     boundaryDofs.clear();
-    isVertexDof.clear();
 
     // === Determine to each dof the set of partitions the dof belongs to. ===
 
@@ -1822,11 +1638,6 @@ namespace AMDiS {
       do {
 	// Determine to each dof the partition(s) it corresponds to.
 	partitionDofs[elDofIt.getDofPtr()].insert(partitionVec[element->getIndex()]);
-
-	if (elDofIt.getCurrentPos() == 0) 
-	  isVertexDof[elDofIt.getDofPtr()] = true;
-	else
-	  isVertexDof[elDofIt.getDofPtr()] = false;
       } while (elDofIt.next());
 
       elInfo = stack.traverseNext(elInfo);
@@ -1839,8 +1650,6 @@ namespace AMDiS {
     for (DofToPartitions::iterator it = partitionDofs.begin();
 	 it != partitionDofs.end(); ++it) {
 
-      bool isInRank = false;
-
       // iterate over all partition the current DOF is part of.
       for (std::set<int>::iterator itpart1 = it->second.begin();
 	   itpart1 != it->second.end(); ++itpart1) {
@@ -1871,14 +1680,10 @@ namespace AMDiS {
 	    boundaryDofs[it->first] = highestRank;
 	  }
 
-	  isInRank = true;
 	  break;
 	}
 
       }
-
-      if (!isInRank)
-	isVertexDof.erase(it->first);
     }
 
     sort(rankAllDofs.begin(), rankAllDofs.end(), cmpDofsByValue);
@@ -2070,7 +1875,6 @@ namespace AMDiS {
     SerUtil::serialize(out, mapLocalDofIndex);
     SerUtil::serialize(out, isRankDof);
 
-    serialize(out, vertexDof);
     serialize(out, periodicDof);
     serialize(out, periodicDofAssociations);
 
@@ -2122,7 +1926,6 @@ namespace AMDiS {
     SerUtil::deserialize(in, mapLocalDofIndex);
     SerUtil::deserialize(in, isRankDof);
 
-    deserialize(in, vertexDof, dofMap);
     deserialize(in, periodicDof);
     deserialize(in, periodicDofAssociations);
 
diff --git a/AMDiS/src/parallel/MeshDistributor.h b/AMDiS/src/parallel/MeshDistributor.h
index 611ef7ed..831ede8f 100644
--- a/AMDiS/src/parallel/MeshDistributor.h
+++ b/AMDiS/src/parallel/MeshDistributor.h
@@ -36,33 +36,13 @@
 #include "parallel/InteriorBoundary.h"
 #include "Serializer.h"
 #include "BoundaryManager.h"
+#include "ElementObjectData.h"
 #include "AMDiS_fwd.h"
 
 namespace AMDiS {
   
   class ParMetisPartitioner;
 
-  struct ElementNeighbour {
-    ElementNeighbour()
-      : elIndex(-1),
-	ith(0),
-	boundaryIndex(INTERIOR)
-    {}
-
-    ElementNeighbour(int a, int b, BoundaryType c = INTERIOR)
-      : elIndex(a),
-	ith(b),
-	boundaryIndex(c)
-    {}
-    
-    int elIndex;
-    
-    int ith;
-    
-    BoundaryType boundaryIndex;
-  };
-
-
   class MeshDistributor
   {
   protected:
@@ -313,8 +293,7 @@ namespace AMDiS {
     void createDofMemberInfo(DofToPartitions& partitionDofs,
 			     DofContainer& rankOwnedDofs,
 			     DofContainer& rankAllDofs,
-			     DofToRank& boundaryDofs,
-			     DofToBool& isVertexDof);
+			     DofToRank& boundaryDofs);
 
     /** \brief
      * Checks for all given interior boundaries if the elements fit together on both
@@ -534,12 +513,6 @@ namespace AMDiS {
      */
     DofIndexToBool isRankDof;
 
-    /** \brief
-     * Maps every dof pointer in ranks macro mesh to a boolean variable indicating 
-     * whether this dof is a vertex dof (true) or not (false).
-     */
-    DofToBool vertexDof;
-
     /** \brief
      * If periodic boundaries are used, this map stores, for each periodic boundary
      * type, for all DOFs in rank's partition (that are on periodic boundaries), the 
-- 
GitLab