Refs trac:3697 - use the opal_pmi_error function instead of ompi_error as the returned error codes are from PMI
This commit was SVN r28941. The following Trac tickets were found above: Ticket 3697 --> https://svn.open-mpi.org/trac/ompi/ticket/3697
Этот коммит содержится в:
родитель
e6199da2e7
Коммит
db214a2321
@ -17,6 +17,8 @@
|
|||||||
#include <pmi2.h>
|
#include <pmi2.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "opal/mca/common/pmi/common_pmi.h"
|
||||||
|
|
||||||
#include "ompi/info/info.h"
|
#include "ompi/info/info.h"
|
||||||
#include "ompi/mca/rte/rte.h"
|
#include "ompi/mca/rte/rte.h"
|
||||||
#include "ompi/mca/pubsub/base/base.h"
|
#include "ompi/mca/pubsub/base/base.h"
|
||||||
@ -39,12 +41,12 @@ static int publish ( char *service_name, ompi_info_t *info, char *port_name )
|
|||||||
|
|
||||||
#if WANT_PMI2_SUPPORT
|
#if WANT_PMI2_SUPPORT
|
||||||
if (PMI_SUCCESS != (rc = PMI2_Nameserv_publish(service_name, NULL, port_name))) {
|
if (PMI_SUCCESS != (rc = PMI2_Nameserv_publish(service_name, NULL, port_name))) {
|
||||||
OMPI_ERROR_LOG(rc);
|
OPAL_PMI_ERROR(rc, "PMI2_Nameserv_publish");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (PMI_SUCCESS != (rc = PMI_Publish_name(service_name, port_name))) {
|
if (PMI_SUCCESS != (rc = PMI_Publish_name(service_name, port_name))) {
|
||||||
OMPI_ERROR_LOG(rc);
|
OPAL_PMI_ERROR(rc, "PMI_Publish_name");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -59,13 +61,13 @@ static char* lookup ( char *service_name, ompi_info_t *info )
|
|||||||
#if WANT_PMI2_SUPPORT
|
#if WANT_PMI2_SUPPORT
|
||||||
port = (char*)malloc(1024*sizeof(char)); /* arbitrary size */
|
port = (char*)malloc(1024*sizeof(char)); /* arbitrary size */
|
||||||
if (PMI_SUCCESS != (rc = PMI2_Nameserv_lookup(service_name, NULL, port, 1024))) {
|
if (PMI_SUCCESS != (rc = PMI2_Nameserv_lookup(service_name, NULL, port, 1024))) {
|
||||||
OMPI_ERROR_LOG(rc);
|
OPAL_PMI_ERROR(rc, "PMI2_Nameserv_lookup");
|
||||||
free(port);
|
free(port);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (PMI_SUCCESS != (rc = PMI_Lookup_name(service_name, port))) {
|
if (PMI_SUCCESS != (rc = PMI_Lookup_name(service_name, port))) {
|
||||||
OMPI_ERROR_LOG(rc);
|
OPAL_PMI_ERROR(rc, "PMI_Lookup_name");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -80,12 +82,12 @@ static int unpublish ( char *service_name, ompi_info_t *info )
|
|||||||
|
|
||||||
#if WANT_PMI2_SUPPORT
|
#if WANT_PMI2_SUPPORT
|
||||||
if (PMI_SUCCESS != (rc = PMI2_Nameserv_unpublish(service_name, NULL))) {
|
if (PMI_SUCCESS != (rc = PMI2_Nameserv_unpublish(service_name, NULL))) {
|
||||||
OMPI_ERROR_LOG(rc);
|
OPAL_PMI_ERROR(rc, "PMI2_Nameserv_unpublish");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (PMI_SUCCESS != (rc = PMI_Unpublish_name(service_name))) {
|
if (PMI_SUCCESS != (rc = PMI_Unpublish_name(service_name))) {
|
||||||
OMPI_ERROR_LOG(rc);
|
OPAL_PMI_ERROR(rc, "PMI2_Nameserv_unpublish");
|
||||||
return OMPI_ERROR;
|
return OMPI_ERROR;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user