1
1

A break from writing: fix the bug that Brian hacked around for me.

Ensure that OMPI_F77_* are always defined, even if a) a f77 compiler
is not found, or b) the user disables the f77 MPI bindings.

This commit was SVN r2618.
Этот коммит содержится в:
Jeff Squyres 2004-09-11 19:13:43 +00:00
родитель 4fde8045b3
Коммит 0ed4c8f663
3 изменённых файлов: 55 добавлений и 53 удалений

Просмотреть файл

@ -11,57 +11,65 @@ ompi_fortran_single_underscore=0
ompi_fortran_caps=0 ompi_fortran_caps=0
ompi_fortran_plain=0 ompi_fortran_plain=0
cat > conftestf.f <<EOF # If we didn't find an f77 compiler, or if we don't want the f77
# bindings, just leave everything hardwired to 0. Otherwise, do the
# real test.
if test "$1" = "none" -o "$OMPI_WANT_F77_BINDINGS" = "0"; then
AC_MSG_RESULT([no Fortran 77 bindings -- skipped])
else
cat > conftestf.f <<EOF
subroutine FOO_bar(a) subroutine FOO_bar(a)
integer a integer a
a = 1 a = 1
return return
end end
EOF EOF
$1 $FFLAGS -c conftestf.f 1>&5 2>&1 $1 $FFLAGS -c conftestf.f 1>&5 2>&1
if test ! -s conftestf.o; then if test ! -s conftestf.o; then
AC_MSG_WARN(unable to produce an object file testing F77 compiler) AC_MSG_WARN(unable to produce an object file testing F77 compiler)
else
nm conftestf.o | grep foo_bar__ > /dev/null 2>&1
if test $? = "0"; then
AC_MSG_RESULT([double underscore])
ompi_fortran_double_underscore=1
ompi_ac_doubleunder=y
else else
nm conftestf.o | grep foo_bar_ > /dev/null 2>&1 nm conftestf.o | grep foo_bar__ > /dev/null 2>&1
if test $? = "0"; then if test $? = "0"; then
AC_MSG_RESULT([single underscore]) AC_MSG_RESULT([double underscore])
ompi_fortran_single_underscore=1 ompi_fortran_double_underscore=1
ompi_ac_singleunder=y ompi_ac_doubleunder=y
else else
# We may get into trouble here if we start accepting mixed nm conftestf.o | grep foo_bar_ > /dev/null 2>&1
# case compilers -- we may need to have caps underscore, if test $? = "0"; then
# or caps double underscore, for example. But we haven't AC_MSG_RESULT([single underscore])
# found any that require that yet. :-) ompi_fortran_single_underscore=1
nm conftestf.o | grep FOO_bar > /dev/null 2>&1 ompi_ac_singleunder=y
if test $? = "0"; then else
AC_MSG_RESULT([mixed case, so FORTRANCAPS]) # We may get into trouble here if we start accepting
ompi_fortran_caps=1 # mixed case compilers -- we may need to have caps
ompi_ac_caps=y # underscore, or caps double underscore, for example.
else # But we haven't found any that require that yet. :-)
nm conftestf.o | grep foo_bar > /dev/null 2>&1 nm conftestf.o | grep FOO_bar > /dev/null 2>&1
if test $? = "0"; then if test $? = "0"; then
AC_MSG_RESULT([no underscore]) AC_MSG_RESULT([mixed case, so FORTRANCAPS])
ompi_fortran_plain=1 ompi_fortran_caps=1
ompi_ac_nounder=y ompi_ac_caps=y
else else
nm conftestf.o | grep FOO_BAR > /dev/null 2>&1 nm conftestf.o | grep foo_bar > /dev/null 2>&1
if test $? = "0"; then if test $? = "0"; then
AC_MSG_RESULT([all upper case]) AC_MSG_RESULT([no underscore])
ompi_fortran_caps=1 ompi_fortran_plain=1
ompi_ac_caps=y ompi_ac_nounder=y
else else
AC_MSG_WARN([*** Could not find name of subroutine foo_bar]) nm conftestf.o | grep FOO_BAR > /dev/null 2>&1
AC_MSG_ERROR([Cannot continue]) if test $? = "0"; then
fi AC_MSG_RESULT([all upper case])
fi ompi_fortran_caps=1
fi ompi_ac_caps=y
fi else
AC_MSG_WARN([*** Could not find name of subroutine foo_bar])
AC_MSG_ERROR([Cannot continue])
fi
fi
fi
fi
fi
fi fi
fi fi

Просмотреть файл

@ -297,9 +297,7 @@ OMPI_ALIGNMENT_FORTRAN_COMPLEX=0
OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX=0 OMPI_ALIGNMENT_FORTRAN_DBLCOMPLEX=0
OMPI_SETUP_F77 OMPI_SETUP_F77
if test "$OMPI_F77" != "none" ; then OMPI_F77_FIND_EXT_SYMBOL_CONVENTION($OMPI_F77)
OMPI_F77_FIND_EXT_SYMBOL_CONVENTION($OMPI_F77)
fi
# Even if we don't want fortran support, we have to have a size for # Even if we don't want fortran support, we have to have a size for
# INTEGER because it's needed to define MPI_Fint, which is part of # INTEGER because it's needed to define MPI_Fint, which is part of

Просмотреть файл

@ -275,16 +275,12 @@ void ompi_info::do_arch(ompi_cmd_line_t *cmd_line)
// //
void ompi_info::do_config(bool want_all) void ompi_info::do_config(bool want_all)
{ {
#if OMPI_WANT_F77_BINDINGS const string f77(OMPI_WANT_F77_BINDINGS ? string("yes (") +
const string f77(string("yes (") +
(OMPI_HAVE_WEAK_SYMBOLS ? "all" : (OMPI_HAVE_WEAK_SYMBOLS ? "all" :
(OMPI_F77_CAPS ? "caps" : (OMPI_F77_CAPS ? "caps" :
(OMPI_F77_PLAIN ? "lower case" : (OMPI_F77_PLAIN ? "lower case" :
(OMPI_F77_SINGLE_UNDERSCORE ? "single underscore" : (OMPI_F77_SINGLE_UNDERSCORE ? "single underscore" :
"double underscore")))) + string(")")); "double underscore")))) + string(")"): "no");
#else
const string f77("no");
#endif
const string f90(OMPI_WANT_F90_BINDINGS ? "yes" : "no"); const string f90(OMPI_WANT_F90_BINDINGS ? "yes" : "no");
const string threads(OMPI_HAVE_SOLARIS_THREADS ? "solaris" : const string threads(OMPI_HAVE_SOLARIS_THREADS ? "solaris" :
(OMPI_HAVE_POSIX_THREADS ? "posix" : "no")); (OMPI_HAVE_POSIX_THREADS ? "posix" : "no"));