int orte_odls_alps_component_query(mca_base_module_t **module, int *priority)
{
    int rc = ORTE_SUCCESS;
    bool flag;

    /*
     * make sure we're in a daemon process
     */

    if (!ORTE_PROC_IS_DAEMON) {
        *priority = 0;
        *module = NULL;
        rc = ORTE_ERROR;
    }

    /*
     * make sure we're in a Cray PAGG container, and that we are also on
     * a compute node (i.e. we are thought of as a application task by
     * the cray job kernel module  - the thing that creates the PAGG
     */

    rc = orte_common_alps_proc_in_pagg(&flag);
    if ((ORTE_SUCCESS == rc) && flag) {
        *priority = 80; /* take precendence over base and default */
        *module = (mca_base_module_t *) &orte_odls_alps_module;
    }

    return rc;
}
Esempio n. 2
0
static int component_available(void)
{
    bool flag = false;

    /*
     * If I'm not a app proc can't use this component
     */

    if (!ORTE_PROC_IS_APP) {
        return ORTE_ERR_NOT_SUPPORTED;
    }

    /*
     * If I have a orte daemon, then I don't want to use this component
     */

    if (NULL != orte_process_info.my_daemon_uri) {
        return ORTE_ERR_NOT_SUPPORTED;
    }

    /*
     * make sure we're in a Cray PAGG container, and that we are also on
     * a compute node (i.e. we are thought of as a application task by
     * the cray job kernel module  - the thing that creates the PAGG
     */

    orte_common_alps_proc_in_pagg(&flag);

    if (flag) {
        opal_output_verbose(5, orte_oob_base_framework.framework_output,
                            "oob:alps: component_available called");
        return ORTE_SUCCESS;
    }

    return ORTE_ERR_NOT_AVAILABLE;
}