1
1

usnic: handle missing ibv_event_type_str

Some older versions of libibverbs do not have `ibv_event_type_str`,
leading to compilation failures on older machines, irrespective of
whether they could ever support usNIC anyway.  If we encounter any other
build issues related to "old verbs" then we should just cause the usnic
BTL to disqualify itself when it encounters "old" traits.

Thanks to Paul Hargrove for reporting the issue:
http://www.open-mpi.org/community/lists/devel/2014/02/14056.php

Reviewed-by: Jeff Squyres <jsquyres@cisco.com>

cmr=v1.7.5:reviewer=ompi-rm1.7

This commit was SVN r30674.
Этот коммит содержится в:
Dave Goodell 2014-02-11 19:18:29 +00:00
родитель 173dd6d503
Коммит 72c0b89e8f
2 изменённых файлов: 9 добавлений и 0 удалений

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

@ -61,6 +61,12 @@ get_nsec(void)
(type *)( ((char *)(ptr)) - offsetof(type,member) ))
#endif
/* particularly old versions of verbs do not have this function, which will
* cause unnecessary build failures on other platforms */
#if !HAVE_DECL_IBV_EVENT_TYPE_STR
#define ibv_event_type_str(ev_type) "(ibv_event_type_str unavailable)"
#endif
/* MSGDEBUG2 prints 1 line at each BTL entry point */
#define MSGDEBUG2 (MSGDEBUG1||0)
/* MSGDEBUG1 prints more info about arguments and internal functions */

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

@ -64,6 +64,9 @@ AC_DEFUN([MCA_ompi_btl_usnic_CONFIG],[
[btl_usnic_have_ibv_event_gid_change=1],
[],
[ #include <infiniband/verbs.h>
])
AC_CHECK_DECLS([ibv_event_type_str], [], [],
[#include <infiniband/verbs.h>
])
]
)