Initialize fifos at SM BTL init time instead of waiting for first send. This
waist slightly more memory, but prevents problem when fifo cannot be allocated later during a job run when memory resource is exhausted. This commit was SVN r14119.
Этот коммит содержится в:
родитель
e654604a25
Коммит
efe0323d35
@ -516,6 +516,22 @@ int mca_btl_sm_add_procs(
|
||||
diff = tmp_ptr[mca_btl_sm_component.my_smp_rank] - tmp_ptr[j];
|
||||
mca_btl_sm_component.fifo[j] = (ompi_fifo_t*)((char*)fifo_tmp[j]+diff);
|
||||
mca_btl_sm_component.sm_offset[j] = diff;
|
||||
|
||||
}
|
||||
|
||||
for( j=mca_btl_sm_component.num_smp_procs ; j <
|
||||
mca_btl_sm_component.num_smp_procs+n_local_procs ; j++ ) {
|
||||
if(j == mca_btl_sm_component.my_smp_rank)
|
||||
continue;
|
||||
return_code = ompi_fifo_init((int)mca_btl_sm_component.size_of_cb_queue,
|
||||
(int)mca_btl_sm_component.cb_lazy_free_freq,
|
||||
0,0,0,
|
||||
&mca_btl_sm_component.fifo[j][mca_btl_sm_component.my_smp_rank],
|
||||
mca_btl_sm_component.sm_offset[j],
|
||||
mca_btl_sm_component.sm_mpool);
|
||||
|
||||
if(return_code != OMPI_SUCCESS)
|
||||
goto CLEANUP;
|
||||
}
|
||||
|
||||
/* initialize some of the free-lists */
|
||||
|
@ -12,23 +12,6 @@ do { \
|
||||
/* thread lock */ \
|
||||
if(opal_using_threads()) \
|
||||
opal_atomic_lock(fifo->head_lock); \
|
||||
if(OMPI_CB_FREE == fifo->head) { \
|
||||
/* no queues have been allocated - allocate now */ \
|
||||
rc=ompi_fifo_init( \
|
||||
(int)mca_btl_sm_component.size_of_cb_queue, \
|
||||
(int)mca_btl_sm_component.cb_lazy_free_freq, \
|
||||
/* at this stage we are not doing anything with memory \
|
||||
* locality */ \
|
||||
0,0,0, \
|
||||
fifo, mca_btl_sm_component.sm_offset[peer_smp_rank], \
|
||||
mca_btl_sm_component.sm_mpool); \
|
||||
if( rc != OMPI_SUCCESS ) { \
|
||||
if(opal_using_threads()) \
|
||||
opal_atomic_unlock(fifo->head_lock); \
|
||||
break; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
/* post fragment */ \
|
||||
while(ompi_fifo_write_to_head(hdr, fifo, \
|
||||
mca_btl_sm_component.sm_mpool) != OMPI_SUCCESS) \
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user