1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-09-20 09:15:38 +01:00

Merge pull request #292 from lehner/feature/gpt-sycl

Catch edge case in SharedMemoryMPI::GetShmDims; Change default units …
This commit is contained in:
Peter Boyle 2020-06-14 13:43:27 -04:00 committed by GitHub
commit f46f029dbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -77,7 +77,7 @@ void MemoryManager::LRUinsert(AcceleratorViewEntry &AccCache)
assert(AccCache.LRU_valid==0);
if (AccCache.transient) {
LRU.push_back(AccCache.CpuPtr);
AccCache.LRU_entry = LRU.end();
AccCache.LRU_entry = --LRU.end();
} else {
LRU.push_front(AccCache.CpuPtr);
AccCache.LRU_entry = LRU.begin();

View File

@ -180,7 +180,7 @@ void GlobalSharedMemory::GetShmDims(const Coordinate &WorldDims,Coordinate &ShmD
&& divides(prime,WorldShmSize/AutoShmSize) ) {
AutoShmSize*=prime;
ShmDims[dim]*=prime;
last_dim = (dim + ndimension - 1) % ndimension;
last_dim = dim;
break;
}
}

View File

@ -297,11 +297,11 @@ void Grid_init(int *argc,char ***argv)
}
if( GridCmdOptionExists(*argv,*argv+*argc,"--device-mem") ){
int GB;
int MB;
arg= GridCmdOptionPayload(*argv,*argv+*argc,"--device-mem");
GridCmdOptionInt(arg,GB);
uint64_t GB64 = GB;
MemoryManager::DeviceMaxBytes = GB64*1024LL*1024LL*1024LL;
GridCmdOptionInt(arg,MB);
uint64_t MB64 = MB;
MemoryManager::DeviceMaxBytes = MB64*1024LL*1024LL;
}
if( GridCmdOptionExists(*argv,*argv+*argc,"--hypercube") ){