Example #1
0
int orcm_cfgi_base_open(void)
{
    /* Debugging / verbose output.  Always have stream open, with
     verbose set by the mca open system... */
    orcm_cfgi_base.output = opal_output_open(NULL);
    
    /* init the globals */
    OBJ_CONSTRUCT(&orcm_cfgi_base.ctl, orte_thread_ctl_t);
    orcm_cfgi_base.num_active_apps = 0;
    orcm_cfgi_base.daemons = NULL;
    OBJ_CONSTRUCT(&orcm_cfgi_components_available, opal_list_t);
    OBJ_CONSTRUCT(&orcm_cfgi_selected_modules, opal_list_t);
    OBJ_CONSTRUCT(&orcm_cfgi_base.installed_apps, opal_pointer_array_t);
    opal_pointer_array_init(&orcm_cfgi_base.installed_apps, 16, INT_MAX, 16);
    OBJ_CONSTRUCT(&orcm_cfgi_base.confgd_apps, opal_pointer_array_t);
    opal_pointer_array_init(&orcm_cfgi_base.confgd_apps, 16, INT_MAX, 16);
    orcm_cfgi_base.launch_pipe[0] = -1;
    orcm_cfgi_base.launch_pipe[1] = -1;

    /* Open up all available components */
    if (ORCM_SUCCESS != 
        mca_base_components_open("orcm_cfgi", orcm_cfgi_base.output, NULL,
                                 &orcm_cfgi_components_available, true)) {
            return ORCM_ERROR;
        }
    
    /* All done */
    return ORCM_SUCCESS;
}
Example #2
0
/**
 * Function for finding and opening either all MCA components, or the one
 * that was specifically requested via a MCA parameter.
 */
