Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ompi/mca/hook/comm_method/hook_comm_method.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 IBM Corporation. All rights reserved.
* Copyright (c) 2016-2020 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -22,11 +22,11 @@ OMPI_MODULE_DECLSPEC extern const ompi_hook_base_component_1_0_0_t mca_hook_comm

extern int mca_hook_comm_method_verbose;
extern int mca_hook_comm_method_output;
extern bool hook_comm_method_enable_mpi_init;
extern bool hook_comm_method_enable_mpi_finalize;
extern int hook_comm_method_max;
extern int hook_comm_method_brief;
extern char *hook_comm_method_fakefile;
extern bool mca_hook_comm_method_enable_mpi_init;
extern bool mca_hook_comm_method_enable_mpi_finalize;
extern int mca_hook_comm_method_max;
extern int mca_hook_comm_method_brief;
extern char *mca_hook_comm_method_fakefile;

void ompi_hook_comm_method_mpi_init_bottom(int argc, char **argv, int requested, int *provided);

Expand Down
30 changes: 15 additions & 15 deletions ompi/mca/hook/comm_method/hook_comm_method_component.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 IBM Corporation. All rights reserved.
* Copyright (c) 2016-2020 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -68,11 +68,11 @@ const ompi_hook_base_component_1_0_0_t mca_hook_comm_method_component = {

int mca_hook_comm_method_verbose = 0;
int mca_hook_comm_method_output = -1;
bool hook_comm_method_enable_mpi_init = false;
bool hook_comm_method_enable_mpi_finalize = false;
int hook_comm_method_max = 12;
int hook_comm_method_brief = 0;
char *hook_comm_method_fakefile = NULL;
bool mca_hook_comm_method_enable_mpi_init = false;
bool mca_hook_comm_method_enable_mpi_finalize = false;
int mca_hook_comm_method_max = 12;
int mca_hook_comm_method_brief = 0;
char *mca_hook_comm_method_fakefile = NULL;

static int ompi_hook_comm_method_component_open(void)
{
Expand Down Expand Up @@ -113,23 +113,23 @@ static int ompi_hook_comm_method_component_register(void)
/*
* If the component is active for mpi_init / mpi_finalize
*/
hook_comm_method_enable_mpi_init = false;
mca_hook_comm_method_enable_mpi_init = false;
(void) mca_base_component_var_register(&mca_hook_comm_method_component.hookm_version, "enable_mpi_init",
"Enable comm_method behavior on mpi_init",
MCA_BASE_VAR_TYPE_BOOL, NULL,
0, 0,
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_READONLY,
&hook_comm_method_enable_mpi_init);
&mca_hook_comm_method_enable_mpi_init);

hook_comm_method_enable_mpi_finalize = false;
mca_hook_comm_method_enable_mpi_finalize = false;
(void) mca_base_component_var_register(&mca_hook_comm_method_component.hookm_version, "enable_mpi_finalize",
"Enable comm_method behavior on mpi_finalize",
MCA_BASE_VAR_TYPE_BOOL, NULL,
0, 0,
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_READONLY,
&hook_comm_method_enable_mpi_finalize);
&mca_hook_comm_method_enable_mpi_finalize);

// User can set the comm_method mca variable too
int hook_comm_method = -1;
Expand All @@ -142,10 +142,10 @@ static int ompi_hook_comm_method_component_register(void)
&hook_comm_method);

if( 1 == hook_comm_method ) {
hook_comm_method_enable_mpi_init = true;
mca_hook_comm_method_enable_mpi_init = true;
}
else if( 2 == hook_comm_method ) {
hook_comm_method_enable_mpi_finalize = true;
mca_hook_comm_method_enable_mpi_finalize = true;
}

// comm_method_max
Expand All @@ -155,15 +155,15 @@ static int ompi_hook_comm_method_component_register(void)
0, 0,
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_READONLY,
&hook_comm_method_max);
&mca_hook_comm_method_max);
// comm_method_brief
(void) mca_base_var_register("ompi", NULL, NULL, "comm_method_brief",
"Only print the comm method summary, skip the 2d table.",
MCA_BASE_VAR_TYPE_INT, NULL,
0, 0,
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_READONLY,
&hook_comm_method_brief);
&mca_hook_comm_method_brief);

// comm_method_fakefile is just for debugging, allows complete override of all the
// comm method in the table
Expand All @@ -173,7 +173,7 @@ static int ompi_hook_comm_method_component_register(void)
0, 0,
OPAL_INFO_LVL_3,
MCA_BASE_VAR_SCOPE_READONLY,
&hook_comm_method_fakefile);
&mca_hook_comm_method_fakefile);

return OMPI_SUCCESS;
}
14 changes: 7 additions & 7 deletions ompi/mca/hook/comm_method/hook_comm_method_fns.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2018 IBM Corporation. All rights reserved.
* Copyright (c) 2016-2020 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand Down Expand Up @@ -219,14 +219,14 @@ static void ompi_report_comm_methods(int called_from_location);

void ompi_hook_comm_method_mpi_init_bottom(int argc, char **argv, int requested, int *provided)
{
if( hook_comm_method_enable_mpi_init ) {
if( mca_hook_comm_method_enable_mpi_init ) {
ompi_report_comm_methods( 1 );
}
}

void ompi_hook_comm_method_mpi_finalize_top(void)
{
if( hook_comm_method_enable_mpi_finalize ) {
if( mca_hook_comm_method_enable_mpi_finalize ) {
ompi_report_comm_methods( 2 );
}
}
Expand Down Expand Up @@ -339,9 +339,9 @@ ompi_report_comm_methods(int called_from_location) // 1 = from init, 2 = from fi
hpmp_myrank = ompi_comm_rank(MPI_COMM_WORLD);
// hpmp_nprocs = ompi_comm_size(MPI_COMM_WORLD);

max2Dprottable = hook_comm_method_max;
max2Dprottable = mca_hook_comm_method_max;
max2D1Cprottable = 3 * max2Dprottable;
if (hook_comm_method_brief) {
if (mca_hook_comm_method_brief) {
// force only the short summary output to be printed with no 2d table:
max2Dprottable = 0;
max2D1Cprottable = 0;
Expand Down Expand Up @@ -545,10 +545,10 @@ ompi_report_comm_methods(int called_from_location) // 1 = from init, 2 = from fi
// settings, this is only for testing, eg to make sure the printing comes out
// right.
if (myleaderrank == 0) {
if (hook_comm_method_fakefile) {
if (mca_hook_comm_method_fakefile) {
FILE *fp;
int setting;
fp = fopen(hook_comm_method_fakefile, "r");
fp = fopen(mca_hook_comm_method_fakefile, "r");
for (i=0; i<nleaderranks; ++i) {
for (k=0; k<nleaderranks; ++k) {
fscanf(fp, "%d", &setting);
Expand Down
3 changes: 2 additions & 1 deletion ompi/runtime/ompi_spc.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* and Technology (RIST). All rights reserved.
* Copyright (c) 2019 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2020 IBM Corporation. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
Expand All @@ -17,7 +18,7 @@

#include "ompi_spc.h"

opal_timer_t sys_clock_freq_mhz = 0;
static opal_timer_t sys_clock_freq_mhz = 0;

static void ompi_spc_dump(void);

Expand Down