Fix compilation of the MPI tools information interface when profiling
is enabled and fix a bug in the handling of watermark performance variables. cmr=v1.7.3:ticket=trac:3725:reviewer=jsquyres This commit was SVN r29068. The following Trac tickets were found above: Ticket 3725 --> https://svn.open-mpi.org/trac/ompi/ticket/3725
Этот коммит содержится в:
родитель
cf09fe7c99
Коммит
2da64eb719
@ -134,6 +134,7 @@ libmpi_la_LIBADD = \
|
||||
datatype/libdatatype.la \
|
||||
debuggers/libdebuggers.la \
|
||||
mpi/c/libmpi_c.la \
|
||||
mpi/tool/libmpi_mpit_common.la \
|
||||
$(c_mpi_lib) \
|
||||
$(c_pmpi_lib) \
|
||||
$(mpi_fortran_base_lib) \
|
||||
@ -141,11 +142,6 @@ libmpi_la_LIBADD = \
|
||||
$(OMPI_MPIEXT_C_LIBS) \
|
||||
$(OMPI_LIBMPI_EXTRA_LIBS)
|
||||
|
||||
if WANT_MPI_PROFILING
|
||||
libmpi_la_LIBADD += \
|
||||
mpi/tool/libmpi_mpit.la
|
||||
endif
|
||||
|
||||
|
||||
if OMPI_RTE_ORTE
|
||||
libmpi_la_LIBADD += \
|
||||
|
@ -17,10 +17,16 @@ SUBDIRS = profile
|
||||
|
||||
AM_CPPFLAGS = -DOMPI_PROFILING_DEFINES=0
|
||||
|
||||
noinst_LTLIBRARIES = libmpi_mpit.la
|
||||
noinst_LTLIBRARIES = libmpi_mpit_common.la
|
||||
|
||||
if BUILD_MPI_BINDINGS_LAYER
|
||||
noinst_LTLIBRARIES += libmpi_mpit.la
|
||||
endif
|
||||
|
||||
headers = mpit-internal.h
|
||||
|
||||
libmpi_mpit_common_la_SOURCES = mpit_common.c
|
||||
|
||||
libmpi_mpit_la_SOURCES = init_thread.c finalize.c cvar_get_num.c \
|
||||
cvar_get_info.c cvar_read.c cvar_write.c \
|
||||
cvar_handle_alloc.c cvar_handle_free.c \
|
||||
@ -31,7 +37,7 @@ libmpi_mpit_la_SOURCES = init_thread.c finalize.c cvar_get_num.c \
|
||||
pvar_handle_free.c pvar_read.c pvar_readreset.c \
|
||||
pvar_reset.c pvar_session_create.c pvar_session_free.c \
|
||||
pvar_start.c pvar_stop.c pvar_write.c \
|
||||
enum_get_info.c enum_get_item.c mpit_common.c
|
||||
enum_get_info.c enum_get_item.c
|
||||
|
||||
# Conditionally install the header files
|
||||
|
||||
|
@ -473,25 +473,16 @@ int mca_base_pvar_handle_alloc (mca_base_pvar_session_t *session, int index, voi
|
||||
ret = OPAL_ERR_OUT_OF_RESOURCE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mca_base_pvar_is_continuous (pvar) || mca_base_pvar_is_sum (pvar) ||
|
||||
mca_base_pvar_is_watermark (pvar)) {
|
||||
pvar_handle->tmp_value = calloc (*count, datatype_size);
|
||||
if (NULL == pvar_handle->tmp_value) {
|
||||
ret = OPAL_ERR_OUT_OF_RESOURCE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* get the current value of the performance variable if this is a
|
||||
continuous sum. if this variable needs to be started first the
|
||||
current value is not relevant. */
|
||||
if (mca_base_pvar_is_continuous (pvar)) {
|
||||
ret = pvar->get_value (pvar, pvar_handle->last_value, pvar_handle->obj_handle);
|
||||
if (OPAL_SUCCESS != ret) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mca_base_pvar_is_continuous (pvar) || mca_base_pvar_is_sum (pvar)) {
|
||||
/* if a variable is not continuous we will need to keep track of its last value
|
||||
to support start->stop->read correctly. use calloc to initialize the current
|
||||
value to 0. */
|
||||
@ -502,6 +493,23 @@ int mca_base_pvar_handle_alloc (mca_base_pvar_session_t *session, int index, voi
|
||||
}
|
||||
}
|
||||
|
||||
/* get the current value of the performance variable if this is a
|
||||
continuous sum or watermark. if this variable needs to be started first the
|
||||
current value is not relevant. */
|
||||
if (mca_base_pvar_is_continuous (pvar) && (mca_base_pvar_is_sum (pvar) || mca_base_pvar_is_sum (pvar))) {
|
||||
if (mca_base_pvar_is_sum (pvar)) {
|
||||
/* the initial value of a sum is 0 */
|
||||
ret = pvar->get_value (pvar, pvar_handle->last_value, pvar_handle->obj_handle);
|
||||
} else {
|
||||
/* the initial value of a watermark is the current value of the variable */
|
||||
ret = pvar->get_value (pvar, pvar_handle->current_value, pvar_handle->obj_handle);
|
||||
}
|
||||
|
||||
if (OPAL_SUCCESS != ret) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
pvar_handle->session = session;
|
||||
|
||||
/* the handle is ready. add it to the appropriate lists */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user