552c9ca5a0
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic. This commit was SVN r32317.
64 строки
1.4 KiB
C
64 строки
1.4 KiB
C
/*
|
|
* Copyright (c) 2012 Cisco Systems, Inc. All rights reserved.
|
|
*
|
|
* $COPYRIGHT$
|
|
*
|
|
* Additional copyrights may follow
|
|
*
|
|
* $HEADER$
|
|
*/
|
|
|
|
#include "opal_config.h"
|
|
|
|
#include <stdio.h>
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
#include <sys/types.h>
|
|
#endif
|
|
#ifdef HAVE_SYS_STAT_H
|
|
#include <sys/stat.h>
|
|
#endif
|
|
#ifdef HAVE_UNISTD_H
|
|
#include <unistd.h>
|
|
#endif
|
|
|
|
/* 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()). */
|
|
#include <infiniband/verbs.h>
|
|
#ifdef HAVE_INFINIBAND_DRIVER_H
|
|
#include <infiniband/driver.h>
|
|
#else
|
|
const char *ibv_get_sysfs_path(void);
|
|
#endif
|
|
|
|
#include "common_verbs.h"
|
|
|
|
/***********************************************************************/
|
|
|
|
bool opal_common_verbs_check_basics(void)
|
|
{
|
|
#if defined(__linux__)
|
|
int rc;
|
|
char *file;
|
|
struct stat s;
|
|
|
|
/* Check to see if $sysfsdir/class/infiniband/ exists */
|
|
asprintf(&file, "%s/class/infiniband", ibv_get_sysfs_path());
|
|
if (NULL == file) {
|
|
return false;
|
|
}
|
|
rc = stat(file, &s);
|
|
free(file);
|
|
if (0 != rc || !S_ISDIR(s.st_mode)) {
|
|
return false;
|
|
}
|
|
#endif
|
|
|
|
/* It exists and is a directory -- good enough */
|
|
return true;
|
|
}
|
|
|