コード例 #1
0
ファイル: ompi_cr.c プロジェクト: hpc/cce-mpi-openmpi-1.4.3
/*
 * CR Init
 */
int ompi_cr_init(void) 
{
    int val;

    /*
     * Register some MCA parameters
     */
    mca_base_param_reg_int_name("ompi_cr", "verbose",
                                "Verbose output for the OMPI Checkpoint/Restart functionality",
                                false, false,
                                0,
                                &val);
    if(0 != val) {
        ompi_cr_output = opal_output_open(NULL);
        opal_output_set_verbosity(ompi_cr_output, val);
    } else {
        ompi_cr_output = opal_cr_output;
    }

    /* Typically this is not needed. Individual BTLs will set this as needed */
    ompi_cr_continue_like_restart = false;

    opal_output_verbose(10, ompi_cr_output,
                        "ompi_cr: init: ompi_cr_init()");
    
    /* Register the OMPI interlevel coordination callback */
    opal_cr_reg_coord_callback(ompi_cr_coord, &prev_coord_callback);
    
    return OMPI_SUCCESS;
}
コード例 #2
0
/**
  * component open/close/init function
  */
static int rgpusm_open(void)
{
    mca_mpool_rgpusm_component.output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_mpool_rgpusm_component.output, ompi_mpool_rgpusm_verbose);

    return OMPI_SUCCESS;
}
コード例 #3
0
static int hcoll_open(void)
{
    mca_coll_hcoll_component_t *cm;
    cm  = &mca_coll_hcoll_component;

    mca_coll_hcoll_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_coll_hcoll_output, cm->hcoll_verbose);

    hcoll_rte_fns_setup();

    cm->libhcoll_initialized = false;

    /* Register memory hooks */
    if ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
        ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) &
         opal_mem_hooks_support_level()))
    {
        setenv("MXM_HCOLL_MEM_ON_DEMAND_MAP", "y", 0);
        HCOL_VERBOSE(1, "Enabling on-demand memory mapping");
        cm->using_mem_hooks = 1;
    } else {
        HCOL_VERBOSE(1, "Disabling on-demand memory mapping");
        cm->using_mem_hooks = 0;
    }

    return OMPI_SUCCESS;
}
コード例 #4
0
ファイル: crs_blcr_component.c プロジェクト: IanYXXL/A1
static int crs_blcr_open(void)
{
    /* 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_framework.framework_output;
    }

    /*
     * 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;
}
コード例 #5
0
ファイル: opal_datatype_cuda.c プロジェクト: bringhurst/ompi
/**
 * This function gets called once to check if the program is running in a cuda
 * environment. 
 */
static void opal_cuda_support_init(void)
{
    int id;
    CUresult res;
    CUcontext cuContext;

    if (initialized) {
        return;
    }

    /* Set different levels of verbosity in the cuda related code. */
    id = mca_base_param_reg_int_name("opal", "cuda_verbose", 
                                     "Set level of opal cuda verbosity",
                                     false, false, 0, &opal_cuda_verbose);
    opal_cuda_output = opal_output_open(NULL);
    opal_output_set_verbosity(opal_cuda_output, opal_cuda_verbose);

    /* Check to see if this process is running in a CUDA context.  If so,
     * all is good.  Currently, just print out a message in verbose mode
     * to help with debugging. */
    res = cuCtxGetCurrent(&cuContext);
    if (CUDA_SUCCESS != res) {
        opal_output_verbose(10, opal_cuda_output,
                            "CUDA: cuCtxGetCurrent failed, CUDA device pointers will not work");
    } else {
        opal_output_verbose(10, opal_cuda_output,
                            "CUDA: cuCtxGetCurrent succeeded, CUDA device pointers will work");
    }

    initialized = true;
}
コード例 #6
0
static int compress_gzip_open(void)
{
    /* If there is a custom verbose level for this component than use it
     * otherwise take our parents level and output channel
     */
    if ( 0 != mca_compress_gzip_component.super.verbose) {
        mca_compress_gzip_component.super.output_handle = opal_output_open(NULL);
        opal_output_set_verbosity(mca_compress_gzip_component.super.output_handle,
                                  mca_compress_gzip_component.super.verbose);
    } else {
        mca_compress_gzip_component.super.output_handle = opal_compress_base_framework.framework_output;
    }

    /*
     * Debug output
     */
    opal_output_verbose(10, mca_compress_gzip_component.super.output_handle,
                        "compress:gzip: open()");
    opal_output_verbose(20, mca_compress_gzip_component.super.output_handle,
                        "compress:gzip: open: priority = %d",
                        mca_compress_gzip_component.super.priority);
    opal_output_verbose(20, mca_compress_gzip_component.super.output_handle,
                        "compress:gzip: open: verbosity = %d",
                        mca_compress_gzip_component.super.verbose);
    return OPAL_SUCCESS;
}
コード例 #7
0
int mca_pml_crcpw_component_open(void)
{
    opal_output_verbose( 10, mca_pml_crcpw_component.output_handle,
                         "pml:crcpw: component_open: Open");

    mca_pml_crcpw_component.output_handle = opal_output_open(NULL);
    if ( 0 != mca_pml_crcpw_component.verbose) {
        opal_output_set_verbosity(mca_pml_crcpw_component.output_handle,
                                  mca_pml_crcpw_component.verbose);
    }
    
    /*
     * Debug Output
     */
    opal_output_verbose(10, mca_pml_crcpw_component.output_handle,
                        "pml:crcpw: open()");
    opal_output_verbose(20, mca_pml_crcpw_component.output_handle,
                        "pml:crcpw: open: priority   = %d", 
                        mca_pml_crcpw_component.priority);
    opal_output_verbose(20, mca_pml_crcpw_component.output_handle,
                        "pml:crcpw: open: verbosity  = %d", 
                        mca_pml_crcpw_component.verbose);

    return OMPI_SUCCESS;
}
コード例 #8
0
ファイル: osub.c プロジェクト: forzaclaudio/orcm
static int orcm_osub_init(int argc, char *argv[]) 
{
    int ret;

    /*
     * Make sure to init util before parse_args
     * to ensure installdirs is setup properly
     * before calling mca_base_open();
     */
    if( ORTE_SUCCESS != (ret = opal_init_util(&argc, &argv)) ) {
        return ret;
    }

    /*
     * Parse Command Line Arguments
     */
    if (ORTE_SUCCESS != (ret = parse_args(argc, argv))) {
        return ret;
    }

    /*
     * Setup OPAL Output handle from the verbose argument
     */
    if( orcm_osub_globals.verbose ) {
        orcm_osub_globals.output = opal_output_open(NULL);
        opal_output_set_verbosity(orcm_osub_globals.output, 10);
    } else {
        orcm_osub_globals.output = 0; /* Default=STDERR */
    }

    ret = orcm_init(ORCM_TOOL);

    return ret;
}
コード例 #9
0
ファイル: shmem_init.c プロジェクト: jimmycao/ompi-mirror-try
void shmem_init(void)
{
    int err = OSHMEM_SUCCESS;
    int provided;
    int required = SHMEM_THREAD_SINGLE;

    if (oshmem_shmem_initialized) {
        /*
         * SPEC: If start_pes() is called multiple times, subsequent calls have no effect.
         */
        return;
    }

    shmem_api_logger_output = opal_output_open(NULL);
    opal_output_set_verbosity(shmem_api_logger_output,
                              oshmem_shmem_api_verbose);

    err = oshmem_shmem_init(0, NULL, required, &provided);
    if (OSHMEM_SUCCESS != err) {
        /* since spec does not propagete error to user we can only abort */
        SHMEM_API_ERROR("SHMEM failed to initialize - aborting");
        oshmem_shmem_abort(-1);
    }

    OPAL_CR_INIT_LIBRARY();
}
コード例 #10
0
ファイル: pml_ob1_component.c プロジェクト: XuanWang1982/ompi
static int mca_pml_ob1_component_open(void)
{
    mca_pml_ob1_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_pml_ob1_output, mca_pml_ob1_verbose);

    mca_pml_ob1.enabled = false;
    return mca_base_framework_open(&ompi_bml_base_framework, 0);
}
コード例 #11
0
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;
}
コード例 #12
0
/**
 * Function for finding and opening either all MCA components,
 * or the one that was specifically requested via a MCA parameter.
 */
int opal_compress_base_open(void)
{
    int ret, exit_status = OPAL_SUCCESS;
    int value;
    char *str_value = NULL;

    /* Debugging/Verbose output */
    mca_base_param_reg_int_name("compress",
                                "base_verbose",
                                "Verbosity level of the COMPRESS framework",
                                false, false,
                                0, &value);
    if(0 != value) {
        opal_compress_base_output = opal_output_open(NULL);
    } else {
        opal_compress_base_output = -1;
    }
    opal_output_set_verbosity(opal_compress_base_output, value);

    /* 
     * Which COMPRESS component to open
     *  - NULL or "" = auto-select
     *  - "none" = Empty component
     *  - ow. select that specific component
     */
    mca_base_param_reg_string_name("compress", NULL,
                                   "Which COMPRESS component to use (empty = auto-select)",
                                   false, false,
                                   NULL, &str_value);

    /* Compression currently only used with C/R */
    if( !opal_cr_is_enabled ) {
        opal_output_verbose(10, opal_compress_base_output,
                            "compress:open: FT is not enabled, skipping!");
        return OPAL_SUCCESS;
    }

    /* Open up all available components */
    if (OPAL_SUCCESS != (ret = mca_base_components_open("compress", 
                                                        opal_compress_base_output, 
                                                        mca_compress_base_static_components,
                                                        &opal_compress_base_components_available,
                                                        true)) ) {
        if( OPAL_ERR_NOT_FOUND == ret &&
            NULL != str_value &&
            0 == strncmp(str_value, "none", strlen("none")) ) {
            exit_status = OPAL_SUCCESS;
        } else {
            exit_status = OPAL_ERROR;
        }
    }

    if( NULL != str_value ) {
        free(str_value);
    }
    return exit_status;
}
コード例 #13
0
ファイル: pml_csum_component.c プロジェクト: bringhurst/ompi
static int mca_pml_csum_component_open(void)
{
    int value;
    mca_allocator_base_component_t* allocator_component;

    value = mca_pml_csum_param_register_int("verbose", 0);
    mca_pml_csum_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_pml_csum_output, value);

    mca_pml_csum.free_list_num =
        mca_pml_csum_param_register_int("free_list_num", 4);
    mca_pml_csum.free_list_max =
        mca_pml_csum_param_register_int("free_list_max", -1);
    mca_pml_csum.free_list_inc =
        mca_pml_csum_param_register_int("free_list_inc", 64);
    mca_pml_csum.priority =
        mca_pml_csum_param_register_int("priority", 0);
    mca_pml_csum.send_pipeline_depth =
        mca_pml_csum_param_register_int("send_pipeline_depth", 3);
    mca_pml_csum.recv_pipeline_depth =
        mca_pml_csum_param_register_int("recv_pipeline_depth", 4);
    mca_pml_csum.rdma_put_retries_limit =
        mca_pml_csum_param_register_int("rdma_put_retries_limit", 5);
    mca_pml_csum.max_rdma_per_request =
        mca_pml_csum_param_register_int("max_rdma_per_request", 4);
    mca_pml_csum.max_send_per_range =
        mca_pml_csum_param_register_int("max_send_per_range", 4);

    mca_pml_csum.unexpected_limit =
        mca_pml_csum_param_register_int("unexpected_limit", 128);
 
    mca_base_param_reg_string(&mca_pml_csum_component.pmlm_version,
                              "allocator",
                              "Name of allocator component for unexpected messages",
                              false, false,
                              "bucket",
                              &mca_pml_csum.allocator_name);

    allocator_component = mca_allocator_component_lookup( mca_pml_csum.allocator_name );
    if(NULL == allocator_component) {
        opal_output(0, "mca_pml_csum_component_open: can't find allocator: %s\n", mca_pml_csum.allocator_name);
        return OMPI_ERROR;
    }

    mca_pml_csum.allocator = allocator_component->allocator_init(true,
                                                                mca_pml_csum_seg_alloc,
                                                                mca_pml_csum_seg_free, NULL);
    if(NULL == mca_pml_csum.allocator) {
        opal_output(0, "mca_pml_csum_component_open: unable to initialize allocator\n");
        return OMPI_ERROR;
    }

    mca_pml_csum.enabled = false; 
    return mca_bml_base_open(); 
}
コード例 #14
0
ファイル: orte_cr.c プロジェクト: bringhurst/ompi
/*
 * CR Init
 */
