initialize the 2d fifo array.
This commit was SVN r2489.
Этот коммит содержится в:
родитель
aa4118e450
Коммит
910f282c3f
@ -250,10 +250,10 @@ int mca_ptl_sm_add_procs(
|
||||
( (char *)(mca_ptl_sm_component.sm_ctl_header->fifo[i]) -
|
||||
(char *)(mca_ptl_sm_component.sm_mpool->mpool_base()) );
|
||||
/* initialize the ompi_fifo_t structures */
|
||||
for( j=0 ; j < n_to_allocate ; j++ ) {
|
||||
fifo_addr=(ompi_fifo_t *) (
|
||||
((char *)(mca_ptl_sm_component.sm_ctl_header->fifo[i])) +
|
||||
mca_ptl_sm_component.sm_offset);
|
||||
((char *)(mca_ptl_sm_component.sm_ctl_header->fifo[i]))
|
||||
+ mca_ptl_sm_component.sm_offset);
|
||||
for( j=0 ; j < n_to_allocate ; j++ ) {
|
||||
fifo_addr[j].head=OMPI_CB_FREE;
|
||||
fifo_addr[j].tail=OMPI_CB_FREE;
|
||||
ompi_atomic_unlock(&(fifo_addr[j].head_lock));
|
||||
@ -268,6 +268,12 @@ int mca_ptl_sm_add_procs(
|
||||
/* Note: Need to make sure that proc 0 initializes control
|
||||
* structures before any of the other procs can progress */
|
||||
if( 0 != mca_ptl_sm_component.my_smp_rank ) {
|
||||
|
||||
/* spin unitl local proc 0 initializes the segment */
|
||||
while(!mca_ptl_sm_component.mmap_file->map_seg->seg_inited)
|
||||
{
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initizlize queue data structures
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user