diff --git a/ompi/attribute/attribute.c b/ompi/attribute/attribute.c index 550a89d2a7..6b711dad4c 100644 --- a/ompi/attribute/attribute.c +++ b/ompi/attribute/attribute.c @@ -195,6 +195,8 @@ #include "ompi/attribute/attribute.h" #include "opal/class/opal_bitmap.h" #include "opal/threads/mutex.h" +#include "opal/util/opal_sos.h" + #include "ompi/constants.h" #include "ompi/datatype/ompi_datatype.h" #include "ompi/communicator/communicator.h" /* ompi_communicator_t generated in [COPY|DELETE]_ATTR_CALLBACKS */ @@ -1176,7 +1178,7 @@ static int get_value(opal_hash_table_t *attr_hash, int key, ret = opal_hash_table_get_value_uint32(keyval_hash, key, (void**) &keyval); - if (OMPI_ERR_NOT_FOUND == ret) { + if (OMPI_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret)) { OPAL_THREAD_UNLOCK(&alock); return MPI_KEYVAL_INVALID; } diff --git a/ompi/communicator/comm_cid.c b/ompi/communicator/comm_cid.c index 8c7e1dfb52..3a890c339e 100644 --- a/ompi/communicator/comm_cid.c +++ b/ompi/communicator/comm_cid.c @@ -31,6 +31,7 @@ #include "ompi/constants.h" #include "opal/class/opal_pointer_array.h" #include "opal/class/opal_list.h" +#include "opal/util/opal_sos.h" #include "ompi/mca/pml/pml.h" #include "ompi/mca/coll/base/base.h" #include "ompi/request/request.h" @@ -143,7 +144,7 @@ int ompi_comm_cid_init (void) ompi_comm_world_thread_level_mult = 1; break; } - } else if (OMPI_ERR_NOT_IMPLEMENTED == ret) { + } else if (OMPI_ERR_NOT_IMPLEMENTED == OPAL_SOS_GET_ERROR_CODE(ret)) { if (ompi_mpi_thread_multiple) { ompi_comm_world_thread_level_mult = 1; } diff --git a/ompi/errhandler/errhandler.c b/ompi/errhandler/errhandler.c index 3a9b01c109..5b369720a2 100644 --- a/ompi/errhandler/errhandler.c +++ b/ompi/errhandler/errhandler.c @@ -199,7 +199,7 @@ ompi_errhandler_t *ompi_errhandler_create(ompi_errhandler_type_t object_type, new_errhandler = OBJ_NEW(ompi_errhandler_t); if (NULL != new_errhandler) { - if (OMPI_ERROR == new_errhandler->eh_f_to_c_index) { + if (OMPI_SUCCESS != new_errhandler->eh_f_to_c_index) { OBJ_RELEASE(new_errhandler); new_errhandler = NULL; } else { diff --git a/ompi/group/group_init.c b/ompi/group/group_init.c index c157c6e191..f5c632d9ed 100644 --- a/ompi/group/group_init.c +++ b/ompi/group/group_init.c @@ -62,7 +62,7 @@ ompi_group_t *ompi_group_allocate(int group_size) if (NULL == new_group) goto error_exit; - if (OMPI_ERROR == new_group->grp_f_to_c_index) { + if (OMPI_SUCCESS != new_group->grp_f_to_c_index) { OBJ_RELEASE (new_group); new_group = NULL; goto error_exit; @@ -106,7 +106,7 @@ ompi_group_t *ompi_group_allocate_sporadic(int group_size) if( NULL == new_group) { goto error_exit; } - if (OMPI_ERROR == new_group->grp_f_to_c_index) { + if (OMPI_SUCCESS != new_group->grp_f_to_c_index) { OBJ_RELEASE(new_group); new_group = NULL; goto error_exit; @@ -148,7 +148,7 @@ ompi_group_t *ompi_group_allocate_strided(void) if( NULL == new_group ) { goto error_exit; } - if (OMPI_ERROR == new_group->grp_f_to_c_index) { + if (OMPI_SUCCESS != new_group->grp_f_to_c_index) { OBJ_RELEASE(new_group); new_group = NULL; goto error_exit; @@ -175,7 +175,7 @@ ompi_group_t *ompi_group_allocate_bmap(int orig_group_size , int group_size) if( NULL == new_group) { goto error_exit; } - if (OMPI_ERROR == new_group->grp_f_to_c_index) { + if (OMPI_SUCCESS != new_group->grp_f_to_c_index) { OBJ_RELEASE(new_group); new_group = NULL; goto error_exit; diff --git a/ompi/mca/bml/bml.h b/ompi/mca/bml/bml.h index 8c9556eada..9314fd953d 100644 --- a/ompi/mca/bml/bml.h +++ b/ompi/mca/bml/bml.h @@ -31,6 +31,7 @@ #include "opal/datatype/opal_convertor.h" #include "opal/mca/crs/crs.h" #include "opal/mca/crs/base/base.h" +#include "opal/util/opal_sos.h" #include "ompi/mca/btl/btl.h" @@ -272,7 +273,7 @@ static inline int mca_bml_base_send( mca_bml_base_btl_t* bml_btl, des->des_context = (void*) bml_btl; rc = btl->btl_send(btl, bml_btl->btl_endpoint, des, tag); - if(rc == OMPI_ERR_RESOURCE_BUSY) + if(OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_RESOURCE_BUSY) rc = OMPI_SUCCESS; return rc; diff --git a/ompi/mca/bml/r2/bml_r2.c b/ompi/mca/bml/r2/bml_r2.c index f46cb1bf4c..6571193022 100644 --- a/ompi/mca/bml/r2/bml_r2.c +++ b/ompi/mca/bml/r2/bml_r2.c @@ -404,7 +404,7 @@ static int mca_bml_r2_add_procs( size_t nprocs, } if (mca_bml_r2.show_unreach_errors && - OMPI_ERR_UNREACH == ret) { + OMPI_ERR_UNREACH == OPAL_SOS_GET_ERROR_CODE(ret)) { orte_show_help("help-mca-bml-r2.txt", "unreachable proc", true, diff --git a/ompi/mca/btl/ofud/btl_ofud_component.c b/ompi/mca/btl/ofud/btl_ofud_component.c index 5e48d51512..6eee6a4da4 100644 --- a/ompi/mca/btl/ofud/btl_ofud_component.c +++ b/ompi/mca/btl/ofud/btl_ofud_component.c @@ -34,6 +34,7 @@ #include "ompi/mca/btl/btl.h" #include "opal/sys/timer.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "orte/mca/errmgr/errmgr.h" #include "ompi/mca/btl/base/base.h" diff --git a/ompi/mca/btl/openib/btl_openib.c b/ompi/mca/btl/openib/btl_openib.c index 0908aa12cb..2940c1b186 100644 --- a/ompi/mca/btl/openib/btl_openib.c +++ b/ompi/mca/btl/openib/btl_openib.c @@ -32,6 +32,7 @@ #include "opal/class/opal_bitmap.h" #include "opal/util/output.h" #include "opal/util/arch.h" +#include "opal/util/opal_sos.h" #include "ompi/mca/btl/btl.h" #include "ompi/mca/btl/base/btl_base_error.h" @@ -291,7 +292,7 @@ static int create_srq(mca_btl_openib_module_t *openib_btl) /* Check if our device supports modify srq ability */ rc = check_if_device_support_modify_srq(openib_btl); - if(OMPI_ERR_NOT_SUPPORTED == rc) { + if(OMPI_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(rc)) { device_support_modify_srq = false; } else if(OMPI_SUCCESS != rc) { mca_btl_openib_show_init_error(__FILE__, __LINE__, @@ -481,7 +482,8 @@ static int mca_btl_openib_tune_endpoint(mca_btl_openib_module_t* openib_btl, ret = ompi_btl_openib_ini_query(endpoint->rem_info.rem_vendor_id, endpoint->rem_info.rem_vendor_part_id, &values); - if (OMPI_SUCCESS != ret && OMPI_ERR_NOT_FOUND != ret) { + if (OMPI_SUCCESS != ret && + OMPI_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret)) { orte_show_help("help-mpi-btl-openib.txt", "error in device init", true, orte_process_info.nodename, @@ -1586,7 +1588,7 @@ int mca_btl_openib_put( mca_btl_base_module_t* btl, OPAL_THREAD_LOCK(&ep->endpoint_lock); rc = check_endpoint_state(ep, descriptor, &ep->pending_put_frags); OPAL_THREAD_UNLOCK(&ep->endpoint_lock); - if(OMPI_ERR_RESOURCE_BUSY == rc) + if(OMPI_ERR_RESOURCE_BUSY == OPAL_SOS_GET_ERROR_CODE(rc)) return OMPI_SUCCESS; if(OMPI_SUCCESS != rc) return rc; @@ -1657,7 +1659,7 @@ int mca_btl_openib_get(mca_btl_base_module_t* btl, OPAL_THREAD_LOCK(&ep->endpoint_lock); rc = check_endpoint_state(ep, descriptor, &ep->pending_get_frags); OPAL_THREAD_UNLOCK(&ep->endpoint_lock); - if(OMPI_ERR_RESOURCE_BUSY == rc) + if(OMPI_ERR_RESOURCE_BUSY == OPAL_SOS_GET_ERROR_CODE(rc)) return OMPI_SUCCESS; if(OMPI_SUCCESS != rc) return rc; diff --git a/ompi/mca/btl/openib/btl_openib_component.c b/ompi/mca/btl/openib/btl_openib_component.c index a7a9b81b6c..42b6286958 100644 --- a/ompi/mca/btl/openib/btl_openib_component.c +++ b/ompi/mca/btl/openib/btl_openib_component.c @@ -1035,8 +1035,8 @@ static int prepare_device_for_use(mca_btl_openib_device_t *device) if (OMPI_SUCCESS != rc) { /* If we're "out of memory", this usually means that we ran out of registered memory, so show that error message */ - if (OMPI_ERR_OUT_OF_RESOURCE == rc || - OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc) { + if (OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc) || + OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { errno = ENOMEM; mca_btl_openib_show_init_error(__FILE__, __LINE__, "ompi_free_list_init_ex_new", @@ -1071,8 +1071,8 @@ static int prepare_device_for_use(mca_btl_openib_device_t *device) /* If we're "out of memory", this usually means that we ran out of registered memory, so show that error message */ - if (OMPI_ERR_OUT_OF_RESOURCE == rc || - OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc) { + if (OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc) || + OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { errno = ENOMEM; mca_btl_openib_show_init_error(__FILE__, __LINE__, "ompi_free_list_init_ex_new", @@ -1567,11 +1567,12 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev) ret = ompi_btl_openib_ini_query(device->ib_dev_attr.vendor_id, device->ib_dev_attr.vendor_part_id, &values); - if (OMPI_SUCCESS != ret && OMPI_ERR_NOT_FOUND != ret) { + if (OMPI_SUCCESS != ret && + OMPI_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret)) { /* If we get a serious error, propagate it upwards */ goto error; } - if (OMPI_ERR_NOT_FOUND == ret) { + if (OMPI_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret)) { /* If we didn't find a matching device in the INI files, output a warning that we're using default values (unless overridden that we don't want to see these warnings) */ @@ -1587,7 +1588,8 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev) /* Note that even if we don't find default values, "values" will be set indicating that it does not have good values */ ret = ompi_btl_openib_ini_query(0, 0, &default_values); - if (OMPI_SUCCESS != ret && OMPI_ERR_NOT_FOUND != ret) { + if (OMPI_SUCCESS != ret && + OMPI_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret)) { /* If we get a serious error, propagate it upwards */ goto error; } @@ -1807,7 +1809,7 @@ static int init_one_device(opal_list_t *btl_list, struct ibv_device* ib_dev) if (OMPI_SUCCESS != ret) { /* Out of bounds error indicates that we hit max btl number * don't propagate the error to the caller */ - if (OMPI_ERR_VALUE_OUT_OF_BOUNDS == ret) { + if (OMPI_ERR_VALUE_OUT_OF_BOUNDS == OPAL_SOS_GET_ERROR_CODE(ret)) { ret = OMPI_SUCCESS; } break; @@ -2722,7 +2724,7 @@ btl_openib_component_init(int *num_btl_modules, /* If we get NOT_SUPPORTED, then no CPC was found for this port. But that's not a fatal error -- just keep going; let's see if we find any usable openib modules or not. */ - if (OMPI_ERR_NOT_SUPPORTED == ret) { + if (OMPI_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(ret)) { continue; } else if (OMPI_SUCCESS != ret) { /* All others *are* fatal. Note that we already did a @@ -2877,8 +2879,8 @@ static int progress_no_credits_pending_frags(mca_btl_base_endpoint_t *ep) If it fails because of another error, return the error upward. */ rc = mca_btl_openib_endpoint_post_send(ep, to_send_frag(frag)); - if (OPAL_UNLIKELY(OMPI_SUCCESS != rc && - OMPI_ERR_RESOURCE_BUSY != rc)) { + if (OPAL_UNLIKELY(OMPI_SUCCESS != rc && + OMPI_ERR_RESOURCE_BUSY != OPAL_SOS_GET_ERROR_CODE(rc))) { OPAL_THREAD_UNLOCK(&ep->endpoint_lock); return rc; } @@ -2904,8 +2906,8 @@ void mca_btl_openib_frag_progress_pending_put_get(mca_btl_base_endpoint_t *ep, OPAL_THREAD_UNLOCK(&ep->endpoint_lock); if(NULL == frag) break; - if(mca_btl_openib_get((mca_btl_base_module_t *)openib_btl, ep, - &to_base_frag(frag)->base) == OMPI_ERR_OUT_OF_RESOURCE) + if(OPAL_SOS_GET_ERROR_CODE(mca_btl_openib_get((mca_btl_base_module_t *)openib_btl, ep, + &to_base_frag(frag)->base)) == OMPI_ERR_OUT_OF_RESOURCE) break; } @@ -2916,8 +2918,8 @@ void mca_btl_openib_frag_progress_pending_put_get(mca_btl_base_endpoint_t *ep, OPAL_THREAD_UNLOCK(&ep->endpoint_lock); if(NULL == frag) break; - if(mca_btl_openib_put((mca_btl_base_module_t*)openib_btl, ep, - &to_base_frag(frag)->base) == OMPI_ERR_OUT_OF_RESOURCE) + if(OPAL_SOS_GET_ERROR_CODE(mca_btl_openib_put((mca_btl_base_module_t*)openib_btl, ep, + &to_base_frag(frag)->base)) == OMPI_ERR_OUT_OF_RESOURCE) break; } } @@ -3293,14 +3295,13 @@ error: cq_name[cq], btl_openib_component_status_to_string(wc->status), wc->status, wc->wr_id, wc->opcode, wc->vendor_err, qp)); - orte_notifier.peer(ORTE_NOTIFIER_INFRA, ORTE_ERR_COMM_FAILURE, - remote_proc ? &remote_proc->proc_name : NULL, - "\n\tIB polling %s with status %s " - "status number %d for wr_id %" PRIx64 " opcode %d vendor error %d qp_idx %d", - cq_name[cq], - btl_openib_component_status_to_string(wc->status), - wc->status, wc->wr_id, - wc->opcode, wc->vendor_err, qp); + orte_notifier.log_peer(ORTE_NOTIFIER_CRIT, ORTE_ERR_COMM_FAILURE, + remote_proc ? &remote_proc->proc_name : NULL, + "\n\tIB polling %s with status %s " + "status number %d for wr_id %llu opcode %d vendor error %d qp_idx %d", + cq_name[cq], btl_openib_component_status_to_string(wc->status), + wc->status, wc->wr_id, + wc->opcode, wc->vendor_err, qp); } if (IBV_WC_RNR_RETRY_EXC_ERR == wc->status || @@ -3319,23 +3320,23 @@ error: "srq rnr retry exceeded", true, orte_process_info.nodename, device_name, peer_hostname); - orte_notifier.help(ORTE_NOTIFIER_INFRA, ORTE_ERR_COMM_FAILURE, - "help-mpi-btl-openib.txt", - BTL_OPENIB_QP_TYPE_PP(qp) ? - "pp rnr retry exceeded" : - "srq rnr retry exceeded", - orte_process_info.nodename, device_name, - peer_hostname); + orte_notifier.show_help(ORTE_NOTIFIER_CRIT, ORTE_ERR_COMM_FAILURE, + "help-mpi-btl-openib.txt", + BTL_OPENIB_QP_TYPE_PP(qp) ? + "pp rnr retry exceeded" : + "srq rnr retry exceeded", + orte_process_info.nodename, device_name, + peer_hostname); } else if (IBV_WC_RETRY_EXC_ERR == wc->status) { orte_show_help("help-mpi-btl-openib.txt", "pp retry exceeded", true, orte_process_info.nodename, device_name, peer_hostname); - orte_notifier.help(ORTE_NOTIFIER_INFRA, ORTE_ERR_COMM_FAILURE, - "help-mpi-btl-openib.txt", - "pp retry exceeded", - orte_process_info.nodename, - device_name, peer_hostname); + orte_notifier.show_help(ORTE_NOTIFIER_CRIT, ORTE_ERR_COMM_FAILURE, + "help-mpi-btl-openib.txt", + "pp retry exceeded", + orte_process_info.nodename, + device_name, peer_hostname); } } diff --git a/ompi/mca/btl/openib/btl_openib_endpoint.c b/ompi/mca/btl/openib/btl_openib_endpoint.c index 612c67fc22..6955ca5e49 100644 --- a/ompi/mca/btl/openib/btl_openib_endpoint.c +++ b/ompi/mca/btl/openib/btl_openib_endpoint.c @@ -33,6 +33,7 @@ #include "opal_stdint.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" @@ -678,7 +679,7 @@ void mca_btl_openib_endpoint_connected(mca_btl_openib_endpoint_t *endpoint) frag = to_send_frag(frag_item); /* We need to post this one */ - if(OMPI_ERROR == mca_btl_openib_endpoint_post_send(endpoint, frag)) + if(OMPI_SUCCESS != mca_btl_openib_endpoint_post_send(endpoint, frag)) BTL_ERROR(("Error posting send")); } OPAL_THREAD_UNLOCK(&endpoint->endpoint_lock); @@ -706,7 +707,7 @@ int mca_btl_openib_endpoint_send(mca_btl_base_endpoint_t* ep, rc = mca_btl_openib_endpoint_post_send(ep, frag); } OPAL_THREAD_UNLOCK(&ep->endpoint_lock); - if (OPAL_UNLIKELY(OMPI_ERR_RESOURCE_BUSY == rc)) { + if (OPAL_UNLIKELY(OMPI_ERR_RESOURCE_BUSY == OPAL_SOS_GET_ERROR_CODE(rc))) { rc = OMPI_SUCCESS; } @@ -890,7 +891,7 @@ static int mca_btl_openib_endpoint_send_eager_rdma( )); } rc = mca_btl_openib_endpoint_send(endpoint, frag); - if (OMPI_SUCCESS == rc ||OMPI_ERR_RESOURCE_BUSY == rc) + if (OMPI_SUCCESS == rc || OMPI_ERR_RESOURCE_BUSY == OPAL_SOS_GET_ERROR_CODE(rc)) return OMPI_SUCCESS; MCA_BTL_IB_FRAG_RETURN(frag); diff --git a/ompi/mca/btl/openib/btl_openib_ini.c b/ompi/mca/btl/openib/btl_openib_ini.c index 3f5bacce26..e8b9bc6a62 100644 --- a/ompi/mca/btl/openib/btl_openib_ini.c +++ b/ompi/mca/btl/openib/btl_openib_ini.c @@ -27,6 +27,7 @@ #include #include "orte/util/show_help.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "btl_openib.h" @@ -122,13 +123,13 @@ int ompi_btl_openib_ini_init(void) /* Note that NOT_FOUND and SUCCESS are not fatal errors and we keep going. Other errors are treated as fatal */ - if (OMPI_ERR_NOT_FOUND != ret && OMPI_SUCCESS != ret) { + if (OMPI_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret) && OMPI_SUCCESS != ret) { break; } str = colon + 1; } /* Parse the last file if we didn't have a fatal error above */ - if (OMPI_ERR_NOT_FOUND != ret && OMPI_SUCCESS != ret) { + if (OMPI_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret) && OMPI_SUCCESS != ret) { ret = parse_file(str); } @@ -139,7 +140,7 @@ int ompi_btl_openib_ini_init(void) /* Return SUCCESS unless we got a fatal error */ initialized = true; - return (OMPI_SUCCESS == ret || OMPI_ERR_NOT_FOUND == ret) ? + return (OMPI_SUCCESS == ret || OMPI_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret)) ? OMPI_SUCCESS : ret; } diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_base.c b/ompi/mca/btl/openib/connect/btl_openib_connect_base.c index 03dc5f5eb2..de3e867aff 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_base.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_base.c @@ -28,6 +28,7 @@ #include "orte/util/show_help.h" #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" /* * Array of all possible connection functions @@ -218,7 +219,7 @@ int ompi_btl_openib_connect_base_init(void) opal_output(-1, "found available cpc (SUCCESS init): %s", all[i]->cbc_name); continue; - } else if (OMPI_ERR_NOT_SUPPORTED == rc) { + } else if (OMPI_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(rc)) { continue; } else { return rc; @@ -264,7 +265,8 @@ int ompi_btl_openib_connect_base_select_for_local_port(mca_btl_openib_module_t * strcat(msg, available[i]->cbc_name); rc = available[i]->cbc_query(btl, &cpcs[cpc_index]); - if (OMPI_ERR_NOT_SUPPORTED == rc || OMPI_ERR_UNREACH == rc) { + if (OMPI_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(rc) || + OMPI_ERR_UNREACH == OPAL_SOS_GET_ERROR_CODE(rc)) { continue; } else if (OMPI_SUCCESS != rc) { free(cpcs); diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c b/ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c index 3cbaa81643..1335266c94 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_ibcm.c @@ -857,7 +857,7 @@ static int ibcm_component_query(mca_btl_openib_module_t *btl, error: ibcm_module_finalize(btl, (ompi_btl_openib_connect_base_module_t *) m); - if (OMPI_ERR_NOT_SUPPORTED == rc) { + if (OMPI_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(rc)) { BTL_VERBOSE(("unavailable for use on %s:%d; skipped", ibv_get_device_name(btl->device->ib_dev), btl->port_num)); diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c b/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c index 30b0a73a00..0cb5bec894 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_oob.c @@ -29,6 +29,7 @@ #include "orte/util/show_help.h" #include "opal/util/error.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c b/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c index 1424d961c0..9e152c7b49 100644 --- a/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c +++ b/ompi/mca/btl/openib/connect/btl_openib_connect_rdmacm.c @@ -32,6 +32,7 @@ #include "opal/util/output.h" #include "opal/util/error.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "btl_openib_fd.h" @@ -1912,7 +1913,7 @@ out3: out1: free(*cpc); out: - if (OMPI_ERR_NOT_SUPPORTED == rc) { + if (OMPI_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(rc)) { opal_output_verbose(5, mca_btl_base_output, "openib BTL: rdmacm CPC unavailable for use on %s:%d; skipped", ibv_get_device_name(openib_btl->device->ib_dev), diff --git a/ompi/mca/btl/portals/btl_portals_frag.h b/ompi/mca/btl/portals/btl_portals_frag.h index 8461046e94..797884048d 100644 --- a/ompi/mca/btl/portals/btl_portals_frag.h +++ b/ompi/mca/btl/portals/btl_portals_frag.h @@ -67,7 +67,7 @@ OBJ_CLASS_DECLARATION(mca_btl_portals_frag_recv_t); ompi_free_list_item_t *item; \ OMPI_FREE_LIST_GET(&((mca_btl_portals_module_t*)btl_macro)->portals_frag_eager, item, rc); \ frag = (mca_btl_portals_frag_t*) item; \ - if (rc == OMPI_ERR_TEMP_OUT_OF_RESOURCE) { \ + if (OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_TEMP_OUT_OF_RESOURCE) { \ OMPI_BTL_PORTALS_FRAG_ALLOC_MAX(btl_macro, frag, rc); \ } \ } diff --git a/ompi/mca/btl/tcp/btl_tcp_component.c b/ompi/mca/btl/tcp/btl_tcp_component.c index 24624f6449..1e2a5ecf04 100644 --- a/ompi/mca/btl/tcp/btl_tcp_component.c +++ b/ompi/mca/btl/tcp/btl_tcp_component.c @@ -959,7 +959,8 @@ mca_btl_base_module_t** mca_btl_tcp_component_init(int *num_btl_modules, } #if OPAL_WANT_IPV6 if((ret = mca_btl_tcp_component_create_listen(AF_INET6)) != OMPI_SUCCESS) { - if (!(OMPI_ERR_IN_ERRNO == ret && EAFNOSUPPORT == opal_socket_errno)) { + if (!(OMPI_ERR_IN_ERRNO == OPAL_SOS_GET_ERROR_CODE(ret) && + EAFNOSUPPORT == opal_socket_errno)) { opal_output (0, "mca_btl_tcp_component: IPv6 listening socket failed\n"); return 0; } diff --git a/ompi/mca/coll/sm2/coll_sm2_module.c b/ompi/mca/coll/sm2/coll_sm2_module.c index 158e9bbd31..dbf49a0d2c 100644 --- a/ompi/mca/coll/sm2/coll_sm2_module.c +++ b/ompi/mca/coll/sm2/coll_sm2_module.c @@ -1174,7 +1174,7 @@ mca_coll_sm2_comm_query(struct ompi_communicator_t *comm, int *priority) /* get process affinity mask */ OPAL_PAFFINITY_CPU_ZERO(my_cpu_set); ret=opal_paffinity_base_get(&my_cpu_set); - if( OPAL_ERR_NOT_FOUND == ret ) { + if( OPAL_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret) ) { /* pa affinity not set, so socket index will be set to -1 */ my_socket_index=-1; diff --git a/ompi/mca/common/sm/common_sm_mmap.c b/ompi/mca/common/sm/common_sm_mmap.c index e7e7debd42..583412d734 100644 --- a/ompi/mca/common/sm/common_sm_mmap.c +++ b/ompi/mca/common/sm/common_sm_mmap.c @@ -48,6 +48,7 @@ #include "opal/util/path.h" #include "opal/align.h" #include "opal/threads/mutex.h" +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/util/name_fns.h" diff --git a/ompi/mca/dpm/base/dpm_base_select.c b/ompi/mca/dpm/base/dpm_base_select.c index 12f03ea49b..f22f9d0ec6 100644 --- a/ompi/mca/dpm/base/dpm_base_select.c +++ b/ompi/mca/dpm/base/dpm_base_select.c @@ -18,6 +18,7 @@ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/base/mca_base_component_repository.h" @@ -40,7 +41,7 @@ int ompi_dpm_base_select(void) (mca_base_module_t **) &best_module, (mca_base_component_t **) &best_component))) { /* it is okay not to find any executable components */ - if (OMPI_ERR_NOT_FOUND == ret) { + if (OMPI_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret)) { ret = OPAL_SUCCESS; } goto cleanup; diff --git a/ompi/mca/dpm/orte/dpm_orte.c b/ompi/mca/dpm/orte/dpm_orte.c index 1fd309c02e..73fffd6cad 100644 --- a/ompi/mca/dpm/orte/dpm_orte.c +++ b/ompi/mca/dpm/orte/dpm_orte.c @@ -28,6 +28,7 @@ #include "opal/util/argv.h" #include "opal/util/opal_getcwd.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_component.c b/ompi/mca/osc/pt2pt/osc_pt2pt_component.c index 353862d97a..97e0fefcc4 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_component.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_component.c @@ -121,7 +121,7 @@ check_config_value_bool(char *key, ompi_info_t *info) info_not_found: param = mca_base_param_find("osc", "pt2pt", key); - if (param == OPAL_ERROR) return false; + if (param != OPAL_SUCCESS) return false; ret = mca_base_param_lookup_int(param, &flag); if (OMPI_SUCCESS != ret) return false; diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c b/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c index 6433fa7143..24d4c6bec9 100644 --- a/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c +++ b/ompi/mca/osc/pt2pt/osc_pt2pt_sync.c @@ -25,6 +25,7 @@ #include "mpi.h" #include "opal/runtime/opal_progress.h" #include "opal/threads/mutex.h" +#include "opal/util/opal_sos.h" #include "ompi/communicator/communicator.h" #include "ompi/mca/osc/base/base.h" @@ -122,7 +123,7 @@ ompi_osc_pt2pt_module_fence(int assert, ompi_win_t *win) ret = ompi_osc_pt2pt_sendreq_send(module, req); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret ) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret) ) { opal_output_verbose(5, ompi_osc_base_output, "complete: failure in starting sendreq (%d). Will try later.", ret); @@ -267,7 +268,7 @@ ompi_osc_pt2pt_module_complete(ompi_win_t *win) ret = ompi_osc_pt2pt_sendreq_send(module, req); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret ) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret) ) { opal_output_verbose(5, ompi_osc_base_output, "complete: failure in starting sendreq (%d). Will try later.", ret); @@ -480,7 +481,7 @@ ompi_osc_pt2pt_module_unlock(int target, ret = ompi_osc_pt2pt_sendreq_send(module, req); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret ) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret) ) { opal_output_verbose(5, ompi_osc_base_output, "complete: failure in starting sendreq (%d). Will try later.", ret); diff --git a/ompi/mca/osc/rdma/osc_rdma_comm.c b/ompi/mca/osc/rdma/osc_rdma_comm.c index e075604a70..67d24cb208 100644 --- a/ompi/mca/osc/rdma/osc_rdma_comm.c +++ b/ompi/mca/osc/rdma/osc_rdma_comm.c @@ -134,7 +134,7 @@ ompi_osc_rdma_module_accumulate(void *origin_addr, int origin_count, ret = ompi_osc_rdma_sendreq_send(module, sendreq); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret)) { OPAL_THREAD_LOCK(&module->m_lock); sendreq->req_module->m_num_pending_out -= 1; opal_list_append(&(module->m_pending_sendreqs), @@ -206,7 +206,7 @@ ompi_osc_rdma_module_get(void *origin_addr, ret = ompi_osc_rdma_sendreq_send(module, sendreq); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret)) { OPAL_THREAD_LOCK(&module->m_lock); sendreq->req_module->m_num_pending_out -= 1; opal_list_append(&(module->m_pending_sendreqs), @@ -274,7 +274,7 @@ ompi_osc_rdma_module_put(void *origin_addr, int origin_count, ret = ompi_osc_rdma_sendreq_send(module, sendreq); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret)) { OPAL_THREAD_LOCK(&module->m_lock); sendreq->req_module->m_num_pending_out -= 1; opal_list_append(&(module->m_pending_sendreqs), diff --git a/ompi/mca/osc/rdma/osc_rdma_component.c b/ompi/mca/osc/rdma/osc_rdma_component.c index d09eab652a..b283d4c910 100644 --- a/ompi/mca/osc/rdma/osc_rdma_component.c +++ b/ompi/mca/osc/rdma/osc_rdma_component.c @@ -128,7 +128,7 @@ check_config_value_bool(char *key, ompi_info_t *info) info_not_found: param = mca_base_param_find("osc", "rdma", key); - if (param == OPAL_ERROR) return false; + if (param != OPAL_SUCCESS) return false; ret = mca_base_param_lookup_int(param, &flag); if (OMPI_SUCCESS != ret) return false; diff --git a/ompi/mca/osc/rdma/osc_rdma_sync.c b/ompi/mca/osc/rdma/osc_rdma_sync.c index 4f119c2f5d..06d34be4e5 100644 --- a/ompi/mca/osc/rdma/osc_rdma_sync.c +++ b/ompi/mca/osc/rdma/osc_rdma_sync.c @@ -140,7 +140,7 @@ ompi_osc_rdma_module_fence(int assert, ompi_win_t *win) opal_list_remove_first(&(module->m_copy_pending_sendreqs)); ret = ompi_osc_rdma_sendreq_send(module, req); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret)) { opal_list_append(&(module->m_copy_pending_sendreqs), (opal_list_item_t*)req); } else if (OMPI_SUCCESS != ret) { return ret; @@ -355,7 +355,7 @@ ompi_osc_rdma_module_complete(ompi_win_t *win) (ompi_osc_rdma_sendreq_t*) item; ret = ompi_osc_rdma_sendreq_send(module, req); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret)) { opal_list_append(&(module->m_copy_pending_sendreqs), item); break; } else if (OMPI_SUCCESS != ret) { @@ -579,7 +579,7 @@ ompi_osc_rdma_module_unlock(int target, (ompi_osc_rdma_sendreq_t*) item; ret = ompi_osc_rdma_sendreq_send(module, req); - if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == ret) { + if (OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(ret)) { opal_list_append(&(module->m_copy_pending_sendreqs), item); break; } else if (OMPI_SUCCESS != ret) { diff --git a/ompi/mca/pml/base/pml_base_select.c b/ompi/mca/pml/base/pml_base_select.c index 1808be7b58..0492ab1739 100644 --- a/ompi/mca/pml/base/pml_base_select.c +++ b/ompi/mca/pml/base/pml_base_select.c @@ -25,6 +25,7 @@ #include "opal/class/opal_list.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "opal/runtime/opal_progress.h" #include "opal/mca/mca.h" @@ -357,7 +358,7 @@ mca_pml_base_pml_check_selected(const char *my_pml, (void**) &remote_pml, &size); /* if modex isn't implemented, then just assume all is well... */ - if (OMPI_ERR_NOT_IMPLEMENTED == ret) { + if (OMPI_ERR_NOT_IMPLEMENTED == OPAL_SOS_GET_ERROR_CODE(ret)) { opal_output_verbose( 10, mca_pml_base_output, "check:select: modex not implemented"); return OMPI_SUCCESS; diff --git a/ompi/mca/pml/csum/pml_csum.c b/ompi/mca/pml/csum/pml_csum.c index d16a598d98..18acad7132 100644 --- a/ompi/mca/pml/csum/pml_csum.c +++ b/ompi/mca/pml/csum/pml_csum.c @@ -580,7 +580,7 @@ void mca_pml_csum_process_pending_packets(mca_bml_base_btl_t* bml_btl) pckt->hdr.hdr_ack.hdr_dst_req.pval, pckt->hdr.hdr_ack.hdr_send_offset, pckt->hdr.hdr_common.hdr_flags & MCA_PML_CSUM_HDR_FLAGS_NORDMA); - if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == rc) ) { + if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) ) { OPAL_THREAD_LOCK(&mca_pml_csum.lock); opal_list_append(&mca_pml_csum.pckt_pending, (opal_list_item_t*)pckt); @@ -593,7 +593,7 @@ void mca_pml_csum_process_pending_packets(mca_bml_base_btl_t* bml_btl) pckt->hdr.hdr_fin.hdr_des.pval, pckt->order, pckt->hdr.hdr_fin.hdr_fail); - if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == rc) ) { + if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) ) { return; } break; @@ -625,7 +625,7 @@ void mca_pml_csum_process_pending_rdma(void) } else { rc = mca_pml_csum_recv_request_get_frag(frag); } - if(OMPI_ERR_OUT_OF_RESOURCE == rc) + if(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) break; } } diff --git a/ompi/mca/pml/csum/pml_csum_recvfrag.c b/ompi/mca/pml/csum/pml_csum_recvfrag.c index 8f3513160d..53cc779c57 100644 --- a/ompi/mca/pml/csum/pml_csum_recvfrag.c +++ b/ompi/mca/pml/csum/pml_csum_recvfrag.c @@ -14,6 +14,7 @@ * Copyright (c) 2009 IBM Corporation. All rights reserved. * Copyright (c) 2009 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -167,7 +168,7 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl, if (csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'match header\' - received csum:0x%04x != computed csum:0x%04x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, csum_received, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum header violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -298,7 +299,7 @@ void mca_pml_csum_recv_frag_callback_match(mca_btl_base_module_t* btl, if (csum_data != hdr->hdr_csum) { opal_output(0, "%s:%s:%d: Invalid \'match data\' - received csum:0x%x != computed csum:0x%x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, hdr->hdr_csum, csum_data); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum data violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -347,7 +348,7 @@ void mca_pml_csum_recv_frag_callback_rndv(mca_btl_base_module_t* btl, if (csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'rndv header\' - received csum:0x%04x != computed csum:0x%04x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, csum_received, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum header violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -405,7 +406,7 @@ void mca_pml_csum_recv_frag_callback_ack(mca_btl_base_module_t* btl, if (csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'ACK header\' - received csum:0x%04x != computed csum:0x%04x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, csum_received, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum header violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -458,7 +459,7 @@ void mca_pml_csum_recv_frag_callback_frag(mca_btl_base_module_t* btl, if(csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'frag header\' - received csum:0x%04x != computed csum:0x%04x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, csum_received, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum header violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -500,7 +501,7 @@ void mca_pml_csum_recv_frag_callback_put(mca_btl_base_module_t* btl, if(csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'PUT header\' - received csum:0x%04x != computed csum:0x%04x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, csum_received, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum header violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -542,7 +543,7 @@ void mca_pml_csum_recv_frag_callback_fin(mca_btl_base_module_t* btl, if(csum_received != csum) { opal_output(0, "%s:%s:%d: Invalid \'FIN header\' - received csum:0x%04x != computed csum:0x%04x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, csum_received, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum header violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); diff --git a/ompi/mca/pml/csum/pml_csum_recvreq.c b/ompi/mca/pml/csum/pml_csum_recvreq.c index 964aee764d..35c616ebea 100644 --- a/ompi/mca/pml/csum/pml_csum_recvreq.c +++ b/ompi/mca/pml/csum/pml_csum_recvreq.c @@ -13,6 +13,7 @@ * Copyright (c) 2009 IBM Corporation. All rights reserved. * Copyright (c) 2009 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2009 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -80,7 +81,7 @@ void mca_pml_csum_recv_request_process_pending(void) if( OPAL_UNLIKELY(NULL == recvreq) ) break; recvreq->req_pending = false; - if(mca_pml_csum_recv_request_schedule_exclusive(recvreq, NULL) == + if(OPAL_SOS_GET_ERROR_CODE(mca_pml_csum_recv_request_schedule_exclusive(recvreq, NULL)) == OMPI_ERR_OUT_OF_RESOURCE) break; } @@ -423,7 +424,7 @@ int mca_pml_csum_recv_request_get_frag( mca_pml_csum_rdma_frag_t* frag ) /* queue up get request */ rc = mca_bml_base_get(bml_btl,descriptor); if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { + if(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { mca_bml_base_free(bml_btl, descriptor); OPAL_THREAD_LOCK(&mca_pml_csum.lock); opal_list_append(&mca_pml_csum.rdma_pending, @@ -496,7 +497,7 @@ void mca_pml_csum_recv_request_progress_frag( mca_pml_csum_recv_request_t* recvr if(csum != hdr->hdr_frag.hdr_csum) { opal_output(0, "%s:%s:%d: Invalid \'frag data\' - received csum:0x%x != computed csum:0x%x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, hdr->hdr_frag.hdr_csum, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum data violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -642,7 +643,7 @@ void mca_pml_csum_recv_request_progress_rndv( mca_pml_csum_recv_request_t* recvr if (csum != hdr->hdr_match.hdr_csum) { opal_output(0, "%s:%s:%d: Invalid \'rndv data\' - received csum:0x%x != computed csum:0x%x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, hdr->hdr_match.hdr_csum, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum data violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); @@ -704,7 +705,7 @@ void mca_pml_csum_recv_request_progress_match( mca_pml_csum_recv_request_t* recv if (csum != hdr->hdr_match.hdr_csum) { opal_output(0, "%s:%s:%d: Invalid \'match data\' - received csum:0x%x != computed csum:0x%x\n", ORTE_NAME_PRINT(ORTE_PROC_MY_NAME), __FILE__, __LINE__, hdr->hdr_match.hdr_csum, csum); - orte_notifier.log(ORTE_NOTIFIER_INFRA, 1, + orte_notifier.log(ORTE_NOTIFIER_CRIT, 1, "Checksum data violation: job %s file %s line %d", (NULL == orte_job_ident) ? "UNKNOWN" : orte_job_ident, __FILE__, __LINE__); diff --git a/ompi/mca/pml/csum/pml_csum_recvreq.h b/ompi/mca/pml/csum/pml_csum_recvreq.h index dbd63277d4..077cbeefd8 100644 --- a/ompi/mca/pml/csum/pml_csum_recvreq.h +++ b/ompi/mca/pml/csum/pml_csum_recvreq.h @@ -346,7 +346,7 @@ static inline int mca_pml_csum_recv_request_schedule_exclusive( do { rc = mca_pml_csum_recv_request_schedule_once(req, start_bml_btl); - if(rc == OMPI_ERR_OUT_OF_RESOURCE) + if(OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_OUT_OF_RESOURCE) break; } while(!unlock_recv_request(req)); diff --git a/ompi/mca/pml/csum/pml_csum_sendreq.c b/ompi/mca/pml/csum/pml_csum_sendreq.c index 9fd6eee89f..847b7d7f58 100644 --- a/ompi/mca/pml/csum/pml_csum_sendreq.c +++ b/ompi/mca/pml/csum/pml_csum_sendreq.c @@ -64,7 +64,7 @@ void mca_pml_csum_send_request_process_pending(mca_bml_base_btl_t *bml_btl) switch(pending_type) { case MCA_PML_CSUM_SEND_PENDING_SCHEDULE: - if(mca_pml_csum_send_request_schedule_exclusive(sendreq) == + if(OPAL_SOS_GET_ERROR_CODE(mca_pml_csum_send_request_schedule_exclusive(sendreq)) == OMPI_ERR_OUT_OF_RESOURCE) { return; } @@ -73,7 +73,7 @@ void mca_pml_csum_send_request_process_pending(mca_bml_base_btl_t *bml_btl) send_dst = mca_bml_base_btl_array_find( &sendreq->req_endpoint->btl_eager, bml_btl->btl); if( (NULL == send_dst) || - (mca_pml_csum_send_request_start_btl(sendreq, send_dst) == + (OPAL_SOS_GET_ERROR_CODE(mca_pml_csum_send_request_start_btl(sendreq, send_dst)) == OMPI_ERR_OUT_OF_RESOURCE) ) { /* prepend to the pending list to minimize reordering in case * send_dst != 0 */ @@ -586,7 +586,7 @@ int mca_pml_csum_send_request_start_copy( mca_pml_csum_send_request_t* sendreq, } return OMPI_SUCCESS; } - switch(rc) { + switch(OPAL_SOS_GET_ERROR_CODE(rc)) { case OMPI_ERR_RESOURCE_BUSY: /* No more resources. Allow the upper level to queue the send */ rc = OMPI_ERR_OUT_OF_RESOURCE; @@ -1251,7 +1251,7 @@ int mca_pml_csum_send_request_put_frag( mca_pml_csum_rdma_frag_t* frag ) if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { mca_bml_base_free(bml_btl, des); frag->rdma_length = save_size; - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { + if(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { OPAL_THREAD_LOCK(&mca_pml_csum.lock); opal_list_append(&mca_pml_csum.rdma_pending, (opal_list_item_t*)frag); OPAL_THREAD_UNLOCK(&mca_pml_csum.lock); diff --git a/ompi/mca/pml/csum/pml_csum_sendreq.h b/ompi/mca/pml/csum/pml_csum_sendreq.h index 84a0541abd..1fb5ef4ddd 100644 --- a/ompi/mca/pml/csum/pml_csum_sendreq.h +++ b/ompi/mca/pml/csum/pml_csum_sendreq.h @@ -284,7 +284,7 @@ mca_pml_csum_send_request_schedule_exclusive(mca_pml_csum_send_request_t* sendre int rc; do { rc = mca_pml_csum_send_request_schedule_once(sendreq); - if(rc == OMPI_ERR_OUT_OF_RESOURCE) + if(OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_OUT_OF_RESOURCE) break; } while(!unlock_send_request(sendreq)); @@ -432,7 +432,7 @@ mca_pml_csum_send_request_start( mca_pml_csum_send_request_t* sendreq ) /* select a btl */ bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); rc = mca_pml_csum_send_request_start_btl(sendreq, bml_btl); - if( OPAL_LIKELY(OMPI_ERR_OUT_OF_RESOURCE != rc) ) + if( OPAL_LIKELY(OMPI_ERR_OUT_OF_RESOURCE != OPAL_SOS_GET_ERROR_CODE(rc)) ) return rc; } add_request_to_send_pending(sendreq, MCA_PML_CSUM_SEND_PENDING_START, true); diff --git a/ompi/mca/pml/dr/pml_dr_sendreq.c b/ompi/mca/pml/dr/pml_dr_sendreq.c index 2082fdbea7..478262efbe 100644 --- a/ompi/mca/pml/dr/pml_dr_sendreq.c +++ b/ompi/mca/pml/dr/pml_dr_sendreq.c @@ -102,7 +102,7 @@ static void mca_pml_dr_error_completion( mca_pml_dr_vfrag_t* vfrag = (mca_pml_dr_vfrag_t*)descriptor->des_cbdata; mca_pml_dr_send_request_t* sendreq = (mca_pml_dr_send_request_t*)vfrag->vf_send.pval; - switch(status) { + switch(OPAL_SOS_GET_ERROR_CODE(status)) { case OMPI_ERR_UNREACH: case OMPI_ERR_CONNECTION_FAILED: case OMPI_ERR_CONNECTION_REFUSED: diff --git a/ompi/mca/pml/ob1/pml_ob1.c b/ompi/mca/pml/ob1/pml_ob1.c index 998ecfaf9c..0b399e2b3f 100644 --- a/ompi/mca/pml/ob1/pml_ob1.c +++ b/ompi/mca/pml/ob1/pml_ob1.c @@ -549,7 +549,7 @@ void mca_pml_ob1_process_pending_packets(mca_bml_base_btl_t* bml_btl) pckt->hdr.hdr_ack.hdr_dst_req.pval, pckt->hdr.hdr_ack.hdr_send_offset, pckt->hdr.hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NORDMA); - if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == rc) ) { + if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) ) { OPAL_THREAD_LOCK(&mca_pml_ob1.lock); opal_list_append(&mca_pml_ob1.pckt_pending, (opal_list_item_t*)pckt); @@ -562,7 +562,7 @@ void mca_pml_ob1_process_pending_packets(mca_bml_base_btl_t* bml_btl) pckt->hdr.hdr_fin.hdr_des, pckt->order, pckt->hdr.hdr_fin.hdr_fail); - if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == rc) ) { + if( OPAL_UNLIKELY(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) ) { return; } break; @@ -594,7 +594,7 @@ void mca_pml_ob1_process_pending_rdma(void) } else { rc = mca_pml_ob1_recv_request_get_frag(frag); } - if(OMPI_ERR_OUT_OF_RESOURCE == rc) + if(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) break; } } diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.c b/ompi/mca/pml/ob1/pml_ob1_recvreq.c index 785def3eff..09061f53b3 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.c @@ -46,7 +46,7 @@ void mca_pml_ob1_recv_request_process_pending(void) if( OPAL_UNLIKELY(NULL == recvreq) ) break; recvreq->req_pending = false; - if(mca_pml_ob1_recv_request_schedule_exclusive(recvreq, NULL) == + if(OPAL_SOS_GET_ERROR_CODE(mca_pml_ob1_recv_request_schedule_exclusive(recvreq, NULL)) == OMPI_ERR_OUT_OF_RESOURCE) break; } @@ -384,7 +384,7 @@ int mca_pml_ob1_recv_request_get_frag( mca_pml_ob1_rdma_frag_t* frag ) /* queue up get request */ rc = mca_bml_base_get(bml_btl,descriptor); if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { + if(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { mca_bml_base_free(bml_btl, descriptor); OPAL_THREAD_LOCK(&mca_pml_ob1.lock); opal_list_append(&mca_pml_ob1.rdma_pending, diff --git a/ompi/mca/pml/ob1/pml_ob1_recvreq.h b/ompi/mca/pml/ob1/pml_ob1_recvreq.h index 301a045cc7..e3b7642fa1 100644 --- a/ompi/mca/pml/ob1/pml_ob1_recvreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_recvreq.h @@ -347,7 +347,7 @@ static inline int mca_pml_ob1_recv_request_schedule_exclusive( do { rc = mca_pml_ob1_recv_request_schedule_once(req, start_bml_btl); - if(rc == OMPI_ERR_OUT_OF_RESOURCE) + if(OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_OUT_OF_RESOURCE) break; } while(!unlock_recv_request(req)); diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.c b/ompi/mca/pml/ob1/pml_ob1_sendreq.c index 5a82826d3b..1fcaee5bc1 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.c +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.c @@ -52,7 +52,7 @@ void mca_pml_ob1_send_request_process_pending(mca_bml_base_btl_t *bml_btl) switch(pending_type) { case MCA_PML_OB1_SEND_PENDING_SCHEDULE: - if(mca_pml_ob1_send_request_schedule_exclusive(sendreq) == + if(OPAL_SOS_GET_ERROR_CODE(mca_pml_ob1_send_request_schedule_exclusive(sendreq)) == OMPI_ERR_OUT_OF_RESOURCE) { return; } @@ -61,8 +61,8 @@ void mca_pml_ob1_send_request_process_pending(mca_bml_base_btl_t *bml_btl) send_dst = mca_bml_base_btl_array_find( &sendreq->req_endpoint->btl_eager, bml_btl->btl); if( (NULL == send_dst) || - (mca_pml_ob1_send_request_start_btl(sendreq, send_dst) == - OMPI_ERR_OUT_OF_RESOURCE) ) { + (OPAL_SOS_GET_ERROR_CODE(mca_pml_ob1_send_request_start_btl(sendreq, send_dst)) == + OMPI_ERR_OUT_OF_RESOURCE) ) { /* prepend to the pending list to minimize reordering in case * send_dst != 0 */ add_request_to_send_pending(sendreq, @@ -541,7 +541,7 @@ int mca_pml_ob1_send_request_start_copy( mca_pml_ob1_send_request_t* sendreq, } return OMPI_SUCCESS; } - switch(rc) { + switch(OPAL_SOS_GET_ERROR_CODE(rc)) { case OMPI_ERR_RESOURCE_BUSY: /* No more resources. Allow the upper level to queue the send */ rc = OMPI_ERR_OUT_OF_RESOURCE; @@ -1173,7 +1173,7 @@ int mca_pml_ob1_send_request_put_frag( mca_pml_ob1_rdma_frag_t* frag ) if( OPAL_UNLIKELY(OMPI_SUCCESS != rc) ) { mca_bml_base_free(bml_btl, des); frag->rdma_length = save_size; - if(OMPI_ERR_OUT_OF_RESOURCE == rc) { + if(OMPI_ERR_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { OPAL_THREAD_LOCK(&mca_pml_ob1.lock); opal_list_append(&mca_pml_ob1.rdma_pending, (opal_list_item_t*)frag); OPAL_THREAD_UNLOCK(&mca_pml_ob1.lock); diff --git a/ompi/mca/pml/ob1/pml_ob1_sendreq.h b/ompi/mca/pml/ob1/pml_ob1_sendreq.h index b7962138a3..a2f99782c3 100644 --- a/ompi/mca/pml/ob1/pml_ob1_sendreq.h +++ b/ompi/mca/pml/ob1/pml_ob1_sendreq.h @@ -284,7 +284,7 @@ mca_pml_ob1_send_request_schedule_exclusive(mca_pml_ob1_send_request_t* sendreq) int rc; do { rc = mca_pml_ob1_send_request_schedule_once(sendreq); - if(rc == OMPI_ERR_OUT_OF_RESOURCE) + if(OPAL_SOS_GET_ERROR_CODE(rc) == OMPI_ERR_OUT_OF_RESOURCE) break; } while(!unlock_send_request(sendreq)); @@ -432,7 +432,7 @@ mca_pml_ob1_send_request_start( mca_pml_ob1_send_request_t* sendreq ) /* select a btl */ bml_btl = mca_bml_base_btl_array_get_next(&endpoint->btl_eager); rc = mca_pml_ob1_send_request_start_btl(sendreq, bml_btl); - if( OPAL_LIKELY(OMPI_ERR_OUT_OF_RESOURCE != rc) ) + if( OPAL_LIKELY(OMPI_ERR_OUT_OF_RESOURCE != OPAL_SOS_GET_ERROR_CODE(rc)) ) return rc; } add_request_to_send_pending(sendreq, MCA_PML_OB1_SEND_PENDING_START, true); diff --git a/ompi/mca/pml/v/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c b/ompi/mca/pml/v/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c index 97990c90ef..a694988054 100644 --- a/ompi/mca/pml/v/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c +++ b/ompi/mca/pml/v/mca/vprotocol/pessimist/vprotocol_pessimist_eventlog.c @@ -10,6 +10,7 @@ #include "ompi_config.h" #include "vprotocol_pessimist_eventlog.h" +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/base/rml_contact.h" diff --git a/ompi/mca/pubsub/base/pubsub_base_select.c b/ompi/mca/pubsub/base/pubsub_base_select.c index 4b4f7c92ea..a69e1f17b7 100644 --- a/ompi/mca/pubsub/base/pubsub_base_select.c +++ b/ompi/mca/pubsub/base/pubsub_base_select.c @@ -18,6 +18,7 @@ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/base/mca_base_component_repository.h" @@ -40,7 +41,7 @@ int ompi_pubsub_base_select(void) (mca_base_module_t **) &best_module, (mca_base_component_t **) &best_component))) { /* it is okay not to find any executable components */ - if (OMPI_ERR_NOT_FOUND == ret) { + if (OMPI_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret)) { ret = OPAL_SUCCESS; } goto cleanup; diff --git a/ompi/mca/pubsub/orte/pubsub_orte.c b/ompi/mca/pubsub/orte/pubsub_orte.c index 37270460f8..9b7a83fa5d 100644 --- a/ompi/mca/pubsub/orte/pubsub_orte.c +++ b/ompi/mca/pubsub/orte/pubsub_orte.c @@ -26,6 +26,7 @@ #include "orte/util/show_help.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/ompi/mca/rcache/rb/rcache_rb.c b/ompi/mca/rcache/rb/rcache_rb.c index dda993d24f..5087378300 100644 --- a/ompi/mca/rcache/rb/rcache_rb.c +++ b/ompi/mca/rcache/rb/rcache_rb.c @@ -121,7 +121,7 @@ int mca_rcache_rb_insert ( if(flags & MCA_MPOOL_FLAGS_CACHE) { rc = mca_rcache_rb_mru_insert( (mca_rcache_rb_module_t*) rcache, reg); if(OMPI_SUCCESS != rc) { - if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc) { + if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == OPAL_SOS_GET_ERROR_CODE(rc)) { /* * If the registration is too big for the rcache, * don't cache it and reset the flags so the upper level diff --git a/ompi/mpi/c/unpublish_name.c b/ompi/mpi/c/unpublish_name.c index ce084bd6b3..24a135545b 100644 --- a/ompi/mpi/c/unpublish_name.c +++ b/ompi/mpi/c/unpublish_name.c @@ -25,6 +25,8 @@ #include "ompi/info/info.h" #include "ompi/mca/pubsub/pubsub.h" +#include "opal/util/opal_sos.h" + #if OPAL_HAVE_WEAK_SYMBOLS && OMPI_PROFILING_DEFINES #pragma weak MPI_Unpublish_name = PMPI_Unpublish_name #endif @@ -66,13 +68,13 @@ int MPI_Unpublish_name(char *service_name, MPI_Info info, */ rc = ompi_pubsub.unpublish(service_name, info); if ( OMPI_SUCCESS != rc ) { - if (OMPI_ERR_NOT_FOUND == rc) { + if (OMPI_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(rc)) { /* service couldn't be found */ OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_SERVICE, FUNC_NAME); } - if (OMPI_ERR_PERM == rc) { + if (OMPI_ERR_PERM == OPAL_SOS_GET_ERROR_CODE(rc)) { /* this process didn't own the specified service */ OPAL_CR_EXIT_LIBRARY(); return OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_ACCESS, diff --git a/ompi/op/op.c b/ompi/op/op.c index 970f87aa1f..9645e38b2f 100644 --- a/ompi/op/op.c +++ b/ompi/op/op.c @@ -235,7 +235,7 @@ ompi_op_t *ompi_op_create_user(bool commute, goto error; } - if (OMPI_ERROR == new_op->o_f_to_c_index) { + if (OMPI_SUCCESS != new_op->o_f_to_c_index) { OBJ_RELEASE(new_op); new_op = NULL; goto error; diff --git a/ompi/proc/proc.c b/ompi/proc/proc.c index 6dd274ae88..4a2577e31d 100644 --- a/ompi/proc/proc.c +++ b/ompi/proc/proc.c @@ -26,6 +26,7 @@ #include "opal/threads/mutex.h" #include "opal/dss/dss.h" #include "opal/util/arch.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" @@ -168,7 +169,7 @@ int ompi_proc_set_arch(void) return OMPI_ERR_NOT_SUPPORTED; #endif } - } else if (OMPI_ERR_NOT_IMPLEMENTED == ret) { + } else if (OMPI_ERR_NOT_IMPLEMENTED == OPAL_SOS_GET_ERROR_CODE(ret)) { proc->proc_arch = opal_local_arch; } else { OPAL_THREAD_UNLOCK(&ompi_proc_lock); diff --git a/ompi/runtime/ompi_mpi_init.c b/ompi/runtime/ompi_mpi_init.c index 166b6dfbdb..9fbf1bf90f 100644 --- a/ompi/runtime/ompi_mpi_init.c +++ b/ompi/runtime/ompi_mpi_init.c @@ -57,7 +57,6 @@ #include "orte/mca/odls/base/base.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/util/name_fns.h" - #include "orte/mca/notifier/notifier.h" #include "ompi/constants.h" @@ -443,7 +442,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) goto error; } ret = opal_paffinity_base_slot_list_set((long)ORTE_PROC_MY_NAME->vpid, opal_paffinity_base_slot_list, &mask); - if (OPAL_SUCCESS != ret && OPAL_ERR_NOT_FOUND != ret) { + if (OPAL_SUCCESS != ret && OPAL_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret)) { error = "opal_paffinity_base_slot_list_set() returned an error"; goto error; } @@ -746,7 +745,7 @@ int ompi_mpi_init(int argc, char **argv, int requested, int *provided) /* If we got "unreachable", then print a specific error message. Otherwise, if we got some other failure, fall through to print a generic message. */ - if (OMPI_ERR_UNREACH == ret) { + if (OMPI_ERR_UNREACH == OPAL_SOS_GET_ERROR_CODE(ret)) { orte_show_help("help-mpi-runtime", "mpi_init:startup:pml-add-procs-fail", true); error = NULL; diff --git a/ompi/runtime/ompi_mpi_preconnect.c b/ompi/runtime/ompi_mpi_preconnect.c index d1b35045e0..2f56664cd1 100644 --- a/ompi/runtime/ompi_mpi_preconnect.c +++ b/ompi/runtime/ompi_mpi_preconnect.c @@ -34,7 +34,7 @@ ompi_init_preconnect_mpi(void) char inbuf[1], outbuf[1]; param = mca_base_param_find("mpi", NULL, "preconnect_mpi"); - if (OMPI_ERROR == param) return OMPI_SUCCESS; + if (OMPI_SUCCESS != param) return OMPI_SUCCESS; ret = mca_base_param_lookup_int(param, &value); if (OMPI_SUCCESS != ret || 0 == value) { return OMPI_SUCCESS; diff --git a/ompi/tools/ompi-server/ompi-server.c b/ompi/tools/ompi-server/ompi-server.c index afcd8e58fa..aec26c6ed9 100644 --- a/ompi/tools/ompi-server/ompi-server.c +++ b/ompi/tools/ompi-server/ompi-server.c @@ -46,6 +46,7 @@ #include "opal/mca/base/base.h" #include "opal/util/cmd_line.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "opal/util/daemon_init.h" #include "opal/runtime/opal.h" diff --git a/ompi/tools/ompi_info/components.c b/ompi/tools/ompi_info/components.c index 42b8dde9b5..0044d1b97a 100644 --- a/ompi/tools/ompi_info/components.c +++ b/ompi/tools/ompi_info/components.c @@ -383,7 +383,7 @@ void ompi_info_open_components(void) } map = OBJ_NEW(ompi_info_component_map_t); map->type = strdup("notifier"); - map->components = &mca_notifier_base_components_available; + map->components = &orte_notifier_base_components_available; opal_pointer_array_add(&component_map, map); #if !ORTE_DISABLE_FULL_SUPPORT diff --git a/ompi/tools/ompi_info/param.c b/ompi/tools/ompi_info/param.c index 266572f3d6..3871d63cb5 100644 --- a/ompi/tools/ompi_info/param.c +++ b/ompi/tools/ompi_info/param.c @@ -500,6 +500,7 @@ void ompi_info_do_config(bool want_all) char *memprofile; char *memdebug; char *debug; + char *log_event; char *mpi_interface_warning; char *cprofiling; char *cxxprofiling; @@ -545,6 +546,7 @@ void ompi_info_do_config(bool want_all) memprofile = OPAL_ENABLE_MEM_PROFILE ? "yes" : "no"; memdebug = OPAL_ENABLE_MEM_DEBUG ? "yes" : "no"; debug = OPAL_ENABLE_DEBUG ? "yes" : "no"; + log_event = ORTE_WANT_NOTIFIER_LOG_EVENT ? "yes" : "no"; mpi_interface_warning = OMPI_WANT_MPI_INTERFACE_WARNING ? "yes" : "no"; cprofiling = OMPI_ENABLE_MPI_PROFILING ? "yes" : "no"; cxxprofiling = (OMPI_WANT_CXX_BINDINGS && OMPI_ENABLE_MPI_PROFILING) ? "yes" : "no"; @@ -818,6 +820,7 @@ void ompi_info_do_config(bool want_all) ompi_info_out("MPI parameter check", "option:mpi-param-check", paramcheck); ompi_info_out("Memory profiling support", "option:mem-profile", memprofile); ompi_info_out("Memory debugging support", "option:mem-debug", memdebug); + ompi_info_out("Unusual events notif.", "option:log-event", log_event); ompi_info_out("libltdl support", "option:dlopen", want_libltdl); ompi_info_out("Heterogeneous support", "options:heterogeneous", heterogeneous); ompi_info_out("mpirun default --prefix", "mpirun:prefix_by_default", diff --git a/opal/event/signal.c b/opal/event/signal.c index 42e7febd9c..c5dea11c57 100644 --- a/opal/event/signal.c +++ b/opal/event/signal.c @@ -48,9 +48,7 @@ #include #include #include -#ifdef HAVE_UNISTD_H #include -#endif #include #ifdef HAVE_FCNTL_H #include diff --git a/opal/mca/base/mca_base_components_open.c b/opal/mca/base/mca_base_components_open.c index 42203da554..ec2c59d575 100644 --- a/opal/mca/base/mca_base_components_open.c +++ b/opal/mca/base/mca_base_components_open.c @@ -27,6 +27,7 @@ #include "opal/util/argv.h" #include "opal/util/output.h" #include "opal/util/show_help.h" +#include "opal/util/opal_sos.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_component_repository.h" @@ -296,7 +297,7 @@ static int parse_requested(int mca_param, bool *include_mode, /* See if the user requested anything */ - if (OPAL_ERROR == mca_base_param_lookup_string(mca_param, &requested)) { + if (OPAL_SUCCESS != mca_base_param_lookup_string(mca_param, &requested)) { return OPAL_ERROR; } if (NULL == requested || 0 == strlen(requested)) { @@ -391,7 +392,7 @@ static int open_components(const char *type_name, int output_id, "mca: base: components_open: " "component %s register function successful", component->mca_component_name); - } else if (OPAL_ERR_NOT_AVAILABLE != ret) { + } else if (OPAL_ERR_NOT_AVAILABLE != OPAL_SOS_GET_ERROR_CODE(ret)) { /* If the component returns OPAL_ERR_NOT_AVAILABLE, it's a cue to "silently ignore me" -- it's not a failure, it's just a way for the component to say @@ -431,7 +432,7 @@ static int open_components(const char *type_name, int output_id, "mca: base: components_open: " "component %s open function successful", component->mca_component_name); - } else if (OPAL_ERR_NOT_AVAILABLE != ret) { + } else if (OPAL_ERR_NOT_AVAILABLE != OPAL_SOS_GET_ERROR_CODE(ret)) { /* If the component returns OPAL_ERR_NOT_AVAILABLE, it's a cue to "silently ignore me" -- it's not a failure, it's just a way for the component to say @@ -482,7 +483,7 @@ static int open_components(const char *type_name, int output_id, opened_components list */ else { - if (OPAL_ERROR == mca_base_param_find(type_name, + if (OPAL_SUCCESS != mca_base_param_find(type_name, component->mca_component_name, "priority")) { mca_base_param_register_int(type_name, diff --git a/opal/mca/base/mca_base_param.c b/opal/mca/base/mca_base_param.c index fc8fb99f74..469a043bb2 100644 --- a/opal/mca/base/mca_base_param.c +++ b/opal/mca/base/mca_base_param.c @@ -630,7 +630,7 @@ char *mca_base_param_environ_variable(const char *type, } id = mca_base_param_find(type, component, param); - if (OPAL_ERROR != id) { + if (OPAL_SUCCESS == id) { array = OPAL_VALUE_ARRAY_GET_BASE(&mca_base_params, mca_base_param_t); ret = strdup(array[id].mbp_env_var_name); } else { diff --git a/opal/mca/crs/base/crs_base_open.c b/opal/mca/crs/base/crs_base_open.c index d22e8b94c7..743720ca6c 100644 --- a/opal/mca/crs/base/crs_base_open.c +++ b/opal/mca/crs/base/crs_base_open.c @@ -28,6 +28,7 @@ #include "opal/mca/crs/crs.h" #include "opal/mca/crs/base/base.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/crs/base/static-components.h" @@ -97,7 +98,7 @@ int opal_crs_base_open(void) mca_crs_base_static_components, &opal_crs_base_components_available, true)) ) { - if( OPAL_ERR_NOT_FOUND == ret && + if( OPAL_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(ret) && NULL != str_value && 0 == strncmp(str_value, "none", strlen("none")) ) { exit_status = OPAL_SUCCESS; diff --git a/opal/runtime/opal_init.c b/opal/runtime/opal_init.c index 2425d9135e..78e38fe224 100644 --- a/opal/runtime/opal_init.c +++ b/opal/runtime/opal_init.c @@ -53,6 +53,7 @@ #include "opal/util/stacktrace.h" #include "opal/util/keyval_parse.h" #include "opal/util/sys_limits.h" +#include "opal/util/opal_sos.h" #if OPAL_CC_USE_PRAGMA_IDENT #pragma ident OPAL_IDENT_STRING @@ -71,7 +72,7 @@ opal_err2str(int errnum) { const char *retval; - switch (errnum) { + switch (OPAL_SOS_GET_ERROR_CODE(errnum)) { case OPAL_SUCCESS: retval = "Success"; break; @@ -223,6 +224,9 @@ opal_init_util(int* pargc, char*** pargv) /* initialize the memory allocator */ opal_malloc_init(); + /* initialize the OPAL SOS system */ + opal_sos_init(); + /* initialize the output system */ opal_output_init(); diff --git a/opal/util/argv.c b/opal/util/argv.c index e316adb3ff..4886cff43a 100644 --- a/opal/util/argv.c +++ b/opal/util/argv.c @@ -161,7 +161,7 @@ static char **opal_argv_split_inter(const char *src_string, int delimiter, if (src_string == p) { if (include_empty) { arg[0] = '\0'; - if (OPAL_ERROR == opal_argv_append(&argc, &argv, arg)) + if (OPAL_SUCCESS != opal_argv_append(&argc, &argv, arg)) return NULL; } } @@ -169,7 +169,7 @@ static char **opal_argv_split_inter(const char *src_string, int delimiter, /* tail argument, add straight from the original string */ else if ('\0' == *p) { - if (OPAL_ERROR == opal_argv_append(&argc, &argv, src_string)) + if (OPAL_SUCCESS != opal_argv_append(&argc, &argv, src_string)) return NULL; src_string = p; continue; @@ -185,7 +185,7 @@ static char **opal_argv_split_inter(const char *src_string, int delimiter, strncpy(argtemp, src_string, arglen); argtemp[arglen] = '\0'; - if (OPAL_ERROR == opal_argv_append(&argc, &argv, argtemp)) { + if (OPAL_SUCCESS != opal_argv_append(&argc, &argv, argtemp)) { free(argtemp); return NULL; } @@ -199,7 +199,7 @@ static char **opal_argv_split_inter(const char *src_string, int delimiter, strncpy(arg, src_string, arglen); arg[arglen] = '\0'; - if (OPAL_ERROR == opal_argv_append(&argc, &argv, arg)) + if (OPAL_SUCCESS != opal_argv_append(&argc, &argv, arg)) return NULL; } @@ -389,7 +389,7 @@ char **opal_argv_copy(char **argv) dupv[0] = NULL; while (NULL != *argv) { - if (OPAL_ERROR == opal_argv_append(&dupc, &dupv, *argv)) { + if (OPAL_SUCCESS != opal_argv_append(&dupc, &dupv, *argv)) { opal_argv_free(dupv); return NULL; } diff --git a/opal/util/error.c b/opal/util/error.c index dcf8b1488a..485f678609 100644 --- a/opal/util/error.c +++ b/opal/util/error.c @@ -30,6 +30,7 @@ #endif #include "opal/util/error.h" +#include "opal/util/opal_sos.h" #include "opal/constants.h" #define MAX_CONVERTERS 5 @@ -94,12 +95,12 @@ opal_perror(int errnum, const char *msg) { const char* errmsg = opal_strerror_int(errnum); - if (NULL != msg && errnum != OPAL_ERR_IN_ERRNO) { + if (NULL != msg && OPAL_SOS_GET_ERROR_CODE(errnum) != OPAL_ERR_IN_ERRNO) { fprintf(stderr, "%s: ", msg); } if (NULL == errmsg) { - if (errnum == OPAL_ERR_IN_ERRNO) { + if (OPAL_SOS_GET_ERROR_CODE(errnum) == OPAL_ERR_IN_ERRNO) { perror(msg); } else { char *ue_msg = opal_strerror_unknown(errnum); @@ -147,7 +148,7 @@ opal_strerror_r(int errnum, char *strerrbuf, size_t buflen) int ret; if (NULL == errmsg) { - if (errnum == OPAL_ERR_IN_ERRNO) { + if (OPAL_SOS_GET_ERROR_CODE(errnum) == OPAL_ERR_IN_ERRNO) { char *tmp = strerror(errno); strncpy(strerrbuf, tmp, buflen); return OPAL_SUCCESS; diff --git a/orte/mca/errmgr/base/errmgr_base_fns.c b/orte/mca/errmgr/base/errmgr_base_fns.c index d03cc2eeda..d83705dadb 100644 --- a/orte/mca/errmgr/base/errmgr_base_fns.c +++ b/orte/mca/errmgr/base/errmgr_base_fns.c @@ -29,6 +29,7 @@ #include "opal/util/trace.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/name_fns.h" #include "orte/util/session_dir.h" @@ -48,7 +49,7 @@ void orte_errmgr_base_log(int error_code, char *filename, int line) { OPAL_TRACE(1); - if (ORTE_ERR_SILENT == error_code) { + if (ORTE_ERR_SILENT == OPAL_SOS_GET_ERROR_CODE(error_code)) { /* if the error is silent, say nothing */ return; } diff --git a/orte/mca/errmgr/hnp/errmgr_hnp.c b/orte/mca/errmgr/hnp/errmgr_hnp.c index e277fb6006..f23cdc40a2 100644 --- a/orte/mca/errmgr/hnp/errmgr_hnp.c +++ b/orte/mca/errmgr/hnp/errmgr_hnp.c @@ -21,6 +21,7 @@ #endif #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/util/error_strings.h" diff --git a/orte/mca/errmgr/orted/errmgr_orted.c b/orte/mca/errmgr/orted/errmgr_orted.c index 26c35bd068..f9923bc2eb 100644 --- a/orte/mca/errmgr/orted/errmgr_orted.c +++ b/orte/mca/errmgr/orted/errmgr_orted.c @@ -21,6 +21,7 @@ #endif #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/util/error_strings.h" diff --git a/orte/mca/ess/base/ess_base_get.c b/orte/mca/ess/base/ess_base_get.c index 26fd86b622..942dc038f0 100644 --- a/orte/mca/ess/base/ess_base_get.c +++ b/orte/mca/ess/base/ess_base_get.c @@ -26,6 +26,7 @@ #include #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/ess/base/ess_base_put.c b/orte/mca/ess/base/ess_base_put.c index d77dbaad1f..a17ce1608d 100644 --- a/orte/mca/ess/base/ess_base_put.c +++ b/orte/mca/ess/base/ess_base_put.c @@ -26,6 +26,7 @@ #include #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/ess/base/ess_base_std_prolog.c b/orte/mca/ess/base/ess_base_std_prolog.c index bd1fb617a2..9873bc11fa 100644 --- a/orte/mca/ess/base/ess_base_std_prolog.c +++ b/orte/mca/ess/base/ess_base_std_prolog.c @@ -28,6 +28,8 @@ #include #endif +#include "opal/util/opal_sos.h" + #include "orte/mca/errmgr/errmgr.h" #include "orte/util/show_help.h" #include "orte/runtime/orte_wait.h" diff --git a/orte/mca/ess/base/ess_base_std_tool.c b/orte/mca/ess/base/ess_base_std_tool.c index 9d6ef8e0d8..0d5330d9de 100644 --- a/orte/mca/ess/base/ess_base_std_tool.c +++ b/orte/mca/ess/base/ess_base_std_tool.c @@ -29,7 +29,7 @@ #endif #include "opal/event/event.h" -#include "orte/util/show_help.h" +#include "opal/util/opal_sos.h" #include "opal/runtime/opal.h" #include "opal/runtime/opal_cr.h" diff --git a/orte/mca/ess/cm/ess_cm_module.c b/orte/mca/ess/cm/ess_cm_module.c index 1c9604e994..03edac72ab 100644 --- a/orte/mca/ess/cm/ess_cm_module.c +++ b/orte/mca/ess/cm/ess_cm_module.c @@ -29,6 +29,7 @@ #include "opal/util/argv.h" #include "opal/util/if.h" +#include "opal/util/opal_sos.h" #include "opal/mca/paffinity/paffinity.h" #include "opal/mca/sysinfo/sysinfo.h" #include "opal/mca/sysinfo/base/base.h" diff --git a/orte/mca/ess/env/ess_env_module.c b/orte/mca/ess/env/ess_env_module.c index 342f27dee3..53953bf64b 100644 --- a/orte/mca/ess/env/ess_env_module.c +++ b/orte/mca/ess/env/ess_env_module.c @@ -39,6 +39,7 @@ #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/malloc.h" #include "opal/util/argv.h" diff --git a/orte/mca/ess/hnp/ess_hnp_module.c b/orte/mca/ess/hnp/ess_hnp_module.c index 39c0f461d9..a5b473acff 100644 --- a/orte/mca/ess/hnp/ess_hnp_module.c +++ b/orte/mca/ess/hnp/ess_hnp_module.c @@ -336,7 +336,7 @@ static int rte_init(void) /* setup the orte_show_help system to recv remote output */ ret = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SHOW_HELP, ORTE_RML_NON_PERSISTENT, orte_show_help_recv, NULL); - if (ret != ORTE_SUCCESS && ret != ORTE_ERR_NOT_IMPLEMENTED) { + if (ret != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(ret) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(ret); error = "setup receive for orte_show_help"; goto error; @@ -586,7 +586,7 @@ static int rte_init(void) return ORTE_SUCCESS; error: - if (ORTE_ERR_SILENT != ret) { + if (ORTE_ERR_SILENT != OPAL_SOS_GET_ERROR_CODE(ret)) { orte_show_help("help-orte-runtime.txt", "orte_init:startup:internal-failure", true, error, ORTE_ERROR_NAME(ret), ret); diff --git a/orte/mca/ess/singleton/ess_singleton_module.c b/orte/mca/ess/singleton/ess_singleton_module.c index bcad9fb1bd..f2b1916aa8 100644 --- a/orte/mca/ess/singleton/ess_singleton_module.c +++ b/orte/mca/ess/singleton/ess_singleton_module.c @@ -34,6 +34,7 @@ #include "opal/util/argv.h" #include "opal/util/path.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/installdirs/installdirs.h" #include "opal/mca/paffinity/paffinity.h" diff --git a/orte/mca/ess/slave/ess_slave_module.c b/orte/mca/ess/slave/ess_slave_module.c index f34420f7fe..fe4fd650cc 100644 --- a/orte/mca/ess/slave/ess_slave_module.c +++ b/orte/mca/ess/slave/ess_slave_module.c @@ -38,6 +38,7 @@ #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/malloc.h" #include "orte/mca/rml/base/base.h" diff --git a/orte/mca/ess/slurm/ess_slurm_module.c b/orte/mca/ess/slurm/ess_slurm_module.c index 172b25465d..10cc423543 100644 --- a/orte/mca/ess/slurm/ess_slurm_module.c +++ b/orte/mca/ess/slurm/ess_slurm_module.c @@ -32,6 +32,7 @@ #include "opal/util/opal_environ.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/argv.h" #include "opal/class/opal_pointer_array.h" diff --git a/orte/mca/ess/slurmd/ess_slurmd_module.c b/orte/mca/ess/slurmd/ess_slurmd_module.c index dbf7461a14..0146fc5422 100644 --- a/orte/mca/ess/slurmd/ess_slurmd_module.c +++ b/orte/mca/ess/slurmd/ess_slurmd_module.c @@ -38,6 +38,7 @@ #include "opal/util/opal_environ.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/argv.h" #include "opal/class/opal_pointer_array.h" @@ -400,7 +401,8 @@ static int rte_finalize(void) static void rte_abort(int error_code, bool report) { - if (ORTE_ERR_SOCKET_NOT_AVAILABLE == error_code && slurm20) { + if (ORTE_ERR_SOCKET_NOT_AVAILABLE == OPAL_SOS_GET_ERROR_CODE(error_code) && + slurm20) { /* exit silently with a special error code for slurm 2.0 */ orte_ess_base_app_abort(108, false); } else { diff --git a/orte/mca/ess/tool/ess_tool_module.c b/orte/mca/ess/tool/ess_tool_module.c index 2e5564a240..a954904d25 100644 --- a/orte/mca/ess/tool/ess_tool_module.c +++ b/orte/mca/ess/tool/ess_tool_module.c @@ -29,6 +29,7 @@ #include #endif +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/plm/base/base.h" diff --git a/orte/mca/filem/base/filem_base_fns.c b/orte/mca/filem/base/filem_base_fns.c index 37aa431ed7..987a891fa5 100644 --- a/orte/mca/filem/base/filem_base_fns.c +++ b/orte/mca/filem/base/filem_base_fns.c @@ -29,6 +29,7 @@ #include "orte/constants.h" +#include "opal/util/opal_sos.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" diff --git a/orte/mca/filem/base/filem_base_receive.c b/orte/mca/filem/base/filem_base_receive.c index 1971dd50b7..cc7e8bd6fc 100644 --- a/orte/mca/filem/base/filem_base_receive.c +++ b/orte/mca/filem/base/filem_base_receive.c @@ -40,6 +40,7 @@ #include "opal/mca/mca.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/dss/dss.h" diff --git a/orte/mca/filem/rsh/filem_rsh_module.c b/orte/mca/filem/rsh/filem_rsh_module.c index 5239b9ff23..fd777697b2 100644 --- a/orte/mca/filem/rsh/filem_rsh_module.c +++ b/orte/mca/filem/rsh/filem_rsh_module.c @@ -36,6 +36,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/event/event.h" +#include "opal/util/opal_sos.h" #include "orte/constants.h" #include "orte/util/show_help.h" diff --git a/orte/mca/grpcomm/bad/grpcomm_bad_module.c b/orte/mca/grpcomm/bad/grpcomm_bad_module.c index c347434098..91ac14099e 100644 --- a/orte/mca/grpcomm/bad/grpcomm_bad_module.c +++ b/orte/mca/grpcomm/bad/grpcomm_bad_module.c @@ -26,6 +26,7 @@ #include "orte/util/proc_info.h" #include "opal/dss/dss.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/odls/base/base.h" #include "orte/mca/odls/odls_types.h" diff --git a/orte/mca/grpcomm/base/grpcomm_base_allgather.c b/orte/mca/grpcomm/base/grpcomm_base_allgather.c index a753c8e1a1..a522055b3d 100644 --- a/orte/mca/grpcomm/base/grpcomm_base_allgather.c +++ b/orte/mca/grpcomm/base/grpcomm_base_allgather.c @@ -27,6 +27,7 @@ #endif /* HAVE_SYS_TIME_H */ #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/errmgr/errmgr.h" @@ -67,7 +68,7 @@ static void allgather_server_recv(int status, orte_process_name_t* sender, /* reissue the recv */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_ALLGATHER_LIST, ORTE_RML_NON_PERSISTENT, allgather_server_recv, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); allgather_failed = true; } @@ -147,7 +148,7 @@ int orte_grpcomm_base_allgather_list(opal_list_t *names, opal_buffer_t *sbuf, op allgather_failed = false; rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_ALLGATHER_LIST, ORTE_RML_NON_PERSISTENT, allgather_client_recv, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); return rc; } @@ -208,7 +209,7 @@ int orte_grpcomm_base_allgather_list(opal_list_t *names, opal_buffer_t *sbuf, op /* post the non-blocking recv */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_ALLGATHER_LIST, ORTE_RML_NON_PERSISTENT, allgather_server_recv, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/grpcomm/base/grpcomm_base_app_fns.c b/orte/mca/grpcomm/base/grpcomm_base_app_fns.c index e3b8d2a070..b96f486269 100644 --- a/orte/mca/grpcomm/base/grpcomm_base_app_fns.c +++ b/orte/mca/grpcomm/base/grpcomm_base_app_fns.c @@ -29,6 +29,7 @@ #endif /* HAVE_SYS_TIME_H */ #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_hash_table.h" #include "opal/dss/dss.h" #include "opal/threads/mutex.h" diff --git a/orte/mca/grpcomm/base/grpcomm_base_coll.c b/orte/mca/grpcomm/base/grpcomm_base_coll.c index bd45d1a1ac..6d4385bc3a 100644 --- a/orte/mca/grpcomm/base/grpcomm_base_coll.c +++ b/orte/mca/grpcomm/base/grpcomm_base_coll.c @@ -33,6 +33,7 @@ #endif /* HAVE_SYS_TIME_H */ #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/grpcomm/base/grpcomm_base_modex.c b/orte/mca/grpcomm/base/grpcomm_base_modex.c index eebb887ff1..e4ff74bd71 100644 --- a/orte/mca/grpcomm/base/grpcomm_base_modex.c +++ b/orte/mca/grpcomm/base/grpcomm_base_modex.c @@ -29,6 +29,7 @@ #include "opal/threads/condition.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_hash_table.h" #include "opal/dss/dss.h" diff --git a/orte/mca/grpcomm/basic/grpcomm_basic_module.c b/orte/mca/grpcomm/basic/grpcomm_basic_module.c index d8a8028642..9a55569770 100644 --- a/orte/mca/grpcomm/basic/grpcomm_basic_module.c +++ b/orte/mca/grpcomm/basic/grpcomm_basic_module.c @@ -26,6 +26,7 @@ #include "opal/dss/dss.h" #include "opal/runtime/opal.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/grpcomm/hier/grpcomm_hier_module.c b/orte/mca/grpcomm/hier/grpcomm_hier_module.c index ef1f470240..76d4f17653 100644 --- a/orte/mca/grpcomm/hier/grpcomm_hier_module.c +++ b/orte/mca/grpcomm/hier/grpcomm_hier_module.c @@ -25,6 +25,7 @@ #include #include "opal/dss/dss.h" +#include "opal/util/opal_sos.h" #include "opal/runtime/opal.h" #include "opal/mca/paffinity/paffinity.h" diff --git a/orte/mca/iof/base/iof_base_output.c b/orte/mca/iof/base/iof_base_output.c index 554d32683a..72ba94f7ad 100644 --- a/orte/mca/iof/base/iof_base_output.c +++ b/orte/mca/iof/base/iof_base_output.c @@ -39,6 +39,7 @@ #include #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/name_fns.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/iof/base/iof_base_select.c b/orte/mca/iof/base/iof_base_select.c index a19451f2b8..a11cfc2d9d 100644 --- a/orte/mca/iof/base/iof_base_select.c +++ b/orte/mca/iof/base/iof_base_select.c @@ -21,6 +21,7 @@ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" +#include "opal/util/opal_sos.h" #include "orte/util/proc_info.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/base/iof_base_setup.c b/orte/mca/iof/base/iof_base_setup.c index eb7e658fde..0783b3e78a 100644 --- a/orte/mca/iof/base/iof_base_setup.c +++ b/orte/mca/iof/base/iof_base_setup.c @@ -57,6 +57,7 @@ #include "opal/util/opal_pty.h" #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/hnp/iof_hnp.c b/orte/mca/iof/hnp/iof_hnp.c index 05fd60349c..5b6e63a2bb 100644 --- a/orte/mca/iof/hnp/iof_hnp.c +++ b/orte/mca/iof/hnp/iof_hnp.c @@ -37,6 +37,7 @@ #endif #endif +#include "opal/util/opal_sos.h" #include "orte/runtime/orte_globals.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/iof/hnp/iof_hnp_read.c b/orte/mca/iof/hnp/iof_hnp_read.c index f31e89bda2..20e61fda2b 100644 --- a/orte/mca/iof/hnp/iof_hnp_read.c +++ b/orte/mca/iof/hnp/iof_hnp_read.c @@ -28,6 +28,7 @@ #include #endif /* HAVE_STRING_H */ +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/rml/rml_types.h" @@ -184,7 +185,7 @@ void orte_iof_hnp_read_local_handler(int fd, short event, void *cbdata) */ if( ORTE_SUCCESS != (rc = orte_iof_hnp_send_data_to_endpoint(&sink->daemon, &sink->name, ORTE_IOF_STDIN, data, numbytes))) { /* if the addressee is unknown, remove the sink from the list */ - if( ORTE_ERR_ADDRESSEE_UNKNOWN == rc ) { + if( ORTE_ERR_ADDRESSEE_UNKNOWN == OPAL_SOS_GET_ERROR_CODE(rc) ) { prev_item = opal_list_get_prev(item); opal_list_remove_item(&mca_iof_hnp_component.sinks, item); OBJ_RELEASE(item); diff --git a/orte/mca/iof/hnp/iof_hnp_receive.c b/orte/mca/iof/hnp/iof_hnp_receive.c index 588e484a16..b351efbab3 100644 --- a/orte/mca/iof/hnp/iof_hnp_receive.c +++ b/orte/mca/iof/hnp/iof_hnp_receive.c @@ -35,6 +35,7 @@ #endif #endif +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/hnp/iof_hnp_send.c b/orte/mca/iof/hnp/iof_hnp_send.c index 03d77b2f3b..c78b7b8dd2 100644 --- a/orte/mca/iof/hnp/iof_hnp_send.c +++ b/orte/mca/iof/hnp/iof_hnp_send.c @@ -28,6 +28,7 @@ #include #endif /* HAVE_STRING_H */ +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/orted/iof_orted.c b/orte/mca/iof/orted/iof_orted.c index 11b1279caa..9b684a71c3 100644 --- a/orte/mca/iof/orted/iof_orted.c +++ b/orte/mca/iof/orted/iof_orted.c @@ -37,6 +37,7 @@ #endif #endif +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/util/name_fns.h" diff --git a/orte/mca/iof/orted/iof_orted_read.c b/orte/mca/iof/orted/iof_orted_read.c index e95d401285..cf1c5632c2 100644 --- a/orte/mca/iof/orted/iof_orted_read.c +++ b/orte/mca/iof/orted/iof_orted_read.c @@ -29,6 +29,7 @@ #endif /* HAVE_STRING_H */ #include "opal/dss/dss.h" +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/orted/iof_orted_receive.c b/orte/mca/iof/orted/iof_orted_receive.c index 8f83841114..0daa99437f 100644 --- a/orte/mca/iof/orted/iof_orted_receive.c +++ b/orte/mca/iof/orted/iof_orted_receive.c @@ -28,6 +28,7 @@ #include #endif /* HAVE_STRING_H */ +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/tool/iof_tool.c b/orte/mca/iof/tool/iof_tool.c index 76b8e3bc43..55c1dd4a64 100644 --- a/orte/mca/iof/tool/iof_tool.c +++ b/orte/mca/iof/tool/iof_tool.c @@ -28,6 +28,7 @@ #include #endif /* HAVE_STRING_H */ +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/iof/tool/iof_tool_receive.c b/orte/mca/iof/tool/iof_tool_receive.c index 439414c288..9e80fd97de 100644 --- a/orte/mca/iof/tool/iof_tool_receive.c +++ b/orte/mca/iof/tool/iof_tool_receive.c @@ -28,6 +28,7 @@ #include #endif /* HAVE_STRING_H */ +#include "opal/util/opal_sos.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/odls/base/odls_base_default_fns.c b/orte/mca/odls/base/odls_base_default_fns.c index 171d061d6e..4bc223a4b1 100644 --- a/orte/mca/odls/base/odls_base_default_fns.c +++ b/orte/mca/odls/base/odls_base_default_fns.c @@ -40,6 +40,7 @@ #include "opal/util/opal_environ.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/util/os_path.h" #include "opal/util/sys_limits.h" #include "opal/dss/dss.h" @@ -738,7 +739,7 @@ int orte_odls_base_default_construct_child_list(opal_buffer_t *data, /* if the buffer was empty, then we know that all we are doing is * launching debugger daemons */ - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER == rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER == OPAL_SOS_GET_ERROR_CODE(rc)) { goto done; } *job = ORTE_JOBID_INVALID; @@ -1970,7 +1971,7 @@ int orte_odls_base_default_deliver_message(orte_jobid_t job, opal_buffer_t *buff /* if so, send the message */ rc = orte_rml.send_buffer(child->name, buffer, tag, 0); - if (rc < 0 && rc != ORTE_ERR_ADDRESSEE_UNKNOWN) { + if (rc < 0 && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_ADDRESSEE_UNKNOWN) { /* ignore if the addressee is unknown as a race condition could * have allowed the child to exit before we send it a barrier * due to the vagaries of the event library @@ -2817,9 +2818,10 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, * the child object from our local list */ if (child->iof_complete && child->waitpid_recvd) { - if (ORTE_ERR_SILENT == orte_errmgr.update_state(ORTE_JOBID_INVALID, ORTE_JOB_STATE_UNDEF, - child->name, child->state, - child->exit_code)) { + rc = orte_errmgr.update_state(ORTE_JOBID_INVALID, ORTE_JOB_STATE_UNDEF, + child->name, child->state, + child->exit_code); + if (ORTE_ERR_SILENT == OPAL_SOS_GET_ERROR_CODE(rc)) { /* all procs are complete - we are done */ break; } @@ -2839,7 +2841,7 @@ int orte_odls_base_default_kill_local_procs(opal_pointer_array_t *procs, opal_condition_signal(&orte_odls_globals.cond); OPAL_THREAD_UNLOCK(&orte_odls_globals.mutex); - return rc; + return ORTE_SUCCESS; } int orte_odls_base_get_proc_stats(opal_buffer_t *answer, diff --git a/orte/mca/odls/base/odls_base_state.c b/orte/mca/odls/base/odls_base_state.c index 488539893b..d7e65b01b6 100644 --- a/orte/mca/odls/base/odls_base_state.c +++ b/orte/mca/odls/base/odls_base_state.c @@ -35,6 +35,7 @@ #include "orte/util/show_help.h" #include "orte/runtime/orte_globals.h" #include "opal/util/basename.h" +#include "opal/util/opal_sos.h" #include "orte/util/name_fns.h" #include "orte/util/proc_info.h" diff --git a/orte/mca/odls/default/odls_default_module.c b/orte/mca/odls/default/odls_default_module.c index 61331af0b3..3a8d47a719 100644 --- a/orte/mca/odls/default/odls_default_module.c +++ b/orte/mca/odls/default/odls_default_module.c @@ -73,6 +73,7 @@ #include "opal/mca/paffinity/base/base.h" #include "opal/class/opal_pointer_array.h" #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/runtime/orte_wait.h" @@ -352,6 +353,17 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, ORTE_NAME_PRINT(child->name), child->slot_list); } if (ORTE_SUCCESS != (rc = opal_paffinity_base_slot_list_set((long)child->name->vpid, child->slot_list, &mask))) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(rc)) { + /* OS doesn't support providing topology information */ + orte_show_help("help-odls-default.txt", + "odls-default:topo-not-supported", + true, orte_process_info.nodename, "rankfile containing a slot_list of ", + child->slot_list, context->app); + ORTE_ODLS_ERROR_OUT(rc); + } + + orte_show_help("help-odls-default.txt", + "odls-default:slot-list-failed", true, child->slot_list, ORTE_ERROR_NAME(rc)); ORTE_ODLS_ERROR_OUT(rc); } /* if we didn't wind up bound, then generate a warning unless suppressed */ @@ -403,7 +415,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, } } else { target_socket = opal_paffinity_base_get_physical_socket_id(logical_skt); - if (target_socket < 0) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(target_socket)) { /* OS doesn't support providing topology information */ ORTE_ODLS_IF_BIND_NOT_REQD(5); ORTE_ODLS_ERROR_OUT(target_socket); @@ -427,7 +439,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, * from when we initialized */ target_socket = opal_paffinity_base_get_physical_socket_id(lrank % orte_odls_globals.num_sockets); - if (target_socket < 0) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(target_socket)) { /* OS does not support providing topology information */ ORTE_ODLS_IF_BIND_NOT_REQD(5); ORTE_ODLS_ERROR_OUT(target_socket); @@ -504,7 +516,8 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, * physical cpu */ phys_cpu = opal_paffinity_base_get_physical_processor_id(logical_cpu); - if (0 > phys_cpu) { + if (OPAL_SUCCESS != phys_cpu){ + /* No processor to bind to so error out */ ORTE_ODLS_IF_BIND_NOT_REQD(5); ORTE_ODLS_ERROR_OUT(phys_cpu); } @@ -568,7 +581,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, } } else { target_socket = opal_paffinity_base_get_physical_socket_id(logical_skt); - if (target_socket < 0) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(target_socket)) { /* OS doesn't support providing topology information */ ORTE_ODLS_IF_BIND_NOT_REQD(6); ORTE_ODLS_ERROR_OUT(target_socket); @@ -588,7 +601,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, * from when we initialized */ target_socket = opal_paffinity_base_get_physical_socket_id(lrank % orte_odls_globals.num_sockets); - if (target_socket < 0) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(target_socket)) { /* OS does not support providing topology information */ ORTE_ODLS_IF_BIND_NOT_REQD(6); ORTE_ODLS_ERROR_OUT(target_socket); @@ -635,7 +648,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, if (1 == orte_odls_globals.num_sockets) { /* if we only have one socket, then just put it there */ target_socket = opal_paffinity_base_get_physical_socket_id(0); - if (target_socket < 0) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(target_socket)) { /* OS doesn't support providing topology information */ ORTE_ODLS_IF_BIND_NOT_REQD(6); ORTE_ODLS_ERROR_OUT(target_socket); @@ -647,7 +660,7 @@ static int odls_default_fork_local_proc(orte_app_context_t* context, logical_skt = logical_skt % orte_odls_globals.num_sockets; /* now get the target physical socket */ target_socket = opal_paffinity_base_get_physical_socket_id(logical_skt); - if (target_socket < 0) { + if (ORTE_ERR_NOT_SUPPORTED == OPAL_SOS_GET_ERROR_CODE(target_socket)) { /* OS doesn't support providing topology information */ ORTE_ODLS_IF_BIND_NOT_REQD(6); ORTE_ODLS_ERROR_OUT(target_socket); diff --git a/orte/mca/oob/tcp/oob_tcp.c b/orte/mca/oob/tcp/oob_tcp.c index af8058c1f5..c3a4c89762 100644 --- a/orte/mca/oob/tcp/oob_tcp.c +++ b/orte/mca/oob/tcp/oob_tcp.c @@ -48,6 +48,7 @@ #include "opal/util/show_help.h" #include "opal/util/error.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/opal_socket_errno.h" #include "opal/util/if.h" #include "opal/util/net.h" @@ -2032,7 +2033,7 @@ mca_oob_tcp_get_new_name(orte_process_name_t* name) MCA_OOB_TCP_HDR_HTON(&msg->msg_hdr); rc = mca_oob_tcp_peer_send(peer, msg); if(rc != ORTE_SUCCESS) { - if (rc != ORTE_ERR_ADDRESSEE_UNKNOWN) { + if (OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_ADDRESSEE_UNKNOWN) { MCA_OOB_TCP_MSG_RETURN(msg); } return rc; diff --git a/orte/mca/oob/tcp/oob_tcp_msg.c b/orte/mca/oob/tcp/oob_tcp_msg.c index 9a41e8d525..593e123604 100644 --- a/orte/mca/oob/tcp/oob_tcp_msg.c +++ b/orte/mca/oob/tcp/oob_tcp_msg.c @@ -28,6 +28,7 @@ #include "opal/types.h" #include "opal/opal_socket_errno.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_hash_table.h" #include "orte/util/name_fns.h" diff --git a/orte/mca/oob/tcp/oob_tcp_peer.c b/orte/mca/oob/tcp/oob_tcp_peer.c index 22772b69f1..e67568f0e9 100644 --- a/orte/mca/oob/tcp/oob_tcp_peer.c +++ b/orte/mca/oob/tcp/oob_tcp_peer.c @@ -179,7 +179,7 @@ int mca_oob_tcp_peer_send(mca_oob_tcp_peer_t* peer, mca_oob_tcp_msg_t* msg) append to the peer_send_queue. */ OPAL_THREAD_UNLOCK(&peer->peer_lock); rc = mca_oob_tcp_resolve(peer); - if (ORTE_ERR_ADDRESSEE_UNKNOWN != rc) { + if (ORTE_ERR_ADDRESSEE_UNKNOWN != OPAL_SOS_GET_ERROR_CODE(rc)) { OPAL_THREAD_LOCK(&peer->peer_lock); opal_list_append(&peer->peer_send_queue, (opal_list_item_t*)msg); @@ -626,7 +626,7 @@ void mca_oob_tcp_peer_shutdown(mca_oob_tcp_peer_t* peer) ORTE_NAME_PRINT(&(peer->peer_name)), (NULL == host) ? "NULL" : host); /* provide a notifier message */ - orte_notifier.peer(ORTE_NOTIFIER_INFRA, ORTE_ERR_COMM_FAILURE, &(peer->peer_name), + orte_notifier.log_peer(ORTE_NOTIFIER_CRIT, ORTE_ERR_COMM_FAILURE, &(peer->peer_name), "OOB Connection retries exceeded. Can not communicate with peer"); /* There are cases during the initial connection setup where diff --git a/orte/mca/oob/tcp/oob_tcp_send.c b/orte/mca/oob/tcp/oob_tcp_send.c index d0722ddfd8..be31de351c 100644 --- a/orte/mca/oob/tcp/oob_tcp_send.c +++ b/orte/mca/oob/tcp/oob_tcp_send.c @@ -21,6 +21,8 @@ #include "orte/types.h" #include "opal/types.h" +#include "opal/util/opal_sos.h" + #include "orte/util/name_fns.h" #include "orte/runtime/orte_globals.h" @@ -166,7 +168,7 @@ int mca_oob_tcp_send_nb( MCA_OOB_TCP_HDR_HTON(&msg->msg_hdr); rc = mca_oob_tcp_peer_send(peer, msg); if(rc != ORTE_SUCCESS) { - if (rc != ORTE_ERR_ADDRESSEE_UNKNOWN) { + if (OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_ADDRESSEE_UNKNOWN) { MCA_OOB_TCP_MSG_RETURN(msg); } return rc; diff --git a/orte/mca/plm/base/plm_base_close.c b/orte/mca/plm/base/plm_base_close.c index 1689926a48..4deae36bd7 100644 --- a/orte/mca/plm/base/plm_base_close.c +++ b/orte/mca/plm/base/plm_base_close.c @@ -24,6 +24,7 @@ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "orte/util/proc_info.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/plm/base/plm_base_jobid.c b/orte/mca/plm/base/plm_base_jobid.c index 4e9d8c789f..d388e01b0c 100644 --- a/orte/mca/plm/base/plm_base_jobid.c +++ b/orte/mca/plm/base/plm_base_jobid.c @@ -21,6 +21,7 @@ #include +#include "opal/util/opal_sos.h" #include "opal/hash_string.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/plm/base/plm_base_launch_support.c b/orte/mca/plm/base/plm_base_launch_support.c index 7360e108e1..5043ca45ff 100644 --- a/orte/mca/plm/base/plm_base_launch_support.c +++ b/orte/mca/plm/base/plm_base_launch_support.c @@ -31,6 +31,7 @@ #endif /* HAVE_SYS_TIME_H */ #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/runtime/opal_progress.h" #include "opal/class/opal_pointer_array.h" #include "opal/dss/dss.h" @@ -644,7 +645,7 @@ static void orted_report_launch(int status, orte_process_name_t* sender, /* reissue the recv */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_ORTED_CALLBACK, ORTE_RML_NON_PERSISTENT, orted_report_launch, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); orted_failed_launch = true; } @@ -669,7 +670,7 @@ int orte_plm_base_daemon_callback(orte_std_cntr_t num_daemons) rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_ORTED_CALLBACK, ORTE_RML_NON_PERSISTENT, orted_report_launch, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/plm/base/plm_base_orted_cmds.c b/orte/mca/plm/base/plm_base_orted_cmds.c index cead17be84..6731cea0d6 100644 --- a/orte/mca/plm/base/plm_base_orted_cmds.c +++ b/orte/mca/plm/base/plm_base_orted_cmds.c @@ -29,6 +29,7 @@ #include "opal/dss/dss.h" +#include "opal/util/opal_sos.h" #include "orte/mca/odls/odls_types.h" #include "orte/mca/grpcomm/grpcomm.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/plm/base/plm_base_proxy.c b/orte/mca/plm/base/plm_base_proxy.c index 4840193eec..9d19b1f5cd 100644 --- a/orte/mca/plm/base/plm_base_proxy.c +++ b/orte/mca/plm/base/plm_base_proxy.c @@ -22,6 +22,7 @@ #include "orte/constants.h" #include "opal/dss/dss.h" +#include "opal/util/opal_sos.h" #include "orte/util/name_fns.h" #include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/plm/base/plm_base_receive.c b/orte/mca/plm/base/plm_base_receive.c index 7f55adcc98..a8665ce9fa 100644 --- a/orte/mca/plm/base/plm_base_receive.c +++ b/orte/mca/plm/base/plm_base_receive.c @@ -34,6 +34,7 @@ #include "opal/mca/mca.h" #include "opal/mca/base/mca_base_param.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "opal/threads/threads.h" @@ -443,7 +444,7 @@ static void process_msg(int fd, short event, void *data) } count = 1; } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); } else { rc = ORTE_SUCCESS; diff --git a/orte/mca/plm/base/plm_base_rsh_support.c b/orte/mca/plm/base/plm_base_rsh_support.c index 47feeb5d60..653c7c2800 100644 --- a/orte/mca/plm/base/plm_base_rsh_support.c +++ b/orte/mca/plm/base/plm_base_rsh_support.c @@ -43,6 +43,7 @@ #include "opal/util/argv.h" #include "opal/util/basename.h" #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "opal/util/if.h" #include "opal/dss/dss.h" diff --git a/orte/mca/plm/rsh/plm_rsh_module.c b/orte/mca/plm/rsh/plm_rsh_module.c index bc385ea182..68a5c0dc07 100644 --- a/orte/mca/plm/rsh/plm_rsh_module.c +++ b/orte/mca/plm/rsh/plm_rsh_module.c @@ -62,6 +62,7 @@ #include "opal/mca/installdirs/installdirs.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/event/event.h" #include "opal/util/argv.h" #include "opal/util/opal_environ.h" @@ -1257,7 +1258,7 @@ int orte_plm_rsh_launch(orte_job_t *jdata) orted_failed_launch = false; rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_ORTED_CALLBACK, ORTE_RML_PERSISTENT, plm_rsh_report_orted_launch, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/plm/rshd/plm_rshd_module.c b/orte/mca/plm/rshd/plm_rshd_module.c index 1df0a0f1b2..a32d0defda 100644 --- a/orte/mca/plm/rshd/plm_rshd_module.c +++ b/orte/mca/plm/rshd/plm_rshd_module.c @@ -62,6 +62,7 @@ #include "opal/mca/installdirs/installdirs.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/event/event.h" #include "opal/util/argv.h" #include "opal/util/opal_environ.h" diff --git a/orte/mca/plm/slurm/plm_slurm_module.c b/orte/mca/plm/slurm/plm_slurm_module.c index 4af36c0055..51b56f17d6 100644 --- a/orte/mca/plm/slurm/plm_slurm_module.c +++ b/orte/mca/plm/slurm/plm_slurm_module.c @@ -54,6 +54,7 @@ #include "opal/mca/installdirs/installdirs.h" #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/opal_environ.h" #include "opal/util/path.h" #include "opal/util/basename.h" diff --git a/orte/mca/ras/base/ras_base_allocate.c b/orte/mca/ras/base/ras_base_allocate.c index b04a265f26..95c0889059 100644 --- a/orte/mca/ras/base/ras_base_allocate.c +++ b/orte/mca/ras/base/ras_base_allocate.c @@ -29,6 +29,7 @@ #include "opal/mca/base/base.h" #include "opal/class/opal_list.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "opal/dss/dss.h" @@ -137,7 +138,7 @@ int orte_ras_base_allocate(orte_job_t *jdata) if (NULL != orte_ras_base.active_module) { /* read the allocation */ if (ORTE_SUCCESS != (rc = orte_ras_base.active_module->allocate(&nodes))) { - if (ORTE_ERR_SYSTEM_WILL_BOOTSTRAP == rc) { + if (ORTE_ERR_SYSTEM_WILL_BOOTSTRAP == OPAL_SOS_GET_ERROR_CODE(rc)) { /* this module indicates that nodes will be discovered * on a bootstrap basis, so all we do here is add our * own node to the list diff --git a/orte/mca/ras/base/ras_base_node.c b/orte/mca/ras/base/ras_base_node.c index cdf830a1f3..a31357583f 100644 --- a/orte/mca/ras/base/ras_base_node.c +++ b/orte/mca/ras/base/ras_base_node.c @@ -23,6 +23,7 @@ #include "opal/util/argv.h" #include "opal/util/if.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/util/name_fns.h" diff --git a/orte/mca/ras/slurm/ras_slurm_module.c b/orte/mca/ras/slurm/ras_slurm_module.c index 7cb59555f4..eeb921ac0c 100644 --- a/orte/mca/ras/slurm/ras_slurm_module.c +++ b/orte/mca/ras/slurm/ras_slurm_module.c @@ -25,6 +25,7 @@ #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rmaps/base/rmaps_base_common_mappers.c b/orte/mca/rmaps/base/rmaps_base_common_mappers.c index 58ca7960fe..92d2ba36c0 100644 --- a/orte/mca/rmaps/base/rmaps_base_common_mappers.c +++ b/orte/mca/rmaps/base/rmaps_base_common_mappers.c @@ -24,6 +24,7 @@ #include "opal/util/if.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" @@ -225,7 +226,7 @@ int orte_rmaps_base_map_byslot(orte_job_t *jdata, orte_app_context_t *app, * since the node is fully used up. For now, just don't report * an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } @@ -243,7 +244,7 @@ int orte_rmaps_base_map_byslot(orte_job_t *jdata, orte_app_context_t *app, } /* if we have fully used up this node, then break from the loop */ - if (ORTE_ERR_NODE_FULLY_USED == rc) { + if (ORTE_ERR_NODE_FULLY_USED == OPAL_SOS_GET_ERROR_CODE(rc)) { break; } } @@ -253,7 +254,8 @@ int orte_rmaps_base_map_byslot(orte_job_t *jdata, orte_app_context_t *app, * node is NOT max'd out * */ - if (i < (num_procs_to_assign-1) && ORTE_ERR_NODE_FULLY_USED != rc) { + if (i < (num_procs_to_assign-1) && + ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { continue; } cur_node_item = next; @@ -327,7 +329,7 @@ int orte_rmaps_base_map_bynode(orte_job_t *jdata, orte_app_context_t *app, * since the node is fully used up. For now, just don't report * an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/rmaps/base/rmaps_base_get_job_map.c b/orte/mca/rmaps/base/rmaps_base_get_job_map.c index e84340d890..f344d9899a 100644 --- a/orte/mca/rmaps/base/rmaps_base_get_job_map.c +++ b/orte/mca/rmaps/base/rmaps_base_get_job_map.c @@ -21,6 +21,8 @@ #include +#include "opal/util/opal_sos.h" + #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/orte_globals.h" diff --git a/orte/mca/rmaps/base/rmaps_base_map_job.c b/orte/mca/rmaps/base/rmaps_base_map_job.c index 8ae7b6a015..93ea2f844d 100644 --- a/orte/mca/rmaps/base/rmaps_base_map_job.c +++ b/orte/mca/rmaps/base/rmaps_base_map_job.c @@ -23,6 +23,7 @@ #include "opal/mca/mca.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/base.h" #include "opal/dss/dss.h" diff --git a/orte/mca/rmaps/base/rmaps_base_support_fns.c b/orte/mca/rmaps/base/rmaps_base_support_fns.c index 78c0256384..110d523df9 100644 --- a/orte/mca/rmaps/base/rmaps_base_support_fns.c +++ b/orte/mca/rmaps/base/rmaps_base_support_fns.c @@ -27,6 +27,7 @@ #include "opal/util/if.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" diff --git a/orte/mca/rmaps/load_balance/rmaps_lb.c b/orte/mca/rmaps/load_balance/rmaps_lb.c index efa284c53a..f899054513 100644 --- a/orte/mca/rmaps/load_balance/rmaps_lb.c +++ b/orte/mca/rmaps/load_balance/rmaps_lb.c @@ -30,6 +30,7 @@ #endif /* HAVE_STRING_H */ #include "opal/mca/base/mca_base_param.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" @@ -135,7 +136,7 @@ static int npernode(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, and we still have * more procs to place, then that is an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc || + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc) || j < orte_rmaps_base.npernode-1) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(node); @@ -227,7 +228,7 @@ static int nperboard(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, and we still have * more procs to place, then that is an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc || + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc) || j < orte_rmaps_base.nperboard-1) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(node); @@ -323,7 +324,7 @@ static int npersocket(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, and we still have * more procs to place, then that is an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc || + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc) || j < orte_rmaps_base.npersocket-1) { ORTE_ERROR_LOG(rc); OBJ_RELEASE(node); @@ -425,7 +426,7 @@ static int loadbalance(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, and we still have * more procs to place, then that is an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc || + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc) || j < ppn-1) { ORTE_ERROR_LOG(rc); goto error; @@ -456,7 +457,7 @@ static int loadbalance(orte_job_t *jdata) &node_list, jdata->map->oversubscribe, false, NULL))) { /* if the code is not ORTE_ERR_NODE_FULLY_USED, then that is an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); goto error; } diff --git a/orte/mca/rmaps/rank_file/rmaps_rank_file.c b/orte/mca/rmaps/rank_file/rmaps_rank_file.c index 14dbee6e7b..8acf306a40 100644 --- a/orte/mca/rmaps/rank_file/rmaps_rank_file.c +++ b/orte/mca/rmaps/rank_file/rmaps_rank_file.c @@ -35,6 +35,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/argv.h" #include "opal/util/if.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "orte/mca/errmgr/errmgr.h" @@ -126,7 +127,7 @@ static int map_app_by_node(orte_app_context_t* app, * since the node is fully used up. For now, just don't report * an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } @@ -236,7 +237,7 @@ static int map_app_by_slot(orte_app_context_t* app, * since the node is fully used up. For now, just don't report * an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } @@ -252,7 +253,8 @@ static int map_app_by_slot(orte_app_context_t* app, /** if all the procs have been mapped OR we have fully used up this node, then * break from the loop */ - if(num_alloc == app->num_procs || ORTE_ERR_NODE_FULLY_USED == rc) { + if(num_alloc == app->num_procs || + ORTE_ERR_NODE_FULLY_USED == OPAL_SOS_GET_ERROR_CODE(rc)) { break; } } @@ -262,7 +264,8 @@ static int map_app_by_slot(orte_app_context_t* app, * node is NOT max'd out * */ - if (i < (num_slots_to_take-1) && ORTE_ERR_NODE_FULLY_USED != rc) { + if (i < (num_slots_to_take-1) && + ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { continue; } cur_node_item = next; @@ -460,7 +463,7 @@ static int orte_rmaps_rf_map(orte_job_t *jdata) proc = NULL; if (ORTE_SUCCESS != (rc = orte_rmaps_base_claim_slot(jdata, node, 1, app->idx, &node_list, jdata->map->oversubscribe, true, &proc))) { - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { /* if this is a true error and not the node just being * full, then report the error and abort */ diff --git a/orte/mca/rmaps/resilient/rmaps_resilient.c b/orte/mca/rmaps/resilient/rmaps_resilient.c index 7710c703e7..fdb5910805 100644 --- a/orte/mca/rmaps/resilient/rmaps_resilient.c +++ b/orte/mca/rmaps/resilient/rmaps_resilient.c @@ -26,6 +26,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "orte/util/show_help.h" @@ -326,7 +327,7 @@ static int orte_rmaps_resilient_map(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, then we know this * really isn't an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); goto error; } @@ -369,7 +370,7 @@ static int orte_rmaps_resilient_map(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, then we know this * really isn't an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); goto error; } @@ -520,7 +521,7 @@ static int orte_rmaps_resilient_map(orte_job_t *jdata) /** if the code is ORTE_ERR_NODE_FULLY_USED, then we know this * really isn't an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); goto error; } diff --git a/orte/mca/rmaps/round_robin/rmaps_rr.c b/orte/mca/rmaps/round_robin/rmaps_rr.c index e5dbb329df..942b005828 100644 --- a/orte/mca/rmaps/round_robin/rmaps_rr.c +++ b/orte/mca/rmaps/round_robin/rmaps_rr.c @@ -30,6 +30,7 @@ #endif /* HAVE_STRING_H */ #include "opal/mca/base/mca_base_param.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rmaps/seq/rmaps_seq.c b/orte/mca/rmaps/seq/rmaps_seq.c index 4b760047bb..e9bb8a11cb 100644 --- a/orte/mca/rmaps/seq/rmaps_seq.c +++ b/orte/mca/rmaps/seq/rmaps_seq.c @@ -31,6 +31,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/if.h" +#include "opal/util/opal_sos.h" #include "orte/util/show_help.h" #include "orte/mca/errmgr/errmgr.h" @@ -187,7 +188,7 @@ static int orte_rmaps_seq_map(orte_job_t *jdata) node_list, jdata->map->oversubscribe, false, &proc))) { - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); goto error; } diff --git a/orte/mca/rmaps/topo/rmaps_topo.c b/orte/mca/rmaps/topo/rmaps_topo.c index 76e703c471..aa468538c5 100644 --- a/orte/mca/rmaps/topo/rmaps_topo.c +++ b/orte/mca/rmaps/topo/rmaps_topo.c @@ -31,6 +31,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/trace.h" +#include "opal/util/opal_sos.h" #include "opal/mca/carto/base/base.h" #include "orte/util/show_help.h" @@ -117,7 +118,7 @@ static int map_app_by_node( * since the node is fully used up. For now, just don't report * an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } @@ -224,7 +225,7 @@ static int map_app_by_slot( * since the node is fully used up. For now, just don't report * an error */ - if (ORTE_ERR_NODE_FULLY_USED != rc) { + if (ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } @@ -241,7 +242,7 @@ static int map_app_by_slot( /* if we have fully used up this node * OR we are at our ppn and loadbalancing, then break from the loop */ - if (ORTE_ERR_NODE_FULLY_USED == rc || + if (ORTE_ERR_NODE_FULLY_USED == OPAL_SOS_GET_ERROR_CODE(rc) || (orte_rmaps_base.loadbalance && (int)node->num_procs >= ppn)) { break; } @@ -253,7 +254,7 @@ static int map_app_by_slot( * */ if (i < (num_slots_to_take-1) && - ORTE_ERR_NODE_FULLY_USED != rc && + ORTE_ERR_NODE_FULLY_USED != OPAL_SOS_GET_ERROR_CODE(rc) && (orte_rmaps_base.loadbalance && (int)node->num_procs < ppn)) { continue; } diff --git a/orte/mca/rmcast/base/rmcast_base_open.c b/orte/mca/rmcast/base/rmcast_base_open.c index 6ef9be2e6b..bee04bdc28 100644 --- a/orte/mca/rmcast/base/rmcast_base_open.c +++ b/orte/mca/rmcast/base/rmcast_base_open.c @@ -25,6 +25,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/argv.h" #include "opal/util/if.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_ring_buffer.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rmcast/base/rmcast_base_select.c b/orte/mca/rmcast/base/rmcast_base_select.c index 8365b29596..8938351d95 100644 --- a/orte/mca/rmcast/base/rmcast_base_select.c +++ b/orte/mca/rmcast/base/rmcast_base_select.c @@ -12,6 +12,7 @@ #include "opal/mca/mca.h" #include "opal/mca/base/base.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rml/base/rml_base_contact.c b/orte/mca/rml/base/rml_base_contact.c index 21f6fb4d88..4ac9db6c2c 100644 --- a/orte/mca/rml/base/rml_base_contact.c +++ b/orte/mca/rml/base/rml_base_contact.c @@ -23,6 +23,7 @@ #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/errmgr/errmgr.h" @@ -120,7 +121,7 @@ int orte_rml_base_update_contact_info(opal_buffer_t* data) /* track how many procs were in the message */ ++num_procs; } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/rml/base/rml_base_receive.c b/orte/mca/rml/base/rml_base_receive.c index 8ae61a98a0..21578e849c 100644 --- a/orte/mca/rml/base/rml_base_receive.c +++ b/orte/mca/rml/base/rml_base_receive.c @@ -36,6 +36,7 @@ #include "opal/dss/dss.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/orte_globals.h" #include "orte/runtime/orte_wait.h" diff --git a/orte/mca/rml/oob/rml_oob_component.c b/orte/mca/rml/oob/rml_oob_component.c index acb717557f..a4acb596f7 100644 --- a/orte/mca/rml/oob/rml_oob_component.c +++ b/orte/mca/rml/oob/rml_oob_component.c @@ -26,6 +26,7 @@ #include "opal/mca/base/base.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/mca_base_param.h" #include "opal/mca/backtrace/backtrace.h" @@ -402,7 +403,7 @@ rml_oob_queued_progress(int fd, short event, void *arg) qmsg); if (ORTE_SUCCESS != ret) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN == ret) { + if (ORTE_ERR_ADDRESSEE_UNKNOWN == OPAL_SOS_GET_ERROR_CODE(ret)) { /* still no route -- try again */ ORTE_RML_OOB_MSG_HEADER_NTOH(*hdr); OPAL_THREAD_LOCK(&orte_rml_oob_module.queued_lock); @@ -507,7 +508,7 @@ rml_oob_recv_route_callback(int status, NULL); if (ORTE_SUCCESS != ret) { - if (ORTE_ERR_ADDRESSEE_UNKNOWN == ret) { + if (ORTE_ERR_ADDRESSEE_UNKNOWN == OPAL_SOS_GET_ERROR_CODE(ret)) { /* no route -- queue and hope we find a route */ orte_rml_oob_queued_msg_t *qmsg = OBJ_NEW(orte_rml_oob_queued_msg_t); OPAL_OUTPUT_VERBOSE((1, orte_rml_base_output, diff --git a/orte/mca/rml/oob/rml_oob_contact.c b/orte/mca/rml/oob/rml_oob_contact.c index bb7e8e017a..b951cd0305 100644 --- a/orte/mca/rml/oob/rml_oob_contact.c +++ b/orte/mca/rml/oob/rml_oob_contact.c @@ -12,6 +12,7 @@ #include "orte_config.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/base/rml_contact.h" diff --git a/orte/mca/rml/oob/rml_oob_ping.c b/orte/mca/rml/oob/rml_oob_ping.c index bc77855187..5f5471e49f 100644 --- a/orte/mca/rml/oob/rml_oob_ping.c +++ b/orte/mca/rml/oob/rml_oob_ping.c @@ -11,6 +11,7 @@ #include "rml_oob.h" #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/mca/rml/oob/rml_oob_send.c b/orte/mca/rml/oob/rml_oob_send.c index fd963474ac..c749f86a56 100644 --- a/orte/mca/rml/oob/rml_oob_send.c +++ b/orte/mca/rml/oob/rml_oob_send.c @@ -22,6 +22,7 @@ #include "orte/mca/routed/routed.h" #include "opal/dss/dss.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/base/base.h" #include "orte/mca/rml/rml_types.h" diff --git a/orte/mca/rml/rml_types.h b/orte/mca/rml/rml_types.h index 800fb657bd..b25786c6a4 100644 --- a/orte/mca/rml/rml_types.h +++ b/orte/mca/rml/rml_types.h @@ -11,6 +11,7 @@ * All rights reserved. * Copyright (c) 2007 Los Alamos National Security, LLC. All rights * reserved. + * Copyright (c) 2009-2010 Cisco Systems, Inc. All rights reserved. * $COPYRIGHT$ * * Additional copyrights may follow @@ -180,6 +181,9 @@ ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_msg_packet_t); /* tag for receiving heartbeats */ #define ORTE_RML_TAG_HEARTBEAT 39 +/* notifier data */ +#define ORTE_RML_TAG_NOTIFIER_HNP 40 + #define ORTE_RML_TAG_MAX 100 diff --git a/orte/mca/routed/base/routed_base_register_sync.c b/orte/mca/routed/base/routed_base_register_sync.c index 64507fe396..562fd2b610 100644 --- a/orte/mca/routed/base/routed_base_register_sync.c +++ b/orte/mca/routed/base/routed_base_register_sync.c @@ -21,6 +21,7 @@ #include "orte/constants.h" #include "orte/types.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "opal/threads/threads.h" @@ -97,7 +98,7 @@ int orte_routed_base_register_sync(bool setup) sync_recvd = false; rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SYNC, ORTE_RML_NON_PERSISTENT, report_sync, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); return rc; } @@ -158,7 +159,7 @@ int orte_routed_base_process_callback(orte_jobid_t job, opal_buffer_t *buffer) &proc->name, ORTE_PROC_STATE_RUNNING, 0); cnt = 1; } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); return rc; } diff --git a/orte/mca/routed/binomial/routed_binomial.c b/orte/mca/routed/binomial/routed_binomial.c index 7caa2ec04b..8fcba25ed7 100644 --- a/orte/mca/routed/binomial/routed_binomial.c +++ b/orte/mca/routed/binomial/routed_binomial.c @@ -17,6 +17,7 @@ #include "opal/class/opal_bitmap.h" #include "opal/util/bit_ops.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/cm/routed_cm.c b/orte/mca/routed/cm/routed_cm.c index c017c96b2d..6e71fc4a54 100644 --- a/orte/mca/routed/cm/routed_cm.c +++ b/orte/mca/routed/cm/routed_cm.c @@ -20,6 +20,7 @@ #include "opal/class/opal_bitmap.h" #include "opal/util/bit_ops.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/direct/routed_direct.c b/orte/mca/routed/direct/routed_direct.c index b1bc77e327..6f0e9cc6dc 100644 --- a/orte/mca/routed/direct/routed_direct.c +++ b/orte/mca/routed/direct/routed_direct.c @@ -14,6 +14,7 @@ #include "opal/threads/condition.h" #include "opal/dss/dss_types.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/rml.h" diff --git a/orte/mca/routed/linear/routed_linear.c b/orte/mca/routed/linear/routed_linear.c index 00ffcb9cdb..3678372d35 100644 --- a/orte/mca/routed/linear/routed_linear.c +++ b/orte/mca/routed/linear/routed_linear.c @@ -16,6 +16,7 @@ #include "opal/class/opal_bitmap.h" #include "opal/class/opal_hash_table.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/radix/routed_radix.c b/orte/mca/routed/radix/routed_radix.c index 2734bb898a..f4f95f9a30 100644 --- a/orte/mca/routed/radix/routed_radix.c +++ b/orte/mca/routed/radix/routed_radix.c @@ -16,6 +16,7 @@ #include "opal/class/opal_hash_table.h" #include "opal/class/opal_bitmap.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/ess/ess.h" diff --git a/orte/mca/routed/slave/routed_slave.c b/orte/mca/routed/slave/routed_slave.c index aa6cd111a8..704ab6201e 100644 --- a/orte/mca/routed/slave/routed_slave.c +++ b/orte/mca/routed/slave/routed_slave.c @@ -13,6 +13,7 @@ #include "opal/threads/condition.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/rml.h" diff --git a/orte/mca/snapc/base/snapc_base_fns.c b/orte/mca/snapc/base/snapc_base_fns.c index febeb4a334..583d49baf8 100644 --- a/orte/mca/snapc/base/snapc_base_fns.c +++ b/orte/mca/snapc/base/snapc_base_fns.c @@ -44,6 +44,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/os_dirpath.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/show_help.h" #include "opal/util/basename.h" #include "opal/util/argv.h" diff --git a/orte/orted/orted_comm.c b/orte/orted/orted_comm.c index 80c794026f..3ed4c2dbf3 100644 --- a/orte/orted/orted_comm.c +++ b/orte/orted/orted_comm.c @@ -46,6 +46,7 @@ #include "opal/event/event.h" #include "opal/mca/base/base.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/opal_environ.h" #include "opal/runtime/opal.h" #include "opal/runtime/opal_progress.h" @@ -333,7 +334,7 @@ CLEANUP: /* reissue the non-blocking receive */ ret = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DAEMON, ORTE_RML_NON_PERSISTENT, orte_daemon_recv, NULL); - if (ret != ORTE_SUCCESS && ret != ORTE_ERR_NOT_IMPLEMENTED) { + if (ret != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(ret) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(ret); } diff --git a/orte/orted/orted_main.c b/orte/orted/orted_main.c index 280af2d423..67208dfda7 100644 --- a/orte/orted/orted_main.c +++ b/orte/orted/orted_main.c @@ -49,6 +49,7 @@ #include "opal/event/event.h" #include "opal/mca/base/base.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/cmd_line.h" #include "opal/util/opal_environ.h" #include "opal/util/os_path.h" @@ -433,7 +434,7 @@ int orte_daemon(int argc, char *argv[]) /* setup the primary daemon command receive function */ ret = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DAEMON, ORTE_RML_NON_PERSISTENT, orte_daemon_recv, NULL); - if (ret != ORTE_SUCCESS && ret != ORTE_ERR_NOT_IMPLEMENTED) { + if (ret != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(ret) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(ret); goto DONE; } diff --git a/orte/runtime/data_type_support/orte_dt_copy_fns.c b/orte/runtime/data_type_support/orte_dt_copy_fns.c index b4a80713f1..ea7ab3bd23 100644 --- a/orte/runtime/data_type_support/orte_dt_copy_fns.c +++ b/orte/runtime/data_type_support/orte_dt_copy_fns.c @@ -26,6 +26,7 @@ #endif #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/runtime/data_type_support/orte_dt_support.h" diff --git a/orte/runtime/data_type_support/orte_dt_packing_fns.c b/orte/runtime/data_type_support/orte_dt_packing_fns.c index aca25db19c..1c6007dc0f 100644 --- a/orte/runtime/data_type_support/orte_dt_packing_fns.c +++ b/orte/runtime/data_type_support/orte_dt_packing_fns.c @@ -22,6 +22,7 @@ #include #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/runtime/data_type_support/orte_dt_print_fns.c b/orte/runtime/data_type_support/orte_dt_print_fns.c index 0b7981aa23..9c8eab84ed 100644 --- a/orte/runtime/data_type_support/orte_dt_print_fns.c +++ b/orte/runtime/data_type_support/orte_dt_print_fns.c @@ -22,6 +22,7 @@ #include #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/mca/sysinfo/sysinfo.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/runtime/data_type_support/orte_dt_size_fns.c b/orte/runtime/data_type_support/orte_dt_size_fns.c index 24acdeccd7..5f30b3b4e9 100644 --- a/orte/runtime/data_type_support/orte_dt_size_fns.c +++ b/orte/runtime/data_type_support/orte_dt_size_fns.c @@ -24,6 +24,7 @@ #endif #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/constants.h" diff --git a/orte/runtime/data_type_support/orte_dt_unpacking_fns.c b/orte/runtime/data_type_support/orte_dt_unpacking_fns.c index ada750450d..eba6012372 100644 --- a/orte/runtime/data_type_support/orte_dt_unpacking_fns.c +++ b/orte/runtime/data_type_support/orte_dt_unpacking_fns.c @@ -24,6 +24,7 @@ #include "orte/mca/errmgr/errmgr.h" #include "opal/dss/dss.h" #include "opal/dss/dss_internal.h" +#include "opal/util/opal_sos.h" #include "orte/runtime/data_type_support/orte_dt_support.h" /* diff --git a/orte/runtime/orte_data_server.c b/orte/runtime/orte_data_server.c index f1ec76bd2b..993989819d 100644 --- a/orte/runtime/orte_data_server.c +++ b/orte/runtime/orte_data_server.c @@ -31,6 +31,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/dss/dss.h" diff --git a/orte/runtime/orte_globals.c b/orte/runtime/orte_globals.c index f5f20c9057..d754d5333a 100644 --- a/orte/runtime/orte_globals.c +++ b/orte/runtime/orte_globals.c @@ -30,6 +30,7 @@ #include "opal/mca/paffinity/paffinity.h" #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/class/opal_value_array.h" #include "opal/dss/dss.h" diff --git a/orte/runtime/orte_init.c b/orte/runtime/orte_init.c index 6d6f83af88..e133240ae9 100644 --- a/orte/runtime/orte_init.c +++ b/orte/runtime/orte_init.c @@ -33,6 +33,7 @@ #include "opal/util/error.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/runtime/opal.h" #include "orte/util/show_help.h" @@ -137,7 +138,7 @@ int orte_init(int* pargc, char*** pargv, orte_proc_type_t flags) return ORTE_SUCCESS; error: - if (ORTE_ERR_SILENT != ret) { + if (ORTE_ERR_SILENT != OPAL_SOS_GET_ERROR_CODE(ret)) { orte_show_help("help-orte-runtime", "orte_init:startup:internal-failure", true, error, ORTE_ERROR_NAME(ret), ret); diff --git a/orte/runtime/orte_wait.c b/orte/runtime/orte_wait.c index 9817ca2968..e43c30d767 100644 --- a/orte/runtime/orte_wait.c +++ b/orte/runtime/orte_wait.c @@ -52,6 +52,7 @@ #include "opal/dss/dss_types.h" #include "opal/class/opal_object.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_list.h" #include "opal/event/event.h" #include "opal/threads/mutex.h" diff --git a/orte/tools/orte-info/components.c b/orte/tools/orte-info/components.c index 3153f4dec1..38914ab6c2 100644 --- a/orte/tools/orte-info/components.c +++ b/orte/tools/orte-info/components.c @@ -348,7 +348,7 @@ void orte_info_open_components(void) } map = OBJ_NEW(orte_info_component_map_t); map->type = strdup("notifier"); - map->components = &mca_notifier_base_components_available; + map->components = &orte_notifier_base_components_available; opal_pointer_array_add(&component_map, map); #if !ORTE_DISABLE_FULL_SUPPORT diff --git a/orte/tools/orte-iof/orte-iof.c b/orte/tools/orte-iof/orte-iof.c index 10df5e7d16..5d3be08523 100644 --- a/orte/tools/orte-iof/orte-iof.c +++ b/orte/tools/orte-iof/orte-iof.c @@ -60,6 +60,7 @@ #include "opal/util/cmd_line.h" #include "opal/util/argv.h" #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/runtime/opal.h" diff --git a/orte/tools/orte-ps/orte-ps.c b/orte/tools/orte-ps/orte-ps.c index 91d2eae2bc..b3fe516c00 100644 --- a/orte/tools/orte-ps/orte-ps.c +++ b/orte/tools/orte-ps/orte-ps.c @@ -56,6 +56,7 @@ #include "opal/util/cmd_line.h" #include "opal/util/output.h" #include "opal/util/opal_environ.h" +#include "opal/util/opal_sos.h" #include "opal/mca/base/base.h" #include "opal/mca/base/mca_base_param.h" #include "opal/runtime/opal.h" @@ -254,7 +255,7 @@ main(int argc, char *argv[]) /* this could be due to a stale session directory - if so, * just skip this entry, but don't abort */ - if (ORTE_ERR_SILENT == ret) { + if (ORTE_ERR_SILENT == OPAL_SOS_GET_ERROR_CODE(ret)) { orte_show_help("help-orte-ps.txt", "stale-hnp", true, ORTE_NAME_PRINT(&(hnpinfo.hnp->name))); continue; diff --git a/orte/tools/orte-top/orte-top.c b/orte/tools/orte-top/orte-top.c index b51eeeddb1..67237fc66e 100644 --- a/orte/tools/orte-top/orte-top.c +++ b/orte/tools/orte-top/orte-top.c @@ -43,6 +43,7 @@ #include "opal/mca/base/base.h" #include "opal/util/opal_environ.h" #include "opal/runtime/opal.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/rml/rml.h" diff --git a/orte/tools/orterun/debuggers.c b/orte/tools/orterun/debuggers.c index 2618435a40..346bf850e5 100644 --- a/orte/tools/orterun/debuggers.c +++ b/orte/tools/orterun/debuggers.c @@ -111,6 +111,7 @@ #include "opal/util/output.h" #include "opal/util/path.h" #include "opal/util/os_path.h" +#include "opal/util/opal_sos.h" #include "opal/class/opal_pointer_array.h" #include "opal/mca/base/mca_base_param.h" #include "opal/util/opal_getcwd.h" diff --git a/orte/tools/orterun/orterun.c b/orte/tools/orterun/orterun.c index d258f4531e..7f5760f2ad 100644 --- a/orte/tools/orterun/orterun.c +++ b/orte/tools/orterun/orterun.c @@ -53,6 +53,7 @@ #include "opal/mca/paffinity/base/base.h" #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/basename.h" #include "opal/util/cmd_line.h" #include "opal/util/opal_environ.h" @@ -759,7 +760,7 @@ int orterun(int argc, char *argv[]) */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_DAEMON, ORTE_RML_NON_PERSISTENT, orte_daemon_recv, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); ORTE_UPDATE_EXIT_STATUS(ORTE_ERROR_DEFAULT_EXIT_CODE); goto DONE; @@ -1027,127 +1028,53 @@ static void dump_aborted_procs(void) orterun_basename); return; } - switch (proc->exit_code) { - case ORTE_ERR_SYS_LIMITS_PIPES: - orte_show_help("help-orterun.txt", "orterun:sys-limit-pipe", true, - orterun_basename, proc->node->name, - (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_PIPE_SETUP_FAILURE: - orte_show_help("help-orterun.txt", "orterun:pipe-setup-failure", true, - orterun_basename, proc->node->name, - (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_SYS_LIMITS_CHILDREN: - orte_show_help("help-orterun.txt", "orterun:sys-limit-children", true, - orterun_basename, proc->node->name, - (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_FAILED_GET_TERM_ATTRS: - orte_show_help("help-orterun.txt", "orterun:failed-term-attrs", true, - orterun_basename, proc->node->name, - (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_WDIR_NOT_FOUND: - orte_show_help("help-orterun.txt", "orterun:wdir-not-found", true, - orterun_basename, approc->cwd, - proc->node->name, (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_EXE_NOT_FOUND: - orte_show_help("help-orterun.txt", "orterun:exe-not-found", true, - orterun_basename, - (unsigned long)proc->name.vpid, - orterun_basename, - orterun_basename, - proc->node->name, - approc->app); - break; - case ORTE_ERR_EXE_NOT_ACCESSIBLE: - orte_show_help("help-orterun.txt", "orterun:exe-not-accessible", true, - orterun_basename, approc->app, proc->node->name, - (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_MULTIPLE_AFFINITIES: - orte_show_help("help-orterun.txt", - "orterun:multiple-paffinity-schemes", true, proc->slot_list); - break; - case ORTE_ERR_TOPO_SLOT_LIST_NOT_SUPPORTED: - orte_show_help("help-orterun.txt", - "orterun:topo-not-supported", - true, orte_process_info.nodename, "rankfile containing a slot_list of ", - proc->slot_list, approc->app); - break; - case ORTE_ERR_INVALID_NODE_RANK: - orte_show_help("help-orterun.txt", - "orterun:invalid-node-rank", true); - break; - case ORTE_ERR_INVALID_LOCAL_RANK: - orte_show_help("help-orterun.txt", - "orterun:invalid-local-rank", true); - break; - case ORTE_ERR_NOT_ENOUGH_CORES: - orte_show_help("help-orterun.txt", - "orterun:not-enough-resources", true, - "sockets", node->name, - "bind-to-core", approc->app); - break; - case ORTE_ERR_TOPO_CORE_NOT_SUPPORTED: - orte_show_help("help-orterun.txt", - "orterun:topo-not-supported", - true, node->name, "bind-to-core", "", - approc->app); - break; - case ORTE_ERR_INVALID_PHYS_CPU: - orte_show_help("help-orterun.txt", - "orterun:invalid-phys-cpu", true); - break; - case ORTE_ERR_NOT_ENOUGH_SOCKETS: - orte_show_help("help-orterun.txt", - "orterun:not-enough-resources", true, - "sockets", node->name, - "bind-to-socket", approc->app); - break; - case ORTE_ERR_TOPO_SOCKET_NOT_SUPPORTED: - orte_show_help("help-orterun.txt", - "orterun:topo-not-supported", - true, node->name, "bind-to-socket", "", - approc->app); - break; - case ORTE_ERR_MODULE_NOT_FOUND: - orte_show_help("help-orterun.txt", - "orterun:paffinity-missing-module", - true, node->name); - break; - case ORTE_ERR_SLOT_LIST_RANGE: - orte_show_help("help-orterun.txt", - "orterun:invalid-slot-list-range", - true, node->name, proc->slot_list); - break; - case ORTE_ERR_PAFFINITY_NOT_SUPPORTED: - orte_show_help("help-orterun.txt", - "orterun:affinity-not-supported", - true, node->name); - break; - case ORTE_ERR_PIPE_READ_FAILURE: - orte_show_help("help-orterun.txt", "orterun:pipe-read-failure", true, - orterun_basename, node->name, (unsigned long)proc->name.vpid); - break; - case ORTE_ERR_SOCKET_NOT_AVAILABLE: - orte_show_help("help-orterun.txt", "orterun:proc-socket-not-avail", true, - orterun_basename, ORTE_ERROR_NAME(proc->exit_code), node->name, - (unsigned long)proc->name.vpid); - break; - - default: - if (0 != proc->exit_code) { - orte_show_help("help-orterun.txt", "orterun:proc-failed-to-start", true, - orterun_basename, ORTE_ERROR_NAME(proc->exit_code), node->name, - (unsigned long)proc->name.vpid); - } else { - orte_show_help("help-orterun.txt", "orterun:proc-failed-to-start-no-status", true, - orterun_basename, node->name); - } - break; + proc->exit_code = OPAL_SOS_GET_ERROR_CODE(proc->exit_code); + if (ORTE_ERR_SYS_LIMITS_PIPES == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:sys-limit-pipe", true, + orterun_basename, proc->node->name, + (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_PIPE_SETUP_FAILURE == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:pipe-setup-failure", true, + orterun_basename, proc->node->name, + (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_SYS_LIMITS_CHILDREN == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:sys-limit-children", true, + orterun_basename, proc->node->name, + (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_FAILED_GET_TERM_ATTRS == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:failed-term-attrs", true, + orterun_basename, proc->node->name, + (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_WDIR_NOT_FOUND == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:wdir-not-found", true, + orterun_basename, apps[proc->app_idx]->cwd, + proc->node->name, (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_EXE_NOT_FOUND == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:exe-not-found", true, + orterun_basename, + (unsigned long)proc->name.vpid, + orterun_basename, + orterun_basename, + proc->node->name, + apps[proc->app_idx]->app); + } else if (ORTE_ERR_EXE_NOT_ACCESSIBLE == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:exe-not-accessible", true, + orterun_basename, apps[proc->app_idx]->app, proc->node->name, + (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_PIPE_READ_FAILURE == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:pipe-read-failure", true, + orterun_basename, proc->node->name, (unsigned long)proc->name.vpid); + } else if (0 != proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:proc-failed-to-start", true, + orterun_basename, ORTE_ERROR_NAME(proc->exit_code), proc->node->name, + (unsigned long)proc->name.vpid); + } else if (ORTE_ERR_SOCKET_NOT_AVAILABLE == proc->exit_code) { + orte_show_help("help-orterun.txt", "orterun:proc-socket-not-avail", true, + orterun_basename, ORTE_ERROR_NAME(proc->exit_code), proc->node->name, + (unsigned long)proc->name.vpid); + } else { + orte_show_help("help-orterun.txt", "orterun:proc-failed-to-start-no-status", true, + orterun_basename, proc->node->name); } } else if (ORTE_JOB_STATE_ABORTED == job->state) { if (NULL == proc) { diff --git a/orte/util/comm/comm.c b/orte/util/comm/comm.c index 362f0888fa..61e49da378 100644 --- a/orte/util/comm/comm.c +++ b/orte/util/comm/comm.c @@ -23,6 +23,7 @@ #include #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/threads/tsd.h" #include "opal/dss/dss.h" diff --git a/orte/util/dash_host/dash_host.c b/orte/util/dash_host/dash_host.c index ea8970bf1d..355d32e3da 100644 --- a/orte/util/dash_host/dash_host.c +++ b/orte/util/dash_host/dash_host.c @@ -26,6 +26,7 @@ #include "orte/types.h" #include "orte/util/show_help.h" +#include "opal/util/opal_sos.h" #include "opal/util/argv.h" #include "opal/util/if.h" diff --git a/orte/util/error_strings.c b/orte/util/error_strings.c index ab6b47c158..4b9b690157 100644 --- a/orte/util/error_strings.c +++ b/orte/util/error_strings.c @@ -24,12 +24,13 @@ #include +#include "opal/util/opal_sos.h" #include "orte/util/error_strings.h" const char *orte_err2str(int errnum) { const char *retval; - switch (errnum) { + switch (OPAL_SOS_GET_ERROR_CODE(errnum)) { case ORTE_ERR_RECV_LESS_THAN_POSTED: retval = "Receive was less than posted size"; break; diff --git a/orte/util/hnp_contact.c b/orte/util/hnp_contact.c index f3c560d465..0a0492b16a 100644 --- a/orte/util/hnp_contact.c +++ b/orte/util/hnp_contact.c @@ -37,6 +37,7 @@ #include "opal/util/os_path.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/os_dirpath.h" #include "orte/mca/errmgr/errmgr.h" @@ -190,7 +191,7 @@ int orte_list_local_hnps(opal_list_t *hnps, bool connect) /* it is okay not to find this as there may not be any * HNP's present, and we don't write our own session dir */ - if (ORTE_ERR_NOT_FOUND != ret) { + if (ORTE_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(ret)) { ORTE_ERROR_LOG(ret); } goto cleanup; diff --git a/orte/util/hostfile/hostfile.c b/orte/util/hostfile/hostfile.c index 50dbf45030..2143a36b96 100644 --- a/orte/util/hostfile/hostfile.c +++ b/orte/util/hostfile/hostfile.c @@ -30,6 +30,7 @@ #include "opal/class/opal_list.h" #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/mca/mca.h" #include "opal/mca/base/base.h" #include "opal/util/if.h" diff --git a/orte/util/name_fns.c b/orte/util/name_fns.c index 6c32439ec2..ae9f239c80 100644 --- a/orte/util/name_fns.c +++ b/orte/util/name_fns.c @@ -23,6 +23,7 @@ #include #include "opal/util/printf.h" +#include "opal/util/opal_sos.h" #include "opal/threads/tsd.h" #include "orte/mca/errmgr/errmgr.h" diff --git a/orte/util/nidmap.c b/orte/util/nidmap.c index 541c6c2e4b..53c18e065d 100644 --- a/orte/util/nidmap.c +++ b/orte/util/nidmap.c @@ -47,6 +47,7 @@ #include "opal/runtime/opal.h" #include "opal/class/opal_pointer_array.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/argv.h" #include "opal/mca/sysinfo/sysinfo_types.h" @@ -854,7 +855,7 @@ int orte_util_decode_pidmap(opal_byte_object_t *bo) /* setup for next cycle */ n = 1; } - if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER == rc) { + if (ORTE_ERR_UNPACK_READ_PAST_END_OF_BUFFER == OPAL_SOS_GET_ERROR_CODE(rc)) { rc = ORTE_SUCCESS; } diff --git a/orte/util/pre_condition_transports.c b/orte/util/pre_condition_transports.c index 2e56734efb..9307d21682 100644 --- a/orte/util/pre_condition_transports.c +++ b/orte/util/pre_condition_transports.c @@ -39,7 +39,7 @@ #include "opal/mca/base/mca_base_param.h" #include "opal/util/opal_environ.h" - +#include "opal/util/opal_sos.h" #include "orte/constants.h" #include "orte/types.h" diff --git a/orte/util/regex.c b/orte/util/regex.c index 9cc5d01ce4..9db6f6d175 100644 --- a/orte/util/regex.c +++ b/orte/util/regex.c @@ -43,6 +43,7 @@ #endif #include "opal/util/argv.h" +#include "opal/util/opal_sos.h" #include "orte/mca/errmgr/errmgr.h" #include "orte/mca/odls/odls_types.h" diff --git a/orte/util/session_dir.c b/orte/util/session_dir.c index 3fe6c73d02..24f3d19b59 100644 --- a/orte/util/session_dir.c +++ b/orte/util/session_dir.c @@ -47,6 +47,7 @@ #include "opal/util/argv.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/util/os_path.h" #include "opal/util/os_dirpath.h" #include "opal/util/basename.h" @@ -89,7 +90,8 @@ static int orte_create_dir(char *directory) /* Sanity check before creating the directory with the proper mode, * Make sure it doesn't exist already */ - if( ORTE_ERR_NOT_FOUND != (ret = opal_os_dirpath_access(directory, my_mode)) ) { + if( ORTE_ERR_NOT_FOUND != + (ret = OPAL_SOS_GET_ERROR_CODE(opal_os_dirpath_access(directory, my_mode))) ) { /* Failure because opal_os_dirpath_access() indicated that either: * - The directory exists and we can access it (no need to create it again), * return OPAL_SUCCESS, or @@ -387,7 +389,7 @@ int orte_session_dir(bool create, &frontend, hostid, batchid, proc) ) ) { - if (ORTE_ERR_FATAL == rc) { + if (ORTE_ERR_FATAL == OPAL_SOS_GET_ERROR_CODE(rc)) { /* this indicates we should abort quietly */ rc = ORTE_ERR_SILENT; goto cleanup; @@ -414,7 +416,7 @@ int orte_session_dir(bool create, /* it is okay for the path not to be found - don't error * log that case, but do error log others */ - if (ORTE_ERR_NOT_FOUND != rc) { + if (ORTE_ERR_NOT_FOUND != OPAL_SOS_GET_ERROR_CODE(rc)) { ORTE_ERROR_LOG(rc); } goto cleanup; diff --git a/orte/util/show_help.c b/orte/util/show_help.c index 8ca6b12487..993139291f 100644 --- a/orte/util/show_help.c +++ b/orte/util/show_help.c @@ -26,6 +26,7 @@ #include "opal/util/show_help.h" #include "opal/util/output.h" +#include "opal/util/opal_sos.h" #include "opal/dss/dss.h" #include "orte/mca/errmgr/errmgr.h" @@ -406,7 +407,7 @@ static int show_help(const char *filename, const char *topic, } } /* Not already displayed */ - else if (ORTE_ERR_NOT_FOUND == rc) { + else if (ORTE_ERR_NOT_FOUND == OPAL_SOS_GET_ERROR_CODE(rc)) { if (orte_xml_output) { char *tmp; tmp = xml_format((unsigned char*)output); @@ -492,7 +493,7 @@ cleanup: /* reissue the recv */ rc = orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD, ORTE_RML_TAG_SHOW_HELP, ORTE_RML_NON_PERSISTENT, orte_show_help_recv, NULL); - if (rc != ORTE_SUCCESS && rc != ORTE_ERR_NOT_IMPLEMENTED) { + if (rc != ORTE_SUCCESS && OPAL_SOS_GET_ERROR_CODE(rc) != ORTE_ERR_NOT_IMPLEMENTED) { ORTE_ERROR_LOG(rc); } } diff --git a/test/class/opal_bitmap.c b/test/class/opal_bitmap.c index 8c5b3df7d3..c02b7afd42 100644 --- a/test/class/opal_bitmap.c +++ b/test/class/opal_bitmap.c @@ -8,6 +8,7 @@ #include "support.h" #include "opal/class/opal_bitmap.h" +#include "opal/util/opal_sos.h" #include "opal/constants.h" #define BSIZE 26 @@ -62,12 +63,12 @@ int main(int argc, char *argv[]) PRINT_VALID_ERR; err = opal_bitmap_init(NULL, 2); - if (err == OPAL_ERR_BAD_PARAM) + if (OPAL_SOS_GET_ERROR_CODE(err) == OPAL_ERR_BAD_PARAM) fprintf(error_out, "ERROR: Initialization of bitmap failed\n\n"); PRINT_VALID_ERR; err = opal_bitmap_init(&bm, -1); - if (err == OPAL_ERR_BAD_PARAM) + if (OPAL_SOS_GET_ERROR_CODE(err) == OPAL_ERR_BAD_PARAM) fprintf(error_out, "ERROR: Initialization of bitmap failed \n\n"); err = opal_bitmap_init(&bm, BSIZE); diff --git a/test/util/Makefile.am b/test/util/Makefile.am index 1d927d56e2..f65566b8a9 100644 --- a/test/util/Makefile.am +++ b/test/util/Makefile.am @@ -31,6 +31,7 @@ AM_CPPFLAGS = -I$(top_srcdir)/test/support check_PROGRAMS = \ + opal_sos \ opal_path_nfs TESTS = \ @@ -72,6 +73,12 @@ opal_path_nfs_LDADD = \ $(top_builddir)/test/support/libsupport.a opal_path_nfs_DEPENDENCIES = $(opal_path_nfs_LDADD) +opal_sos_SOURCES = opal_sos.c +opal_sos_LDADD = \ + $(top_builddir)/opal/libopen-pal.la \ + $(top_builddir)/test/support/libsupport.a +opal_sos_DEPENDENCIES = $(opal_error_LDADD) + #opal_os_path_SOURCES = opal_os_path.c #opal_os_path_LDADD = \ # $(top_builddir)/opal/libopen-pal.la \ diff --git a/test/util/opal_os_create_dirpath.c b/test/util/opal_os_create_dirpath.c index b496e375eb..591fca8aff 100644 --- a/test/util/opal_os_create_dirpath.c +++ b/test/util/opal_os_create_dirpath.c @@ -89,7 +89,7 @@ static bool test1(void) /* Test trivial functionality. Program should return OPAL_ERROR when called with NULL path. */ - if (OPAL_ERROR != opal_os_dirpath_create(NULL, S_IRWXU)) + if (OPAL_SUCCESS == opal_os_dirpath_create(NULL, S_IRWXU)) return(false); return true; @@ -111,14 +111,14 @@ static bool test2(void) return(false); } - if (OPAL_ERROR == opal_os_dirpath_create(tmp, S_IRWXU)) { + if (OPAL_SUCCESS != opal_os_dirpath_create(tmp, S_IRWXU)) { rmdir(tmp); return(false); } chmod(tmp, S_IRUSR); - if (OPAL_ERROR == opal_os_dirpath_create(tmp, S_IRWXU)) { + if (OPAL_SUCCESS != opal_os_dirpath_create(tmp, S_IRWXU)) { rmdir(tmp); return(false); } @@ -148,7 +148,7 @@ static bool test3(void) } out = opal_os_path(true, a[0], a[1], a[2], NULL); - if (OPAL_ERROR == opal_os_dirpath_create(out, S_IRWXU)) { + if (OPAL_SUCCESS != opal_os_dirpath_create(out, S_IRWXU)) { out = opal_os_path(true, a[0], a[1], a[2], NULL); if (0 == stat(out, &buf)) rmdir(out); diff --git a/test/util/orte_session_dir.c b/test/util/orte_session_dir.c index a994d7d815..01dc8f2fb1 100644 --- a/test/util/orte_session_dir.c +++ b/test/util/orte_session_dir.c @@ -154,14 +154,14 @@ static bool test1(void) clear_proc_info(); prefix = opal_os_path(false, "tmp", NULL); - if (ORTE_ERROR == orte_session_dir(true, prefix, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(true, prefix, NULL, NULL, "test-universe", NULL, NULL)) { fprintf(test_out, "test1 - couldn't create specified path\n"); free(prefix); return(false); } /* see if it can access an existing path */ - if (ORTE_ERROR == orte_session_dir(false, prefix, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(false, prefix, NULL, NULL, "test-universe", NULL, NULL)) { fprintf(test_out, "test1 - couldn't access existing path\n"); free(prefix); return(false); @@ -183,7 +183,7 @@ static bool test2(void) setenv("OMPI_PREFIX_ENV", "/tmp/trythis", 1); - if (ORTE_ERROR == orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { unsetenv("OMPI_PREFIX_ENV"); return(false); } @@ -204,7 +204,7 @@ static bool test3(void) setenv("TMPDIR", "/tmp/trythis", 1); - if (ORTE_ERROR == orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { unsetenv("TMPDIR"); return(false); } @@ -225,7 +225,7 @@ static bool test4(void) setenv("TMP", "/tmp/trythis", 1); - if (ORTE_ERROR == orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { unsetenv("TMP"); return(false); } @@ -246,7 +246,7 @@ static bool test5(void) setenv("HOME", "/tmp/trythis", 1); - if (ORTE_ERROR == orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { unsetenv("HOME"); return(false); } @@ -268,7 +268,7 @@ static bool test6(void) * Program should turn to default of /tmp (where "/" is whatever * top-level directory is appropriate for given system) */ - if (ORTE_ERROR == orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, NULL, NULL, "test-universe", NULL, NULL)) { return(false); } @@ -286,7 +286,7 @@ static bool test7(void) clear_proc_info(); /* create test proc session directory tree */ - if (ORTE_ERROR == orte_session_dir(true, NULL, "localhost", NULL, "test-universe", "test-job", "test-proc")) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, "localhost", NULL, "test-universe", "test-job", "test-proc")) { return(false); } @@ -312,7 +312,7 @@ static bool test7(void) fprintf(fp, "ss"); fclose(fp); - if (ORTE_ERROR == orte_session_dir_finalize(orte_process_info.my_name)) { + if (ORTE_SUCCESS != orte_session_dir_finalize(orte_process_info.my_name)) { return(false); } @@ -331,7 +331,7 @@ static bool test8(void) clear_proc_info(); /* create test proc session directory tree */ - if (ORTE_ERROR == orte_session_dir(true, NULL, "localhost", NULL, "test-universe2", "test-job2", "test-proc2")) { + if (ORTE_SUCCESS != orte_session_dir(true, NULL, "localhost", NULL, "test-universe2", "test-job2", "test-proc2")) { return(false); } @@ -358,7 +358,7 @@ static bool test8(void) fclose(fp); - if (ORTE_ERROR == orte_session_dir_finalize(orte_process_info.my_name)) { + if (ORTE_SUCCESS != orte_session_dir_finalize(orte_process_info.my_name)) { return(false); }