Exemple #1
0
static int s2_job_connect(const char jobId[])
{
    int rc;
    PMI2_Connect_comm_t conn;
    /*FIXME should change function prototype to add void* conn */
    rc = PMI2_Job_Connect(jobId, &conn);
    if( PMI2_SUCCESS != rc ){
        OPAL_PMI_ERROR(rc, "PMI2_Job_Connect");
        return OPAL_ERROR;
    }
    return OPAL_SUCCESS;
}
Exemple #2
0
static int s2_job_connect(opal_list_t *procs)
{
    int rc;
    PMI2_Connect_comm_t conn;
    opal_namelist_t *nm;
    char *jobid;

    if (NULL == procs || 1 < opal_list_get_size(procs)) {
        return OPAL_ERR_NOT_SUPPORTED;
    }
    nm = (opal_namelist_t*)opal_list_get_first(procs);
    (void)asprintf(&jobid, "%s", OPAL_JOBID_PRINT(nm->name.jobid));

    /*FIXME should change function prototype to add void* conn */
    rc = PMI2_Job_Connect(jobid, &conn);
    if( PMI2_SUCCESS != rc ){
        OPAL_PMI_ERROR(rc, "PMI2_Job_Connect");
        free(jobid);
        return OPAL_ERROR;
    }
    free(jobid);
    return OPAL_SUCCESS;
}