Skip to content

Commit

Permalink
AMPI: Add MPICH automated testing build option "--enable-ampi-mpich-t…
Browse files Browse the repository at this point in the history
…ests"

Also add AMPI testlists containing all passing and non hanging tests.

See tests/ampi/mpich-tests/README.AMPI for details.

Co-authored-by: Evan Ramos <evan@hpccharm.com>

Change-Id: Ibcd73f20339ff09c44f9feb1797fb9abb1dc9804
  • Loading branch information
zzhu35 authored and evan-charmworks committed Feb 15, 2019
1 parent 045a564 commit 135da1d
Show file tree
Hide file tree
Showing 33 changed files with 1,654 additions and 66 deletions.
4 changes: 0 additions & 4 deletions src/libs/ck-libs/ampi/ampi.h
Original file line number Diff line number Diff line change
Expand Up @@ -1588,8 +1588,6 @@ extern long ampiCurrentStackUsage(void);

/* If compiling the MPICH test suite, enable these no-op definitions
* for the MPI features that AMPI does not yet support. */
//#define AMPI_WITH_UNIMPL_DEFS

#ifdef AMPI_WITH_UNIMPL_DEFS

// MPI-2 Constants
Expand Down Expand Up @@ -1638,8 +1636,6 @@ typedef int (MPI_Grequest_query_function)(void *, MPI_Status *);
#define MPI_Comm_join (void*)
#define MPI_Publish_name (void*)
#define MPI_Unpublish_name (void*)
#define MPI_Grequest_start (void*)
#define MPI_Grequest_complete (void*)
#define MPI_Pack_external (void*)
#define MPI_Pack_external_size (void*)
#define MPI_Type_match_size (void*)
Expand Down
18 changes: 17 additions & 1 deletion src/scripts/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,23 @@ else
test_finish 1
fi

#### Check if compiler if 64 bit ####
# enable mpich tests
AC_ARG_ENABLE([ampi-mpich-tests],
[AS_HELP_STRING([--enable-ampi-mpich-tests],
[enable mpich tests for ampi])],
[enable_ampi_mpich_tests=yes],
[enable_ampi_mpich_tests=no])

if test "$enable_ampi_mpich_tests" = "yes"
then
AC_DEFINE([AMPI_ERRHANDLER_RETURN], [1], [enable ampi fatal error return])
AC_DEFINE([AMPI_WITH_UNIMPL_DEFS], [1], [enable ampi no-op definitions])
add_make_flag "BUILD_MPICH_TESTS:=true" 'mpich tests setup'
else
AC_DEFINE([AMPI_ERRHANDLER_RETURN], [0], [disable ampi fatal error return])
fi

#### Check if compiler is 64 bit ####
cat > $t <<EOT
#include <stdio.h>

Expand Down
17 changes: 17 additions & 0 deletions tests/ampi/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-include ../../include/conv-mach-opt.mak

DIRS = \
megampi \
stacksize \
Expand All @@ -8,6 +10,10 @@ DIRS = \
jacobi3d \
# chkpt \
ifeq ($(BUILD_MPICH_TESTS),true)
DIRS += mpich-test
endif

NOBGDIRS = \
intercomm_coll \
privatization \
Expand All @@ -17,6 +23,7 @@ FTDIRS = \

TESTDIRS = $(filter-out $(FTDIRS),$(DIRS))


all: $(foreach i,$(DIRS),build-$i)

test: $(foreach i,$(TESTDIRS),test-$i)
Expand All @@ -42,3 +49,13 @@ $(foreach i,$(DIRS),bgtest-$i):

$(foreach i,$(DIRS),clean-$i):
$(MAKE) -C $(subst clean-,,$@) clean OPTS='$(OPTS)'


# additional dependencies

mpich-test/Makefile:
cd mpich-test && ./configure.sh && cd ..

