Esempio n. 1
0
static void
orte_iof_hnp_exception_handler(const orte_process_name_t* peer, orte_rml_exception_t reason)
{
#if 0
    orte_iof_base_endpoint_t *endpoint;
    opal_output_verbose(1, orte_iof_base.iof_output, 
                        "iof svc exception handler! %s\n",
                        ORTE_NAME_PRINT((orte_process_name_t*)peer));
    
    /* If we detect an exception on the RML connection to a peer,
     delete all of its subscriptions and publications.  Note that
     exceptions can be detected during a normal RML shutdown; they
     are recoverable events (no need to abort). */
    orte_iof_hnp_sub_delete_all(peer);
    orte_iof_hnp_pub_delete_all(peer);
    opal_output_verbose(1, orte_iof_base.iof_output, "deleted all pubs and subs\n");
    
    /* Find any streams on any endpoints for this peer and close them */
    while (NULL != 
           (endpoint = orte_iof_base_endpoint_match(peer, ORTE_NS_CMP_ALL,
                                                    ORTE_IOF_ANY))) {
        orte_iof_base_endpoint_closed(endpoint);
        
        /* Delete the endpoint that we just matched */
        orte_iof_base_endpoint_delete(peer, ORTE_NS_CMP_ALL, ORTE_IOF_ANY);
    }
#endif
    opal_output_verbose(1, orte_iof_base.iof_output, "done with exception handler\n");
}
Esempio n. 2
0
int orte_iof_proxy_unpublish(
    const orte_process_name_t* origin,
    orte_ns_cmp_bitmask_t mask,
    orte_iof_base_tag_t tag)
{
    int rc;

#if 0
        {
            int i = 0;
            opal_output(orte_iof_base.iof_output, "[%lu,%lu,%lu] orted: ******** ABOUT TO IOF PROXY UNPUBLISH, %d", ORTE_NAME_ARGS(orte_process_info.my_name), getpid());
            fflush(stderr);
            while (0 == i) sleep(5);
        }
#endif

    /* cleanup server */
    orte_iof_proxy_svc_unpublish(
        origin,
        mask,
        tag);

    /* delete local endpoint.  Note that the endpoint may have already
       been deleted (e.g., if some entity noticed that the fd closed
       and called orte_iof_base_endpoint_delete on the corresopnding
       endpoint already).  So if we get NOT_FOUND, ignore that error
       -- the end result is what we want: the endpoint is deleted when
       we return. */
    rc = orte_iof_base_endpoint_delete(
        origin,
        mask,
        tag);
    if (ORTE_ERR_NOT_FOUND == rc || ORTE_SUCCESS == rc) {
        return ORTE_SUCCESS;
    } else {
        return rc;
    }
}
Esempio n. 3
0
int orte_iof_svc_unpublish(
    const orte_process_name_t* origin,
    orte_ns_cmp_bitmask_t mask,
    orte_iof_base_tag_t tag)
{
    int rc;

    /* Delete the corresponding publish.  Note that it may have
       already been deleted by some other entity (e.g., message
       arriving saying to unpublish), so we may get a NOT_FOUND.
       That's ok/not an error -- the only end result that we want is
       that there is no corresponding publish. */
    rc = orte_iof_svc_pub_delete(
        origin,
        ORTE_PROC_MY_NAME,
        mask,
        tag);
    if (ORTE_SUCCESS != rc && ORTE_ERR_NOT_FOUND != rc) {
        return rc;
    }

    /* delete local endpoint.  Note that the endpoint may have already
       been deleted (e.g., if some entity noticed that the fd closed
       and called orte_iof_base_endpoint_delete on the corresopnding
       endpoint already).  So if we get NOT_FOUND, ignore that error
       -- the end result is what we want: the endpoint is deleted when
       we return. */
    rc = orte_iof_base_endpoint_delete(
        origin,
        mask,
        tag);
    if (ORTE_ERR_NOT_FOUND == rc || ORTE_SUCCESS == rc) {
        return ORTE_SUCCESS;
    } else {
        return rc;
    }
}