int orte_cr_init(void) 
{
    int ret, exit_status = ORTE_SUCCESS;
    int val;

    /*
     * OPAL Frameworks
     */
    if (OPAL_SUCCESS != (ret = opal_cr_init() ) ) {
        exit_status = ret;
        goto cleanup;
    }

    /*
     * Register MCA Parameters
     */
    mca_base_param_reg_int_name("orte_cr", "verbose",
                                "Verbose output for the ORTE Checkpoint/Restart functionality",
                                false, false,
                                0,
                                &val);
    
    /*** RHC: This is going to crash-and-burn when the output conversion is
     * completed as opal_output will have no idea what opal_cr_output stream means,
     * or even worse, will have assigned it to someone else!
     */
    
    if(0 != val) {
        orte_cr_output = opal_output_open(NULL);
        opal_output_set_verbosity(orte_cr_output, val);
    } else {
        orte_cr_output = opal_cr_output;
    }

    opal_output_verbose(10, orte_cr_output,
                        "orte_cr: init: orte_cr_init()\n");

    /* Init ORTE Entry Point Function */
    if( ORTE_SUCCESS != (ret = orte_cr_entry_point_init()) ) {
        exit_status = ret;
        goto cleanup;
    }

    /* Register the ORTE interlevel coordination callback */
    opal_cr_reg_coord_callback(orte_cr_coord, &prev_coord_callback);

    /* Typically this is not needed. Individual BTLs will set this as needed */
    orte_cr_continue_like_restart = false;
    orte_cr_flush_restart_files   = true;
    
 cleanup:

    return exit_status;
}
コード例 #15
0
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;
}
コード例 #16
0
static void framework_open_output (struct mca_base_framework_t *framework)
{
    if (0 < framework->framework_verbose) {
        if (-1 == framework->framework_output) {
            framework->framework_output = opal_output_open (NULL);
        }
        opal_output_set_verbosity(framework->framework_output,
                                  framework->framework_verbose);
    } else if (-1 != framework->framework_output) {
        opal_output_close (framework->framework_output);
        framework->framework_output = -1;
    }
}
コード例 #17
0
/**
 * Function for finding and opening either all MCA components, or the one
 * that was specifically requested via a MCA parameter.
 */
int mca_btl_base_open(void)
{
    int i;
    if( ++mca_btl_base_already_opened > 1 ) return OMPI_SUCCESS;

    /* Verbose output */
    mca_base_param_reg_int_name("btl", 
                                "base_verbose", 
                                "Verbosity level of the BTL framework", 
                                false, false, 
                                0, 
                                &mca_btl_base_verbose);

    mca_btl_base_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_btl_base_output, mca_btl_base_verbose);

    /* Override the per-BTL "don't run if THREAD_MULTIPLE selected"
       embargo? */
    mca_base_param_reg_int_name("btl", 
                                "base_thread_multiple_override", 
                                "Enable BTLs that are not normally enabled when MPI_THREAD_MULTIPLE is enabled (THIS IS FOR DEVELOPERS ONLY!  SHOULD NOT BE USED BY END USERS!)",
                                true, false, 
                                0, &i);
    mca_btl_base_thread_multiple_override = OPAL_INT_TO_BOOL(i);

  /* Open up all available components */
    
  if (OMPI_SUCCESS != 
      mca_base_components_open("btl", mca_btl_base_output, mca_btl_base_static_components,
                               &mca_btl_base_components_opened, true)) {
    return OMPI_ERROR;
  }

  /* Initialize the list so that in mca_btl_base_close(), we can
     iterate over it (even if it's empty, as in the case of
     ompi_info) */

  OBJ_CONSTRUCT(&mca_btl_base_modules_initialized, opal_list_t);

  /* register parameters */
  mca_base_param_lookup_string(
      mca_base_param_register_string("btl","base","include",NULL,NULL), &mca_btl_base_include);
  mca_base_param_lookup_string(
      mca_base_param_register_string("btl","base","exclude",NULL,NULL), &mca_btl_base_exclude);
  mca_base_param_reg_int_name("btl", "base_warn_component_unused",
      "This parameter is used to turn on warning messages when certain NICs are not used",
      false, false, 1, &mca_btl_base_warn_component_unused);

  /* All done */
  return OMPI_SUCCESS;
}
コード例 #18
0
int main(int argc, char* argv[])
{
    int rank, size;
    int stream, stream2;

    MPI_Init(&argc, &argv);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    MPI_Comm_size(MPI_COMM_WORLD, &size);

    stream = opal_output_open(NULL);
    opal_output(stream, "(stream) Hello, World, I am %d of %d\n", rank, size);
    printf("(printf) Hello, World, I am %d of %d\n", rank, size);
    
    opal_output_set_verbosity(stream, 10);
    opal_output(stream, "this is an opal_output on the verbose stream");
    
    stream2 = opal_output_open(NULL);
    opal_output(stream2, "opal_output stream2");
    opal_output_set_verbosity(stream2, 10);
    opal_output(stream2, "this is an opal_output on the same verbose stream2");

    MPI_Finalize();
    return 0;
}
コード例 #19
0
static int hcoll_open(void)
{
    int rc;

    mca_coll_hcoll_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_coll_hcoll_output, mca_coll_hcoll_component.hcoll_verbose);

    hcoll_rte_fns_setup();

    OBJ_CONSTRUCT(&mca_coll_hcoll_component.active_modules,
                  opal_list_t);

    mca_coll_hcoll_component.progress_lock = -1;
    return OMPI_SUCCESS;
}
コード例 #20
0
/**
 * Function for finding and opening either all MCA components, or the one
 * that was specifically requested via a MCA parameter.
 */
