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
@ -79,7 +79,7 @@ SUBDIRS = \
|
|||||||
debuggers \
|
debuggers \
|
||||||
etc \
|
etc \
|
||||||
mpi/c \
|
mpi/c \
|
||||||
mpi/tool \
|
mpi/tool \
|
||||||
$(OMPI_MPIEXT_C_DIRS) \
|
$(OMPI_MPIEXT_C_DIRS) \
|
||||||
mpi/fortran/base/ \
|
mpi/fortran/base/ \
|
||||||
$(MCA_ompi_FRAMEWORKS_SUBDIRS) \
|
$(MCA_ompi_FRAMEWORKS_SUBDIRS) \
|
||||||
@ -111,7 +111,7 @@ DIST_SUBDIRS = \
|
|||||||
debuggers \
|
debuggers \
|
||||||
etc \
|
etc \
|
||||||
mpi/c \
|
mpi/c \
|
||||||
mpi/tool \
|
mpi/tool \
|
||||||
mpi/cxx \
|
mpi/cxx \
|
||||||
mpi/fortran/base \
|
mpi/fortran/base \
|
||||||
mpi/fortran/mpif-h \
|
mpi/fortran/mpif-h \
|
||||||
@ -134,6 +134,7 @@ libmpi_la_LIBADD = \
|
|||||||
datatype/libdatatype.la \
|
datatype/libdatatype.la \
|
||||||
debuggers/libdebuggers.la \
|
debuggers/libdebuggers.la \
|
||||||
mpi/c/libmpi_c.la \
|
mpi/c/libmpi_c.la \
|
||||||
|
mpi/tool/libmpi_mpit_common.la \
|
||||||
$(c_mpi_lib) \
|
$(c_mpi_lib) \
|
||||||
$(c_pmpi_lib) \
|
$(c_pmpi_lib) \
|
||||||
$(mpi_fortran_base_lib) \
|
$(mpi_fortran_base_lib) \
|
||||||
@ -141,11 +142,6 @@ libmpi_la_LIBADD = \
|
|||||||
$(OMPI_MPIEXT_C_LIBS) \
|
$(OMPI_MPIEXT_C_LIBS) \
|
||||||
$(OMPI_LIBMPI_EXTRA_LIBS)
|
$(OMPI_LIBMPI_EXTRA_LIBS)
|
||||||
|
|
||||||
if WANT_MPI_PROFILING
|
|
||||||
libmpi_la_LIBADD += \
|
|
||||||
mpi/tool/libmpi_mpit.la
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
if OMPI_RTE_ORTE
|
if OMPI_RTE_ORTE
|
||||||
libmpi_la_LIBADD += \
|
libmpi_la_LIBADD += \
|
||||||
|
@ -17,10 +17,16 @@ SUBDIRS = profile
|
|||||||
|
|
||||||
AM_CPPFLAGS = -DOMPI_PROFILING_DEFINES=0
|
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
|
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 \
|
libmpi_mpit_la_SOURCES = init_thread.c finalize.c cvar_get_num.c \
|
||||||
cvar_get_info.c cvar_read.c cvar_write.c \
|
cvar_get_info.c cvar_read.c cvar_write.c \
|
||||||
cvar_handle_alloc.c cvar_handle_free.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_handle_free.c pvar_read.c pvar_readreset.c \
|
||||||
pvar_reset.c pvar_session_create.c pvar_session_free.c \
|
pvar_reset.c pvar_session_create.c pvar_session_free.c \
|
||||||
pvar_start.c pvar_stop.c pvar_write.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
|
# 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;
|
ret = OPAL_ERR_OUT_OF_RESOURCE;
|
||||||
break;
|
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);
|
pvar_handle->tmp_value = calloc (*count, datatype_size);
|
||||||
if (NULL == pvar_handle->tmp_value) {
|
if (NULL == pvar_handle->tmp_value) {
|
||||||
ret = OPAL_ERR_OUT_OF_RESOURCE;
|
ret = OPAL_ERR_OUT_OF_RESOURCE;
|
||||||
break;
|
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
|
/* 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
|
to support start->stop->read correctly. use calloc to initialize the current
|
||||||
value to 0. */
|
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;
|
pvar_handle->session = session;
|
||||||
|
|
||||||
/* the handle is ready. add it to the appropriate lists */
|
/* the handle is ready. add it to the appropriate lists */
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user