Zoltan is added as thirdParty package

This commit is contained in:
Hamidreza
2025-05-15 21:58:43 +03:30
parent 83a6e4baa1
commit d7479cf1bd
3392 changed files with 318142 additions and 1 deletions

View File

@ -0,0 +1,12 @@
TRIBITS_ADD_EXECUTABLE_AND_TEST(
exampleBLOCK
SOURCES exampleBLOCK.cpp
ARGS
COMM serial mpi
NUM_MPI_PROCS 1-4
)
TRIBITS_COPY_FILES_TO_BINARY_DIR(CPPExamplesCopyFile
SOURCE_FILES objects.txt
)

View File

@ -0,0 +1,60 @@
# @HEADER
#
########################################################################
#
# Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
# Copyright 2012 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Questions? Contact Karen Devine kddevin@sandia.gov
# Erik Boman egboman@sandia.gov
#
########################################################################
#
# @HEADER
# The following line helps the test harness recover from build errors.
all-local:
include $(top_builddir)/Makefile.export.zoltan
EXEEXT = .exe
noinst_PROGRAMS = exampleBLOCK
exampleBLOCK_SOURCES = exampleBLOCK.cpp
exampleBLOCK_DEPENDENCIES = $(ZOLTAN_DEPS)
exampleBLOCK_CXXFLAGS = $(ZOLTAN_INCLUDES)
exampleBLOCK_LDADD = $(ZOLTAN_LIBS)
EXTRA_DIST = classicMakefile objects.txt

View File

