-
Notifications
You must be signed in to change notification settings - Fork 900
osc pt2pt wrong answer #2505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A couple more data points running mpirun -np 2 -mca pml ob1 -mca osc pt2pt -mca btl VALUE ./small_1sided
For one of the hangs this is the backtrace (both processes are in the same location): (gdb) bt
#0 0x00003fff77da2e44 in clock_gettime () from /lib64/power8/libc.so.6
#1 0x00003fff7773d37c in gettime (base=0x10034a1f2e0, tp=0x10034a1f450) at event.c:370
#2 0x00003fff77741f40 in event_base_loop (base=0x10034a1f2e0, flags=<optimized out>) at event.c:1624
#3 0x00003fff778a38b8 in opal_progress () at ompi/opal/runtime/opal_progress.c:207
#4 0x00003fff74f9a990 in opal_condition_wait (c=0x10034bbac38, m=0x10034bbabd0)
at ompi/opal/threads/condition.h:72
#5 0x00003fff74f9d0dc in ompi_osc_pt2pt_wait (win=0x10034bba9a0)
at ompi/ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c:519
#6 0x00003fff780c8318 in PMPI_Win_wait (win=0x10034bba9a0) at pwin_wait.c:52
#7 0x000000001000317c in main_test_fn ()
#8 0x0000000010004348 in runtest ()
#9 0x00000000100043d4 in main ()
(gdb)
#5 0x00003fff74f9d0dc in ompi_osc_pt2pt_wait (win=0x10034bba9a0)
at ompi/ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c:519
519 opal_condition_wait(&module->cond, &module->lock);
(gdb) l
514 module->active_incoming_frag_count != module->active_incoming_frag_signal_count) {
515 OPAL_OUTPUT_VERBOSE((25, ompi_osc_base_framework.framework_output, "num_complete_msgs = %d, "
516 "active_incoming_frag_count = %d, active_incoming_frag_signal_count = %d",
517 module->num_complete_msgs, module->active_incoming_frag_count,
518 module->active_incoming_frag_signal_count));
519 opal_condition_wait(&module->cond, &module->lock);
520 }
521
522 group = module->pw_group;
523 module->pw_group = NULL; The whole module structure is a bit big, but here are some of the top level variables from the first process: accumulate_ordering = true,
no_locks = false,
free_after = 0x0,
baseptr = 0x3fff99df0010,
comm = 0x1003d0fea50,
disp_unit = 4,
epoch_outgoing_frag_count = 0x1003d0f53e0,
tag_counter = 2473132,
outgoing_frag_count = 1911377,
outgoing_frag_signal_count = 1911377,
active_incoming_frag_count = 933106,
active_incoming_frag_signal_count = 933106,
passive_target_access_epoch = 0,
pw_group = 0x1003d1188d0,
num_complete_msgs = -1,
lock_status = 0,
recv_frags = 0x1003d101230,
recv_frag_count = 4, Here is the same information from the second process: accumulate_ordering = true,
no_locks = false,
free_after = 0x0,
baseptr = 0x3fff74a20010,
comm = 0x10034bbe9f0,
disp_unit = 4,
epoch_outgoing_frag_count = 0x10034ba17d0,
tag_counter = 2473128,
outgoing_frag_count = 1911374,
outgoing_frag_signal_count = 1911374,
active_incoming_frag_count = 933108,
active_incoming_frag_signal_count = 933108,
passive_target_access_epoch = 0,
pw_group = 0x10034bd8870,
num_complete_msgs = 1,
lock_status = 0,
recv_frags = 0x10034bc12a0,
recv_frag_count = 4, I don't know the one sided code, but from the variables above |
It should be noted that |
@hjelmn Have you been able to make any progress on this? I know @jjhursey and @markalle were working on this over the weekend, and noticed some inconsistencies in completion counting in osc_pt2pt in v2.0.x (and master). Comparing with v1.10, it looks like that code was restructured quite a bit, so difficult to pinpoint to a specific commit. |
@jjhursey made some progress today as well. I'm not posting the full details here. But if others are working on this, it'd be good to sync up with Josh.
|
The timeline below shows an interleaving of two ranks that always leads to a wrong answer.
Notice that at Notice also that the We believe that the |
The patch below seems to fix the issue with a single threaded test [ diff --git a/ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c b/ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c
index 3c086a42..4ecad212 100644
--- a/ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c
+++ b/ompi/mca/osc/pt2pt/osc_pt2pt_active_target.c
@@ -227,6 +227,12 @@ int ompi_osc_pt2pt_start (ompi_group_t *group, int assert, ompi_win_t *win)
/* haven't processed any post messages yet */
sync->sync_expected = sync->num_peers;
+ /* If the previous epoch was from Fence, then eager_send_active is still
+ * set to true at this time, but it shoulnd't be true until we get our
+ * incoming Posts. So reset to 'false' for this new epoch.
+ */
+ sync->eager_send_active = false;
+
OPAL_OUTPUT_VERBOSE((50, ompi_osc_base_framework.framework_output,
"ompi_osc_pt2pt_start entering with group size %d...",
sync->num_peers)); We are tracking a multithreaded one-sided issue at the moment which is related to this issue. That is the |
* Fixes Issue open-mpi#2505
@jjhursey could you provide more info about the particular case gave the wrong answer? Does it look like a particular use case for OSC? Or was it just a matter of chance/timing that the test failed? |
The outline of this phase of the test program looks roughly like this (at all ranks)
I'll work with @markalle on trying to get a smaller version to share. |
@markalle and I worked on this test case a bit more yesterday, and we think it is a test case issue. I'm working this morning to confirm that. If confirmed then we can close this issue and open another to track the multi-threading issues. |
Using the testcase small_1sided.c from this test harness pull request:
https://github.com/open-mpi/ompi-tests/pull/25
I get wrong answers from the osc pt2pt component:
In cases where it's able to use osc rdma it seems to work.
This was from a vanilla build of openmpi-master-201612022109-0366f3a.
The text was updated successfully, but these errors were encountered: