diff --git a/src/INTEL/intel_buffers.cpp b/src/INTEL/intel_buffers.cpp index 07e59b1bcf..bb54577097 100644 --- a/src/INTEL/intel_buffers.cpp +++ b/src/INTEL/intel_buffers.cpp @@ -391,9 +391,10 @@ void IntelBuffers::_grow_nbor_list(NeighList * /*list*/, free_nbor_list(); _list_alloc_atoms = 1.10 * nlocal; int nt = MAX(nthreads, _off_threads); - int list_alloc_size = (_list_alloc_atoms + nt * 2 + pack_width - 1) * - get_max_nbors(); - lmp->memory->create(_list_alloc, list_alloc_size, "_list_alloc"); + + bigint list_alloc_size = + (bigint)(_list_alloc_atoms + nt * 2 + pack_width - 1) * (bigint)get_max_nbors(); + _list_alloc = (int *) lmp->memory->smalloc(list_alloc_size * sizeof(int), "_list_alloc"); #ifdef _LMP_INTEL_OFFLOAD if (offload_end > 0) { int * list_alloc =_list_alloc; @@ -706,7 +707,7 @@ double IntelBuffers::memory_usage(const int nthreads) if (_off_f) tmem += fstride*_off_threads * sizeof(vec3_acc_t); #endif - tmem += (_list_alloc_atoms + _off_threads) * get_max_nbors() * sizeof(int); + tmem += (bigint)(_list_alloc_atoms + _off_threads) * (bigint)get_max_nbors() * sizeof(int); tmem += _ntypes * _ntypes * sizeof(int); tmem += _buf_local_size + (_n_list_ptrs - 1) * _buf_local_size * 2; diff --git a/src/memory.cpp b/src/memory.cpp index c2d8163ece..ce82f70428 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -63,8 +63,7 @@ void *Memory::smalloc(bigint nbytes, const char *name) void *ptr = malloc(nbytes); #endif if (ptr == nullptr) - error->one(FLERR,"Failed to allocate {} bytes for array {}", - nbytes,name); + error->one(FLERR,"Failed to allocate {} bytes for array {}", nbytes,name); return ptr; }