This commit adds opal_using_threads() protection around the atomic
operation in OBJ_RETAIN/OBJ_RELEASE. This resolves the performance
issues seen when running psm with MPI_THREAD_SINGLE.
To avoid issues with header dependencies opal_using_threads() has been
moved to a new header (thread_usage.h). The OPAL_THREAD_ADD* and
OPAL_THREAD_CMPSET* macros have also been relocated to this header.
This commit is cherry-picked off a fix that was submitted for the v1.8
release series but never applied to master. This fixes part of the
problem reported by @nysal in #1902.
(cherry picked from commit open-mpi/ompi-release@ce91307918)
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
This commit does two things. It removes checks for C99 required
headers (stdlib.h, string.h, signal.h, etc). Additionally it removes
definitions for required C99 types (intptr_t, int64_t, int32_t, etc).
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
This commit enables the use of opal classes after a call to
opal_class_finalize. This is needed to support re-initializing opal
after calling opal_finalize_util (). This is needed to support the
following without leaking:
MPI_T_init_thread ();
MPI_T_finalize ();
MPI_Init ();
MPI_Finalize ();
Before this commit the above code would crash in MPI_Init because the
constructor array for some class was freed by opal_class_finalize ().
The fix is to turn the cls_initialized member of opal_class_t into an
init epoch identifier and compare it against opal_class_init_epoch
instead of 1. On each call to opal_class_finalize the
opal_class_init_epoch counter is incremented forcing re-initialization
of classes after finalize.
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
With --enable-memchecker builds, use calloc(3) for OBJ_NEW instead of
malloc(3). This cuts down on a lot of valgrind/memory checker false
positive output.
Also make a minor change in the valgrind configure.m4; have it assign
0xf to a char. The prior assignment (of 0xff) was warning about an
overflow. This didn't really matter, but we might as well make the
test not have a gratuitious warning in it.
more:
- Remove OPAL_ENABLE_MULTI_THREADS, since it didn't really do anything
correctly. Opal always has threads enabled at this point.
- Remove OMPI_ENABLE_PROGRESS_THREADS, since this hasn't worked in
8 years and it has performance issues we'll never be able to
overcome. Note that we have plans for re-adding async progress, using
a hybrid protocol of async and sync sends.
- OMPI_ENABLE_THREAD_MULTIPLE now determines whether the thread lock
macros do the check or not.
- Condition variables are ALWAYS polling right now, which fixes the thread
live-lock currently found when THREAD_MULTIPLE is turned on.
This commit was SVN r29891.
No need for any CMRs to 1.5... that was already done in CMR 2728.
This commit was SVN r24545.
The following SVN revision numbers were found above:
r22841 --> open-mpi/ompi@b400b84162
OMPI_* to OPAL_*. This allows opal layer to be used more independent
from the whole of ompi.
NOTE: 9 "svn mv" operations immediately follow this commit.
This commit was SVN r21180.
Now, while #include "ompi_config.h" is good and fine in order
to have OMPI_DECLSPEC,
here it led to stdint.h (with the uint8_t) being included early
but INSIDE a namespace "MPI" {}.
Of course it was included anymore (thinkg #define _STDINT_H), when
it was required in opal/class/opal_hash_list.h
NOT good.
- opal/class/opal_object.h: Yeah, one can have nested extern "C" {}
but it's not necessary. Instead just have the outer *_C_DECLS.
This commit was SVN r20837.
The following SVN revision numbers were found above:
r20817 --> open-mpi/ompi@6f808d9b05
get bitten by header depending on having already included
the corresponding [opal|orte|ompi]_config.h header.
When separating, things like [OPAL|ORTE|OMPI]_DECLSPEC
are missed.
Script to add the corresponding header in front of all following
(taking care of possible #ifdef HAVE_...)
- Including some minor cleanups to
- ompi/group/group.h -- include _after_ #ifndef OMPI_GROUP_H
- ompi/mca/btl/btl.h -- nclude _after_ #ifndef MCA_BTL_H
- ompi/mca/crcp/bkmrk/crcp_bkmrk_btl.c -- still no need for
orte/util/output.h
- ompi/mca/pml/dr/pml_dr_recvreq.c -- no need for mpool.h
- ompi/mca/btl/btl.h -- reorder to fit
- ompi/mca/bml/bml.h -- reorder to fit
- ompi/runtime/ompi_mpi_finalize.c -- reorder to fit
- ompi/request/request.h -- additionally need ompi/constants.h
- Tested on linux/x86-64
This commit was SVN r20720.
intended. In truth, any unique value will do, but he's right that
having a regular, recognizeable, repeatable value is probably much
better for debugging purposes.
This commit was SVN r13341.
and George on these refinements):
* Rename the static OBJ initializer macro to be
OPAL_OBJ_STATIC_INIT(class)
* Ensure that all static OBJ initializations get a refcount of 1
(doesn't ''really'' matter, since they're static, it should never
get to the point where the OBJ is DESTRUCTed, but more correct
nonetheless)
* Add a "magic number" to the OBJ when compiling with debug support.
The magic number does some rudimentary support to ensure that
you're operating on a valid OBJ (and fails an assertion if you're
not). Check to ensure that the memory contains the magic number
when performing actions of OBJ's. Also remove the magic number
when DESTRUCTing OBJs, so that if, for example, an OBJ is
DESTRUCTed more than once, we'll fail the magic number assert.
This commit was SVN r13338.
The following SVN revision numbers were found above:
r13227 --> open-mpi/ompi@96030de97b
r13228 --> open-mpi/ompi@c2e9075d29
The same treatement will happens on all sub-projects. The .h files
have to be C++ compatibles and all symbols with an external visibility
have to get the {PROJECT}_DECLSPEC in front of the prototype.
This commit was SVN r11340.
different macros, one for each project. Therefore, now we have OPAL_DECLSPEC,
ORTE_DECLSPEC and OMPI_DECLSPEC. Please use them based on the sub-project.
This commit was SVN r11270.
add object size to opal class
no longer need the size when allocating a new object as this is stored in
the class structure
--- dr changes
Previous rev. maintained state on the communicator used for acking duplicate
fragments, but the communicator may be destroyed prior to successfull
delivery of an ack to the peer. We must therefore maintain this state
globally on a per peer, not a per peer, per communicator basis.
This requires that we use a global rank on the wire and translate this as
appropriate to a local rank within the communicator.
This commit was SVN r9454.
- move files out of toplevel include/ and etc/, moving it into the
sub-projects
- rather than including config headers with <project>/include,
have them as <project>
- require all headers to be included with a project prefix, with
the exception of the config headers ({opal,orte,ompi}_config.h
mpi.h, and mpif.h)
This commit was SVN r8985.
than I want to) on the constructor and destructor loops. Compress the constructors and
destructors array to remove all the useless tests against NULL. Now we use the cache a
little bit more efficient.
Correct a threading problem in the obj_update function. In the threaded case we have to
return the value returned by the ompi_atomic_add function otherwise there are ways
leading to the release of an object twice.
This commit was SVN r8966.
an object has been created. I slightly change this behaviour. Now, during the life time of an object (when
the reference count is > 0) we keep the place where the object was created and just before freeing the object
we set the location where the object get destroyed. So when we try to release an already destroyed object
we have the location where it happens (where the object get destroyed for the first time).
This commit was SVN r6428.