Exemple #1
0
/**
  * component open/close/init function
  */
static int orte_sensor_file_open(void)
{
    mca_base_component_t *c = &mca_sensor_file_component.super.base_version;
    int tmp;

    /* lookup parameters */
    mca_base_param_reg_string(c, "filename",
                           "File to be monitored",
                           false, false, NULL, &mca_sensor_file_component.file);

    mca_base_param_reg_int(c, "check_size",
                           "Check the file size",
                           false, false, false, &tmp);
    mca_sensor_file_component.check_size = OPAL_INT_TO_BOOL(tmp);
    
    mca_base_param_reg_int(c, "check_access",
                           "Check access time",
                           false, false, false, &tmp);
    mca_sensor_file_component.check_access = OPAL_INT_TO_BOOL(tmp);

    mca_base_param_reg_int(c, "check_mod",
                           "Check modification time",
                           false, false, false, &tmp);
    mca_sensor_file_component.check_mod = OPAL_INT_TO_BOOL(tmp);

    mca_base_param_reg_int(c, "limit",
                           "Number of times the sensor can detect no motion before declaring error (default=3)",
                           false, false, 3, &mca_sensor_file_component.limit);
    
    return ORTE_SUCCESS;
}
Exemple #2
0
static int open_component(void)
{
    /* Use a low priority, but allow other components to be lower */
    
    priority_param = 
        mca_base_param_reg_int(&mca_io_romio_component.io_version, 
                               "priority",
                               "Priority of the io romio component",
                               false, false, 10, NULL);
    delete_priority_param = 
        mca_base_param_reg_int(&mca_io_romio_component.io_version,
                               "delete_priority", 
                               "Delete priority of the io romio component",
                               false, false, 10, NULL);

    mca_base_param_reg_int(&mca_io_romio_component.io_version,
                           "enable_parallel_optimizations",
                           "Enable set of Open MPI-added options to improve collective file i/o performance",
                           false, false, 0, NULL);

    /* Create the mutex */
    OBJ_CONSTRUCT(&mca_io_romio_mutex, opal_mutex_t);

    /* Create the list of pending requests */

    OBJ_CONSTRUCT(&mca_io_romio_pending_requests, opal_list_t);

    return OMPI_SUCCESS;
}
Exemple #3
0
int mca_btl_self_component_open(void)
{
    /* register SELF component parameters */
    mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "free_list_num",
                            "Number of fragments by default", false, false,
                            0, &mca_btl_self_component.free_list_num );
    mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "free_list_max",
                            "Maximum number of fragments", false, false,
                            -1, &mca_btl_self_component.free_list_max );
    mca_base_param_reg_int( (mca_base_component_t*)&mca_btl_self_component, "free_list_inc",
                            "Increment by this number of fragments", false, false,
                            32, &mca_btl_self_component.free_list_inc );

    mca_btl_self.btl_exclusivity = MCA_BTL_EXCLUSIVITY_HIGH;
    mca_btl_self.btl_eager_limit = 128 * 1024;
    mca_btl_self.btl_rndv_eager_limit = 128 * 1024;
    mca_btl_self.btl_max_send_size = 256 * 1024;
    mca_btl_self.btl_rdma_pipeline_send_length = INT_MAX;
    mca_btl_self.btl_rdma_pipeline_frag_size = INT_MAX;
    mca_btl_self.btl_min_rdma_pipeline_size = 0;
    mca_btl_self.btl_flags = MCA_BTL_FLAGS_PUT | MCA_BTL_FLAGS_SEND_INPLACE;
    mca_btl_self.btl_bandwidth = 100;
    mca_btl_self.btl_latency = 0;
    mca_btl_base_param_register(&mca_btl_self_component.super.btl_version,
            &mca_btl_self);

    /* initialize objects */
    OBJ_CONSTRUCT(&mca_btl_self_component.self_lock, opal_mutex_t);
    OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_eager, ompi_free_list_t);
    OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_send, ompi_free_list_t);
    OBJ_CONSTRUCT(&mca_btl_self_component.self_frags_rdma, ompi_free_list_t);
    return OMPI_SUCCESS;
}
static int
ompi_mtl_mx_component_open(void)
{
        
    
    mca_base_param_reg_int(&mca_mtl_mx_component.super.mtl_version, "filter",
                           "user assigned value used to filter incomming messages",
                           false, false, 0xaaaaffff, &ompi_mtl_mx.mx_filter);
    
    mca_base_param_reg_int(&mca_mtl_mx_component.super.mtl_version, "timeout",
                           "Timeout for connections",
                           false, false, MX_INFINITE, &ompi_mtl_mx.mx_timeout);
    
    mca_base_param_reg_int(&mca_mtl_mx_component.super.mtl_version, "retries",
                           "Number of retries for each new connection before considering the peer as unreacheable",
                           false, false, 20, &ompi_mtl_mx.mx_retries);
    
    mca_base_param_reg_int(&mca_mtl_mx_component.super.mtl_version, "shared_mem",
                           "Enable the MX support for shared memory",
                           false, true, 1, &ompi_mtl_mx.mx_support_sharedmem );
    
    mca_base_param_reg_int(&mca_mtl_mx_component.super.mtl_version, "unexpected_queue_length", 
                           "Length of MX unexpected message queue", 
                           false, false, MCA_MTL_MX_QUEUE_LENGTH_MAX, &ompi_mtl_mx.mx_unexp_queue_max);
    
    if(ompi_mtl_mx.mx_unexp_queue_max >  MCA_MTL_MX_QUEUE_LENGTH_MAX) { 
        ompi_mtl_mx.mx_unexp_queue_max =  MCA_MTL_MX_QUEUE_LENGTH_MAX; 
    }
    return OMPI_SUCCESS;
    
}
/**
  * component open/close/init function
  */
