Liebe Gitlab-Nutzerin, lieber Gitlab-Nutzer,
es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Die Konten der externen Nutzer:innen sind über den Reiter "Standard" erreichbar.
Die Administratoren


Dear Gitlab user,
it is now possible to log in to our service using the ZIH login/LDAP. The accounts of external users can be accessed via the "Standard" tab.
The administrators

Commit cdb9e4ad authored by Thomas Witkowski's avatar Thomas Witkowski
Browse files

Fixed incorrect MPI usage in parmetis partitioner.

parent 2a0239ea
......@@ -44,7 +44,7 @@ available_tags=" CXX F77"
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host deimos103:
# Libtool was configured on host mars:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......@@ -66,12 +66,12 @@ fast_install=yes
# The host system.
host_alias=
host=x86_64-unknown-linux-gnu
host=ia64-unknown-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=
build=x86_64-unknown-linux-gnu
build=ia64-unknown-linux-gnu
build_os=linux-gnu
# An echo program that does not interpret backslashes.
......@@ -82,13 +82,13 @@ AR="ar"
AR_FLAGS="cru"
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
# A language-specific compiler.
CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
CC="gcc"
# Is the compiler the GNU C compiler?
with_gcc=yes
......@@ -97,7 +97,7 @@ with_gcc=yes
EGREP="grep -E"
# The linker used to build libraries.
LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
LD="/usr/ia64-suse-linux/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
......@@ -147,7 +147,7 @@ pic_flag=" -fPIC -DPIC"
pic_mode=default
# What is the maximum length of a command?
max_cmd_len=32768
max_cmd_len=131072
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
......@@ -171,7 +171,7 @@ dlopen_self=unknown
dlopen_self_static=unknown
# Compiler flag to prevent dynamic linking.
link_static_flag=""
link_static_flag="-static"
# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"
......@@ -269,10 +269,10 @@ finish_eval=""
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
# This is the shared library runtime path variable.
runpath_var=LD_RUN_PATH
......@@ -325,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=" /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/ /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/"
sys_lib_search_path_spec=" /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ /lib/ia64-suse-linux/4.1.2/ /lib/ /usr/lib/ia64-suse-linux/4.1.2/ /usr/lib/"
# Run-time system search path for libraries
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 "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/ia64-suse-linux/lib /usr/local/lib /opt/kde3/lib /opt/gnome/lib /work/licsoft/lsf/6.2/linux2.6-glibc2.4-sn-ipf/lib /opt/sgi-dapl/lib /opt/tivoli/tsm/client/api/bin /usr/lib/sgi/intel9/ /usr/lib/sgi/intel8/ /usr/lib/sgi/intel7/ /usr/lib/sysadm/lib "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
......@@ -6760,7 +6760,7 @@ build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
# End:
# ### BEGIN LIBTOOL TAG CONFIG: CXX
# Libtool was configured on host deimos103:
# Libtool was configured on host mars:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......@@ -6782,12 +6782,12 @@ fast_install=yes
# The host system.
host_alias=
host=x86_64-unknown-linux-gnu
host=ia64-unknown-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=
build=x86_64-unknown-linux-gnu
build=ia64-unknown-linux-gnu
build_os=linux-gnu
# An echo program that does not interpret backslashes.
......@@ -6798,13 +6798,13 @@ AR="ar"
AR_FLAGS="cru"
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
# A language-specific compiler.
CC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpiCC"
CC="g++"
# Is the compiler the GNU C compiler?
with_gcc=yes
......@@ -6813,7 +6813,7 @@ with_gcc=yes
EGREP="grep -E"
# The linker used to build libraries.
LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
LD="/usr/ia64-suse-linux/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
......@@ -6863,7 +6863,7 @@ pic_flag=" -fPIC -DPIC"
pic_mode=default
# What is the maximum length of a command?
max_cmd_len=32768
max_cmd_len=131072
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
......@@ -6887,7 +6887,7 @@ dlopen_self=unknown
dlopen_self_static=unknown
# Compiler flag to prevent dynamic linking.
link_static_flag=""
link_static_flag="-static"
# Compiler flag to turn off builtin functions.
no_builtin_flag=" -fno-builtin"
......@@ -6942,11 +6942,11 @@ striplib="strip --strip-unneeded"
# Dependencies to place before the objects being linked to create a
# shared library.
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"
predep_objects="/usr/lib/gcc/ia64-suse-linux/4.1.2/../../../crti.o /usr/lib/gcc/ia64-suse-linux/4.1.2/crtbeginS.o"
# Dependencies to place after the objects being linked to create a
# shared library.
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"
postdep_objects="/usr/lib/gcc/ia64-suse-linux/4.1.2/crtendS.o /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../crtn.o"
# Dependencies to place before the objects being linked to create a
# shared library.
......@@ -6954,11 +6954,11 @@ predeps=""
# Dependencies to place after the objects being linked to create a
# shared library.
postdeps="-lmpi_cxx -lmpi -lopen-rte -lopen-pal -libverbs -lrt -lnuma -ldl -lnsl -lutil -ldl -lstdc++ -lm -lgcc_s -lpthread -lc -lgcc_s"
postdeps="-lstdc++ -lm -lgcc_s -lunwind -lc -lgcc_s -lunwind"
# The library search path used internally by the compiler when linking
# a shared library.
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/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/../../.."
compiler_lib_search_path="-L/usr/lib/gcc/ia64-suse-linux/4.1.2 -L/usr/lib/gcc/ia64-suse-linux/4.1.2 -L/usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib -L/usr/lib/gcc/ia64-suse-linux/4.1.2/../../.."
# Method to check whether dependent libraries are shared objects.
deplibs_check_method="pass_all"
......@@ -6982,10 +6982,10 @@ finish_eval=""
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
# This is the shared library runtime path variable.
runpath_var=LD_RUN_PATH
......@@ -7038,10 +7038,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=" /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/ /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/"
sys_lib_search_path_spec=" /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ /lib/ia64-suse-linux/4.1.2/ /lib/ /usr/lib/ia64-suse-linux/4.1.2/ /usr/lib/"
# Run-time system search path for libraries
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 "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/ia64-suse-linux/lib /usr/local/lib /opt/kde3/lib /opt/gnome/lib /work/licsoft/lsf/6.2/linux2.6-glibc2.4-sn-ipf/lib /opt/sgi-dapl/lib /opt/tivoli/tsm/client/api/bin /usr/lib/sgi/intel9/ /usr/lib/sgi/intel8/ /usr/lib/sgi/intel7/ /usr/lib/sysadm/lib "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
......@@ -7065,7 +7065,7 @@ include_expsyms=""
# ### BEGIN LIBTOOL TAG CONFIG: F77
# Libtool was configured on host deimos103:
# Libtool was configured on host mars:
# Shell to use when invoking shell scripts.
SHELL="/bin/sh"
......@@ -7087,12 +7087,12 @@ fast_install=yes
# The host system.
host_alias=
host=x86_64-unknown-linux-gnu
host=ia64-unknown-linux-gnu
host_os=linux-gnu
# The build system.
build_alias=
build=x86_64-unknown-linux-gnu
build=ia64-unknown-linux-gnu
build_os=linux-gnu
# An echo program that does not interpret backslashes.
......@@ -7103,22 +7103,22 @@ AR="ar"
AR_FLAGS="cru"
# A C compiler.
LTCC="/licsoft/libraries/openmpi/1.2.6/64bit/bin/mpicc"
LTCC="gcc"
# LTCC compiler flags.
LTCFLAGS="-g -O2"
# A language-specific compiler.
CC="g77"
CC="gfortran"
# Is the compiler the GNU C compiler?
with_gcc=
with_gcc=yes
# An ERE matcher.
EGREP="grep -E"
# The linker used to build libraries.
LD="/usr/x86_64-suse-linux/bin/ld -m elf_x86_64"
LD="/usr/ia64-suse-linux/bin/ld"
# Whether we need hard or soft links.
LN_S="ln -s"
......@@ -7168,7 +7168,7 @@ pic_flag=" -fPIC"
pic_mode=default
# What is the maximum length of a command?
max_cmd_len=32768
max_cmd_len=131072
# Does compiler simultaneously support -c and -o options?
compiler_c_o="yes"
......@@ -7290,10 +7290,10 @@ finish_eval=""
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
global_symbol_to_cdecl="sed -n -e 's/^T .* \\(.*\\)\$/extern int \\1();/p' -e 's/^[ABCDGIRSTW]* .* \\(.*\\)\$/extern char \\1;/p'"
# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[ABCDGIRSTW]* \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
# This is the shared library runtime path variable.
runpath_var=LD_RUN_PATH
......@@ -7346,10 +7346,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=" /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/"
sys_lib_search_path_spec=" /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../../ia64-suse-linux/lib/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ia64-suse-linux/4.1.2/ /usr/lib/gcc/ia64-suse-linux/4.1.2/../../../ /lib/ia64-suse-linux/4.1.2/ /lib/ /usr/lib/ia64-suse-linux/4.1.2/ /usr/lib/"
# Run-time system search path for libraries
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 "
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib/Xaw3d /usr/X11R6/lib /usr/ia64-suse-linux/lib /usr/local/lib /opt/kde3/lib /opt/gnome/lib /work/licsoft/lsf/6.2/linux2.6-glibc2.4-sn-ipf/lib /opt/sgi-dapl/lib /opt/tivoli/tsm/client/api/bin /usr/lib/sgi/intel9/ /usr/lib/sgi/intel8/ /usr/lib/sgi/intel7/ /usr/lib/sysadm/lib "
# Fix the shell variable $srcfile for the compiler.
fix_srcfile_path=""
......
#include <queue>
#include "ParMetisPartitioner.h"
#include "Mesh.h"
#include "Traverse.h"
......@@ -8,11 +9,9 @@
#include "DOFVector.h"
#include "mpi.h"
#include <queue>
namespace AMDiS {
ParMetisMesh::ParMetisMesh(Mesh *mesh, MPI::Comm *comm)
ParMetisMesh::ParMetisMesh(Mesh *mesh, MPI::Intracomm *comm)
: dim(mesh->getDim()),
nElements(0),
mpiComm(comm)
......@@ -51,11 +50,10 @@ namespace AMDiS {
elmdist = new int[mpiSize + 1];
elem_p2a = new int[nElements];
if (dim == dow) {
if (dim == dow)
xyz = new float[nElements * dim];
} else {
xyz = NULL;
}
else
xyz = NULL;
eptr[0] = 0;
......@@ -67,9 +65,8 @@ namespace AMDiS {
mpiComm->Allgather(&nElements, 1, MPI_INT, elmdist + 1, 1, MPI_INT);
elmdist[0] = 0;
for (int i = 2; i < mpiSize + 1; i++) {
for (int i = 2; i < mpiSize + 1; i++)
elmdist[i] += elmdist[i - 1];
}
// traverse mesh and fill distributed ParMETIS data
DimVec<double> bary(dim, DEFAULT_VALUE, 1.0 / (dim + 1));
......@@ -141,7 +138,7 @@ namespace AMDiS {
}
ParMetisGraph::ParMetisGraph(ParMetisMesh *parMesh,
MPI::Comm *comm,
MPI::Intracomm *comm,
int ncommonnodes)
: parMetisMesh(parMesh)
{
......@@ -201,11 +198,11 @@ namespace AMDiS {
new PartitionElementData(element->getElementData());
element->setElementData(elData);
if (totalElementCounter % mpiSize == mpiRank) {
if (totalElementCounter % mpiSize == mpiRank)
elData->setPartitionStatus(IN);
} else {
else
elData->setPartitionStatus(UNDEFINED);
}
totalElementCounter++;
elInfo = stack.traverseNext(elInfo);
......@@ -475,9 +472,8 @@ namespace AMDiS {
for (int i = 0; i < mpiSize; i++) {
int *rankStart = rankElements + recvBufferOffset[i];
int *rankEnd = rankStart + nRankElements[i];
for (int *rankPtr = rankStart; rankPtr < rankEnd; ++rankPtr) {
for (int *rankPtr = rankStart; rankPtr < rankEnd; ++rankPtr)
elementInPartition[*rankPtr] = true;
}
}
TraverseStack stack;
......@@ -491,11 +487,11 @@ namespace AMDiS {
if (partitionData && partitionData->getLevel() == 0) {
int amdisIndex = element->getIndex();
if (elementInPartition[amdisIndex]) {
if (elementInPartition[amdisIndex])
partitionData->setPartitionStatus(IN);
} else {
else
partitionData->setPartitionStatus(OUT);
}
descendPartitionData(element);
}
......@@ -551,12 +547,10 @@ namespace AMDiS {
PartitionElementData *partitionData = dynamic_cast<PartitionElementData*>
(element->getElementData(PARTITION_ED));
if (partitionData) {
if (partitionData->getLevel() == 0) {
if (partitionData->getLevel() == 0)
partition = (*(coarseVec))[element->getIndex()];
}
if(element->isLeaf()) {
if (element->isLeaf())
(*(fineVec))[element->getIndex()] = partition;
}
}
elInfo = stack.traverseNext(elInfo);
}
......
......@@ -25,7 +25,9 @@
#include <map>
#include <set>
#include "parmetis.h"
#include <Global.h>
#include "Global.h"
#include "mpi.h"
namespace AMDiS {
class FiniteElemSpace;
......@@ -43,53 +45,64 @@ namespace AMDiS {
class ParMetisMesh
{
public:
ParMetisMesh(Mesh *mesh, MPI::Comm *comm);
ParMetisMesh(Mesh *mesh, MPI::Intracomm *comm);
~ParMetisMesh();
inline void setParMetisIndex(int amdisIndex, int parMetisIndex) {
inline void setParMetisIndex(int amdisIndex, int parMetisIndex)
{
elem_a2p[amdisIndex] = parMetisIndex + 1;
}
inline int getParMetisIndex(int amdisIndex) {
inline int getParMetisIndex(int amdisIndex)
{
int result = elem_a2p[amdisIndex];
TEST_EXIT(result > 0)("invalid index\n");
return result - 1;
}
inline void setAMDiSIndex(int parMetisIndex, int amdisIndex) {
inline void setAMDiSIndex(int parMetisIndex, int amdisIndex)
{
elem_p2a[parMetisIndex] = amdisIndex;
}
inline int getAMDiSIndex(int parMetisIndex) {
inline int getAMDiSIndex(int parMetisIndex)
{
return elem_p2a[parMetisIndex];
}
inline int *getAMDiSIndices() {
inline int *getAMDiSIndices()
{
return elem_p2a;
}
inline int *getElementPtr() {
inline int *getElementPtr()
{
return eptr;
}
inline int *getElementInd() {
inline int *getElementInd()
{
return eind;
}
inline int *getElementDist() {
inline int *getElementDist()
{
return elmdist;
}
inline int getDim() {
inline int getDim()
{
return dim;
}
inline float *getXYZ() {
inline float *getXYZ()
{
return xyz;
}
inline int getNumElements() {
inline int getNumElements()
{
return nElements;
}
......@@ -119,7 +132,7 @@ namespace AMDiS {
int *elem_p2a;
/// The MPI communicator that should be used for mesh partition.
MPI::Comm *mpiComm;
MPI::Intracomm *mpiComm;
};
......@@ -127,16 +140,18 @@ namespace AMDiS {
{
public:
ParMetisGraph(ParMetisMesh *parMetisMesh,
MPI::Comm *comm,
MPI::Intracomm *comm,
int ncommonnodes = -1);
~ParMetisGraph();
inline int *getXAdj() {
inline int *getXAdj()
{
return xadj;
}
inline int *getAdjncy() {
inline int *getAdjncy()
{
return adjncy;
}
......@@ -152,7 +167,7 @@ namespace AMDiS {
class ParMetisPartitioner
{
public:
ParMetisPartitioner(Mesh *mesh, MPI::Comm *comm)
ParMetisPartitioner(Mesh *mesh, MPI::Intracomm *comm)
: mesh_(mesh),
mpiComm(comm),
parMetisMesh(NULL)
......@@ -187,7 +202,7 @@ namespace AMDiS {
protected:
Mesh *mesh_;
MPI::Comm *mpiComm;
MPI::Intracomm *mpiComm;
ParMetisMesh *parMetisMesh;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment