From 6844ff32ba17c9b38129cfeb89160e6ea9e021de Mon Sep 17 00:00:00 2001 From: Gleb Natapov Date: Mon, 12 May 2008 07:15:29 +0000 Subject: [PATCH] Return OMPI_ERR_RESOURCE_BUSY from sm->btl_send() function if there is no place in cb. This will prevent OB1 from doing early completion of small sends. This commit was SVN r18424. --- ompi/mca/btl/sm/btl_sm.c | 2 +- ompi/mca/btl/sm/btl_sm_fifo.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ompi/mca/btl/sm/btl_sm.c b/ompi/mca/btl/sm/btl_sm.c index c4f6155970..f633db0f7f 100644 --- a/ompi/mca/btl/sm/btl_sm.c +++ b/ompi/mca/btl/sm/btl_sm.c @@ -640,7 +640,7 @@ int mca_btl_sm_send( */ MCA_BTL_SM_FIFO_WRITE(endpoint, endpoint->my_smp_rank, endpoint->peer_smp_rank, frag->hdr, false, rc); - return OMPI_SUCCESS; + return rc; } int mca_btl_sm_ft_event(int state) { diff --git a/ompi/mca/btl/sm/btl_sm_fifo.h b/ompi/mca/btl/sm/btl_sm_fifo.h index 975c913606..4d5a29f4cf 100644 --- a/ompi/mca/btl/sm/btl_sm_fifo.h +++ b/ompi/mca/btl/sm/btl_sm_fifo.h @@ -17,7 +17,7 @@ do { \ if(ompi_fifo_write_to_head(hdr, fifo, mca_btl_sm_component.sm_mpool) \ != OMPI_SUCCESS) { \ btl_sm_add_pending(endpoint_peer, hdr, resend); \ - rc = OMPI_ERR_TEMP_OUT_OF_RESOURCE; \ + rc = OMPI_ERR_RESOURCE_BUSY; \ } else { \ MCA_BTL_SM_SIGNAL_PEER(endpoint_peer); \ rc = OMPI_SUCCESS; \