mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-11 16:01:00 +08:00
[svn-r3935] Purpose:
Test Addition Description: I added a small test to determine if the MPI library has a working version of the MPI_Get_count() function. If it does, then I define the macro: MPI_GET_COUNT_WORKS This should (hopefully) take care of the kludges in H5FDmpio.c... NOTE: This isn't implemented in the H5FDmpio.c file since I don't know the code in there and don't know which solution will work. Also, the test program I put into the configure script needs to be checked on a platform which does have a working MPI_Get_count() function...I.e., this is just a first stab. Platforms tested: Linux
This commit is contained in:
parent
0d2d6fb97d
commit
9ac96a9bd3
41
configure
vendored
41
configure
vendored
@ -9702,6 +9702,47 @@ rm -f conftest*
|
||||
if test "X$RUNPARALLEL" = "Xnone"; then
|
||||
RUNPARALLEL=
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether a MPI_Get_count works correctly""... $ac_c" 1>&6
|
||||
echo "configure:9708: checking whether a MPI_Get_count works correctly" >&5
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 9713 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
MPI_Status mpi_stat;
|
||||
int bytes_read = 0, ret;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
ret = MPI_Get_count(&mpi_stat, MPI_BYTE, &bytes_read);
|
||||
MPI_Finalize();
|
||||
|
||||
/* this returns TRUE if bytes_read is 0...the shell thinks that the
|
||||
* program fails, but we want it didn't of course so switch the
|
||||
* "true"/"false" parts of the TRY_RUN macro */
|
||||
return bytes_read == 0;
|
||||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:9734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
echo "$ac_t""no" 1>&6
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -fr conftest*
|
||||
echo "$ac_t""yes" 1>&6
|
||||
CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS"
|
||||
fi
|
||||
rm -fr conftest*
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
|
27
configure.in
27
configure.in
@ -1109,7 +1109,7 @@ int main(void)
|
||||
sprintf(s,"%${hdf5_cv_printf_ll}d",x);
|
||||
exit(strcmp(s,"1099511627776"));
|
||||
}
|
||||
], break)
|
||||
], break,,)
|
||||
done)
|
||||
|
||||
AC_MSG_RESULT(%${hdf5_cv_printf_ll}d and %${hdf5_cv_printf_ll}u)
|
||||
@ -1409,6 +1409,31 @@ if test -n "$PARALLEL"; then
|
||||
if test "X$RUNPARALLEL" = "Xnone"; then
|
||||
RUNPARALLEL=
|
||||
fi
|
||||
|
||||
dnl Check whether MPI_Get_count actually works correctly on this
|
||||
dnl platform.
|
||||
AC_MSG_CHECKING(whether a MPI_Get_count works correctly)
|
||||
AC_TRY_RUN([
|
||||
#include <mpi.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
MPI_Status mpi_stat;
|
||||
int bytes_read = 0, ret;
|
||||
|
||||
MPI_Init(&argc, &argv);
|
||||
ret = MPI_Get_count(&mpi_stat, MPI_BYTE, &bytes_read);
|
||||
MPI_Finalize();
|
||||
|
||||
/* this returns TRUE if bytes_read is 0...the shell thinks that the
|
||||
* program fails, but we want it didn't of course so switch the
|
||||
* "true"/"false" parts of the TRY_RUN macro */
|
||||
return bytes_read == 0;
|
||||
}
|
||||
],
|
||||
AC_MSG_RESULT(no),
|
||||
AC_MSG_RESULT(yes)
|
||||
CPPFLAGS="$CPPFLAGS -DMPI_GET_COUNT_WORKS")
|
||||
fi
|
||||
|
||||
dnl ----------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user