1
1

Remove a compiler warning from ompi_info by using 2 macros to record

whether MPI API parameters should be checked never, always, or
determined at run-time.

This commit was SVN r19805.
Этот коммит содержится в:
Jeff Squyres 2008-10-25 20:54:02 +00:00
родитель 71dcf61f9b
Коммит bc710baa75
2 изменённых файлов: 7 добавлений и 3 удалений

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

@ -345,20 +345,25 @@ mpi_param_check=ompi_mpi_param_check
if test "$with_mpi_param_check" = "no" -o \ if test "$with_mpi_param_check" = "no" -o \
"$with_mpi_param_check" = "never"; then "$with_mpi_param_check" = "never"; then
mpi_param_check=0 mpi_param_check=0
mpi_param_check_level=0
AC_MSG_RESULT([never]) AC_MSG_RESULT([never])
elif test "$with_mpi_param_check" = "yes" -o \ elif test "$with_mpi_param_check" = "yes" -o \
"$with_mpi_param_check" = "always"; then "$with_mpi_param_check" = "always"; then
mpi_param_check=1 mpi_param_check=1
mpi_param_check_level=1
AC_MSG_RESULT([always]) AC_MSG_RESULT([always])
elif test "$with_mpi_param_check" = "runtime" -o \ elif test "$with_mpi_param_check" = "runtime" -o \
-z "$with_mpi_params_check"; then -z "$with_mpi_params_check"; then
AC_MSG_RESULT([runtime]) AC_MSG_RESULT([runtime])
mpi_param_check_level=2
else else
AC_MSG_RESULT([unknown]) AC_MSG_RESULT([unknown])
AC_MSG_WARN([*** Unrecognized --with-mpi-param-check value]) AC_MSG_WARN([*** Unrecognized --with-mpi-param-check value])
AC_MSG_WARN([*** See "configure --help" output]) AC_MSG_WARN([*** See "configure --help" output])
AC_MSG_WARN([*** Defaulting to "runtime"]) AC_MSG_WARN([*** Defaulting to "runtime"])
fi fi
AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK_LEVEL, $mpi_param_check_level,
[Whether we want to check MPI parameters never (0), always (1), or decide at run-time (2) -- this macro mainly for displaying the right value in ompi_info])
AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check, AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check,
[Whether we want to check MPI parameters always, never, or decide at run-time]) [Whether we want to check MPI parameters always, never, or decide at run-time])

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

@ -501,9 +501,8 @@ void ompi_info::do_config(bool want_all)
const string f90profiling((OMPI_ENABLE_MPI_PROFILING && OMPI_WANT_F90_BINDINGS) ? const string f90profiling((OMPI_ENABLE_MPI_PROFILING && OMPI_WANT_F90_BINDINGS) ?
"yes" : "no"); "yes" : "no");
const string cxxexceptions(OMPI_HAVE_CXX_EXCEPTION_SUPPORT ? "yes" : "no"); const string cxxexceptions(OMPI_HAVE_CXX_EXCEPTION_SUPPORT ? "yes" : "no");
int ompi_mpi_param_check = 3; const string paramcheck(0 == MPI_PARAM_CHECK_LEVEL ? "never" :
const string paramcheck(0 == MPI_PARAM_CHECK ? "never" : 1 == MPI_PARAM_CHECK_LEVEL ? "always" : "runtime");
1 == MPI_PARAM_CHECK ? "always" : "runtime");
string threads; string threads;
const string want_libltdl(OMPI_WANT_LIBLTDL ? "yes" : "no"); const string want_libltdl(OMPI_WANT_LIBLTDL ? "yes" : "no");
const string mpirun_prefix_by_default(ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT ? const string mpirun_prefix_by_default(ORTE_WANT_ORTERUN_PREFIX_BY_DEFAULT ?