Fix problem on RHEL4U3 when compiling with the PGI 32 bit compiler:
<infiniband/driver.h> cannot be included because it will fail to compile. So per advice from Roland, in that case, just put manually include the one ibv_*() prototype that we need. Use an undocumented feature of AC_CHECK_HEADERS to check for <infiniband/driver.h> that I was told on the autoconf mailing list (see the comment for more details). This commit was SVN r19857.
Этот коммит содержится в:
родитель
d79775c98c
Коммит
3b1a1d75f8
@ -187,6 +187,18 @@ AC_DEFUN([OMPI_CHECK_OPENIB],[
|
||||
fi
|
||||
])
|
||||
|
||||
# Check to see if <infiniband/driver.h> works. It is known to
|
||||
# create problems on some platforms with some compilers (e.g.,
|
||||
# RHEL4U3 with the PGI 32 bit compiler). Use undocumented (in AC
|
||||
# 2.63) feature of AC_CHECK_HEADERS: if you explicitly pass in
|
||||
# AC_INCLUDES_DEFAULT as the 4th arg to AC_CHECK_HEADERS, the test
|
||||
# will fail if the header is present but not compilable, *but it
|
||||
# will not print the big scary warning*. See
|
||||
# http://lists.gnu.org/archive/html/autoconf/2008-10/msg00143.html.
|
||||
AS_IF([test "$ompi_check_openib_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS([infiniband/driver.h], [], [],
|
||||
[AC_INCLUDES_DEFAULT])])
|
||||
|
||||
AC_MSG_CHECKING([if ConnectX XRC support is enabled])
|
||||
AC_DEFINE_UNQUOTED([OMPI_HAVE_CONNECTX_XRC], [$$1_have_xrc],
|
||||
[Enable features required for ConnectX XRC support])
|
||||
|
@ -25,9 +25,19 @@
|
||||
#include "ompi_config.h"
|
||||
|
||||
#include <infiniband/verbs.h>
|
||||
/* This is crummy, but <infiniband/driver.h> doesn't work on all
|
||||
platforms with all compilers. Specifically, trying to include it
|
||||
on RHEL4U3 with the PGI 32 bit compiler will cause problems because
|
||||
certain 64 bit types are not defined. Per advice from Roland D.,
|
||||
just include the one prototype that we need in this case
|
||||
(ibv_get_sysfs_path()). */
|
||||
#ifdef HAVE_INFINIBAND_DRIVER_H
|
||||
#include <infiniband/driver.h>
|
||||
#else
|
||||
const char *ibv_get_sysfs_path(void);
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#include <string.h> /* for strerror()*/
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user