1
1

Update memory barriers in shared memory (sm) BTL. Fixes periodic segmentation faults when using Intel 10.0.025 or PGI 9.0-3. See #2619 for more details. Thanks Brian and George!

This commit was SVN r24095.
Этот коммит содержится в:
Samuel Gutierrez 2010-11-29 15:57:54 +00:00
родитель 956e030f28
Коммит 74cff0e2a5

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

@ -334,12 +334,13 @@ static inline int sm_fifo_write(void *value, sm_fifo_t *fifo)
volatile void **q = (volatile void **) RELATIVE2VIRTUAL(fifo->queue);
/* if there is no free slot to write, report exhausted resource */
opal_atomic_rmb();
if ( SM_FIFO_FREE != q[fifo->head] )
return OMPI_ERR_OUT_OF_RESOURCE;
/* otherwise, write to the slot and advance the head index */
opal_atomic_rmb();
q[fifo->head] = value;
opal_atomic_wmb();
fifo->head = (fifo->head + 1) & fifo->mask;
opal_atomic_wmb();
return OMPI_SUCCESS;