static int mca_mpool_rdma_open(void)
{
    int val;

    mca_base_param_reg_string(&mca_mpool_rdma_component.super.mpool_version,
            "rcache_name",
            "The name of the registration cache the mpool should use",
            false, false, "vma", &mca_mpool_rdma_component.rcache_name);

    mca_base_param_reg_int(&mca_mpool_rdma_component.super.mpool_version,
            "rcache_size_limit",
            "the maximum size of registration cache in bytes. "
            "0 is unlimited (default 0)", false, false, 0, &val);

    mca_mpool_rdma_component.rcache_size_limit = (size_t)val;

    mca_base_param_reg_int(&mca_mpool_rdma_component.super.mpool_version,
            "print_stats",
            "print pool usage statistics at the end of the run",
            false, false, 0, &val);

    mca_mpool_rdma_component.print_stats = val?true:false;

    return OMPI_SUCCESS;
}
static int sync_register(void)
{
    int val;

    val = mca_coll_sync_component.priority;
    mca_base_param_reg_int(&mca_coll_sync_component.super.collm_version,
                           "priority",
                           "Priority of the sync coll component; only relevant if barrier_before or barrier_after is > 0",
                           false, false, val, &val);
    mca_coll_sync_component.priority = val;

    mca_base_param_reg_int(&mca_coll_sync_component.super.collm_version,
                           "barrier_before",
                           "Do a synchronization before each Nth collective",
                           false, false, 
                           mca_coll_sync_component.barrier_before_nops,
                           &mca_coll_sync_component.barrier_before_nops);

    mca_base_param_reg_int(&mca_coll_sync_component.super.collm_version,
                           "barrier_after",
                           "Do a synchronization after each Nth collective",
                           false, false, 
                           mca_coll_sync_component.barrier_after_nops,
                           &mca_coll_sync_component.barrier_after_nops);

    return OMPI_SUCCESS;
}
Exemple #7
0
static int
pvfs2_register(void)
{
    int param;

    param = mca_base_param_find ("fs", NULL, "pvfs2_stripe_size");
    if (param >= 0)
    {
        mca_base_param_lookup_int (param, &mca_fs_pvfs2_stripe_size);
    }
    param = mca_base_param_find ("fs", NULL, "pvfs2_stripe_width");
    if (param >= 0)
    {
        mca_base_param_lookup_int (param, &mca_fs_pvfs2_stripe_width);
    }

    mca_base_param_reg_int (&mca_fs_pvfs2_component.fsm_version,
                            "priority",
                            "Priority of the pvfs2 fs component",
                            false, false, mca_fs_pvfs2_priority,
                            &mca_fs_pvfs2_priority);
    mca_base_param_reg_int (&mca_fs_pvfs2_component.fsm_version,
                            "stripe_size",
                            "stripe size of a file over pvfs2",
                            false, false, mca_fs_pvfs2_stripe_size,
                            &mca_fs_pvfs2_stripe_size);
    mca_base_param_reg_int (&mca_fs_pvfs2_component.fsm_version,
                            "stripe_width",
                            "stripe width of a file over pvfs2",
                            false, false, mca_fs_pvfs2_stripe_width,
                            &mca_fs_pvfs2_stripe_width);

    return OMPI_SUCCESS;
}
/* 
 * The following are used by dynamic and forced rules.  Publish
 * details of each algorithm and if its forced/fixed/locked in as you add
 * methods/algorithms you must update this and the query/map routines.
 * This routine is called by the component only.  This makes sure that
 * the mca parameters are set to their initial values and perms.
 * Module does not call this.  They call the forced_getvalues routine
 * instead.
 */
