1
1
Граф коммитов

144 Коммитов

Автор SHA1 Сообщение Дата
George Bosilca
0425a7a7d8 Consistent return from all progress functions.
This fix ensures that all progress functions return the number of
completed events.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
(cherry picked from commit 72501f8f9c)
2020-03-30 19:00:03 +02:00
Joseph Schuchart
7b1beb0f6c Harmonize return values of progress callbacks
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
(cherry picked from commit 2c97187ee0)
2020-03-30 18:58:57 +02:00
Joseph Schuchart
b7f5c17d83 Ensure that grequestx continuously make progress
Signed-off-by: Joseph Schuchart <schuchart@hlrs.de>
(cherry picked from commit 37e6bbb1e1)
2019-10-29 10:31:23 +01:00
George Bosilca
8d892f9917 Be conservative with the array_of_indices
We were assuming that the array_of_indices has the same size as the
number of requests (incount), instead of the numberr of actually
active requests. While the patch is trivial, the question of the
size of the array_of_indices should be clarified in the MPI Forum.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
(cherry picked from commit a5fbfa476a)
2018-09-18 12:05:51 -07:00
Gilles Gouaillardet
7363906e4e io/romio321: make grequest extensions internal
Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-06-29 16:41:27 +09:00
Gilles Gouaillardet
e609cf7bc3
Merge pull request #5337 from ggouaillardet/topic/generalized_requests
ompi/requests: implement generalized request extensions
2018-06-26 13:01:04 +09:00
Gilles Gouaillardet
383f23bf35 ompi/request: implement MPI Generalized request extensions
so latest ROM-IO can be used with Open MPI.

Note this first and naive implementation does not use the wait_fn callback.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2018-06-26 10:52:18 +09:00
KAWASHIMA Takahiro
e72f510daf ompi/request: Add ompi_request_persistent_noop_create
Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2018-06-11 17:22:16 +09:00
Nathan Hjelm
9d0b3fe9f4 opal/asm: remove opal_atomic_bool_cmpset functions
This commit eliminates the old opal_atomic_bool_cmpset functions. They
have been replaced by the opal_atomic_compare_exchange_strong
functions.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2017-11-30 10:41:22 -07:00
Nathan Hjelm
3ff34af355 opal: rename opal_atomic_cmpset* to opal_atomic_bool_cmpset*
This commit renames the atomic compare-and-swap functions to indicate
the return value. This is in preperation for adding support for a
compare-and-swap that returns the old value. At the same time the
return type has been changed to bool.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2017-10-31 12:47:23 -06:00
KAWASHIMA Takahiro
0cbdbe32f7 ompi/request: Support non-PML persistent requests
This commit adds the `req_start` member to the `ompi_request_t` struct.
The `MPI_START` and `MPI_STARTALL` routines call this callback function
instead of `MCA_PML_CALL(start(...))`. So components that return
persistent request must set this member to their request objects.

`mca_pml_base_module_t::pml_start` is not deleted because
`MCA_PML_CALL(start(...))` is still used elsewhere across OMPI.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2017-06-02 13:08:17 +09:00
Jeff Squyres
d520c24f3a predefined MPI object padding: set to fixed number of bytes (#3634)
Convert the predefined MPI object padding to a fixed number of bytes
(vs. a multiple of sizeof(void*)) so that the padding is the same size
between 32 and 64 bit builds.  I.e., we won't have a situation where
we've run out of padding in 32 bit builds but still have more space
available in 64 bit builds.

Fixes #3610

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
2017-06-01 15:28:23 -04:00
bosilca
872cf44c28 Improve the opal_pointer_array & more (#3369)
* Complete rewrite of opal_pointer_array
Instead of a cache oblivious linear search use a bits array
to speed up the management of the free space. As a result we
slightly increase the memory used by the structure, but we get a
significant boost in performance.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>

* Do not register datatypes in the f2c translation table.
The registration is now done up into the Fortran layer, by
forcing a call to MPI_Type_c2f.

Signed-off-by: George Bosilca <bosilca@icl.utk.edu>
2017-04-18 21:41:26 -04:00
Ralph Castain
dadc6fbaf6 Merge pull request #2448 from thananon/remove_request_lock
Completely removed ompi_request_lock and ompi_request_cond
2017-01-03 19:31:46 -08:00
KAWASHIMA Takahiro
6510800c16 ompi/request: Fix a persistent request creation bug
According to the MPI-3.1 p.52 and p.53 (cited below), a request
created by `MPI_*_INIT` but not yet started by `MPI_START` or
`MPI_STARTALL` is inactive therefore `MPI_WAIT` or its friends
must return immediately if such a request is passed.

The current implementation hangs in `MPI_WAIT` and its friends
in such case because a persistent request is initialized as
`req_complete = REQUEST_PENDING`. This commit fixes the
initialization.

Also, this commit fixes internal requests used in `MPI_PROBE`
and `MPI_IPROBE` which was marked wrongly as persistent.

MPI-3.1 p.52:

We shall use the following terminology: A null handle is a handle
with value MPI_REQUEST_NULL. A persistent request and the handle
to it are inactive if the request is not associated with any ongoing
communication (see Section 3.9). A handle is active if it is neither
null nor inactive. An empty status is a status which is set to return
tag = MPI_ANY_TAG, source = MPI_ANY_SOURCE, error = MPI_SUCCESS, and
is also internally configured so that calls to MPI_GET_COUNT,
MPI_GET_ELEMENTS, and MPI_GET_ELEMENTS_X return count = 0 and
MPI_TEST_CANCELLED returns false. We set a status variable to empty
when the value returned by it is not significant. Status is set in
this way so as to prevent errors due to accesses of stale information.

MPI-3.1 p.53:

One is allowed to call MPI_WAIT with a null or inactive request
argument. In this case the operation returns immediately with empty
status.

Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
2016-12-08 21:42:05 +09:00
Thananon Patinyasakdikul
6c5553c23c Removed the unused ompi_request_[waiting, completed, failed, poll] variable.
Signed-off-by: Thananon Patinyasakdikul <tpatinya@utk.edu>
2016-11-23 10:39:45 -05:00
Ralph Castain
1e2019ce2a Revert "Update to sync with OMPI master and cleanup to build"
This reverts commit cb55c88a8b.
2016-11-22 15:03:20 -08:00
Thananon Patinyasakdikul
b25a8c3fa5 Completely removed ompi_request_lock and ompi_request_cond as we dont need them anymore.
Signed-off-by: Thananon Patinyasakdikul <tpatinya@utk.edu>
2016-11-22 17:58:31 -05:00
Ralph Castain
cb55c88a8b Update to sync with OMPI master and cleanup to build
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2016-11-22 14:24:54 -08:00
Joshua Hursey
f6f24a4f67 build: Custom libmpi(_FOO) name option in configure
* Add a configure time option to rename libmpi(_FOO).*
   - `--with-libmpi-name=STRING`
 * This commit only impacts the installed libraries.
   Internal, temporary libraries have not been renamed to limit the
   scope of the patch to only what is needed.

For example:
```shell
shell$ ./configure --with-libmpi-name=wookie
...
shell$ find . -name "libmpi*"
shell$ find . -name "libwookie*"
./lib/libwookie.so.0.0.0
./lib/libwookie.so.0
./lib/libwookie.so
./lib/libwookie.la
./lib/libwookie_mpifh.so.0.0.0
./lib/libwookie_mpifh.so.0
./lib/libwookie_mpifh.so
./lib/libwookie_mpifh.la
./lib/libwookie_usempi.so.0.0.0
./lib/libwookie_usempi.so.0
./lib/libwookie_usempi.so
./lib/libwookie_usempi.la
shell$
```
2016-09-29 21:47:24 -05:00
George Bosilca
803897a915 Correctly indent the code. 2016-09-21 07:46:53 -04:00
Artem Polyakov
84e178ce94 Merge pull request #1821 from artpol84/fix_waitsome_v2
MPI_Waitsome performance improvement (version #2)
2016-09-08 13:55:37 +07:00
Gilles Gouaillardet
91e1200c14 ompi/request: correctly handle zero count in ompi_request_default_wait_{all,any,some} 2016-09-05 17:19:30 +09:00
Nathan Hjelm
6aa658ae33 ompi/request: change semantics of ompi request callbacks
This commit changes the sematics of ompi request callbacks. If a
request's callback has freed or re-posted (using start) a request
the callback must return 1 instead of OMPI_SUCCESS. This indicates
to ompi_request_complete that the request should not be modified
further. This fixes a race condition in osc/pt2pt that could lead
to the req_state being inconsistent if a request is freed between
the callback and setting the request as complete.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-08-17 20:14:01 -06:00
George Bosilca
087761c2dc Fix a warning and other small cleanups. 2016-08-02 17:33:53 +02:00
Nathan Hjelm
f38cc00df9 Merge pull request #1835 from hjelmn/thread_fix
ompi/request: fix hang in ompi_request_wait_completion
2016-06-30 18:50:32 -06:00
Nathan Hjelm
445b79bba8 ompi/request: fix hang in ompi_request_wait_completion
This commit fixes a hang reported by @nysal which happens when a
request is completed after a sync object is created but before the
sync object can be assigned to the request. In this case we need to
set the sync signaling field to false to ensure WAIT_SYNC_RELEASE does
not hang.

Fixes open-mpi/ompi#1828

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-06-30 09:54:00 -06:00
Artem Polyakov
732d89095b MPI_Waitsome performance improvement
by avoiding extra atomic exchanges.

Use indices array to mark already completed connections
in the pre-wait loop to avoid extra atomic exchanges
in the after-wait loop.
2016-06-29 20:40:41 +06:00
Artem Polyakov
541715572f Fix MPI_Waitany and MPI_Waitsome
(request handling related)
2016-06-28 16:40:00 +03:00
Nathan Hjelm
143a93f379 opal/sync: remove usage of OPAL_ENABLE_MULTI_THREADS
The OPAL_ENABLE_MULTI_THREADS macro is always defined as 1. This was
causing us to always use the multi-thread path for synchronization
objects. The code has been updated to use the opal_using_threads()
function. When MPI_THREAD_MULTIPLE support is disabled at build time
(2.x only) this function is a macro evaluating to false so the
compiler will optimize out the MT-path in this case. The
OPAL_ATOMIC_ADD_32 macro has been removed and replaced by the existing
OPAL_THREAD_ADD32 macro.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-06-22 09:52:37 -06:00
Nathan Hjelm
544adb9aed ompi/request: fix performance regression
This commit fixes a performance regression introduced by the request
rework. We were always using the multi-thread path because
OPAL_ENABLE_MULTI_THREADS is either not defined or always defined to 1
depending on the Open MPI version. To fix this I removed the
conditional and added a conditional on opal_using_threads(). This path
will be optimized out in 2.0.0 in a non-thread-multiple build as
opal_using_threads is #defined to false in that case.

Fixes open-mpi/ompi#1806

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-06-21 11:45:32 -06:00
Nathan Hjelm
5a4adb866d ompi/request: fix loop conditional
This commit fixes a bug in waitany that causes the code to go past the
beginning of the request array. The loop conditional i >= 0 is invalid
since i is unsigned. Changed to loop to check (i+1) > 0.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-06-07 10:28:46 -06:00
George Bosilca
fc5d458249 Consistency in handling OPAL_ENABLE_FT_CR.
I am not sure if we should continue to maintain the request support
for FT_CR, but I tried here to simplify the code while maintaining
the same meaning.
2016-06-03 00:54:24 +09:00
Nathan Hjelm
b001184e63 request: fix warnings (#1742)
Fix warnings introduced by request rework.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
2016-06-02 04:53:16 -04:00
George Bosilca
bfcf145613 Refactor the request test and wait functions. 2016-06-02 11:58:25 +09:00
George Bosilca
50cec456fb ompi_request_complete with signal
Rewrite the ompi_request_complete function to take in account the
with_signal argument. Change the comment to explain the expected
behavior.
Alter all the ompi_request_complete uses to make sure the status of the
request is set before calling ompi_request_complete.

bot🏷️enhancement
2016-06-02 11:49:12 +09:00
Nathan Hjelm
0591139f49 ompi/request: fix bugs in MPI_Wait_some and MPI_Wait_any
This commit fixes two bugs in MPI_Wait_any:

 - If all requests are inactive then the sync wait would hang forever
   because no requests are attached to the sync.

 - The request pointer was pointing to the request before the completed
   request which caused the wrong request to be freed or marked inactive.

MPI_Wait_some had a similar issue if all the requests were pending.

These issues were identified by MTT.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-05-27 12:36:10 -06:00
Nathan Hjelm
ef11ba9394 request: fix compilation error
The request.h header is unfortunately included files in the C++
bindings. C++ does not allow assigning from void * to another
pointer without a cast. This commit adds the cast. We can clean this
up when the C++ bindings are deleted.

Fixes open-mpi/ompi#1707

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-05-25 09:52:23 -06:00
bosilca
b90c83840f Refactor the request completion (#1422)
* Remodel the request.
Added the wait sync primitive and integrate it into the PML and MTL
infrastructure. The multi-threaded requests are now significantly
less heavy and less noisy (only the threads associated with completed
requests are signaled).

* Fix the condition to release the request.
2016-05-24 18:20:51 -05:00
George Bosilca
bf190671e9 Make the request lock recursive.
If during the request completion callback we post another request that
completes right away (such a small send or a match for an unexpected
short message) we will try to complete the second request while holding
the lock for the completion of the first. For performance reasons
(mainly to avoid unlocking and locking the request mutex several times)
we have made the request lock recursive.
2016-04-26 16:16:07 -04:00
Ralph Castain
869041f770 Purge whitespace from the repo 2015-06-23 20:59:57 -07:00
Gilles Gouaillardet
9d56b85b55 initialize common symbols from ompi 2015-05-08 10:11:58 +09:00
Nathan Hjelm
5f1254d710 Update code base to use the new opal_free_list_t
Use of the old ompi_free_list_t and ompi_free_list_item_t is
deprecated. These classes will be removed in a future commit.

This commit updates the entire code base to use opal_free_list_t and
opal_free_list_item_t.

Notes:

OMPI_FREE_LIST_*_MT -> opal_free_list_* (uses opal_using_threads ())

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2015-02-24 10:05:45 -07:00
Ralph Castain
552c9ca5a0 George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT:    Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL

All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies.  This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP.  Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose.  UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs.  A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.

This commit was SVN r32317.
2014-07-26 00:47:28 +00:00
Ralph Castain
f3cb124e50 Revert r32082 and r32070 - the developer's conference has decided to go a different direction on the threaded progress effort. This will involve some degree of prototyping to understand the tradeoffs prior to making a final design decision, and so we'll hold off on the final change until that is completed.
This commit was SVN r32089.

The following SVN revision numbers were found above:
  r32070 --> open-mpi/ompi@12d92d0c22
  r32082 --> open-mpi/ompi@aa6438ef7a
2014-06-25 20:43:28 +00:00
Ralph Castain
12d92d0c22 Per the OMPI developer conference, remove the last vestiges of OMPI_USE_PROGRESS_THREADS
This commit was SVN r32070.
2014-06-24 17:05:11 +00:00
Nathan Hjelm
195c892a9d Add support for MPI_Comm_dup_with_info, MPI_Comm_create_group, and
MPI_Comm_idup.

As part of this work I implemented a basic request scheduler in
ompi/comm/comm_request.c. This scheduler might be useful for more
than just communicator requests and could be moved to ompi/request
if there is a demand. Otherwise I will leave it where it is.

Added a non-blocking version of ompi_comm_set to support ompi_comm_idup.
The call makes a recursive call to comm_dup and a non-blocking version
was needed. To simplify the code the blocking version calls the nonblocking
version and waits on the resulting request if one exists.

cmr=v1.7.4:reviewer=jsquyres:ticket=trac:3796

This commit was SVN r29334.

The following Trac tickets were found above:
  Ticket 3796 --> https://svn.open-mpi.org/trac/ompi/ticket/3796
2013-10-02 14:26:40 +00:00
Joshua Ladd
d1af0e2041 Removing a silly check in the critical path
This commit was SVN r29247.
2013-09-25 21:34:57 +00:00
Joshua Ladd
82e092db1b Adding interface changes in hcoll component to support non-blocking collectives in libhcoll. This was added by Elena Elkina and reviewed by Josh Ladd.
cmr:v1.7.3:reviewer=jladd:subject=Add support for non-blocking collectives in hcoll

This commit was SVN r29244.
2013-09-25 16:14:59 +00:00
Dave Goodell
d1b5940e97 don't call OMPI_REQUEST_INIT in req constructor
Calling OMPI_REQUEST_INIT puts the request into an _INACTIVE state
instead of an _INVALID state, which we don't want if it's been
simply been constructed, e.g., in a free_list.  Without this change a
future change to call destructors at free list destruction time will
result in request dtor state assertion failures.

Reviewed-by: bosilca

cmr=v1.7.4:reviewer=bosilca

This commit was SVN r29095.
2013-08-29 22:56:22 +00:00