static int orcm_scd_base_open(mca_base_open_flag_t flags)
{
    int rc;

    /* setup the base objects */
    OBJ_CONSTRUCT(&orcm_scd_base.states, opal_list_t);
    OBJ_CONSTRUCT(&orcm_scd_base.rmstates, opal_list_t);
    OBJ_CONSTRUCT(&orcm_scd_base.queues, opal_list_t);
    OBJ_CONSTRUCT(&orcm_scd_base.nodes, opal_pointer_array_t);
    opal_pointer_array_init(&orcm_scd_base.nodes, 8, INT_MAX, 8);
    OBJ_CONSTRUCT(&orcm_scd_base.topologies, opal_pointer_array_t);
    opal_pointer_array_init(&orcm_scd_base.topologies, 1, INT_MAX, 1);
    OBJ_CONSTRUCT(&orcm_scd_base.tracking, opal_list_t);

    if (OPAL_SUCCESS !=
            (rc = mca_base_framework_components_open(&orcm_scd_base_framework,
                    flags))) {
        return rc;
    }

    /* create the event base */
    if (NULL ==
            (orcm_scd_base.ev_base = opal_progress_thread_init("scd"))) {
        return ORCM_ERR_OUT_OF_RESOURCE;
    }

    return rc;
}
Example #3
0
/**   INSTANTIATE OPENRCM OBJECTS **/
static void triplets_array_constructor(orcm_triplets_array_t *ptr)
{
    OBJ_CONSTRUCT(&ptr->ctl, orte_thread_ctl_t);

    OBJ_CONSTRUCT(&ptr->wildcards, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->wildcards, 8, INT_MAX, 8);

    OBJ_CONSTRUCT(&ptr->array, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->array, 8, INT_MAX, 8);
}
Example #4
0
static void app_constructor(orcm_cfgi_app_t *ptr)
{
    ptr->modified = false;
    ptr->idx = -1;
    ptr->application = NULL;
    ptr->max_instances = -1;
    ptr->num_instances = 0;
    OBJ_CONSTRUCT(&ptr->executables, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->executables, 4, INT_MAX, 4);
    OBJ_CONSTRUCT(&ptr->instances, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->instances, 4, INT_MAX, 4);
}
Example #5
0
static void slave_file_construct(orte_slave_files_t *ptr)
{
    ptr->node = NULL;
    ptr->local = false;
    ptr->prefix = NULL;
    ptr->bootproxy = NULL;
    ptr->positioned = false;
    OBJ_CONSTRUCT(&ptr->apps, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->apps, 8, 1024, 8);
    OBJ_CONSTRUCT(&ptr->files, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->files, 8, 1024, 8);
}
Example #6
0
static void orte_job_construct(orte_job_t* job)
{
    job->jobid = ORTE_JOBID_INVALID;
    job->offset = 0;
    job->updated = true;
    job->apps = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(job->apps,
                            1,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            2);
    job->num_apps = 0;
    job->controls = ORTE_JOB_CONTROL_FORWARD_OUTPUT;
    job->failure_timer = NULL;
    job->gang_launched = true;
    job->stdin_target = ORTE_VPID_INVALID;
    job->stdout_target = ORTE_JOBID_INVALID;
    job->total_slots_alloc = 0;
    job->num_procs = 0;
    job->procs = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(job->procs,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);
    job->map = NULL;
    job->bookmark = NULL;
    job->state = ORTE_JOB_STATE_UNDEF;
    job->restart = false;

    job->num_mapped = 0;
    job->num_launched = 0;
    job->num_reported = 0;
    job->num_terminated = 0;
    job->num_daemons_reported = 0;
    job->num_non_zero_exit = 0;
    job->abort = false;
    job->aborted_proc = NULL;
    
    job->originator.jobid = ORTE_JOBID_INVALID;
    job->originator.vpid = ORTE_VPID_INVALID;

    job->recovery_defined = false;
    job->enable_recovery = false;
    job->num_local_procs = 0;

    job->file_maps = NULL;

#if OPAL_ENABLE_FT_CR == 1
    job->ckpt_state = 0;
    job->ckpt_snapshot_ref = NULL;
    job->ckpt_snapshot_loc = NULL;
#endif
}
Example #7
0
static void orte_job_construct(orte_job_t* job)
{
    job->name = NULL;
    job->instance = NULL;
    job->jobid = ORTE_JOBID_INVALID;
    job->apps = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(job->apps,
                            1,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            2);
    job->num_apps = 0;
    job->controls = ORTE_JOB_CONTROL_FORWARD_OUTPUT;
    job->stdin_target = ORTE_VPID_INVALID;
    job->total_slots_alloc = 0;
    job->num_procs = 0;
    job->procs = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(job->procs,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);
    
    job->map = NULL;
    job->bookmark = NULL;
    job->oversubscribe_override = false;
    job->state = ORTE_JOB_STATE_UNDEF;

    job->num_launched = 0;
    job->num_reported = 0;
    job->num_terminated = 0;
    job->num_daemons_reported = 0;
    job->abort = false;
    job->aborted_proc = NULL;
    
    OBJ_CONSTRUCT(&job->dyn_spawn_lock, opal_mutex_t);
    OBJ_CONSTRUCT(&job->dyn_spawn_cond, opal_condition_t);
    job->dyn_spawn_active = false;
    
    job->recovery_defined = false;
    job->enable_recovery = false;
    
    job->launch_msg_sent.tv_sec = 0;
    job->launch_msg_sent.tv_usec = 0;
    job->max_launch_msg_recvd.tv_sec = 0;
    job->max_launch_msg_recvd.tv_usec = 0;
    
#if OPAL_ENABLE_FT_CR == 1
    job->ckpt_state = 0;
    job->ckpt_snapshot_ref = NULL;
    job->ckpt_snapshot_loc = NULL;
#endif
}
Example #8
0
static void step_con(orcm_step_t *p)
{
    p->alloc = NULL;
    p->job = NULL;
    OBJ_CONSTRUCT(&p->nodes, opal_pointer_array_t);
    opal_pointer_array_init(&p->nodes, 1, INT_MAX, 8);
}
Example #9
0
int all_orte_proc_init(void)
{
    orte_vpid_t i;
    orte_vpid_t daemon;
    char *cpu_bitmap;
    int rc;


    OBJ_CONSTRUCT(&rte_procs, opal_pointer_array_t);
    rc = opal_pointer_array_init(&rte_procs, orte_process_info.num_procs, INT_MAX, 10);
    if (OPAL_SUCCESS != rc) {
        OBJ_DESTRUCT(&rte_procs);
        return RTE_ERROR;
    }

    /* create proc structures and find self */
    for( i = 0; i < orte_process_info.num_procs; i++ ) {
        rte_proc_t *proc = OBJ_NEW(rte_proc_t);
        rc = opal_pointer_array_set_item(&rte_procs, i, (void *)proc);
        if (OPAL_SUCCESS != rc) {
            OBJ_DESTRUCT(&rte_procs);
            return RTE_ERROR;
        }

        proc->name.jobid = orte_process_info.my_name.jobid;
        proc->name.vpid = i;
        if (i == orte_process_info.my_name.vpid) {
            proc->hostname = strdup(orte_process_info.nodename);
        }
    }
    return RTE_SUCCESS;
}
/**
 * Duplicate a carto graph and reduce the new graph to contain
 * nodes from a ceratin type(s)
 * 
 * @param destination The new graph.
 * @param source the original graph.
 * @param node_type the node type(s) that the new graph will
 *                  include.
 */
