1
1

osc/rdma: really fix active message support

The last fix prevented a hang but had some cases where the results were
wrong. Fixed. Tested with armci, openmpi/ibm, openmpi/onesided.

cmr=v1.8:reviewer=jsquyres

This commit was SVN r31284.
Этот коммит содержится в:
Nathan Hjelm 2014-03-28 22:06:16 +00:00
родитель 6913a0f3cf
Коммит fdf4c3b900
2 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -242,7 +242,6 @@ ompi_osc_rdma_complete(ompi_win_t *win)
complete_req.base.type = OMPI_OSC_RDMA_HDR_TYPE_COMPLETE;
complete_req.base.flags = OMPI_OSC_RDMA_HDR_FLAG_VALID;
complete_req.frag_count = module->epoch_outgoing_frag_count[ranks[i]];
module->epoch_outgoing_frag_count[ranks[i]] = 0;
ret = ompi_osc_rdma_control_send(module,
ranks[i],
@ -256,6 +255,11 @@ ompi_osc_rdma_complete(ompi_win_t *win)
ret = ompi_osc_rdma_frag_flush_all(module);
if (OMPI_SUCCESS != ret) goto cleanup;
/* zero the fragment counts here to ensure they are zerod */
for (i = 0 ; i < ompi_group_size(module->sc_group) ; ++i) {
module->epoch_outgoing_frag_count[ranks[i]] = 0;
}
/* wait for outgoing requests to complete. Don't wait for incoming, as
we're only completing the access epoch, not the exposure epoch */
while (module->outgoing_frag_count != module->outgoing_frag_signal_count) {

Просмотреть файл

@ -1328,9 +1328,8 @@ static inline int process_complete (ompi_osc_rdma_module_t *module, int source,
OPAL_THREAD_LOCK(&module->lock);
/* the current fragment is not part of the frag_count but it doesn't need be be adjusted
* for here */
module->active_incoming_frag_signal_count += complete_header->frag_count;
/* the current fragment is not part of the frag_count so we need to add it here */
module->active_incoming_frag_signal_count += complete_header->frag_count + 1;
module->num_complete_msgs++;
if (0 == module->num_complete_msgs) {