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

439 Коммитов

Автор SHA1 Сообщение Дата
Geoff Paulsen
4917e44a7d Merge pull request #2832 from jjhursey/topic/ibm/osc-base-dt-abort
osc/base: Detect unsupported data types and abort
2017-02-05 04:26:04 -06:00
Nathan Hjelm
362ac8b87e osc/pt2pt: fix threading issues
This commit fixes a number of threading issues discovered in
osc/pt2pt. This includes:

 - Lock the synchronization object not the module in osc_pt2pt_start.
   This fixes a race between the start function and processing post
   messages.

 - Always lock before calling cond_broadcast. Fixes a race between
   the waiting thread and signaling thread.

 - Make all atomically updated values volatile.

 - Make the module lock recursive to protect against some deadlock
   conditions. Will roll this back once the locks have been
   re-designed.

 - Mark incoming complete *after* completing an accumulate not
   before. This was causing an incorrect answer under certain
   conditions.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2017-02-01 10:33:01 -07:00
Nysal Jan K.A
94f92f6b49 osc/base: Detect unsupported data types and abort
Using MPI_MINLOC or MPI_MAXLOC with the following data types
leads to data corruption:
 * MPI_DOUBLE_INT
 * MPI_LONG_INT
 * MPI_SHORT_INT
 * MPI_LONG_DOUBLE_INT

