mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-05 19:55:56 +01:00
Hypercube optimisation
This commit is contained in:
parent
172f412102
commit
12982a4455
@ -173,15 +173,9 @@ void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors,
|
||||
HyperCubeCoords[d] = (hypercoor>>d)&0x1;
|
||||
}
|
||||
|
||||
std::cerr << " Hcoor (" ;
|
||||
for(int d=0;d<maxhdim;d++){
|
||||
std::cerr << " "<< HyperCubeCoords[d] ;
|
||||
}
|
||||
std::cerr << " )"<<std::endl;
|
||||
|
||||
std::string hname(name);
|
||||
std::cerr << "hostname "<<hname<<std::endl;
|
||||
std::cerr << "R " << R << " I " << I << " N "<< N<<" nhi "<<nhi<<" nlo "<<nlo
|
||||
std::cout << "hostname "<<hname<<std::endl;
|
||||
std::cout << "R " << R << " I " << I << " N "<< N<<
|
||||
<< " hypercoor 0x"<<std::hex<<hypercoor<<std::dec<<std::endl;
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
@ -191,7 +185,7 @@ void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors,
|
||||
hypercoor=hypercoor-rootcoor;
|
||||
assert(hypercoor<WorldSize);
|
||||
assert(hypercoor>=0);
|
||||
std::cerr << " WorldRank "<<WorldRank << " relative hypercoor " << std::hex << hypercoor <<std::dec<<std::endl;
|
||||
|
||||
//////////////////////////////////////
|
||||
// Printing
|
||||
//////////////////////////////////////
|
||||
@ -199,12 +193,6 @@ void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors,
|
||||
HyperCubeCoords[d] = (hypercoor>>d)&0x1;
|
||||
}
|
||||
|
||||
std::cerr << " rel Hcoor (";
|
||||
for(int d=0;d<maxhdim;d++){
|
||||
std::cerr << " "<< HyperCubeCoords[d] ;
|
||||
}
|
||||
std::cerr << " )"<<std::endl;
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Identify subblock of ranks on node spreading across dims
|
||||
// in a maximally symmetrical way
|
||||
@ -254,12 +242,6 @@ void GlobalSharedMemory::OptimalCommunicator(const std::vector<int> &processors,
|
||||
int rank;
|
||||
|
||||
Lexicographic::CoorFromIndexReversed(NodeCoor,WorldNode ,NodeDims);
|
||||
std::cerr << "NodeCoor ";
|
||||
for(int d=0;d<ndimension;d++) std::cerr << NodeCoor[d]<<" ";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "HyperCoor ";
|
||||
for(int d=0;d<ndimension;d++) std::cerr << HyperCoor[d]<<" ";
|
||||
std::cerr << std::endl;
|
||||
|
||||
for(int d=0;d<ndimension;d++) NodeCoor[d]=HyperCoor[d];
|
||||
|
||||
@ -395,7 +377,7 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags)
|
||||
#ifdef GRID_MPI3_SHMMMAP
|
||||
void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags)
|
||||
{
|
||||
std::cout << "SharedMemoryAllocate "<< bytes<< " MMAP implementation "<<std::endl;
|
||||
std::cout << "SharedMemoryAllocate "<< bytes<< " MMAP implementation "<< GRID_SHM_PATH <<std::endl;
|
||||
assert(_ShmSetup==1);
|
||||
assert(_ShmAlloc==0);
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@ -405,7 +387,7 @@ void GlobalSharedMemory::SharedMemoryAllocate(uint64_t bytes, int flags)
|
||||
WorldShmCommBufs.resize(WorldShmSize);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Hugetlbf and others map filesystems as mappable huge pages
|
||||
// Hugetlbfs and others map filesystems as mappable huge pages
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
char shm_name [NAME_MAX];
|
||||
for(int r=0;r<WorldShmSize;r++){
|
||||
|
Loading…
x
Reference in New Issue
Block a user