Commit 06e52cf1 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Check that the MPI_Abort exit code is returned.

parent 554cc062
......@@ -46,6 +46,8 @@ EXTRA_DIST = util/add-f90-module \
scripts/checklicense.exclusions \
m4/forloop2.m4 \
config/checksrc/openmpi-typedup-rma.c \
config/checksrc/incorrect_mpi_abort_exitcode.c \
config/checkdoc/incorrect_mpi_abort_exitcode.txt \
contrib/01aix-deplib-rpath-patch/aix-deplib-libtool.patch \
contrib/01aix-deplib-rpath-patch/README.txt \
contrib/01aix-deplib-rpath-patch/README \
......
Your installations does not report the errorcode argument of MPI_Abort
to the calling environment as POSIX exit code. Inspect config.log for
further details of the failure.
/**
* @file intelmpi_datatype.c
* @brief demonstrates a problem some IntelMPI and MVAPICH2 versions have with
* transferring some data layouts
*
* @copyright Copyright (C) 2019 Moritz Hanke <hanke@dkrz.de>
*
* @author Moritz Hanke <hanke@dkrz.de>
*/
/*
* Keywords:
* Maintainer: Moritz Hanke <hanke@dkrz.de>
* Thomas Jahns <jahns@dkrz.de>
* URL: https://doc.redmine.dkrz.de/yaxt/html/
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 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.
*
* Neither the name of the DKRZ GmbH nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT OWNER
* OR 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.
*/
/**
*
* This program calls MPI_Abort to test whether the exit code
* parameter is passed through the calling process.
* acx_mpirun_expected_exitcode=2
*/
#include <stdlib.h>
#include <mpi.h>
int main(void) {
MPI_Init(NULL,NULL);
MPI_Abort(MPI_COMM_WORLD, 2);
/* This should not execute, ever */
MPI_Finalize();
return EXIT_SUCCESS;
}
......@@ -450,17 +450,33 @@ AC_ARG_VAR([NOMPI_LAUNCH],
[optional command prefix for running test programs not using MPI
This will most often be empty, but can be used to e.g. forward commands to
another cluster node, adjust CPU frequency governor, or bind the task.])
dnl do not remove conftest.err we need to inspect the output
m4_pushdef([_AC_RUN_LOG_LIMIT],
m4_bpatsubst(m4_dquote(m4_defn([_AC_RUN_LOG_LIMIT])),
[rm -f conftest.er1 conftest.err],[rm -f conftest.er1]))dnl
m4_pushdef([_AC_LINK_IFELSE],
m4_bpatsubst(m4_dquote(m4_defn([_AC_LINK_IFELSE])),
[rm -f core conftest.err],[rm -f core]))dnl
AS_IF([test $enable_MPI = yes],
[ACX_MPI_DEFECTS(,,
[ACX_MPI_DEFECTS_DOCUMENT
AS_CASE([$acx_subtestname],[openmpi-typedup-rma],
[AC_MSG_WARN([known OpenMPI pre-1.7.x problem detected that might affect distributed array!])],
[incorrect_mpi_abort_exitcode],
[AC_MSG_WARN([Your installation drops the exit code of MPI_Abort!
Consider installing a better MPI/batch scheduler.])
AS_IF([grep -v -i 'mpi_abort(@<:@^,()@:>@*, 2)' conftest.err >/dev/null],
[AC_MSG_NOTICE([Implementing fragile work-around for tests!])
AC_DEFINE([XT_NEED_MPI_ABORT_WORK_AROUND],[1],
[To pass the value for MPI_Abort to the surrounding execution environment, a hack is needed.])])],
[AS_VAR_IF([with_regard_for_quality],[yes],
[AC_MSG_FAILURE([test for known defect $acx_subtestname failed,
re-configure with --without-regard-for-quality in case you must use the
given MPI implementation, but some tests might fail])],
[AC_MSG_NOTICE([ignoring failed test for known defect $acx_subtestname,
because configure option --without-regard-for-quality is active])])])])])
m4_popdef([_AC_RUN_LOG_LIMIT])m4_popdef([_AC_LINK_IFELSE])dnl
rm -f conftest.err
AS_IF([test $enable_MPI = no],
[MPI_C_INCLUDE= MPI_C_LIB= MPI_FC_LIB= MPI_FC_INCLUDE= MPI_FINT_FC_KIND=-1],
[AC_DEFINE([USE_MPI],[1],[use MPI parallel process environment])
......
Supports Markdown
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