Detect this print a error message and abort.
This workaround should be removed once the following issue is resolved:
 * https://github.com/open-mpi/ompi/issues/1666

Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
2017-01-25 15:28:28 -06: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
Mark Allen
eec1d5bf2e osc/pt2pt: Fix hang with Put and Win_lock_all
* When using `MPI_Put` with `MPI_Win_lock_all` a hang is possible since
   the `put` is waiting on `eager_send_active` to become `true` but
   that variable might not be reset in the case of `MPI_Win_lock_all`
   depending on other incoming events (e.g., `post` or ACKs of lock
   requests.

Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
2016-12-16 11:52:53 -05:00
Mark Allen
0d1336b4a8 osc/pt2pt: Fix Lock/Unlock and Get wrong answer
* When using `MPI_Lock`/`MPI_Unlock` with `MPI_Get` and non-contiguous
   datatypes is is possible that the unlock finishes too early before
   the data is actually present in the recv buffer.
 * We need to wait for the irecv to complete before unlocking the target.
   This commit waits for the outgoing fragment counts to become equal
   before unlocking.

Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
2016-12-16 11:52:51 -05:00
Mark Allen
1ebf9fd3a4 osc/pt2pt: Fix PSCW after Fence wrong answer.
* If the user uses PSCW synchronization after a Fence then the previous
   epoch is not reset which can cause the PSCW to transfer data before
   it is ready leading to wrong answers.
 * This commit resets the `eager_send_active` in the start call.

Signed-off-by: Joshua Hursey <jhursey@us.ibm.com>
2016-12-16 11:52:49 -05:00
Ralph Castain
585540bcee Reduce the flood of warnings due to uninitialized variables, mismatched types, and unused things to a more bearable trickle
Signed-off-by: Ralph Castain <rhc@open-mpi.org>
2016-12-14 16:33:50 -08: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
Gilles Gouaillardet
bd364d29f7 osc/sm: plug an other memory leak in ompi_osc_sm_free
Fixes open-mpi/ompi@f1b473ee63

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2016-11-14 23:19:07 -07:00
Gilles Gouaillardet
f1b473ee63 osc/sm: plug a memory leak in ompi_osc_sm_free
Thanks Joseph Schuchart for the report.

Signed-off-by: Gilles Gouaillardet <gilles@rist.or.jp>
2016-11-14 22:22:43 -07:00
Gilles Gouaillardet
958e29f929 osc/rdma: silence a warning
declare a local variable volatile and silence CID 1372692
2016-10-13 16:10:07 +09:00
Nathan Hjelm
e8ef503bee osc/rdma: fix warnings
Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-10-12 10:17:25 -06:00
Nathan Hjelm
432d79046b Merge pull request #2197 from tkordenbrock/topic/master/osc-rdma.put.use.true_extent
osc-rdma: fix datatype lower bound errors in ompi_osc_rdma_master()
2016-10-11 10:42:02 -06:00
Todd Kordenbrock
05f86b5df7 osc-rdma: fix datatype lower bound errors in ompi_osc_rdma_master()
Instead of ompi_datatype_get_extent(), use ompi_datatype_get_true_extent()
to get the local and remote lower bound.  For derived types like
subarray, true_lb is the correct offset for RDMA operations.
2016-10-10 06:45:28 -05:00
Todd Kordenbrock
cc863ff9fb osc-portals4: fix datatype errors in put()
Instead of ompi_datatype_get_extent(), use ompi_datatype_get_true_extent()
to get the origin and target lower bound.  For derived types like
subarray, true_lb is the correct offset for RDMA operations.  Also,
instead of the extent use the size of the datatype.
2016-10-10 06:45:14 -05:00
Todd Kordenbrock
c536e11cf3 osc-portals4: fix offset bug in raccumulate()
This commit fixes a bug where the remote offset was used as both
the local and remote offset.

Thanks to @PDeveze for the patch.
2016-10-04 09:09:17 -05:00
Nathan Hjelm
59bae1a330 osc/rdma: fix typo in compare-and-swap
This commit fixes a typo in compare-and-swap when retrieving the
memory region associated with a displacement. It was erroneously 8
bytes instead of the datatype size. This can cause an incorrect RMA
range error when the compare-and-swap is less than 4 bytes from the
end of the region.

Fixed open-mpi/ompi#2080

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-09-14 16:49:42 -06:00
Nathan Hjelm
7c8e7691a7 Merge pull request #2045 from hjelmn/osc_rdma_atomics
osc/rdma: add support for network AMOs
2016-09-08 11:21:49 -06:00
Nathan Hjelm
1ce5847e8b osc/rdma: add support for network AMOs
This commit adds support for using network AMOs for MPI_Accumulate,
MPI_Fetch_and_op, and MPI_Compare_and_swap. This support is only
enabled if the ompi_single_intrinsic info key is specified or the
acc_single_interinsic MCA variable is set. This configuration
indicates to this implementation that no long accumulates will be
performed since these do not currently mix with the AMO
implementation.

This commit also cleans up the code somwhat. This includes removing
unnecessary struct keywords where the type is also typedef'd.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-09-01 15:47:33 -06:00
Nathan Hjelm
cb1cb5ffed osc/pt2pt: do not use frag send to send lock request
This commit cleans up some code in the passive target path. The code
used the buffered frag control send path but it is more appropriate to
use the unbuffered one. This avoids checking structures that are
should not be in use in this path.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-09-01 09:57:27 -06:00
Nathan Hjelm
99b26644c1 Merge pull request #2011 from hjelmn/osc_pt2pt_fix
osc/pt2pt: fix possible race in peer locking
2016-08-29 09:17:36 -06:00
Nathan Hjelm
e53de7ecbe osc/rdma: fix bug in dynamic memory window tracking code
This commit fixes an ordering bug in the code that keeps track of all
attached memory windows. The code is intended to keep the memory
regions sorted but was often inserting at the wrong index. Thanks to
Christoph Niethammer for reporting the issue. The reproducer will be
added to nightly MTT testing.

Fixes open-mpi/ompi#2012

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-08-25 12:08:46 -06:00
Nathan Hjelm
7af138f83b osc/pt2pt: fix possible race in peer locking
It is possible for another thread to process a lock ack before the
peer is set as locked. In this case either setting the locked or the
eager active flag might clobber the other thread. To address this the
flags have been made volatile and are set atomically. Since there is
no a opal_atomic_or or opal_atomic_and function just use cmpset for
now.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-08-25 09:28:25 -06:00
Nathan Hjelm
70f8a6e792 osc/pt2pt: fix several bugs
This commit fixes some bugs uncovered during thread testing of
2.0.1rc1. With these fixes the component is running cleanly with
threads.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-08-24 14:35:45 -06:00
Ralph Castain
6549c878a9 Silence the warnings 2016-08-22 15:35:27 -07:00
Nathan Hjelm
e5c7512692 Merge pull request #1983 from hjelmn/request_cb
ompi/request: change semantics of ompi request callbacks
2016-08-18 08:31:56 -06: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
Nathan Hjelm
40b70889e5 osc/pt2pt: make receive count an unsigned int
This receive_count MCA variable should never be negative. Change it
to an unsigned int.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
2016-08-17 08:14:24 -06:00
Gilles Gouaillardet
8faa1edafa osc/pt2pt: silence misc warnings 2016-08-17 14:24:14 +09:00
Nathan Hjelm
9444df1eb7 osc/pt2pt: make lock_all locking on-demand
The original lock_all algorithm in osc/pt2pt sent a lock message to
each peer in the communicator even if the peer is never the target of
an operation. Since this scales very poorly the implementation has
been replaced by one that locks the remote peer on first communication
after a call to MPI_Win_lock_all.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-08-11 15:33:07 -06:00
Nathan Hjelm
7589a25377 osc/pt2pt: do not repost receive from request callback
This commit fixes an issue that can occur if a target gets overwhelmed with
requests. This can cause osc/pt2pt to go into deep recursion with a stack
like req_complete_cb -> ompi_osc_pt2pt_callback -> start -> req_complete_cb
-> ... . At small scale this is fine as the recursion depth stays small but
at larger scale we can quickly exhaust the stack processing frag requests.
To fix the issue the request callback now simply puts the request on a
list and returns. The osc/pt2pt progress function then handles the
processing and reposting of the request.

As part of this change osc/pt2pt can now post multiple fragment receive
requests per window. This should help prevent a target from being overwhelmed.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
2016-08-11 15:33:07 -06:00
Nathan Hjelm
11c853d05e osc/pt2pt: do not set rdma_frag after start
It is possible for the start call to complete the requests. For this
reason the module rdma_frag field should be filled in before start is
called. If the request completes the completion callback will reset
the rdma_frag field to NULL. Fixes a bug discovered by @tkordenbrock.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-08-03 15:20:36 -06:00
Nathan Hjelm
aac611237b opal/thread: clean up and add additional OPAL_THREAD macros
This commit expands the OPAL_THREAD macros to include 32- and 64-bit
atomic swap. Additionally, macro declararations have been updated to
include both OPAL_THREAD_* and OPAL_ATOMIC_*. Before this commit the
former was used with add and the later with cmpset.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
2016-07-28 09:23:14 -06:00
Pascal Deveze
f19a2b961c osc/portals4: Correct an error in an if statement 2016-07-18 13:16:12 +02:00
Pascal Deveze
81823d7a63 osc/portals4: Store the no_locks parameter in osc_portals4_component.no_locks 2016-07-18 11:51:52 +02:00
Pascal Deveze
76b38651da osc/portals4: For the contiguous datatype, take into account the lower bound before calling portals4 2016-07-18 11:20:50 +02:00
Pascal Deveze
7aaf16e7fe osc/portals4: Put/Get splitting because Portals4 may restrict sizes 2016-07-18 10:49:28 +02:00
Pascal Deveze
025201b459 osc/portals4: set the initial value of req_status.MPI_ERROR to MPI_SUCCESS 2016-07-18 09:52:56 +02:00
Pascal Deveze
aa0d687a0a osc/portals4: Display an ouput message if ompi_osc_portals4_get_dt() or ompi_osc_portals4_get_op() returns an error 2016-07-18 09:52:56 +02:00
Pascal Deveze
c4181909a4 osc/portals4: Be sure that the ME are operationnal (wait for the PTL_EVENT_LINK) 2016-07-18 09:52:56 +02:00
Pascal Deveze
e99e7d08ed osc/portals4: For the ME, use the uid from PtlGetUid instead of PTL_UID_ANY 2016-07-18 09:52:56 +02:00
Pascal Deveze
56b36eeb7e osc/portals4: Format of "target_disp" is OPAL_PTRDIFF_TYPE and %lu is the appropriate format to display it. 2016-07-18 09:52:55 +02:00
Pascal Deveze
a76566c754 osc/portals4: To allocate a PT, use REQ_OSC_TABLE_ID and test that the right ID is allocated 2016-07-18 09:52:55 +02:00
Nathan Hjelm
b47208e909 osc/rdma: fix bug in CAS
This commit fixes a bug in the RDMA compare-and-swap implementation
that caused the origin value to always be written even if the compare
should have failed.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-07-11 09:54:23 -06:00
Nathan Hjelm
2409024c17 osc/rdma: fix typo
Need to increment the total size after checking the local offset not
before. This typo causes large allocations with MPI_Win_allocate() to
fail.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>
2016-06-21 09:50:29 -06:00
Nathan Hjelm
e968ddfe64 start bug fixes (#1729)
* mpi/start: fix bugs in cm and ob1 start functions

There were several problems with the implementation of start in Open
MPI:

 - There are no checks whatsoever on the state of the request(s)
   provided to MPI_Start/MPI_Start_all. It is erroneous to provide an
   active request to either of these calls. Since we are already
   looping over the provided requests there is little overhead in
   verifying that the request can be started.

 - Both ob1 and cm were always throwing away the request on the
   initial call to start and start_all with a particular
   request. Subsequent calls would see that the request was
   pml_complete and reuse it. This introduced a leak as the initial
   request was never freed. Since the only pml request that can
   be mpi complete but not pml complete is a buffered send the
   code to reallocate the request has been moved. To detect that
   a request is indeed mpi complete but not pml complete isend_init
   in both cm and ob1 now marks the new request as pml complete.

 - If a new request was needed the callbacks on the original request
   were not copied over to the new request. This can cause osc/pt2pt
   to hang as the incoming message callback is never called.

Signed-off-by: Nathan Hjelm <hjelmn@lanl.gov>

* osc/pt2pt: add request for gc after starting a new request

Starting a new receive may cause a recursive call into the pt2pt
frag receive function. If this happens and the prior request is
on the garbage collection list it could cause problems. This commit
moves the gc insert until after the new request has been posted.

Signed-off-by: Nathan Hjelm <hjelmn@me.com>
2016-06-02 20:22:40 -04: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