int mca_bcol_base_open(void)
{
    int value, ret;

    /*_bcol_base_components_available
     * Register some MCA parameters
     */
     /* Debugging/Verbose output */
     mca_base_param_reg_int_name("bcol",
                                 "base_verbose",
                                 "Verbosity level of BCOL framework",
                                 false, false,
                                 0, &value);

     /* get fraemwork id    */
     mca_bcol_base_output = opal_output_open(NULL);
     opal_output_set_verbosity(mca_bcol_base_output, value);

    /* Open up all available components */
    if (OMPI_SUCCESS !=
        mca_base_components_open("bcol", mca_bcol_base_output, mca_bcol_base_static_components,
                                 &mca_bcol_base_components_opened,
                                 true)) {
        return OMPI_ERROR;
    }

    /* figure out which bcol and sbgp components will actually be used */
    /* get list of sub-grouping functions to use */
    mca_base_param_reg_string_name("bcol","base_string",
            "Default set of basic collective components to use ",
            false, false, "basesmuma,basesmuma,iboffload,ptpcoll,ugni", &ompi_bcol_bcols_string);

    ret = mca_bcol_base_set_components_to_use(&mca_bcol_base_components_opened,
                                              &mca_bcol_base_components_in_use);

    /* memory registration compatibilities */
    bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_SHARED_MEMORY_UMA]=1;
    bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_SHARED_MEMORY_SOCKET]=1;
    bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_POINT_TO_POINT]=1;
    bcol_mpool_compatibility[BCOL_SHARED_MEMORY_UMA][BCOL_IB_OFFLOAD]=1;
    bcol_mpool_compatibility[BCOL_SHARED_MEMORY_SOCKET][BCOL_SHARED_MEMORY_UMA]=1;
    bcol_mpool_compatibility[BCOL_POINT_TO_POINT]      [BCOL_SHARED_MEMORY_UMA]=1;
    bcol_mpool_compatibility[BCOL_IB_OFFLOAD]          [BCOL_SHARED_MEMORY_UMA]=1;

    return OMPI_SUCCESS;
}
コード例 #21
0
ファイル: mtl_mxm_component.c プロジェクト: IanYXXL/A1
static int ompi_mtl_mxm_component_open(void)
{
    mxm_error_t err;
    unsigned long cur_ver;
    int rc;

    mca_mtl_mxm_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_mtl_mxm_output, ompi_mtl_mxm.verbose);
    cur_ver = mxm_get_version();
    if (cur_ver != MXM_API) {
        MXM_VERBOSE(1,
                "WARNING: OMPI was compiled with MXM version %d.%d but version %ld.%ld detected.", 
                MXM_VERNO_MAJOR,
                MXM_VERNO_MINOR, 
                (cur_ver >> MXM_MAJOR_BIT) & 0xff,
                (cur_ver >> MXM_MINOR_BIT) & 0xff);
    }
