Skip to content
Snippets Groups Projects
Commit b80f40e2 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Let configure logic instead of test code deal with defect tests.

parent 780e0572
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,6 @@ int main(int argc, char **argv) {
}
MPI_Aint position = 0;
#ifndef WITHOUT_PACK_EXTERNAL
#define BUG
#ifdef BUG
mpi_err_handler(MPI_Pack_external(datarep, uint_data, UINT_COUNT,
......@@ -57,7 +56,6 @@ int main(int argc, char **argv) {
MPI_UNSIGNED, pack_buffer, pack_size,
&position), MPI_COMM_WORLD);
#endif // NO_BUG
#endif // WITHOUT_PACK_EXTERNAL
free(pack_buffer);
free(dble_data);
......
......@@ -12,8 +12,6 @@ int main(void) {
MPI_Init(NULL, NULL);
#ifndef WITHOUT_PACK_EXTERNAL
int send_data[2] = {93184, -9023};
int recv_data[2];
......@@ -35,8 +33,6 @@ int main(void) {
if ((send_data[0] != recv_data[0]) || (send_data[1] != recv_data[1]))
exit_code = EXIT_FAILURE;
#endif // WITHOUT_PACK_EXTERNAL
MPI_Finalize();
return exit_code;
......
......@@ -72,13 +72,19 @@ AS_IF([test x"$enable_MPI" = xyes],
AC_ARG_WITH([mpi-pack-external],
[AS_HELP_STRING([--without-mpi-pack-external],
[use MPI_Pack (not guaranteed to work) instead of MPI_Pack_external @<:@default: yes, use MPI_Pack_external@:>@])],,[with_mpi_pack_external=yes])
AS_IF([test x"$with_mpi_pack_external" = xyes],,
AS_IF([test x"$with_mpi_pack_external" != xyes],
[CPPFLAGS="${CPPFLAGS+$CPPFLAGS }-DWITHOUT_PACK_EXTERNAL"])
ACX_MPI_DEFECTS(,,
[ACX_MPI_DEFECTS_DOCUMENT
AS_CASE(["$acx_subtestname"],[test_mpi_pack_external_*],[AC_MSG_FAILURE])
AS_IF([test "$with_regard_for_quality" != no],
[AC_MSG_FAILURE([test for known defect $subtestname failed, re-configure with --without-regard-for-quality in case you must use the given MPI implementation, but some tests might fail])])])
[AS_CASE(["$CPPFLAGS$acx_subtestname"],
[*-DWITHOUT_PACK_EXTERNAL*test_mpi_pack_external_*],
[AS_IF([test x"$acx_mpi_defects_result" = xerror],
[acx_mpi_defects_result='error (work-around active)'])],
[AS_IF([test "$with_regard_for_quality" != no],
[AC_MSG_RESULT([$acx_mpi_defects_result])
ACX_MPI_DEFECTS_DOCUMENT
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])],
[AS_IF([test x"$acx_mpi_defects_result" = xerror],
[acx_mpi_defects_result='error (suppressed)'])])])])
AS_IF([test "x$MPI_LAUNCH" = xtrue],
[AC_MSG_WARN([MPI launch command unavailable])])
FCFLAGS=$saved_FCFLAGS
......
......@@ -104,14 +104,15 @@ q
[acx_mpirun_test=`echo "$ac_link" | sed -e 's@\(.*/libtool --mode=\)link.*@\1@'`"execute $acx_mpirun_test"])
_AC_RUN_LOG_LIMIT([LIBC_FATAL_STDERR_=1 $acx_mpirun_num_tasks >&2],[echo "running $acx_mpirun_num_tasks"])
AS_IF([test $ac_status -eq 0],
[AC_MSG_RESULT([okay])m4_ifval([$2],[
$2])],
[AC_MSG_RESULT([error])
m4_ifval([$3],[$3],
[AC_MSG_FAILURE([chosen MPI has known error $acx_subtestname])])])],
[AC_MSG_RESULT([error])
m4_ifval([$3],[$3],
[AC_MSG_RESULT([chosen MPI has known error $acx_subtestname])])])
[acx_mpi_defects_result=okay; acx_mpi_defects_fail=no]m4_ifval([$2],[
$2]),
[acx_mpi_defects_result=error
m4_ifval([$3],[$3], [acx_mpi_defects_fail=yes])])],
[acx_mpi_defects_result=error
m4_ifval([$3],[$3],[acx_mpi_defects_fail=yes])])
AC_MSG_RESULT([$acx_mpi_defects_result])
AS_IF([test x"$acx_mpi_defects_fail" = xyes],
[AC_MSG_FAILURE([chosen MPI has known error $acx_subtestname])])
AS_CASE([$acx_suffix],
[f90|F90],[AC_LANG_POP([Fortran])],
[c],[AC_LANG_POP([C])])])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment