Fix a few portability issues noticed after initial commit:
- The official OSX workaround for ROMIO is to configure it with the -arch=freebsd switch (that's what MPICH does!). This switch no longer works because I updated their configure script to a modern version of Autoconf, so I put a[nother] test in ROMIO's configure to detect this situation and do the workaround. - Realize that I forgot that ROMIO uses the MPI profiling layer, so if the profiling layer is not enabled, ROMIO will fail to link in dynamic environments (or otherwise Not Work). So put a thingy in its configure script testing to see if the MPI profiling layer is enabled or not. If it's not enabled, don't build ROMIO. - Make the lack of any available io components *NOT* be an error during MPI_INIT (e.g., what if you didn't enable profiling, but you don't use any MPI_FILE* functions in your program? This is quite a common case). If no io components are available, then an MPI exception will be thrown during MPI_FILE_OPEN and MPI_FILE_DELETE (which, unfortunately, according to the standard uses the default handler on MPI_FILE_NULL, which, unfortunately again, is MPI_ERRORS_RETURN). So users really have to check for this situation. :-\ This commit was SVN r2661.
Этот коммит содержится в:
родитель
069682e046
Коммит
910f6943b7
@ -42,9 +42,9 @@ static int init_query_1_0_0(const mca_base_component_t *ls,
|
||||
* Close all components who do not want to be considered for selection,
|
||||
* and destroy the opened list.
|
||||
*
|
||||
* Also find the basic component while we're doing all of this, and save
|
||||
* it in a global variable so that we can find it easily later (e.g.,
|
||||
* during scope selection).
|
||||
* It is *not* an error if there are no io components available.
|
||||
* Appropriate run-time MPI exceptions will be invoked during
|
||||
* MPI_FILE_OPEN and MPI_FILE_DELETE.
|
||||
*/
|
||||
int mca_io_base_find_available(bool *allow_multi_user_threads,
|
||||
bool *have_hidden_threads)
|
||||
@ -109,18 +109,6 @@ int mca_io_base_find_available(bool *allow_multi_user_threads,
|
||||
OBJ_DESTRUCT(&mca_io_base_components_opened);
|
||||
mca_io_base_components_opened_valid = false;
|
||||
|
||||
/* If we have no io components available, it's an error. Thanks
|
||||
for playing! */
|
||||
|
||||
if (!found) {
|
||||
OBJ_DESTRUCT(&mca_io_base_components_available);
|
||||
mca_io_base_components_available_valid = false;
|
||||
ompi_output_verbose(10, mca_io_base_output,
|
||||
"io:find_available: no io components available!");
|
||||
/* JMS show_help */
|
||||
return OMPI_ERROR;
|
||||
}
|
||||
|
||||
/* All done */
|
||||
|
||||
return OMPI_SUCCESS;
|
||||
|
@ -15,6 +15,18 @@ sinclude(../../../../config/ompi_config_subdir.m4)
|
||||
# configure script.
|
||||
#
|
||||
AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
AC_ARG_ENABLE([mpi-profile],
|
||||
AC_HELP_STRING([--disable-mpi-profile],
|
||||
[Disable MPI profiling, and therefore the ROMIO io component]))
|
||||
|
||||
AC_MSG_CHECKING([if MPI profiling is enabled])
|
||||
if test "$enable_mpi_profile" = "no"; then
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([*** The ROMIO io component requires the MPI profiling layer])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
AC_ARG_WITH([io-romio-flags],
|
||||
AC_HELP_STRING([--with-io-romio-flags=FLAGS],
|
||||
[Pass FLAGS to the ROMIO distribution configuration script]))
|
||||
@ -42,6 +54,7 @@ AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
static=disable
|
||||
fi
|
||||
fi
|
||||
|
||||
io_romio_flags="CFLAGS="'"'"$CFLAGS"'"'" CPPFLAGS="'"'"$CPPFLAGS"'"'" FFLAGS="'"'"$FFLAGS"'"'" LDFLAGS="'"'"$LSFLAGS"'"'" --$shared-shared --$static-static $io_romio_flags"
|
||||
AC_MSG_RESULT([$io_romio_flags])
|
||||
|
||||
@ -60,11 +73,11 @@ AC_DEFUN([MCA_CONFIGURE_STUB],[
|
||||
# For dist
|
||||
#
|
||||
AC_DEFUN([MCA_CONFIGURE_DIST_STUB],[
|
||||
ompi_show_subtitle "Configuring ROMIO distribution"
|
||||
ompi_show_subtitle "Configuring ROMIO distribution (dist only)"
|
||||
OMPI_CONFIG_SUBDIR([romio-dist], [],
|
||||
[HAPPY=1], [HAPPY=0])
|
||||
if test "$HAPPY" = "1"; then
|
||||
echo "ROMIO distribution configured successfully"
|
||||
echo "ROMIO distribution configured successfully (dist only)"
|
||||
else
|
||||
AC_MSG_WARN([ROMIO distribution did not configure successfully])
|
||||
AC_MSG_WARN([Nothing I can do about that -- sorry!])
|
||||
|
62
src/mca/io/romio/romio-dist/configure
поставляемый
62
src/mca/io/romio/romio-dist/configure
поставляемый
@ -2447,6 +2447,12 @@ echo "${ECHO_T}Unknown!" >&6
|
||||
print_error " set an architecture type with -arch=<value>"
|
||||
exit 1
|
||||
fi
|
||||
# Open MPI: -arch=freebsd doesn't work as a configure flag anymore
|
||||
# now that we've updated to a modern autoconf. So add a test here
|
||||
# to do a tech and see if we're on a freebsd-like platform.
|
||||
if test "$ARCH" = "Macintosh"; then
|
||||
ARCH="freebsd"
|
||||
fi
|
||||
eval "arch_$ARCH=1"
|
||||
echo "$as_me:$LINENO: result: $ARCH" >&5
|
||||
echo "${ECHO_T}$ARCH" >&6
|
||||
@ -8279,7 +8285,7 @@ ia64-*-hpux*)
|
||||
;;
|
||||
*-*-irix6*)
|
||||
# Find out which ABI we are using.
|
||||
echo '#line 8282 "configure"' > conftest.$ac_ext
|
||||
echo '#line 8288 "configure"' > conftest.$ac_ext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>&5
|
||||
ac_status=$?
|
||||
@ -9378,7 +9384,7 @@ fi
|
||||
|
||||
|
||||
# Provide some information about the compiler.
|
||||
echo "$as_me:9381:" \
|
||||
echo "$as_me:9387:" \
|
||||
"checking for Fortran 77 compiler version" >&5
|
||||
ac_compiler=`set X $ac_compile; echo $2`
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
|
||||
@ -10412,11 +10418,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:10415: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:10421: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:10419: \$? = $ac_status" >&5
|
||||
echo "$as_me:10425: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -10645,11 +10651,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:10648: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:10654: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:10652: \$? = $ac_status" >&5
|
||||
echo "$as_me:10658: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -10705,11 +10711,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:10708: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:10714: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:10712: \$? = $ac_status" >&5
|
||||
echo "$as_me:10718: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -12889,7 +12895,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 12892 "configure"
|
||||
#line 12898 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -12987,7 +12993,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 12990 "configure"
|
||||
#line 12996 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -15166,11 +15172,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:15169: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:15175: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:15173: \$? = $ac_status" >&5
|
||||
echo "$as_me:15179: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -15226,11 +15232,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:15229: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:15235: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:15233: \$? = $ac_status" >&5
|
||||
echo "$as_me:15239: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -16587,7 +16593,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 16590 "configure"
|
||||
#line 16596 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -16685,7 +16691,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 16688 "configure"
|
||||
#line 16694 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -17512,11 +17518,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:17515: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:17521: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:17519: \$? = $ac_status" >&5
|
||||
echo "$as_me:17525: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -17572,11 +17578,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:17575: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:17581: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:17579: \$? = $ac_status" >&5
|
||||
echo "$as_me:17585: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -19606,11 +19612,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:19609: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:19615: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:19613: \$? = $ac_status" >&5
|
||||
echo "$as_me:19619: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -19839,11 +19845,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:19842: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:19848: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>conftest.err)
|
||||
ac_status=$?
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:19846: \$? = $ac_status" >&5
|
||||
echo "$as_me:19852: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s "$ac_outfile"; then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
# So say no if there are warnings
|
||||
@ -19899,11 +19905,11 @@ else
|
||||
-e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
|
||||
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
|
||||
-e 's:$: $lt_compiler_flag:'`
|
||||
(eval echo "\"\$as_me:19902: $lt_compile\"" >&5)
|
||||
(eval echo "\"\$as_me:19908: $lt_compile\"" >&5)
|
||||
(eval "$lt_compile" 2>out/conftest.err)
|
||||
ac_status=$?
|
||||
cat out/conftest.err >&5
|
||||
echo "$as_me:19906: \$? = $ac_status" >&5
|
||||
echo "$as_me:19912: \$? = $ac_status" >&5
|
||||
if (exit $ac_status) && test -s out/conftest2.$ac_objext
|
||||
then
|
||||
# The compiler can only warn and ignore the option if not recognized
|
||||
@ -22083,7 +22089,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 22086 "configure"
|
||||
#line 22092 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
@ -22181,7 +22187,7 @@ else
|
||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||
lt_status=$lt_dlunknown
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 22184 "configure"
|
||||
#line 22190 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
|
@ -507,6 +507,12 @@ if test -z "$ARCH" -a -x $srcdir/util/tarch ; then
|
||||
print_error " set an architecture type with -arch=<value>"
|
||||
exit 1
|
||||
fi
|
||||
# Open MPI: -arch=freebsd doesn't work as a configure flag anymore
|
||||
# now that we've updated to a modern autoconf. So add a test here
|
||||
# to do a tech and see if we're on a freebsd-like platform.
|
||||
if test "$ARCH" = "Macintosh"; then
|
||||
ARCH="freebsd"
|
||||
fi
|
||||
eval "arch_$ARCH=1"
|
||||
AC_MSG_RESULT($ARCH)
|
||||
fi
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user