mirror of
https://github.com/paboyle/Grid.git
synced 2025-04-25 21:25:56 +01:00
Merge branch 'feature/gpt' of https://github.com/lehner/Grid into feature/gpt
This commit is contained in:
commit
12e6059a70
@ -140,6 +140,7 @@ void MemoryManager::Init(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MemoryManager::InitMessage(void) {
|
void MemoryManager::InitMessage(void) {
|
||||||
|
|
||||||
#ifndef GRID_UVM
|
#ifndef GRID_UVM
|
||||||
std::cout << GridLogMessage << "MemoryManager Cache "<< MemoryManager::DeviceMaxBytes <<" bytes "<<std::endl;
|
std::cout << GridLogMessage << "MemoryManager Cache "<< MemoryManager::DeviceMaxBytes <<" bytes "<<std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,7 +47,12 @@ void GlobalSharedMemory::Init(Grid_MPI_Comm comm)
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
// Split into groups that can share memory
|
// Split into groups that can share memory
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
#ifndef GRID_MPI3_SHM_NONE
|
||||||
MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&WorldShmComm);
|
MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&WorldShmComm);
|
||||||
|
#else
|
||||||
|
MPI_Comm_split(comm, WorldRank, 0, &WorldShmComm);
|
||||||
|
#endif
|
||||||
|
|
||||||
MPI_Comm_rank(WorldShmComm ,&WorldShmRank);
|
MPI_Comm_rank(WorldShmComm ,&WorldShmRank);
|
||||||
MPI_Comm_size(WorldShmComm ,&WorldShmSize);
|
MPI_Comm_size(WorldShmComm ,&WorldShmSize);
|
||||||
|
|
||||||
@ -705,7 +710,11 @@ void SharedMemory::SetCommunicator(Grid_MPI_Comm comm)
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
// Split into groups that can share memory
|
// Split into groups that can share memory
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
#ifndef GRID_MPI3_SHM_NONE
|
||||||
MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&ShmComm);
|
MPI_Comm_split_type(comm, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL,&ShmComm);
|
||||||
|
#else
|
||||||
|
MPI_Comm_split(comm, rank, 0, &ShmComm);
|
||||||
|
#endif
|
||||||
MPI_Comm_rank(ShmComm ,&ShmRank);
|
MPI_Comm_rank(ShmComm ,&ShmRank);
|
||||||
MPI_Comm_size(ShmComm ,&ShmSize);
|
MPI_Comm_size(ShmComm ,&ShmSize);
|
||||||
ShmCommBufs.resize(ShmSize);
|
ShmCommBufs.resize(ShmSize);
|
||||||
|
@ -209,9 +209,11 @@ template<class vobj> void Scatter_plane_merge(Lattice<vobj> &rhs,ExtractPointerA
|
|||||||
|
|
||||||
if(cbmask ==0x3 ) {
|
if(cbmask ==0x3 ) {
|
||||||
autoView( rhs_v , rhs, AcceleratorWrite);
|
autoView( rhs_v , rhs, AcceleratorWrite);
|
||||||
|
int _slice_stride = rhs.Grid()->_slice_stride[dimension];
|
||||||
|
int _slice_block = rhs.Grid()->_slice_block[dimension];
|
||||||
accelerator_for2d(n,e1,b,e2,1,{
|
accelerator_for2d(n,e1,b,e2,1,{
|
||||||
int o = n*rhs.Grid()->_slice_stride[dimension];
|
int o = n*_slice_stride;
|
||||||
int offset = b+n*rhs.Grid()->_slice_block[dimension];
|
int offset = b+n*_slice_block;
|
||||||
merge(rhs_v[so+o+b],pointers,offset);
|
merge(rhs_v[so+o+b],pointers,offset);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user