int ompi_coll_tuned_alltoallv_intra_check_forced_init(coll_tuned_force_algorithm_mca_param_indices_t
                                                      *mca_param_indices)
{
    int max_alg = 2, requested_alg;

    ompi_coll_tuned_forced_max_algorithms[ALLTOALLV] = max_alg;

    mca_base_param_reg_int (&mca_coll_tuned_component.super.collm_version,
                            "alltoallv_algorithm_count",
                            "Number of alltoallv algorithms available",
                            false, true, max_alg, NULL);

    mca_param_indices->algorithm_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "alltoallv_algorithm",
                                 "Which alltoallv algorithm is used. "
                                 "Can be locked down to choice of: 0 ignore, "
                                 "1 basic linear, 2 pairwise.",
                                 false, false, 0, NULL);
    mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
    if (requested_alg > max_alg) {
        if (0 == ompi_comm_rank( MPI_COMM_WORLD)) {
            opal_output(0, "Alltoallv algorithm #%d is not available (range [0..%d]). "
                        "Switching back to ignore(0)\n",
                        requested_alg, max_alg );
        }
        mca_base_param_set_int(mca_param_indices->algorithm_param_index, 0);
    }
    
    return (MPI_SUCCESS);
}
/**
  * component open/close/init function
  */
static int orte_rmcast_udp_open(void)
{
    mca_base_component_t *c = &mca_rmcast_udp_component.version;
    int value;
    
    mca_base_param_reg_int(c, "sndbuf_size", 
                           "Size of send buffer in Kbytes (must be > 0)", 
                           false, false, 
                           ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE, &value);
    if (ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE != value) {
        orte_rmcast_udp_sndbuf_size = 1024*value;
    } else {
        orte_rmcast_udp_sndbuf_size = ORTE_RMCAST_UDP_DEFAULT_SNDBUF_SIZE;
    }

    
    orte_rmcast_udp_rcvbuf_size = 16 * orte_rmcast_udp_sndbuf_size;
    mca_base_param_reg_int(c, "rcvbuf_size", 
                           "Size of recv buffer in Kbytes (default: 16xsndbuf)", 
                           false, false, 
                           orte_rmcast_udp_rcvbuf_size, &value);
    if (value != orte_rmcast_udp_rcvbuf_size) {
        orte_rmcast_udp_rcvbuf_size = 1024 * value;
    }

    return ORTE_SUCCESS;
}
Exemple #10
0
/**
  * component open/close/init function
  */