void opal_carto_base_duplicate_graph_fn(opal_carto_graph_t **destination, const opal_carto_graph_t *source, const char *node_type)
{
    opal_pointer_array_t *vertices;
    int i, graph_order; 
    opal_carto_base_node_t *node;
    opal_graph_vertex_t *vertex;

    /* duplicate the graph */
    opal_graph_duplicate((opal_graph_t **)destination, (opal_graph_t *)source);
    /* if there is no need for reduction, return */
    if (NULL == node_type) {
        return;
    }
    vertices = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(vertices, 20, INT_MAX, 20);
    /* get all the vertices of the new graph */
    graph_order  = opal_graph_get_graph_vertices(*destination, vertices);
    /* remove all the nodes that are not in the required type */
    for (i = 0; i < graph_order; i++ ) {
        vertex = (opal_graph_vertex_t *)opal_pointer_array_get_item(vertices, i);
        node = vertex->vertex_data;
        if (!(0 == strcmp(node_type, node->node_type) || node->is_cpu)) {
            opal_graph_remove_vertex(*destination, vertex);
        }
    }
    /* free the vertices array */
    OBJ_RELEASE(vertices);
}
Example #11
0
File: win.c Project: anandhis/ompi
int
ompi_win_init(void)
{
    int ret;

    assert (sizeof (ompi_predefined_win_t) >= sizeof (ompi_win_t));

    /* setup window Fortran array */
    OBJ_CONSTRUCT(&ompi_mpi_windows, opal_pointer_array_t);
    if( OPAL_SUCCESS != opal_pointer_array_init(&ompi_mpi_windows, 4,
                                                OMPI_FORTRAN_HANDLE_MAX, 16) ) {
        return OMPI_ERROR;
    }

    /* Setup MPI_WIN_NULL */
    OBJ_CONSTRUCT(&ompi_mpi_win_null.win, ompi_win_t);
    ompi_mpi_win_null.win.w_flags = OMPI_WIN_INVALID;
    ompi_mpi_win_null.win.w_group = &ompi_mpi_group_null.group;
    OBJ_RETAIN(&ompi_mpi_group_null);
    ompi_win_set_name(&ompi_mpi_win_null.win, "MPI_WIN_NULL");
    opal_pointer_array_set_item(&ompi_mpi_windows, 0, &ompi_mpi_win_null.win);

    ret = mca_base_var_enum_create ("accumulate_ops", accumulate_ops_values, &ompi_win_accumulate_ops);
    if (OPAL_SUCCESS != ret) {
        return ret;
    }

    ret = mca_base_var_enum_create_flag ("accumulate_order", accumulate_order_flags, &ompi_win_accumulate_order);
    if (OPAL_SUCCESS != ret) {
        return ret;
    }

    return OMPI_SUCCESS;
}
Example #12
0
static void orte_node_construct(orte_node_t* node)
{
    node->index = -1;
    node->name = NULL;
    node->daemon = NULL;

    node->num_procs = 0;
    node->procs = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(node->procs,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);
    node->next_node_rank = 0;
    
    node->state = ORTE_NODE_STATE_UNKNOWN;
    node->slots = 0;
    node->slots_inuse = 0;
    node->slots_max = 0;
    
#if OPAL_HAVE_HWLOC
    node->topology = NULL;
#endif

    node->flags = 0;
    OBJ_CONSTRUCT(&node->attributes, opal_list_t);
}
Example #13
0
/*
 * Initialize OMPI group infrastructure
 */