コード例 #22
0
static int sstore_stage_open(void)
{
    /* If there is a custom verbose level for this component than use it
     * otherwise take our parents level and output channel
     */
    if ( 0 != mca_sstore_stage_component.super.verbose) {
        mca_sstore_stage_component.super.output_handle = opal_output_open(NULL);
        opal_output_set_verbosity(mca_sstore_stage_component.super.output_handle,
                                  mca_sstore_stage_component.super.verbose);
    } else {
        mca_sstore_stage_component.super.output_handle = orte_sstore_base_framework.framework_output;
    }

    /*
     * Debug Output
     */
    opal_output_verbose(10, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open()");
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: priority   = %d",
                        mca_sstore_stage_component.super.priority);
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: verbosity  = %d",
                        mca_sstore_stage_component.super.verbose);
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: Local snapshot directory = %s",
                        orte_sstore_stage_local_snapshot_dir);
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: Is Global dir. shared    = %s",
                        (orte_sstore_stage_global_is_shared ? "True" : "False"));
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: Node Local Caching       = %s",
                        (orte_sstore_stage_enabled_caching ? "Enabled" : "Disabled"));
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: Compression              = %s",
                        (orte_sstore_stage_enabled_compression ? "Enabled" : "Disabled"));
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: Compression Delay        = %d",
                        orte_sstore_stage_compress_delay);
    opal_output_verbose(20, mca_sstore_stage_component.super.output_handle,
                        "sstore:stage: open: Skip FileM (Debug Only)  = %s",
                        (orte_sstore_stage_skip_filem ? "True" : "False"));

    return ORTE_SUCCESS;
}
コード例 #23
0
void pmix_server_register_params(void)
{
    /* register a verbosity */
    orte_pmix_server_globals.verbosity = -1;
    (void) mca_base_var_register ("orte", "pmix", NULL, "server_verbose",
                                  "Debug verbosity for PMIx server",
                                  MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
                                  OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_ALL,
                                  &orte_pmix_server_globals.verbosity);
    if (0 <= orte_pmix_server_globals.verbosity) {
        orte_pmix_server_globals.output = opal_output_open(NULL);
        opal_output_set_verbosity(orte_pmix_server_globals.output,
                                  orte_pmix_server_globals.verbosity);
    }
    /* specify the size of the hotel */
    orte_pmix_server_globals.num_rooms = 256;
    (void) mca_base_var_register ("orte", "pmix", NULL, "server_max_reqs",
                                  "Maximum number of backlogged PMIx server direct modex requests",
                                  MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
                                  OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_ALL,
                                  &orte_pmix_server_globals.num_rooms);
    /* specify the timeout for the hotel */
    orte_pmix_server_globals.timeout = 2;
    (void) mca_base_var_register ("orte", "pmix", NULL, "server_max_wait",
                                  "Maximum time (in seconds) the PMIx server should wait to service direct modex requests",
                                  MCA_BASE_VAR_TYPE_INT, NULL, 0, 0,
                                  OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_ALL,
                                  &orte_pmix_server_globals.timeout);

    /* register the URI of the UNIVERSAL data server */
    orte_pmix_server_globals.server_uri = NULL;
    (void) mca_base_var_register ("orte", "pmix", NULL, "server_uri",
                                  "URI of a session-level keyval server for publish/lookup operations",
                                  MCA_BASE_VAR_TYPE_STRING, NULL, 0, 0,
                                  OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_ALL,
                                  &orte_pmix_server_globals.server_uri);

    /* whether or not to wait for the universal server */
    orte_pmix_server_globals.wait_for_server = false;
    (void) mca_base_var_register ("orte", "pmix", NULL, "wait_for_server",
                                  "Whether or not to wait for the session-level server to start",
                                  MCA_BASE_VAR_TYPE_BOOL, NULL, 0, 0,
                                  OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_ALL,
                                  &orte_pmix_server_globals.wait_for_server);
}
コード例 #24
0
ファイル: pml_ucx_component.c プロジェクト: thananon/ompi
static int mca_pml_ucx_component_open(void)
{
    ompi_pml_ucx.output = opal_output_open(NULL);
    opal_output_set_verbosity(ompi_pml_ucx.output, ompi_pml_ucx.verbose);

    /* Set memory hooks */
    if (ompi_pml_ucx.opal_mem_hooks &&
        (OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) ==
        ((OPAL_MEMORY_FREE_SUPPORT | OPAL_MEMORY_MUNMAP_SUPPORT) &
         opal_mem_hooks_support_level()))
    {
        PML_UCX_VERBOSE(1, "%s", "using OPAL memory hooks as external events");
        ucm_set_external_event(UCM_EVENT_VM_UNMAPPED);
        opal_mem_hooks_register_release(mca_pml_ucx_mem_release_cb, NULL);
    }

    return mca_pml_ucx_open();
}
コード例 #25
0
static int hcoll_open(void)
{
    int rc;

    mca_coll_hcoll_output = opal_output_open(NULL);
    opal_output_set_verbosity(mca_coll_hcoll_output, mca_coll_hcoll_component.hcoll_verbose);

    hcoll_rte_fns_setup();

    opal_progress_register(hcoll_progress_fn);
    rc = hcoll_init();

    if (HCOLL_SUCCESS != rc){
        opal_progress_unregister(hcoll_progress_fn);
        HCOL_VERBOSE(1,"Hcol library init failed");
        return OMPI_ERROR;
    }
    return OMPI_SUCCESS;
}
コード例 #26
0
ファイル: pml_crcpw_component.c プロジェクト: bringhurst/ompi
int mca_pml_crcpw_component_open(void)
{
    opal_output_verbose( 10, mca_pml_crcpw_component.output_handle,
                         "pml:crcpw: component_open: Open");

    /*
     * Register some MCA parameters
     */
    mca_base_param_reg_int(&mca_pml_crcpw_component.super.pmlm_version,
                           "priority",
                           "Priority of the PML crcpw component",
                           false, false,
                           mca_pml_crcpw_component.priority,
                           &mca_pml_crcpw_component.priority);
    
    mca_base_param_reg_int(&mca_pml_crcpw_component.super.pmlm_version,
                           "verbose",
                           "Verbose level for the PML crcpw component",
                           false, false,
                           mca_pml_crcpw_component.verbose, 
                           &mca_pml_crcpw_component.verbose);

    mca_pml_crcpw_component.output_handle = opal_output_open(NULL);
    if ( 0 != mca_pml_crcpw_component.verbose) {
        opal_output_set_verbosity(mca_pml_crcpw_component.output_handle,
                                  mca_pml_crcpw_component.verbose);
    }
    
    /*
     * Debug Output
     */
    opal_output_verbose(10, mca_pml_crcpw_component.output_handle,
                        "pml:crcpw: open()");
    opal_output_verbose(20, mca_pml_crcpw_component.output_handle,
                        "pml:crcpw: open: priority   = %d", 
                        mca_pml_crcpw_component.priority);
    opal_output_verbose(20, mca_pml_crcpw_component.output_handle,
                        "pml:crcpw: open: verbosity  = %d", 
                        mca_pml_crcpw_component.verbose);

    return OMPI_SUCCESS;
}
コード例 #27
0
/*
 * 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;
}
コード例 #28
0
static int crs_blcr_open(void) 
{
    
    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;
    }

    /*
     * 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);

    return OPAL_SUCCESS;
}
コード例 #29
0
static int orte_ps_init(int argc, char *argv[]) {
    int ret;

    /*
     * Make sure to init util before parse_args
     * to ensure installdirs is setup properly
     * before calling mca_base_open();
     */
    if( ORTE_SUCCESS != (ret = opal_init_util(&argc, &argv)) ) {
        return ret;
    }

    /*
     * Parse Command Line Arguments
     */
    if (ORTE_SUCCESS != (ret = parse_args(argc, argv))) {
        return ret;
    }

    /*
     * Setup OPAL Output handle from the verbose argument
     */
    if( orte_ps_globals.verbose ) {
        orte_ps_globals.output = opal_output_open(NULL);
        opal_output_set_verbosity(orte_ps_globals.output, 10);
    } else {
        orte_ps_globals.output = 0; /* Default=STDERR */
    }

    /* we are never allowed to operate as a distributed tool,
     * so insist on the ess/tool component */
    opal_setenv("OMPI_MCA_ess", "tool", true, &environ);

    /***************************
     * We need all of OPAL and the TOOL portion of ORTE
     ***************************/
    ret = orte_init(&argc, &argv, ORTE_PROC_TOOL);

    return ret;
}
コード例 #30
0
ファイル: common_ucx.c プロジェクト: wuqunyong/ompi
OPAL_DECLSPEC void opal_common_ucx_mca_register(void)
{
    opal_common_ucx.registered++;
    if (opal_common_ucx.registered > 1) {
        /* process once */
        return;
    }

    mca_base_var_register("opal", "opal_common", "ucx", "verbose",
                          "Verbose level of the UCX components",
                          MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
                          OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL,
                          &opal_common_ucx.verbose);
    mca_base_var_register("opal", "opal_common", "ucx", "progress_iterations",
                          "Set number of calls of internal UCX progress calls per opal_progress call",
                          MCA_BASE_VAR_TYPE_INT, NULL, 0, MCA_BASE_VAR_FLAG_SETTABLE,
                          OPAL_INFO_LVL_9, MCA_BASE_VAR_SCOPE_LOCAL,
                          &opal_common_ucx.progress_iterations);

    opal_common_ucx.output = opal_output_open(NULL);
    opal_output_set_verbosity(opal_common_ucx.output, opal_common_ucx.verbose);
}