- Add copyright headers to btl_sm_frag.h
- Ensure to convert base_shared_mem_flags to be a relative offset in the global storage, and then to convert that back to an absolute virtual address before we try to use it - Don't double increment n_local_procs when calculating the peer rank during bootstrapping of the different base address case Something else is still wrong; if mmap() returns a different base address, things don't work (i.e., segv or hang forever when you try to send a message). More specifically, the bootstrapping now seems to correctly handle the case when mmap() base addresses are different, but the message passing does *not* -- it always assumes that the mmap() base addresses are the same. Still working on the fix for that -- want to checkpoint what has been done so far to facilitate working on different machines... This commit was SVN r8134.
Этот коммит содержится в:
родитель
d8d13f879f
Коммит
6444887373
@ -119,6 +119,7 @@ int mca_btl_sm_add_procs_same_base_addr(
|
||||
bool same_sm_base;
|
||||
ssize_t diff;
|
||||
volatile char **tmp_ptr;
|
||||
volatile int *tmp_int_ptr;
|
||||
|
||||
/* initializion */
|
||||
for(i=0 ; i < nprocs ; i++ ) {
|
||||
@ -379,6 +380,12 @@ int mca_btl_sm_add_procs_same_base_addr(
|
||||
segment_header.base_shared_mem_segment) -
|
||||
(char *)(mca_btl_sm_component.sm_mpool->mpool_base(mca_btl_sm_component.sm_mpool)) );
|
||||
|
||||
mca_btl_sm_component.sm_ctl_header->segment_header.
|
||||
base_shared_mem_flags = (volatile int *)
|
||||
( ((char *) mca_btl_sm_component.sm_ctl_header->
|
||||
segment_header.base_shared_mem_flags) -
|
||||
(char *) (mca_btl_sm_component.sm_mpool_base));
|
||||
|
||||
/* allow other procs to use this shared memory map */
|
||||
mca_btl_sm_component.mmap_file->map_seg->seg_inited=true;
|
||||
|
||||
@ -409,8 +416,12 @@ int mca_btl_sm_add_procs_same_base_addr(
|
||||
* flags are set */
|
||||
opal_atomic_mb();
|
||||
|
||||
mca_btl_sm_component.sm_ctl_header->segment_header.
|
||||
base_shared_mem_flags[mca_btl_sm_component.my_smp_rank]=1;
|
||||
/* Set my flag to 1 (convert from relative address first) */
|
||||
tmp_int_ptr=(volatile int *)
|
||||
( ((char *) mca_btl_sm_component.sm_ctl_header->segment_header.
|
||||
base_shared_mem_flags) +
|
||||
((long) mca_btl_sm_component.sm_mpool_base));
|
||||
tmp_int_ptr[mca_btl_sm_component.my_smp_rank]=1;
|
||||
|
||||
/*
|
||||
* initialize the array of fifo's "owned" by this process
|
||||
@ -607,15 +618,14 @@ int mca_btl_sm_add_procs(
|
||||
/* set connectivity */
|
||||
n_local_procs=0;
|
||||
for(proc = 0 ; proc < nprocs ; proc++ ) {
|
||||
if( (SM_CONNECTED_DIFFERENT_BASE_ADDR ==
|
||||
mca_btl_sm_component.sm_proc_connect[proc]) ||
|
||||
(SM_CONNECTED ==
|
||||
mca_btl_sm_component.sm_proc_connect[proc]) ) {
|
||||
/* Same base address base */
|
||||
if (SM_CONNECTED == mca_btl_sm_component.sm_proc_connect[proc]) {
|
||||
n_local_procs++;
|
||||
}
|
||||
|
||||
if( (SM_CONNECTED_DIFFERENT_BASE_ADDR ==
|
||||
mca_btl_sm_component.sm_proc_connect[proc]) ) {
|
||||
/* Different base address case */
|
||||
else if (SM_CONNECTED_DIFFERENT_BASE_ADDR ==
|
||||
mca_btl_sm_component.sm_proc_connect[proc]) {
|
||||
|
||||
/* add this proc to shared memory accessability list */
|
||||
return_code=ompi_bitmap_set_bit(reachability,proc);
|
||||
|
@ -1,3 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
* University Research and Technology
|
||||
* Corporation. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
* of Tennessee Research Foundation. All rights
|
||||
* reserved.
|
||||
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
* University of Stuttgart. All rights reserved.
|
||||
* Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* $COPYRIGHT$
|
||||
*
|
||||
* Additional copyrights may follow
|
||||
*
|
||||
* $HEADER$
|
||||
*/
|
||||
#include "ompi_config.h"
|
||||
#include "btl_sm_frag.h"
|
||||
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user