static int orte_sensor_resusage_open(void)
{
    mca_base_component_t *c = &mca_sensor_resusage_component.super.base_version;
    int tmp;

    /* lookup parameters */
    mca_base_param_reg_int(c, "sample_rate",
                           "Sample rate in seconds (default=10)",
                           false, false, 0,  &tmp);
    if (tmp < 0) {
        opal_output(0, "Illegal value %d - must be > 0", tmp);
        return ORTE_ERR_FATAL;
    }
    mca_sensor_resusage_component.sample_rate = tmp;
    
    mca_base_param_reg_int(c, "node_memory_limit",
                           "Percentage of total memory that can be in-use",
                           false, false, 0,  &tmp);
    mca_sensor_resusage_component.node_memory_limit = (float)tmp/100.0;
    
    mca_base_param_reg_int(c, "proc_memory_limit",
                           "Max virtual memory size in MBytes",
                           false, false, 0,  &tmp);
    mca_sensor_resusage_component.proc_memory_limit = (float)tmp;
    
    mca_base_param_reg_string(c, "node_stat_log",
                           "Print the node stats to the indicated file (- => stdout, + => stderr)",
                           false, false, NULL,  &mca_sensor_resusage_component.nstat_log);

    mca_base_param_reg_string(c, "process_stat_log",
                           "Print the process stats to the indicated file (- => stdout, + => stderr)",
                           false, false, NULL,  &mca_sensor_resusage_component.pstat_log);
    return ORTE_SUCCESS;
}
/* ////////////////////////////////////////////////////////////////////////// */
static int
mmap_open(void)
{
    mca_base_param_reg_int(
        &mca_shmem_mmap_component.super.base_version,
        "priority", "Priority of the mmap shmem component", false, false,
        mca_shmem_mmap_component.priority, &mca_shmem_mmap_component.priority
    );

    mca_base_param_reg_int(
        &mca_shmem_mmap_component.super.base_version,
        "relocate_backing_file",
        "Whether to change the default placement of backing files or not "
        "(Negative = try to relocate backing files to an area rooted at "
        "the path specified by "
        "shmem_mmap_opal_shmem_mmap_backing_file_base_dir, but continue "
        "with the default path if the relocation fails, 0 = do not relocate, "
        "Positive = same as the negative option, but will fail if the "
        "relocation fails.", false, false, 0,
        &opal_shmem_mmap_relocate_backing_file
    );

    mca_base_param_reg_string(
        &mca_shmem_mmap_component.super.base_version,
        "backing_file_base_dir",
        "Specifies where backing files will be created when "
        "shmem_mmap_relocate_backing_file is in use.", false, false, "/dev/shm",
        &opal_shmem_mmap_backing_file_base_dir
    );

    return OPAL_SUCCESS;
}
static int snapc_full_open(void) 
{
    int value;

    /*
     * This should be the last componet to ever get used since
     * it doesn't do anything.
     */
    mca_base_param_reg_int(&mca_snapc_full_component.super.base_version,
                           "priority",
                           "Priority of the SNAPC full component",
                           false, false,
                           mca_snapc_full_component.super.priority,
                           &mca_snapc_full_component.super.priority);
    
    mca_base_param_reg_int(&mca_snapc_full_component.super.base_version,
                           "verbose",
                           "Verbose level for the SNAPC full component",
                           false, false,
                           mca_snapc_full_component.super.verbose, 
                           &mca_snapc_full_component.super.verbose);
    /* If there is a custom verbose level for this component than use it
     * otherwise take our parents level and output channel
     */
    if ( 0 != mca_snapc_full_component.super.verbose) {
        mca_snapc_full_component.super.output_handle = opal_output_open(NULL);
        opal_output_set_verbosity(mca_snapc_full_component.super.output_handle,
                                  mca_snapc_full_component.super.verbose);
    } else {
        mca_snapc_full_component.super.output_handle = orte_snapc_base_output;
    }

    mca_base_param_reg_int(&mca_snapc_full_component.super.base_version,
                           "skip_filem",
                           "Not for general use! For debugging only! Pretend to move files. [Default = disabled]",
                           false, false,
                           0,
                           &value);
    orte_snapc_full_skip_filem = OPAL_INT_TO_BOOL(value);

    /*
     * Debug Output
     */
    opal_output_verbose(10, mca_snapc_full_component.super.output_handle,
                        "snapc:full: open()");
    opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
                        "snapc:full: open: priority    = %d", 
                        mca_snapc_full_component.super.priority);
    opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
                        "snapc:full: open: verbosity   = %d", 
                        mca_snapc_full_component.super.verbose);
    opal_output_verbose(20, mca_snapc_full_component.super.output_handle,
                        "snapc:full: open: skip_filem  = %s", 
                        (orte_snapc_full_skip_filem == true ? "True" : "False"));

    return ORTE_SUCCESS;
}
int ompi_coll_tuned_bcast_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices)
{
    int rc, max_alg = 6, requested_alg;

    ompi_coll_tuned_forced_max_algorithms[BCAST] = max_alg;

    rc = mca_base_param_reg_int (&mca_coll_tuned_component.super.collm_version,
                                 "bcast_algorithm_count",
                                 "Number of bcast algorithms available",
                                 false, true, max_alg, NULL);


    mca_param_indices->algorithm_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "bcast_algorithm",
                                 "Which bcast algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 chain, 3: pipeline, 4: split binary tree, 5: binary tree, 6: binomial tree.",
                                 false, false, 0, NULL);
    if (mca_param_indices->algorithm_param_index < 0) {
        return mca_param_indices->algorithm_param_index;
    }
    mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
    if( 0 > requested_alg || requested_alg > max_alg ) {
        if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
            opal_output( 0, "Broadcast algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
                         requested_alg, max_alg );
        }
        mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0);
    }

    mca_param_indices->segsize_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "bcast_algorithm_segmentsize",
                                 "Segment size in bytes used by default for bcast algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.",
                                 false, false, 0, NULL);

    mca_param_indices->tree_fanout_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "bcast_algorithm_tree_fanout",
                                 "Fanout for n-tree used for bcast algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation.",
                                 false, false,
                                 ompi_coll_tuned_init_tree_fanout, /* get system wide default */
                                 NULL);

    mca_param_indices->chain_fanout_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "bcast_algorithm_chain_fanout",
                                 "Fanout for chains used for bcast algorithms. Only has meaning if algorithm is forced and supports chain topo based operation.",
                                 false, false,
                                 ompi_coll_tuned_init_chain_fanout, /* get system wide default */
                                 NULL);

    return (MPI_SUCCESS);
}
static int crs_blcr_open(void)
{
    int value;

    mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version,
                           "priority",
                           "Priority of the CRS blcr component",
                           false, false,
                           mca_crs_blcr_component.super.priority,
                           &mca_crs_blcr_component.super.priority);

    mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version,
                           "verbose",
                           "Verbose level for the CRS blcr component",
                           false, false,
                           mca_crs_blcr_component.super.verbose,
                           &mca_crs_blcr_component.super.verbose);
    /* If there is a custom verbose level for this component than use it
     * otherwise take our parents level and output channel
     */
    if ( 0 != mca_crs_blcr_component.super.verbose) {
        mca_crs_blcr_component.super.output_handle = opal_output_open(NULL);
        opal_output_set_verbosity(mca_crs_blcr_component.super.output_handle,
                                  mca_crs_blcr_component.super.verbose);
    } else {
        mca_crs_blcr_component.super.output_handle = opal_crs_base_output;
    }

    mca_base_param_reg_int(&mca_crs_blcr_component.super.base_version,
                           "dev_null",
                           "Not for general use! For debugging only! Save checkpoint to /dev/null. [Default = disabled]",
                           false, false,
                           0,
                           &value);
    opal_crs_blcr_dev_null = OPAL_INT_TO_BOOL(value);

    /*
     * Debug output
     */
    opal_output_verbose(10, mca_crs_blcr_component.super.output_handle,
                        "crs:blcr: open()");
    opal_output_verbose(20, mca_crs_blcr_component.super.output_handle,
                        "crs:blcr: open: priority = %d",
                        mca_crs_blcr_component.super.priority);
    opal_output_verbose(20, mca_crs_blcr_component.super.output_handle,
                        "crs:blcr: open: verbosity = %d",
                        mca_crs_blcr_component.super.verbose);
    opal_output_verbose(10, mca_crs_blcr_component.super.output_handle,
                        "crs:blcr: open: dev_null = %s",
                        (opal_crs_blcr_dev_null == true ? "True" : "False"));

    return OPAL_SUCCESS;
}
Exemple #15
0
/**
orte_plm_poe_component_open - open component and register all parameters
@return error number
*/
int orte_plm_poe_component_open(void)
{
    char *param;
    mca_base_component_t *c = &mca_plm_poe_component.super.base_version;

    mca_base_param_reg_int(c, "mp_retry",
                           "specifies the interval (in seconds) to wait before repeating the node request",
                           true, false, 0, &mca_plm_poe_component.mp_retry);
    mca_base_param_reg_int(c, "mp_retrycount",
                           "specifies the number of times the Partition Manager should make the request before returning",
                           true, false, 0, &mca_plm_poe_component.mp_retrycount);
    mca_base_param_reg_int(c, "mp_infolevel",
                           "specify the level of messages you want from POE (0-6)",
                           true, false, 0, &mca_plm_poe_component.mp_infolevel);
    mca_base_param_reg_string(c, "mp_labelio",
                           "Whether or not to label message output with task identifiers (yes or no)",
                           true, false, "no", &mca_plm_poe_component.mp_labelio);
    mca_base_param_reg_string(c, "mp_stdoutmode",
                           "standard output mode (ordered, unordered or taskID)",
                           true, false, "unordered", &mca_plm_poe_component.mp_stdoutmode);

    mca_base_param_reg_int(c, "debug",
                           "Whether or not to enable debugging output for the poe plm component (0 or 1)",
                           false, false, 0, &mca_plm_poe_component.debug);
    mca_base_param_reg_int(c, "priority",
                           "Priority of the poe plm component",
                           false , false, 0, &mca_plm_poe_component.priority);
    mca_base_param_reg_string(c, "class",
                           "class (interactive or batch)",
                           true, false, "interactive", &mca_plm_poe_component.class);
    mca_base_param_reg_string(c, "resource_allocation",
                           "resource_allocation mode (hostfile or automatic)",
                           false, false, "hostfile", &mca_plm_poe_component.resource_allocation);
    mca_base_param_reg_string(c, "progenv",
                           "The command name that setup environment",
                           false, false, "env", &mca_plm_poe_component.env);
    mca_base_param_reg_string(c, "progpoe",
                           "The POE command",
                           false, false, "poe", &param);
    mca_plm_poe_component.argv = opal_argv_split(param, ' ');
    mca_plm_poe_component.argc = opal_argv_count(mca_plm_poe_component.argv);
    if (mca_plm_poe_component.argc > 0) {
        mca_plm_poe_component.path = strdup(mca_plm_poe_component.argv[0]);
        return ORTE_SUCCESS;
    } else {
        mca_plm_poe_component.path = NULL;
        return ORTE_ERR_BAD_PARAM;
    }


    return ORTE_SUCCESS;
}
Exemple #16
0
int ompi_coll_tuned_alltoall_intra_check_forced_init (coll_tuned_force_algorithm_mca_param_indices_t *mca_param_indices)
{
    int rc, max_alg = 4, requested_alg;

    ompi_coll_tuned_forced_max_algorithms[ALLTOALL] = max_alg;

    rc = mca_base_param_reg_int (&mca_coll_tuned_component.super.collm_version,
                                 "alltoall_algorithm_count",
                                 "Number of alltoall algorithms available",
                                 false, true, max_alg, NULL);

    mca_param_indices->algorithm_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "alltoall_algorithm",
                                 "Which alltoall algorithm is used. Can be locked down to choice of: 0 ignore, 1 basic linear, 2 pairwise, 3: modified bruck, 4: two proc only.",
                                 false, false, 0, NULL);
    mca_base_param_lookup_int(mca_param_indices->algorithm_param_index, &(requested_alg));
    if( requested_alg > max_alg ) {
        if( 0 == ompi_comm_rank( MPI_COMM_WORLD ) ) {
            opal_output( 0, "Alltoall algorithm #%d is not available (range [0..%d]). Switching back to ignore(0)\n",
                         requested_alg, max_alg );
        }
        mca_base_param_set_int( mca_param_indices->algorithm_param_index, 0);
    }
    
    mca_param_indices->segsize_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "alltoall_algorithm_segmentsize",
                                 "Segment size in bytes used by default for alltoall algorithms. Only has meaning if algorithm is forced and supports segmenting. 0 bytes means no segmentation.",
                                 false, false, 0, NULL);
    
    mca_param_indices->tree_fanout_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "alltoall_algorithm_tree_fanout",
                                 "Fanout for n-tree used for alltoall algorithms. Only has meaning if algorithm is forced and supports n-tree topo based operation.",
                                 false, false, 
                                 ompi_coll_tuned_init_tree_fanout, /* get system wide default */
                                 NULL);

    mca_param_indices->chain_fanout_param_index
        = mca_base_param_reg_int(&mca_coll_tuned_component.super.collm_version,
                                 "alltoall_algorithm_chain_fanout",
                                 "Fanout for chains used for alltoall algorithms. Only has meaning if algorithm is forced and supports chain topo based operation.",
                                 false, false, 
                                 ompi_coll_tuned_init_chain_fanout, /* get system wide default */
                                 NULL);

    return (MPI_SUCCESS);
}
static int
dynamic_register(void)
{
    int param;

    param = mca_base_param_find ("fcoll", NULL, "dynamic_priority");
    if (param >= 0)
    {
        mca_base_param_lookup_int (param, &mca_fcoll_dynamic_priority);
    }
    param = mca_base_param_find ("fcoll", NULL, "dynamic_num_io_procs");
    if (param >= 0)
    {
        mca_base_param_lookup_int (param, &mca_fcoll_dynamic_num_io_procs);
    }
    param = mca_base_param_find ("fcoll", NULL, "dynamic_constant_cbs");
    if (param >= 0)
    {
        mca_base_param_lookup_int (param, &mca_fcoll_dynamic_constant_cbs);
    }
    param = mca_base_param_find ("fcoll", NULL, "dynamic_cycle_buffer_size");
    if (param >= 0)
    {
        mca_base_param_lookup_int (param, &mca_fcoll_dynamic_cycle_buffer_size);
    }

    mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version,
                            "priority",
                            "Priority of the dynamic fcoll component",
                            false, false, mca_fcoll_dynamic_priority,
                            &mca_fcoll_dynamic_priority);
    mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version,
                            "num_io_procs",
                            "Number of writers in the dynamic fcoll component",
                            false, false, mca_fcoll_dynamic_num_io_procs,
                            &mca_fcoll_dynamic_num_io_procs);
    mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version,
                            "constant_cbs",
                            "wether we are using constant or scaling cycle buffer size in the dynamic fcoll component",
                            false, false, mca_fcoll_dynamic_constant_cbs,
                            &mca_fcoll_dynamic_constant_cbs);
    mca_base_param_reg_int (&mca_fcoll_dynamic_component.fcollm_version,
                            "cycle_buffer_size",
                            "Cycle Buffer Size of the dynamic fcoll component",
                            false, false, mca_fcoll_dynamic_cycle_buffer_size,
                            &mca_fcoll_dynamic_cycle_buffer_size);

    return OMPI_SUCCESS;
}
Exemple #18
0
static int ras_alps_open(void)
{
    param_priority = 
        mca_base_param_reg_int(&mca_ras_alps_component.base_version,
                               "priority",
                               "Priority of the alps ras component",
                               false, false, 75, NULL);

    param_read_attempts = 
        mca_base_param_reg_int(&mca_ras_alps_component.base_version,
                               "appinfo_read_attempts",
                               "Maximum number of attempts to read ALPS appinfo file",
                               false, false, 10, NULL);

    return ORTE_SUCCESS;
}
/*
 * utility routine for integer parameter registration
 */
