Allow the PSM component to return ERR_NOT_AVAIL so it can be unloaded silently if executed on a node with no QLogic IB hardware. Also minor modifications to have the CM PML allow itself to be unloaded if no MTL components are available. The component selection logic can then continue to use other PMLs.
This commit was SVN r22410.
Этот коммит содержится в:
родитель
bdd1db8864
Коммит
8bdd334d95
@ -31,6 +31,10 @@
|
||||
|
||||
#include "psm.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static int ompi_mtl_psm_component_open(void);
|
||||
static int ompi_mtl_psm_component_close(void);
|
||||
static int ompi_mtl_psm_component_register(void);
|
||||
@ -152,7 +156,15 @@ ompi_mtl_psm_component_register(void)
|
||||
static int
|
||||
ompi_mtl_psm_component_open(void)
|
||||
{
|
||||
return OMPI_SUCCESS;
|
||||
struct stat st;
|
||||
|
||||
/* Component available only if Truescale hardware is present */
|
||||
if (0 == stat("/dev/ipath", &st)) {
|
||||
return OMPI_SUCCESS;
|
||||
}
|
||||
else {
|
||||
return OPAL_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -115,9 +115,17 @@ mca_pml_cm_component_register(void)
|
||||
static int
|
||||
mca_pml_cm_component_open(void)
|
||||
{
|
||||
/* Avneesh -- might want to check the return code here with
|
||||
respect to r22391 (i.e., OPAL_ERR_NOT_AVAILABLE issues) */
|
||||
return ompi_mtl_base_open();
|
||||
int ret;
|
||||
|
||||
ret = ompi_mtl_base_open();
|
||||
if (OMPI_SUCCESS == ret) {
|
||||
/* If no MTL components initialized CM component can be unloaded */
|
||||
if (0 == opal_list_get_size(&ompi_mtl_base_components_opened)) {
|
||||
ret = OPAL_ERR_NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user