As discussed in issue #4, to support tracking more than INT_MAX (usually about 2 billion) particles, we need to use long long rather than int to index them.
Currently the code uses unsigned long in some places and long long in others. On Xeon both of these are 8 bytes long, but on my mac unsigned long is only 4 bytes (same as int) while long long is the full 8 bytes needed to index billions of particles. Therefore, to support billions of particles on all architectures, I am modifying the code to consistently use long long to index particles.
On the other hand, I see no need to support having more than 2 billion particles in a single MPI process, and perhaps indexing with long integers could slow iterating through particles. I am therefore changing all array indices to use int rather than long long.
As discussed in issue #4, to support tracking more than INT_MAX (usually about 2 billion) particles, we need to use
long long
rather thanint
to index them.Currently the code uses
unsigned long
in some places andlong long
in others. On Xeon both of these are 8 bytes long, but on my macunsigned long
is only 4 bytes (same asint
) whilelong long
is the full 8 bytes needed to index billions of particles. Therefore, to support billions of particles on all architectures, I am modifying the code to consistently uselong long
to index particles.On the other hand, I see no need to support having more than 2 billion particles in a single MPI process, and perhaps indexing with long integers could slow iterating through particles. I am therefore changing all array indices to use
int
rather thanlong long
.