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.
Этот коммит содержится в:
родитель
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;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user