int ompi_group_init(void)
{
    /* initialize ompi_group_f_to_c_table */
    OBJ_CONSTRUCT( &ompi_group_f_to_c_table, opal_pointer_array_t);
    if( OPAL_SUCCESS != opal_pointer_array_init(&ompi_group_f_to_c_table, 0,
                                                OMPI_FORTRAN_HANDLE_MAX, 64) ) {
        return OMPI_ERROR;
    }
    
    /* add MPI_GROUP_NULL to table */
    OBJ_CONSTRUCT(&ompi_mpi_group_null, ompi_group_t);
    ompi_mpi_group_null.group.grp_proc_count        = 0;
    ompi_mpi_group_null.group.grp_my_rank           = MPI_PROC_NULL;
    ompi_mpi_group_null.group.grp_proc_pointers     = NULL;
    ompi_mpi_group_null.group.grp_flags            |= OMPI_GROUP_DENSE;
    ompi_mpi_group_null.group.grp_flags            |= OMPI_GROUP_INTRINSIC;
        
    /* add MPI_GROUP_EMPTY to table */
    OBJ_CONSTRUCT(&ompi_mpi_group_empty, ompi_group_t);
    ompi_mpi_group_empty.group.grp_proc_count        = 0;
    ompi_mpi_group_empty.group.grp_my_rank           = MPI_UNDEFINED;
    ompi_mpi_group_empty.group.grp_proc_pointers     = NULL;
    ompi_mpi_group_empty.group.grp_flags            |= OMPI_GROUP_DENSE;
    ompi_mpi_group_empty.group.grp_flags            |= OMPI_GROUP_INTRINSIC;
        
    return OMPI_SUCCESS;
}
Example #14
0
static void orte_node_construct(orte_node_t* node)
{
    node->name = NULL;
    node->alias = NULL;
    node->index = -1;
    node->daemon = NULL;
    node->daemon_launched = false;
    node->location_verified = false;
    node->launch_id = -1;
    node->mapped = false;

    node->num_procs = 0;
    node->procs = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(node->procs,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);
    node->next_node_rank = 0;
    
    node->oversubscribed = false;
    node->state = ORTE_NODE_STATE_UNKNOWN;
    node->slots = 0;
    node->slots_given = false;
    node->slots_inuse = 0;
    node->slots_max = 0;
    
    node->username = NULL;
    
#if OPAL_HAVE_HWLOC
    node->topology = NULL;
#endif

    OBJ_CONSTRUCT(&node->stats, opal_ring_buffer_t);
    opal_ring_buffer_init(&node->stats, orte_stat_history_size);
}
Example #15
0
static void jtrk_cons(local_jobtracker_t *ptr)
{
    ptr->cmd = NULL;
    OBJ_CONSTRUCT(&ptr->apps, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->apps, 1, INT_MAX, 1);
    ptr->napps = 0;
}
Example #16
0
static int opal_dstore_base_frame_open(mca_base_open_flag_t flags)
{
    OBJ_CONSTRUCT(&opal_dstore_base.handles, opal_pointer_array_t);
    opal_pointer_array_init(&opal_dstore_base.handles, 3, INT_MAX, 1);

    /* Open up all available components */
    return mca_base_framework_components_open(&opal_dstore_base_framework, flags);
}
Example #17
0
static void exec_constructor(orcm_cfgi_exec_t *ptr)
{
    ptr->idx = -1;
    ptr->appname = NULL;
    ptr->process_limit = -1;
    ptr->total_procs = 0;
    OBJ_CONSTRUCT(&ptr->versions, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->versions, 4, INT_MAX, 4);
}
Example #18
0
static void run_constructor(orcm_cfgi_run_t *ptr)
{
    ptr->idx = -1;
    ptr->app_idx = -1;
    ptr->app = NULL;
    ptr->application = NULL;
    ptr->instance = NULL;
    OBJ_CONSTRUCT(&ptr->binaries, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->binaries, 4, INT_MAX, 4);
}
Example #19
0
static void orte_jmap_construct(orte_jmap_t *ptr)
{
    ptr->job = ORTE_JOBID_INVALID;
    ptr->num_procs = 0;
    OBJ_CONSTRUCT(&ptr->pmap, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->pmap,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);
}
Example #20
0
static void vers_constructor(orcm_cfgi_version_t *ptr)
{
    ptr->idx = -1;
    ptr->exec = NULL;
    ptr->version = NULL;
    ptr->argv = NULL;
    ptr->mod_time = NULL;
    OBJ_CONSTRUCT(&ptr->binaries, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->binaries, 4, INT_MAX, 4);
}
static void ftgrp_res_construct(orte_rmaps_res_ftgrp_t *ptr)
{
    ptr->ftgrp = -1;
    ptr->used = false;
    ptr->included = false;
    OBJ_CONSTRUCT(&ptr->nodes, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->nodes,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);    
}
Example #22
0
static void orte_job_construct(orte_job_t* job)
{
    job->personality = NULL;
    job->jobid = ORTE_JOBID_INVALID;
    job->offset = 0;
    job->apps = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(job->apps,
                            1,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            2);
    job->num_apps = 0;
    job->stdin_target = 0;
    job->total_slots_alloc = 0;
    job->num_procs = 0;
    job->procs = OBJ_NEW(opal_pointer_array_t);
    opal_pointer_array_init(job->procs,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            ORTE_GLOBAL_ARRAY_BLOCK_SIZE);
    job->map = NULL;
    job->bookmark = NULL;
    job->bkmark_obj = 0;
    job->state = ORTE_JOB_STATE_UNDEF;

    job->num_mapped = 0;
    job->num_launched = 0;
    job->num_reported = 0;
    job->num_terminated = 0;
    job->num_daemons_reported = 0;

    job->originator.jobid = ORTE_JOBID_INVALID;
    job->originator.vpid = ORTE_VPID_INVALID;
    job->num_local_procs = 0;

    job->flags = 0;
    ORTE_FLAG_SET(job, ORTE_JOB_FLAG_GANG_LAUNCHED);
    ORTE_FLAG_SET(job, ORTE_JOB_FLAG_FORWARD_OUTPUT);

    OBJ_CONSTRUCT(&job->attributes, opal_list_t);
}
Example #23
0
static void group_constructor(orcm_triplet_group_t *ptr)
{
    ptr->triplet = NULL;
    ptr->uid = 0;
    ptr->jobid = ORTE_JOBID_INVALID;
    ptr->num_procs = 0;
    ptr->output = ORTE_RMCAST_INVALID_CHANNEL;
    ptr->input = ORTE_RMCAST_INVALID_CHANNEL;
    ptr->pnp_cb_done = false;
    ptr->pnp_cbfunc = NULL;
    OBJ_CONSTRUCT(&ptr->members, opal_pointer_array_t);
    opal_pointer_array_init(&ptr->members, 8, INT_MAX, 8);
}
/*
 * Open the component
 */
static int iboffload_open(void)
{
    int rc;

    /* local variables */
    mca_bcol_iboffload_component_t *cm = &mca_bcol_iboffload_component;

    IBOFFLOAD_VERBOSE(10, ("Open Iboffload component.\n"));

    cm->super.priority = 100;
    cm->super.n_net_contexts = 0;
    cm->super.network_contexts = NULL;

    OBJ_CONSTRUCT(&cm->recv_wrs.lock, opal_mutex_t);

    /* construct lists */
    OBJ_CONSTRUCT(&cm->devices, opal_pointer_array_t);
    rc = opal_pointer_array_init(&cm->devices, 10, INT_MAX, 10);
    if (OMPI_SUCCESS != rc) {
        goto close_device;
    }

    /* load mca parametres */
    rc = mca_bcol_iboffload_register_params();
    if (OMPI_SUCCESS != rc) {
        goto close_device;
    }

    /* Register the progress function */
    rc = opal_progress_register(mca_bcol_iboffload_component_progress);
    if (OMPI_SUCCESS != rc) {
        IBOFFLOAD_ERROR(("Failed to register the progress function"
                         " for iboffload component.\n"));
        goto close_device;
    }

    map_ompi_to_ib_dtype();
    map_ompi_to_ib_op_type();

    /* The init_done set to true on first component usage */
    cm->init_done = false;

    return OMPI_SUCCESS;

close_device:
    OBJ_DESTRUCT(&cm->devices);
    OBJ_DESTRUCT(&cm->recv_wrs.lock);
    return rc;
}
Example #25
0
void orte_info_components_open(void)
{
    if (opened_components) {
        return;
    }

    opened_components = true;

    /* init the map */
    OBJ_CONSTRUCT(&orte_component_map, opal_pointer_array_t);
    opal_pointer_array_init(&orte_component_map, 256, INT_MAX, 128);

    opal_info_register_framework_params(&orte_component_map);
    orte_info_register_framework_params(&orte_component_map);
}
Example #26
0
static void _terminate_job(orte_jobid_t jobid)
{
    opal_pointer_array_t procs;
    orte_proc_t pobj;

    OBJ_CONSTRUCT(&procs, opal_pointer_array_t);
    opal_pointer_array_init(&procs, 1, 1, 1);
    OBJ_CONSTRUCT(&pobj, orte_proc_t);
    pobj.name.jobid = jobid;
    pobj.name.vpid = ORTE_VPID_WILDCARD;
    opal_pointer_array_add(&procs, &pobj);
    orte_plm.terminate_procs(&procs);
    OBJ_DESTRUCT(&procs);
    OBJ_DESTRUCT(&pobj);
}
Example #27
0
/**
 * Function for finding and opening either all MCA components, or the one
 * that was specifically requested via a MCA parameter.
 */
static int orte_sensor_base_open(mca_base_open_flag_t flags)
{
    /* initialize pointers */
    orte_sensor_base.my_proc = NULL;
    orte_sensor_base.my_node = NULL;
    orte_sensor_base.active = false;

    /* construct the array of modules */
    OBJ_CONSTRUCT(&orte_sensor_base.modules, opal_pointer_array_t);
    opal_pointer_array_init(&orte_sensor_base.modules, 3, INT_MAX, 1);
    
    /* get the sample rate */
    orte_sensor_base.rate.tv_sec = orte_sensor_base_sample_rate;
    orte_sensor_base.rate.tv_usec = 0;

    /* Open up all available components */
    return mca_base_framework_components_open(&orte_sensor_base_framework, flags);
}
Example #28
0
static void orte_app_context_construct(orte_app_context_t* app_context)
{
    app_context->idx=0;
    app_context->app=NULL;
    app_context->num_procs=0;
    OBJ_CONSTRUCT(&app_context->procs, opal_pointer_array_t);
    opal_pointer_array_init(&app_context->procs,
                            1,
                            ORTE_GLOBAL_ARRAY_MAX_SIZE,
                            16);
    app_context->state = ORTE_APP_STATE_UNDEF;
    app_context->first_rank = 0;
    app_context->argv=NULL;
    app_context->env=NULL;
    app_context->cwd=NULL;
    app_context->flags = 0;
    OBJ_CONSTRUCT(&app_context->attributes, opal_list_t);
}
Example #29
0
/* Initialize the module */
static int init(void)
{
    /* post non-blocking recv to catch forwarded IO from
     * the orteds
     */    
    orte_rml.recv_buffer_nb(ORTE_NAME_WILDCARD,
                            ORTE_RML_TAG_IOF_HNP,
                            ORTE_RML_PERSISTENT,
                            orte_iof_mrhnp_recv,
                            NULL);

    OBJ_CONSTRUCT(&mca_iof_mr_hnp_component.sinks, opal_list_t);
    OBJ_CONSTRUCT(&mca_iof_mr_hnp_component.procs, opal_list_t);
    mca_iof_mr_hnp_component.stdinev = NULL;
    OBJ_CONSTRUCT(&mca_iof_mr_hnp_component.stdin_jobs, opal_pointer_array_t);
    opal_pointer_array_init(&mca_iof_mr_hnp_component.stdin_jobs, 1, INT_MAX, 1);
    return ORTE_SUCCESS;
}
void orte_snapc_base_quiesce_construct(orte_snapc_base_quiesce_t *quiesce)
{
    quiesce->epoch         = -1;
    quiesce->snapshot      = NULL;
    quiesce->ss_handle     = ORTE_SSTORE_HANDLE_INVALID;
    quiesce->ss_snapshot   = NULL;
    quiesce->handle        = NULL;
    quiesce->target_dir    = NULL;
    quiesce->crs_name      = NULL;
    quiesce->cmdline       = NULL;
    quiesce->cr_state      = OPAL_CRS_NONE;
    quiesce->checkpointing = false;
    quiesce->restarting    = false;

    quiesce->migrating     = false;
    quiesce->num_migrating = 0;
    OBJ_CONSTRUCT(&(quiesce->migrating_procs), opal_pointer_array_t);
    opal_pointer_array_init(&(quiesce->migrating_procs), 8, INT32_MAX, 8);
}