- only make MCA parameters available if SPC is enabled
- do not compile SPC code if SPC is disabled
- move includes into ompi_spc.c
- allow counters to be enabled through MPI_T without setting MCA parameter
- inline counter update calls that are likely in the critical path
- fix test to succeed even if encountering invalid pvars
- move timer_[start|stop] to header and move attachment info into ompi_spc_t
There is no need to store the name in the ompi_spc_t struct too, we can use that space
for the attachment info instead to avoid accessing another cache line.
- make timer/watermark flags a property of the spc description
This is meant to making adding counters easier in the future by
centralizing the necessary information. By storing a copy of these flags
in the ompi_spc_t structure (without adding to its size) reduces
cache pollution for timer/watermark events.
- allocate ompi_spc_t objects with cache-alignment
This prevents objects from spanning multiple cache lines and thus
ensures that only one cache line is loaded per update.
- fix handling of timer and timer conversion
- only call opal_timer_base_get_cycles if necesary to reduce overhead
- Remove use of OPAL_UNLIKELY to improve code generated by GCC
It appears that GCC makes less effort in optimizing the unlikely path
and generates bloated code.
- Allocate ompi_spc_events statically to reduce loads in critical path
- duplicate comm_world only when dumping is requested
Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
This commit updates the entire codebase to use specific opal types for
all atomic variables. This is a change from the prior atomic support
which required the use of the volatile keyword. This is the first step
towards implementing support for C11 atomics as that interface
requires the use of types declared with the _Atomic keyword.
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
This function is only used in ompi_spc.c and is hence declared as static.
Remove its prototype from the header file in order to silence compiler warnings who will typically consider ompi_spc_get_count() as a declared but not defined function.
Fixesopen-mpi/ompi#5279Fixesopen-mpi/ompi#5273
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
This code is the implementation of Software-base Performance Counters as described in the paper 'Using Software-Base Performance Counters to Expose Low-Level Open MPI Performance Information' in EuroMPI/USA '17 (http://icl.cs.utk.edu/news_pub/submissions/software-performance-counters.pdf). More practical usage information can be found here: https://github.com/davideberius/ompi/wiki/How-to-Use-Software-Based-Performance-Counters-(SPCs)-in-Open-MPI.
All software events functions are put in macros that become no-ops when SOFTWARE_EVENTS_ENABLE is not defined. The internal timer units have been changed to cycles to avoid division operations which was a large source of overhead as discussed in the paper. Added a --with-spc configure option to enable SPCs in the Open MPI build. This defines SOFTWARE_EVENTS_ENABLE. Added an MCA parameter, mpi_spc_enable, for turning on specific counters. Added an MCA parameter, mpi_spc_dump_enabled, for turning on and off dumping SPC counters in MPI_Finalize. Added an SPC test and example.
Signed-off-by: David Eberius <deberius@vols.utk.edu>