static int reg_int(const char* param_name, 
                   const char* deprecated_param_name,
                   const char* param_desc,
                   int default_value, int *out_value, int flags)
{
    int index, value;
    index = mca_base_param_reg_int(&mca_btl_openib_component.super.btl_version,
                                   param_name, param_desc, false, false,
                                   default_value, NULL);
    if (NULL != deprecated_param_name) {
        mca_base_param_reg_syn(index, 
                               &mca_btl_openib_component.super.btl_version, 
                               deprecated_param_name, true);
    }
    mca_base_param_lookup_int(index, &value);
    
    if (0 != (flags & REGINT_NEG_ONE_OK) && -1 == value) {
        *out_value = value;
        return OMPI_SUCCESS;
    }
    if ((0 != (flags & REGINT_GE_ZERO) && value < 0) ||
        (0 != (flags & REGINT_GE_ONE) && value < 1) ||
        (0 != (flags & REGINT_NONZERO) && 0 == value)) {
        opal_output(0, "Bad parameter value for parameter \"%s\"",
                param_name);
        return OMPI_ERR_BAD_PARAM;
    }
    *out_value = value;
    return OMPI_SUCCESS;
}
static int
mmap_register(void)
{
    int value;

    /*
     * Do we want the "warning: your mmap file is on NFS!" message?  Per a
     * thread on the OMPI devel list
     * (http://www.open-mpi.org/community/lists/devel/2011/12/10054.php),
     * on some systems, it doesn't seem to matter.  But per older threads,
     * it definitely does matter on some systems.  Perhaps newer kernels
     * are smarter about this kind of stuff...?  Regardless, we should
     * provide the ability to turn off this message for systems where the
     * effect doesn't matter.
     */
    mca_base_param_reg_int(&mca_shmem_mmap_component.super.base_version,
                           "enable_nfs_warning",
                           "Enable the warning emitted when Open MPI detects "
                           "that its shared memory backing file is located on "
                           "a network filesystem (1 = enabled, 0 = disabled).",
                           false, false,
                           (int)true, &value);

    opal_shmem_mmap_nfs_warning = OPAL_INT_TO_BOOL(value);

    return OPAL_SUCCESS;
}
static int test_open(void)
{
    int tmp;
    
    mca_base_param_reg_int(&mca_paffinity_test_component.super.base_version, "bound",
                           "Whether or not to test as if externally bound (default=0: no)",
                           false, false, (int)false, &tmp);
    mca_paffinity_test_component.bound = OPAL_INT_TO_BOOL(tmp);
    
    mca_base_param_reg_int(&mca_paffinity_test_component.super.base_version, "num_sockets",
                           "Number of sockets on each node (default=4)",
                           false, false, 4, &mca_paffinity_test_component.num_sockets);

    mca_base_param_reg_int(&mca_paffinity_test_component.super.base_version, "num_cores",
                           "Number of cores in each socket (default=4)",
                           false, false, 4, &mca_paffinity_test_component.num_cores);
    return OPAL_SUCCESS;
}
static int solaris_open(void)
{
    mca_base_param_reg_int(&mca_paffinity_solaris_component.paffinityc_version,
                           "priority",
                           "Priority of the solaris paffinity component",
                           false, false, 10, NULL);

    return OPAL_SUCCESS;
}
static inline void mca_btl_ud_param_reg_int(const char* param_name,
                                                 const char* param_desc,
                                                 int default_value,
                                                 int* out_value)
{
    mca_base_param_reg_int(&mca_btl_ofud_component.super.btl_version,
                           param_name, param_desc, false, false,
                           default_value, out_value);
}
static int
basic_register(void)
{
    /* Use a low priority, but allow other components to be lower */

    mca_base_param_reg_int(&mca_coll_basic_component.collm_version,
                           "priority",
                           "Priority of the basic coll component",
                           false, false, mca_coll_basic_priority,
                           &mca_coll_basic_priority);
    mca_base_param_reg_int(&mca_coll_basic_component.collm_version,
                           "crossover",
                           "Minimum number of processes in a communicator before using the logarithmic algorithms",
                           false, false, mca_coll_basic_crossover,
                           &mca_coll_basic_crossover);

    return OMPI_SUCCESS;
}
static int auto_detect_open(void)
{
    mca_base_param_reg_int(&mca_carto_auto_detect_component.base_version,
                           "priority",
                           "Priority of the auto_detect carto component",
                           false, false, 11, NULL);

    return OPAL_SUCCESS;
}
static int pubsub_pmi_component_open(void)
{
    mca_base_component_t *c = &mca_pubsub_pmi_component.base_version;

    mca_base_param_reg_int(c, "priority",
                           "Priority of the pubsub pmi component",
                           false, false, my_priority,
                           &my_priority);
    return OMPI_SUCCESS;
}
static int ras_slurm_open(void)
{
    param_priority = 
        mca_base_param_reg_int(&mca_ras_slurm_component.base_version,
                               "priority",
                               "Priority of the slurm ras component",
                               false, false, 75, NULL);

    return ORTE_SUCCESS;
}
Exemple #28
0
/*******************************************************************************
 * utilities
 */