build-mpich-test: mpich-test/Makefile
test-mpich-test: mpich-test/Makefile
bgtest-mpich-test: mpich-test/Makefile
16 changes: 10 additions & 6 deletions tests/ampi/mpich-test/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
am__v_GEN_0 = @echo " GEN " $@;
am__v_GEN_1 =
am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
am__v_at_1 =
am__v_at_1 =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
Expand Down Expand Up @@ -478,7 +478,7 @@ include/mpitestconf.h: include/stamp-h1
include/stamp-h1: $(top_srcdir)/include/mpitestconf.h.in $(top_builddir)/config.status
@rm -f include/stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status include/mpitestconf.h
$(top_srcdir)/include/mpitestconf.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(top_srcdir)/include/mpitestconf.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f include/stamp-h1
touch $@
Expand Down Expand Up @@ -927,10 +927,14 @@ $(top_builddir)/util/mtest_datatype.$(OBJEXT): $(top_srcdir)/util/mtest_datatype
$(top_builddir)/util/mtest_datatype_gen.$(OBJEXT): $(top_srcdir)/util/mtest_datatype_gen.c
(cd $(top_builddir)/util && $(MAKE) mtest_datatype_gen.$(OBJEXT))

test: all testing
echo "Done"

testing:
$(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist \
-mpiexec=${MPIEXEC} -xmlfile=summary.xml \
-tapfile=summary.tap -junitfile=summary.junit.xml
$(top_builddir)/runtests -srcdir=$(srcdir) -tests=testlist.ampi \
-mpiexec="./ampirun" -xmlfile=summary.xml \
-tapfile=summary.tap -junitfile=summary.junit.xml \
-ampitestopts=$(TESTOPTS)

# Need to patch some things up:
# Make sure to disable rebuilding the autotools related files - the
Expand Down
17 changes: 11 additions & 6 deletions tests/ampi/mpich-test/README.AMPI
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
To configure the mpich-3.2 test suite to use AMPI, do:
Modified 10/30/2018 Zeran Zhu zzhu35@illinois.edu

CC=${PWD}/../../../bin/ampicc CFLAGS="-g -O0" MPICC=${PWD}/../../../bin/ampicc CXX=${PWD}/../../../bin/ampicxx CXXFLAGS="-g -O0" MPICXX=${PWD}/../../../bin/ampicxx MPI_SIZEOF_AINT=8 MPI_SIZEOF_OFFSET=8 ./configure --enable-strictmpi --disable-threads --disable-spawn --disable-cxx --disable-checkfaults --disable-checkpointing --disable-ft-tests --disable-romio --disable-fortran --disable-long-double --disable-long-double-complex --disable-maintainer_mode
* updated autoconf and Makefile to accept build options
* created AMPI all passing testlist automatic generation script (based on original runtests) "generate_ampi_testlist" Usage:
./generate_ampi_testlist -tests=testlist -xmlfile=summary.xml
This will run mpich test suites with AMPI and save all passing and non-timeout (60s) tests to testlist.ampi in the toplevel build directory.
Verify changes and commit/push updated testlist.ampi as needed.
* build AMPI with flag "--enable-ampi-mpich-tests" will enable AMPI test automation with mpich test suites
once seeing the flag, autoconfig sets compiler macro AMPI_ERRHANDLER_RETURN = 1, AMPI_WITH_UNIMPL_DEFS = 1, and the Makefile macro BUILD_MPICH_TESTS:=true
* running "make test" with TESTOPTS in tests/ampi will automatically configure, compile and run all tests including mpich-tests using AMPI

To manually configure the mpich-3.2 test suite to use AMPI, do:

To configure with Fortran90 support:

CC=${PWD}/../../../bin/ampicc MPICC=${PWD}/../../../bin/ampicc CXX=${PWD}/../../../bin/ampicxx MPICXX=${PWD}/../../../bin/ampicxx MPIFC=${PWD}/../../../bin/ampif90 MPIF77=${PWD}/../../../bin/ampif77 FCFLAGS="-g -O0" FC=${PWD}/../../../bin/ampif90 FCLD=${PWD}/../../../bin/ampif90 MPI_SIZEOF_AINT=8 MPI_SIZEOF_OFFSET=8 ./configure --enable-strictmpi --disable-threads --disable-spawn --disable-cxx --disable-checkfaults --disable-checkpointing --disable-ft-tests --disable-romio --disable-long-double --disable-long-double-complex --disable-maintainer_mode

./configure.sh
4 changes: 4 additions & 0 deletions tests/ampi/mpich-test/attr/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
attrt 2
attrerr 1
attrerrcomm 1
attrdeleteget 1
Empty file.
Empty file.
55 changes: 55 additions & 0 deletions tests/ampi/mpich-test/coll/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
allredmany 4
allred2 4
allred6 4
reduce_local 2
op_commutative 2
alltoallw1 10
alltoallw_zeros 1
alltoallw_zeros 2
alltoallw_zeros 5
alltoallw_zeros 8
allgatherv4 4
bcasttest 4
bcasttest 8
bcasttest 10
coll2 5
coll3 5
coll4 4
coll5 4
coll6 5
coll7 1
coll7 2
coll7 5
coll8 4
coll9 4
coll11 4
coll13 4
longuser 4
redscat 4
redscat 6
redscat3 8
red_scat_block 4
red_scat_block 5
red_scat_block 8
redscatblk3 8
redscatblk3 10
scattern 4
scatter2 4
scatter3 4
scatterv 4
opland 4
oplor 4
oplxor 4
oplxor 5
opband 4
opbor 4
opbxor 4
opbxor 5
opprod 5
opprod 6
opsum 4
opmin 4
opmax 5
uoplong 4
uoplong 11
uoplong 16
7 changes: 7 additions & 0 deletions tests/ampi/mpich-test/comm/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
dup 2
commcreate1 8
ic1 4
ic2 33
ctxalloc 2
cmsplit 4
cmsplit2 12
6 changes: 6 additions & 0 deletions tests/ampi/mpich-test/configure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
CC=${PWD}/../../../bin/ampicc CFLAGS="-g -O0" MPICC=${PWD}/../../../bin/ampicc CXX=${PWD}/../../../bin/ampicxx CXXFLAGS="-g -O0" MPICXX=${PWD}/../../../bin/ampicxx MPI_SIZEOF_AINT=8 MPI_SIZEOF_OFFSET=8 ./configure --enable-strictmpi --disable-threads --disable-spawn --disable-cxx --disable-checkfaults --disable-checkpointing --disable-ft-tests --disable-romio --disable-fortran --disable-long-double --disable-long-double-complex --disable-maintainer_mode

# To configure with Fortran90 support:
# CC=${PWD}/../../../bin/ampicc MPICC=${PWD}/../../../bin/ampicc CXX=${PWD}/../../../bin/ampicxx MPICXX=${PWD}/../../../bin/ampicxx MPIFC=${PWD}/../../../bin/ampif90 MPIF77=${PWD}/../../../bin/ampif77 FCFLAGS="-g -O0" FC=${PWD}/../../../bin/ampif90 FCLD=${PWD}/../../../bin/ampif90 MPI_SIZEOF_AINT=8 MPI_SIZEOF_OFFSET=8 ./configure --enable-strictmpi --disable-threads --disable-spawn --disable-cxx --disable-checkfaults --disable-checkpointing --disable-ft-tests --disable-romio --disable-long-double --disable-long-double-complex --disable-maintainer_mode

43 changes: 43 additions & 0 deletions tests/ampi/mpich-test/datatype/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
contents 1
gaddress 1
lbub 1
localpack 1
simple-pack 1
transpose-pack 1
slice-pack 1
struct-pack 1
structpack2 1
typecommit 1
typefree 1
zeroparms 1
getpartelm 2
tresized 2
tresized2 2
sendrecvt2 2
sendrecvt4 2
tfree 2
typelb 1
contigstruct 1
struct-zero-count 1
blockindexed-zero-count 1
blockindexed-misc 1
indexed-misc 1
pairtype-size-extent 1
simple-commit 1
simple-size-extent 1
struct-no-real-types 1
struct-empty-el 1
contig-zero-count 1
simple-resized 1
unusual-noncontigs 1
hindexed-zeros 1
lots-of-types 1
get-elements-pairtype 1
unpack 1
zeroblks 1
struct-derived-zeros 1
get-elements 1
vecblklen 1
hvecblklen 1
longdouble 1
dataalign 2
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions tests/ampi/mpich-test/errors/comm/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
manysplit 4
Empty file.
1 change: 1 addition & 0 deletions tests/ampi/mpich-test/errors/pt2pt/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
proberank 1
2 changes: 2 additions & 0 deletions tests/ampi/mpich-test/errors/rma/testlist.ampi
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
win_sync_complete 2
win_sync_nested 2
Empty file.
Empty file.
Empty file.

0 comments on commit 135da1d

Please sign in to comment.