@ -0,0 +1,544 @@
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# @HEADER
#
########################################################################
#
# Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
# Copyright 2012 Sandia Corporation
#
# Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
# the U.S. Government retains certain rights in this software.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the Corporation nor the names of the
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# Questions? Contact Karen Devine kddevin@sandia.gov
# Erik Boman egboman@sandia.gov
#
########################################################################
#
# @HEADER
# The following line helps the test harness recover from build errors.
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
noinst_PROGRAMS = exampleBLOCK$(EXEEXT)
subdir = example/CPP
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/config/ax_f90_module_case.m4 \
$(top_srcdir)/config/ax_f90_module_flag.m4 \
$(top_srcdir)/config/tac_arg_check_mpi.m4 \
$(top_srcdir)/config/tac_arg_enable_export-makefiles.m4 \
$(top_srcdir)/config/tac_arg_enable_feature.m4 \
$(top_srcdir)/config/tac_arg_enable_feature_sub.m4 \
$(top_srcdir)/config/tac_arg_enable_feature_sub_check.m4 \
$(top_srcdir)/config/tac_arg_enable_option.m4 \
$(top_srcdir)/config/tac_arg_with_3pl_sub.m4 \
$(top_srcdir)/config/tac_arg_with_ar.m4 \
$(top_srcdir)/config/tac_arg_with_flags.m4 \
$(top_srcdir)/config/tac_arg_with_incdirs.m4 \
$(top_srcdir)/config/tac_arg_with_libdirs.m4 \
$(top_srcdir)/config/tac_arg_with_libs.m4 \
$(top_srcdir)/config/tac_arg_with_package.m4 \
$(top_srcdir)/config/tac_arg_with_perl.m4 \
$(top_srcdir)/config/wk_fc_get_vendor.m4 \
$(top_srcdir)/config/zac_arg_config_mpi.m4 \
$(top_srcdir)/config/zac_arg_with_id.m4 \
$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/src/include/Zoltan_config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
PROGRAMS = $(noinst_PROGRAMS)
am_exampleBLOCK_OBJECTS = exampleBLOCK-exampleBLOCK.$(OBJEXT)
exampleBLOCK_OBJECTS = $(am_exampleBLOCK_OBJECTS)
exampleBLOCK_LINK = $(CXXLD) $(exampleBLOCK_CXXFLAGS) $(CXXFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src/include
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
SOURCES = $(exampleBLOCK_SOURCES)
DIST_SOURCES = $(exampleBLOCK_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
ALTERNATE_AR = @ALTERNATE_AR@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EXEEXT = .exe
FC = @FC@
FCFLAGS = @FCFLAGS@
FCFLAGS_f = @FCFLAGS_f@
FCFLAGS_f90 = @FCFLAGS_f90@
FCLIBS = @FCLIBS@
FC_MAJOR_VERSION = @FC_MAJOR_VERSION@
FC_MODNAME = @FC_MODNAME@
FC_MODNAME_Q = @FC_MODNAME_Q@
FC_VENDOR = @FC_VENDOR@
FC_VERSION = @FC_VERSION@
FC_VERSION_STRING = @FC_VERSION_STRING@
HAVE_PERL = @HAVE_PERL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
MPI_CC = @MPI_CC@
MPI_CXX = @MPI_CXX@
MPI_FC = @MPI_FC@
MPI_RECV_LIMIT_FLAG = @MPI_RECV_LIMIT_FLAG@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PERL_EXE = @PERL_EXE@
RANLIB = @RANLIB@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_aux_dir = @ac_aux_dir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_FC = @ac_ct_FC@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
target_cpu = @target_cpu@
target_os = @target_os@
target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
exampleBLOCK_SOURCES = exampleBLOCK.cpp
exampleBLOCK_DEPENDENCIES = $(ZOLTAN_DEPS)
exampleBLOCK_CXXFLAGS = $(ZOLTAN_INCLUDES)
exampleBLOCK_LDADD = $(ZOLTAN_LIBS)
EXTRA_DIST = classicMakefile objects.txt
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .o .obj
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu example/CPP/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu example/CPP/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
exampleBLOCK$(EXEEXT): $(exampleBLOCK_OBJECTS) $(exampleBLOCK_DEPENDENCIES) $(EXTRA_exampleBLOCK_DEPENDENCIES)
@rm -f exampleBLOCK$(EXEEXT)
$(exampleBLOCK_LINK) $(exampleBLOCK_OBJECTS) $(exampleBLOCK_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exampleBLOCK-exampleBLOCK.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
exampleBLOCK-exampleBLOCK.o: exampleBLOCK.cpp
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(exampleBLOCK_CXXFLAGS) $(CXXFLAGS) -MT exampleBLOCK-exampleBLOCK.o -MD -MP -MF $(DEPDIR)/exampleBLOCK-exampleBLOCK.Tpo -c -o exampleBLOCK-exampleBLOCK.o `test -f 'exampleBLOCK.cpp' || echo '$(srcdir)/'`exampleBLOCK.cpp
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/exampleBLOCK-exampleBLOCK.Tpo $(DEPDIR)/exampleBLOCK-exampleBLOCK.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exampleBLOCK.cpp' object='exampleBLOCK-exampleBLOCK.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(exampleBLOCK_CXXFLAGS) $(CXXFLAGS) -c -o exampleBLOCK-exampleBLOCK.o `test -f 'exampleBLOCK.cpp' || echo '$(srcdir)/'`exampleBLOCK.cpp
exampleBLOCK-exampleBLOCK.obj: exampleBLOCK.cpp
@am__fastdepCXX_TRUE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(exampleBLOCK_CXXFLAGS) $(CXXFLAGS) -MT exampleBLOCK-exampleBLOCK.obj -MD -MP -MF $(DEPDIR)/exampleBLOCK-exampleBLOCK.Tpo -c -o exampleBLOCK-exampleBLOCK.obj `if test -f 'exampleBLOCK.cpp'; then $(CYGPATH_W) 'exampleBLOCK.cpp'; else $(CYGPATH_W) '$(srcdir)/exampleBLOCK.cpp'; fi`
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/exampleBLOCK-exampleBLOCK.Tpo $(DEPDIR)/exampleBLOCK-exampleBLOCK.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='exampleBLOCK.cpp' object='exampleBLOCK-exampleBLOCK.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(exampleBLOCK_CXXFLAGS) $(CXXFLAGS) -c -o exampleBLOCK-exampleBLOCK.obj `if test -f 'exampleBLOCK.cpp'; then $(CYGPATH_W) 'exampleBLOCK.cpp'; else $(CYGPATH_W) '$(srcdir)/exampleBLOCK.cpp'; fi`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS) all-local
installdirs:
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am:
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am all-local check check-am clean \
clean-generic clean-noinstPROGRAMS ctags distclean \
distclean-compile distclean-generic distclean-tags distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-html install-html-am \
install-info install-info-am install-man install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
uninstall-am
all-local:
include $(top_builddir)/Makefile.export.zoltan
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -0,0 +1,77 @@
##
## a basic makefile to build examples
##
##
## The default type for a Zoltan global ID is "int". This can be changed
## with compile-time flags like:
##
## -DZOLTAN_ID_TYPE_LONG_LONG
##
## See src/include/zoltan_types.h for the valid id type macros. If Zoltan was compiled
## with one of these flags, then these examples need to be compiled with the same flag.
##
ID_TYPE_FLAG=-DZOLTAN_ID_TYPE_LONG_LONG
##
## Location of zoltan library, also location of Zoltan_config.h if
## using the autoconf build
BLD=../../build_both/src
##
## Location of zoltan "src" directory (for header files)
##
SRC=../../src
# Location of zoltan header files
ZOLTAN_INCLUDE=-I$(SRC)/include
##
## For an autoconf build, the location of Zoltan_config.h
##
ZOLTAN_CONFIG_INCLUDE=-I$(BLD)/include
##
## Headers for zoltan utilities, not often used by applications
## Needed for use of Zoltan_Hash in simpleGRAPH.c
##
ZOLTAN_UTIL_INCLUDE=-I$(SRC)/zz \
-I$(SRC)/par \
-I$(SRC)/order \
-I$(SRC)/tpls \
-I$(SRC)/lb \
-I$(SRC)/params \
-I$(SRC)/Utilities/shared
##
## If Zoltan was built with a third party library, provide the information required
## to link with that library.
##
SCOTCH=/home/lriesen/system/scotch_5.1.10a-32
PARMETIS=/home/lafisk/system/parmetis/ParMetis-3.1
TPL_LIB_DIR=-L$(PARMETIS) -L$(SCOTCH)/lib
TPL_INCLUDE=-I$(PARMETIS) -I$(SCOTCH)/include
TPL_LIBS=-lparmetis -lmetis -lptscotch -lscotch -lptscotcherr -lscotcherr
CXX=mpicxx
CXXFLAGS =$(ID_TYPE_FLAG)
EXAMPLE_NAMES = exampleBLOCK graphHier.cpp
all: $(EXAMPLE_NAMES)
%: %.cpp
$(CXX) $(CXXFLAGS) $(TPL_LIB_DIR) \
-I$(BLD)/include $(TPL_INCLUDE) $(ZOLTAN_INCLUDE) $(ZOLTAN_UTIL_INCLUDE) \
-o $@ $< $(BLD)/libzoltan.a $(TPL_LIBS) -lm
clean:
@rm -rf $(EXAMPLE_NAMES)

View File

@ -0,0 +1,542 @@
/*
* @HEADER
*
* ***********************************************************************
*
* Zoltan Toolkit for Load-balancing, Partitioning, Ordering and Coloring
* Copyright 2012 Sandia Corporation
*
* Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
* the U.S. Government retains certain rights in this software.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the Corporation nor the names of the
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Questions? Contact Karen Devine kddevin@sandia.gov
* Erik Boman egboman@sandia.gov
*
* ***********************************************************************
*
* @HEADER
*/
//
// Basic C++ example of using Zoltan to compute a quick partitioning
// of a set of objects.
//
#ifdef MPICPP
#undef MPICPP
#endif /* MPICPP */
//#define MPICPP // Uncomment to use C++ interface for MPI.
#include <mpi.h>
#include <stdio.h>
#include <zoltan_cpp.h>
// Class representing collection of objects to be partitioned.
class objectCollection {
private:
int numGlobalObjects;
int numMyObjects;
int *myGlobalIDs;
public:
// constructor
objectCollection():numGlobalObjects(0), numMyObjects(0), myGlobalIDs(NULL){}
// destructor
~objectCollection(){ if (myGlobalIDs) delete [] myGlobalIDs;}
void set_num_global_objects(int n) {numGlobalObjects = n;}
int get_num_global_objects() {return numGlobalObjects;}
void set_num_my_objects(int n) {numMyObjects = n;}
int get_num_my_objects() {return numMyObjects;}
void set_my_global_ids(int *p) {myGlobalIDs = p;}
int *get_my_global_ids() {return myGlobalIDs;}
// query functions that respond to requests from Zoltan
static int get_number_of_objects(void *data, int *ierr){
objectCollection *objs = (objectCollection *)data;
*ierr = ZOLTAN_OK;
return objs->numMyObjects;
}
static void get_object_list(void *data, int sizeGID, int sizeLID,
ZOLTAN_ID_PTR globalID, ZOLTAN_ID_PTR localID,
int wgt_dim, float *obj_wgts, int *ierr){
objectCollection *objs = (objectCollection *)data;
*ierr = ZOLTAN_OK;
// In this example, return the IDs of our objects, but no weights.
// Zoltan will assume equally weighted objects.
for (int i=0; i<objs->get_num_my_objects(); i++){
globalID[i] = objs->get_my_global_ids()[i];
localID[i] = i;
}
return;
}
};
static const char *global_fname="objects.txt"; // File containing objects to be partitioned.
static int get_next_line(FILE *fp, char *buf, int bufsize);
static void input_file_error(int numProcs, int tag, int startProc);
static void showSimpleMeshPartitions(int myProc, int numIDs, int *GIDs, int *parts);
static void read_input_objects(int myRank, int numProcs, const char *fname, objectCollection &myData);
static void MPIExit()
{
#ifdef MPICPP
MPI::Finalize();
#else
MPI_Finalize();
#endif
}
int main(int argc, char *argv[])
{
/////////////////////////////////
// Initialize MPI and Zoltan
/////////////////////////////////
int rank, size;
float version;
#ifdef MPICPP
MPI::Init(argc, argv);
rank = MPI::COMM_WORLD.Get_rank();
size = MPI::COMM_WORLD.Get_size();
#else
MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
#endif
Zoltan_Initialize(argc, argv, &version);
/////////////////////////////////
// Create a Zoltan object
/////////////////////////////////
#ifdef MPICPP
Zoltan *zz = new Zoltan(MPI::COMM_WORLD);
#else
Zoltan *zz = new Zoltan(MPI_COMM_WORLD);
#endif
if (zz == NULL){
MPIExit();
exit(0);
}
//////////////////////////////////////////////////////////////////
// Read objects from input file and distribute them unevenly
//////////////////////////////////////////////////////////////////
FILE *fp = fopen(global_fname, "r");
if (!fp){
if (rank == 0) fprintf(stderr,"ERROR: Can not open %s\n",global_fname);
MPIExit();
exit(1);
}
fclose(fp);
objectCollection objects;
read_input_objects(rank, size, global_fname, objects);
///////////////////////////////////////////////////////////////////
// Set the Zoltan parameters, and the names of the query functions
///////////////////////////////////////////////////////////////////
// General parameters
zz->Set_Param( "LB_METHOD", "BLOCK"); /* Zoltan method: "BLOCK" */
zz->Set_Param( "NUM_GID_ENTRIES", "1"); /* global ID is 1 integer */
zz->Set_Param( "NUM_LID_ENTRIES", "1"); /* local ID is 1 integer */
zz->Set_Param( "OBJ_WEIGHT_DIM", "0"); /* we omit object weights */
// Query functions
zz->Set_Num_Obj_Fn(objectCollection::get_number_of_objects, &objects);
zz->Set_Obj_List_Fn(objectCollection::get_object_list, &objects);
////////////////////////////////////////////////////////////////
// Zoltan can now partition the objects in this collection.
// In this simple example, we assume the number of partitions is
// equal to the number of processes. Process rank 0 will own
// partition 0, process rank 1 will own partition 1, and so on.
////////////////////////////////////////////////////////////////
int changes;
int numGidEntries;
int numLidEntries;
int numImport;
ZOLTAN_ID_PTR importGlobalIds;
ZOLTAN_ID_PTR importLocalIds;
int *importProcs;
int *importToPart;
int numExport;
ZOLTAN_ID_PTR exportGlobalIds;
ZOLTAN_ID_PTR exportLocalIds;
int *exportProcs;
int *exportToPart;
int rc = zz->LB_Partition(changes, numGidEntries, numLidEntries,
numImport, importGlobalIds, importLocalIds, importProcs, importToPart,
numExport, exportGlobalIds, exportLocalIds, exportProcs, exportToPart);
if (rc != ZOLTAN_OK){
printf("Partitioning failed on process %d\n",rank);
MPIExit();
delete zz;
exit(0);
}
/////////////////////////////////////////////////////////////////
// Visualize the partitioning before and after calling Zoltan.
//
// In this example, partition number equals process rank.
/////////////////////////////////////////////////////////////////
int *parts = new int [objects.get_num_my_objects()];
for (int i=0; i < objects.get_num_my_objects(); i++){
parts[i] = rank;
}
if (rank == 0){
printf("\nObject partition assignments before calling Zoltan\n");
}
showSimpleMeshPartitions(rank, objects.get_num_my_objects(),
objects.get_my_global_ids(), parts);
for (int i=0; i < numExport; i++){
parts[exportLocalIds[i]] = exportToPart[i];
}
if (rank == 0){
printf("Object partition assignments after calling Zoltan\n");
}
showSimpleMeshPartitions(rank, objects.get_num_my_objects(),
objects.get_my_global_ids(), parts);
delete [] parts;
////////////////////////////////////////////////////////////////
// Free the arrays allocated by LB_Partition, and free
// the storage allocated for the Zoltan structure and the mesh.
////////////////////////////////////////////////////////////////
Zoltan::LB_Free_Part(&importGlobalIds, &importLocalIds, &importProcs,
&importToPart);
Zoltan::LB_Free_Part(&exportGlobalIds, &exportLocalIds, &exportProcs,
&exportToPart);
delete zz;
////////////////////////////////////////////////////////////////
// all done ////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
MPIExit();
return 0;
}
/* Function to find next line of information in input file */
static int get_next_line(FILE *fp, char *buf, int bufsize)
{
int i, cval, len;
char *c;
while (1){
c = fgets(buf, bufsize, fp);
if (c == NULL)
return 0; /* end of file */
len = strlen(c);
for (i=0, c=buf; i < len; i++, c++){
cval = (int)*c;
if (isspace(cval) == 0) break;
}
if (i == len) continue; /* blank line */
if (*c == '#') continue; /* comment */
if (c != buf){
strcpy(buf, c);
}
break;
}
return strlen(buf); /* number of characters */
}
// Proc 0 notifies others of error and exits
static void input_file_error(int numProcs, int tag, int startProc)
{
int i, val;
val = -1;
fprintf(stderr,"ERROR in input file.\n");
for (i=startProc; i < numProcs; i++){
// these procs have posted receive for "tag"
#ifdef MPICPP
MPI::COMM_WORLD.Send(&val, 1, MPI::INT, i, tag);
#else
MPI_Send(&val, 1, MPI_INT, i, tag, MPI_COMM_WORLD);
#endif
}
for (i=1; i < startProc; i++){
// these procs are done
#ifdef MPICPP
MPI::COMM_WORLD.Send(&val, 1, MPI::INT, i, 0);
#else
MPI_Send(&val, 1, MPI_INT, i, 0, MPI_COMM_WORLD);
#endif
}
MPIExit();
exit(0);
}
/* Draw the partition assignments of the objects */
void showSimpleMeshPartitions(int myProc, int numIDs, int *GIDs, int *parts)
{
int partAssign[25], allPartAssign[25];
int i, j, part;
memset(partAssign, 0, sizeof(int) * 25);
for (i=0; i < numIDs; i++){
partAssign[GIDs[i]-1] = parts[i];
}
#ifdef MPICPP
MPI::COMM_WORLD.Reduce(partAssign, allPartAssign, 25, MPI::INT, MPI::MAX, 0);
#else
MPI_Reduce(partAssign, allPartAssign, 25, MPI_INT, MPI_MAX, 0, MPI_COMM_WORLD);
#endif
if (myProc == 0){
for (i=20; i >= 0; i-=5){
for (j=0; j < 5; j++){
part = allPartAssign[i + j];
if (j < 4)
printf("%d-----",part);
else
printf("%d\n",part);
}
if (i > 0)
printf("| | | | |\n");
}
printf("\n");
}
}
//
// Proc 0 reads the objects in the input file and divides them across processes
//
void read_input_objects(int myRank, int numProcs, const char *fname, objectCollection &myData)
{
int val, nobj, remainingObj;
int obj_ack_tag = 5, obj_count_tag = 10, obj_id_tag = 15;
#ifdef MPICPP
MPI::Status status;
#else
MPI_Status status;
#endif
if (myRank == 0){
char *buf = new char [512];
FILE *fp = fopen(fname, "r");
int num = get_next_line(fp, buf, 512);
if (num == 0) input_file_error(numProcs, obj_count_tag, 1);
num = sscanf(buf, "%d", &val);
myData.set_num_global_objects(val);
if (num != 1) input_file_error(numProcs, obj_count_tag, 1);
if (numProcs > 1){
nobj = myData.get_num_global_objects() / 2;
remainingObj = myData.get_num_global_objects() - nobj;
}
else{
nobj = myData.get_num_global_objects();
remainingObj = 0;
}
int *mygids = new int [nobj];
myData.set_num_my_objects(nobj);
myData.set_my_global_ids(mygids);
for (int i=0; i < nobj; i++){
num = get_next_line(fp, buf, 512);
if (num == 0) input_file_error(numProcs, obj_count_tag, 1);
num = sscanf(buf, "%d", &val);
if (num != 1) input_file_error(numProcs, obj_count_tag, 1);
mygids[i] = val;
}
int *gids = new int [nobj + 1];
int ack = 0;
for (int i=1; i < numProcs; i++){
if (remainingObj > 1){
nobj = remainingObj / 2;
remainingObj -= nobj;
}
else if (remainingObj == 1){
nobj = 1;
remainingObj = 0;
}
else{
nobj = 0;
}
if ((i == numProcs - 1) && (remainingObj > 0))
nobj += remainingObj;
if (nobj > 0){
for (int j=0; j < nobj; j++){
num = get_next_line(fp, buf, 512);
if (num == 0) input_file_error(numProcs, obj_count_tag, i);
num = sscanf(buf, "%d", &val);
if (num != 1) input_file_error(numProcs, obj_count_tag, i);
gids[j] = val;;
}
}
#ifdef MPICPP
MPI::COMM_WORLD.Send(&nobj, 1, MPI::INT, i, obj_count_tag);
MPI::COMM_WORLD.Recv(&ack, 1, MPI::INT, i, obj_ack_tag, status);
#else
MPI_Send(&nobj, 1, MPI_INT, i, obj_count_tag, MPI_COMM_WORLD);
MPI_Recv(&ack, 1, MPI_INT, i, obj_ack_tag, MPI_COMM_WORLD, &status);
#endif
if (nobj > 0)
MPI_Send(gids, nobj, MPI_INT, i, obj_id_tag, MPI_COMM_WORLD);
}
delete [] gids;
delete [] buf;
fclose(fp);
/* signal all procs it is OK to go on */
ack = 0;
for (int i=1; i < numProcs; i++){
#ifdef MPICPP
MPI::COMM_WORLD.Send(&ack, 1, MPI::INT, i, 0);
#else
MPI_Send(&ack, 1, MPI_INT, i, 0, MPI_COMM_WORLD);
#endif
}
}
else{
#ifdef MPICPP
MPI::COMM_WORLD.Recv(&val, 1, MPI::INT, 0, obj_count_tag, status);
#else
MPI_Recv(&val, 1, MPI_INT, 0, obj_count_tag, MPI_COMM_WORLD, &status);
#endif
myData.set_num_my_objects(val);
int ack = 0;
if (myData.get_num_my_objects() > 0){
int *mygids = new int [myData.get_num_my_objects()];
#ifdef MPICPP
MPI::COMM_WORLD.Send(&ack, 1, MPI::INT, 0, obj_ack_tag);
MPI::COMM_WORLD.Recv(mygids, myData.get_num_my_objects(), MPI::INT, 0,
obj_id_tag, status);
#else
MPI_Send(&ack, 1, MPI_INT, 0, obj_ack_tag, MPI_COMM_WORLD);
MPI_Recv(mygids, myData.get_num_my_objects(), MPI_INT, 0,
obj_id_tag, MPI_COMM_WORLD, &status);
#endif
myData.set_my_global_ids(mygids);
}
else if (myData.get_num_my_objects() == 0){
#ifdef MPICPP
MPI::COMM_WORLD.Send(&ack, 1, MPI::INT, 0, obj_ack_tag);
#else
MPI_Send(&ack, 1, MPI_INT, 0, obj_ack_tag, MPI_COMM_WORLD);
#endif
}
else{
MPIExit();
exit(1);
}
#ifdef MPICPP
MPI::COMM_WORLD.Recv(&ack, 1, MPI::INT, 0, 0, status);
#else
MPI_Recv(&ack, 1, MPI_INT, 0, 0, MPI_COMM_WORLD, &status);
#endif
if (ack < 0){
MPIExit();
exit(1);
}
}
}

View File

@ -0,0 +1,48 @@
##
## This simple structure is used by many of the nightly Zoltan tests.
## It can be interpreted as a mesh, a graph, a hypergraph, or simply
## as 25 objects to be partitioned.
##
## 21----22----23----24---25
## | | | | |
## 16----17----18----19---20
## | | | | |
## 11----12----13----14---15
## | | | | |
## 6-----7-----8-----9----10
## | | | | |
## 1-----2-----3-----4----5
##
## Regarded as a collection of objects, we have objects 1 through 25.
##
## Number of objects:
25
## Global ID for each object
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25