Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: [OMPI devel] some configury nits
From: Ralf Wildenhues (Ralf.Wildenhues_at_[hidden])
Date: 2008-07-26 06:35:23


Hello,

I tried to build OpenMPI trunk on my Debian stable/testing mix,
and to make things more interesting, today my /bin/sh is dash,
and while gcc is version 4.3.1, g++ remained at 4.1.3.

I needed the following patch in order to get configure to finish
("test ... == ..." is a bash extension).

Then, the build failed with:

| make[6]: Entering directory `/tmp/OpenMPI/build/ompi/contrib/vt/vt/tools/vtfilter'
| g++ -DHAVE_CONFIG_H -I. -I../../../../../../../ompi-trunk/ompi/contrib/vt/vt/tools/vtfilter -I../.. -I../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/otflib -I../../extlib/otf/otflib -I../../../../../../../ompi-trunk/ompi/contrib/vt/vt/vtlib/ -I../../vtlib -fopenmp -DVT_OMP -O3 -DNDEBUG -finline-functions -pthread -MT vtfilter-vt_filter.o -MD -MP -MF .deps/vtfilter-vt_filter.Tpo -c -o vtfilter-vt_filter.o `test -f 'vt_filter.cc' || echo '../../../../../../../ompi-trunk/ompi/contrib/vt/vt/tools/vtfilter/'`vt_filter.cc
| g++ -DHAVE_CONFIG_H -I. -I../../../../../../../ompi-trunk/ompi/contrib/vt/vt/tools/vtfilter -I../.. -I../../../../../../../ompi-trunk/ompi/contrib/vt/vt/extlib/otf/otflib -I../../extlib/otf/otflib -I../../../../../../../ompi-trunk/ompi/contrib/vt/vt/vtlib/ -I../../vtlib -fopenmp -DVT_OMP -O3 -DNDEBUG -finline-functions -pthread -MT vtfilter-vt_filthandler.o -MD -MP -MF .deps/vtfilter-vt_filthandler.Tpo -c -o vtfilter-vt_filthandler.o `test -f 'vt_filthandler.cc' || echo '../../../../../../../ompi-trunk/ompi/contrib/vt/vt/tools/vtfilter/'`vt_filthandler.cc
| cc1plus: error: unrecognized command line option "-fopenmp"
| cc1plus: error: unrecognized command line option "-fopenmp"
| make[6]: *** [vtfilter-vt_filter.o] Fehler 1

This is because GCC 4.1.3 doesn't know about -fopenmp. The AX_OPENMP is
called in ACVT_OMP (in ompi/contrib/vt/vt/acinclude.m4) only for the C
compiler, not the C++ one. Note that the AX_OPENMP is suited to be
called for multiple languages (e.g., wrapped in AC_LANG_PUSH(...) ...
AC_LANG_POP(...)). However, OpenMPI may decide to not allow for
different compiler settings here, or at least require that all compilers
used do OpenMP. As I don't know what's desirable, no proposed patch
here.

Cheers,
Ralf

Fix unportable test statements in configure fragments.

Index: opal/mca/memory/ptmalloc2/configure.m4
===================================================================
--- opal/mca/memory/ptmalloc2/configure.m4 (Revision 19044)
+++ opal/mca/memory/ptmalloc2/configure.m4 (Arbeitskopie)
@@ -37,7 +37,7 @@
     AM_CONDITIONAL([OMPI_WANT_EXTERNAL_PTMALLOC2],
        [test "$enable_ptmalloc2_internal" != "yes"])
     AC_MSG_CHECKING([if ptmalloc2 should be part of libopen-pal])
- AS_IF([test "$enable_ptmalloc2_internal" == "yes"],
+ AS_IF([test "$enable_ptmalloc2_internal" = "yes"],
           [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
 
 
Index: ompi/contrib/vt/vt/extlib/otf/acinclude.m4
===================================================================
--- ompi/contrib/vt/vt/extlib/otf/acinclude.m4 (Revision 19044)
+++ ompi/contrib/vt/vt/extlib/otf/acinclude.m4 (Arbeitskopie)
@@ -306,7 +306,7 @@
                         py_version=`$PYTHON -c "from distutils.sysconfig import *; \
                                 from string import join; \
                                 print join(get_config_vars('VERSION'))" 2> /dev/null`
- if test "$py_version" == "[None]" -o -z "$py_version"; then
+ if test "$py_version" = "[None]" -o -z "$py_version"; then
                                 if test -n "$PYTHON_VERSION"; then
                                         py_version=$PYTHON_VERSION
                                 else
@@ -320,7 +320,7 @@
                                 print '-L' + get_python_lib(0,1), \
                                         '-lpython';" 2> /dev/null`$py_version
                 fi
- if test ! "$PYTHON_LDFLAGS" == "$py_version"; then
+ if test ! "$PYTHON_LDFLAGS" = "$py_version"; then
                         AC_MSG_RESULT([$PYTHON_LDFLAGS])
                 else
                         AC_MSG_RESULT([no])
Index: ompi/contrib/vt/vt/acinclude.m4
===================================================================
--- ompi/contrib/vt/vt/acinclude.m4 (Revision 19044)
+++ ompi/contrib/vt/vt/acinclude.m4 (Arbeitskopie)
@@ -312,7 +312,7 @@
         while :
         do
                 $2=`eval echo $var`
- AS_IF([test $$2 == $var], [break], [var=$$2])
+ AS_IF([test $$2 = $var], [break], [var=$$2])
         done
 ])