1
1

* Add memory barriers for shared memory. Rich and I think we got them

all and the Intel tests pass slightly oversubscribed.

This commit was SVN r7431.
Этот коммит содержится в:
Brian Barrett 2005-09-19 16:28:25 +00:00
родитель 60f9edf17c
Коммит d81726833e
3 изменённых файлов: 8 добавлений и 11 удалений

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

@ -60,13 +60,6 @@ base as of this writing (26 Aug 2005):
- LAM/MPI-like mpirun notation of "C" and "N" is not yet supported.
- Shared memory support will not function properly on machines that
have a weak memory consistency mode. The default in this beta is to
disable shared memory support on all Power PC architectures, even
though some Power PC platforms have strong memory consistency
models. See the description of the --enable-ptl-sm configure flag,
below.
- Striping MPI messages across multiple networks is supported (and
happens automatically when multiple networks are available), but
needs performance tuning.

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

@ -18,9 +18,9 @@
#define _OMPI_CIRCULAR_BUFFER_FIFO
#include "ompi/include/constants.h"
#include "include/sys/cache.h"
#include "include/sys/atomic.h"
#include "mca/mpool/mpool.h"
#include "opal/include/sys/cache.h"
#include "opal/include/sys/atomic.h"
#include "ompi/mca/mpool/mpool.h"
#include "opal/util/pow2.h"
@ -304,6 +304,7 @@ static inline int ompi_cb_fifo_write_to_head(void *data, ompi_cb_fifo_t
if (ptr[index] == OMPI_CB_FREE) {
slot = index;
ptr[slot] = data;
opal_atomic_wmb();
(h_ptr->fifo_index)++;
(h_ptr->fifo_index) &= fifo->mask;
}
@ -337,6 +338,7 @@ static inline int ompi_cb_fifo_get_slot(ompi_cb_fifo_t *fifo,
if ( OMPI_CB_FREE == ptr[index] ) {
ptr[index] = OMPI_CB_RESERVED;
return_value = index;
opal_atomic_wmb();
(h_ptr->fifo_index)++;
(h_ptr->fifo_index) &= fifo->mask;
}
@ -622,6 +624,7 @@ static inline int ompi_cb_fifo_write_to_head_same_base_addr(void *data, ompi_cb_
if (ptr[index] == OMPI_CB_FREE) {
slot = index;
ptr[slot] = data;
opal_atomic_wmb();
(h_ptr->fifo_index)++;
/* wrap around */
(h_ptr->fifo_index) &= fifo->mask;
@ -655,6 +658,7 @@ static inline int ompi_cb_fifo_get_slot_same_base_addr(ompi_cb_fifo_t *fifo)
if ( OMPI_CB_FREE == ptr[index] ) {
ptr[index] = OMPI_CB_RESERVED;
return_value = index;
opal_atomic_wmb();
(h_ptr->fifo_index)++;
(h_ptr->fifo_index) &= fifo->mask;
}

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

@ -433,8 +433,8 @@ int mca_btl_sm_add_procs_same_base_addr(
fifo_tmp=(ompi_fifo_t * volatile *)
( (char *)(mca_btl_sm_component.sm_ctl_header->fifo) +
(long)(mca_btl_sm_component.sm_mpool->mpool_base(mca_btl_sm_component.sm_mpool)) );
/* RLG : need memory barrier */
fifo_tmp[mca_btl_sm_component.my_smp_rank]=my_fifos;
opal_atomic_mb();
/* cache the pointer to the 2d fifo array. These addresses
* are valid in the current process space */