static inline int mca_pml_v_param_register_int( const char* param_name,
                                                  int default_value )
{
    int param_value = default_value;

    (void) mca_base_param_reg_int (&mca_pml_v_component.pmlm_version, param_name,
                                   NULL, false, false, default_value, &param_value);

    return param_value;
}
Exemple #29
0
/**
  * component open/close/init function
  */
static int orte_rmaps_seq_open(void)
{
    mca_base_component_t *c = &mca_rmaps_seq_component.base_version;

    mca_base_param_reg_int(c, "priority",
                           "Priority of the seq rmaps component",
                           false, false, 60,
                           &my_priority);
    return ORTE_SUCCESS;
}
/*
 * Initalize the structures upon opening
 */
static int orte_rml_ftrm_open(void)
{
    int value;

    mca_base_param_reg_int(&mca_rml_ftrm_component.rml_version,
                           "priority",
                           "Priority of the RML ftrm component",
                           false, false,
                           RML_SELECT_WRAPPER_PRIORITY,
                           &value);
    /* Enable this wrapper = RML_SELECT_WRAPPER_PRIORITY
     * ow = -1 or never selected
     */
#if OPAL_ENABLE_FT_CR == 1
    ftrm_priority = value;
#else
    ftrm_priority = -1;
#endif

    mca_base_param_reg_int(&mca_rml_ftrm_component.rml_version,
                           "verbose",
                           "Verbose level for the RML ftrm component",
                           false, false,
                           0, 
                           &value);
    /* If there is a custom verbose level for this component than use it
     * otherwise take our parents level and output channel
     */
    if ( 0 != value) {
        rml_ftrm_output_handle = opal_output_open(NULL);
        opal_output_set_verbosity(rml_ftrm_output_handle, value);
    } else {
        rml_ftrm_output_handle = -1;
    }

    opal_output_verbose(10, rml_ftrm_output_handle,
                        "orte_rml_ftrm: open(): Priority  = %d", ftrm_priority);
    opal_output_verbose(10, rml_ftrm_output_handle,
                        "orte_rml_ftrm: open(): Verbosity = %d", value);

    return ORTE_SUCCESS;
}