Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use long long for particle ID but not to index arrays #53

Open
alecjohnson opened this issue Oct 8, 2013 · 0 comments
Open

use long long for particle ID but not to index arrays #53

alecjohnson opened this issue Oct 8, 2013 · 0 comments

Comments

@alecjohnson
Copy link
Contributor

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.

alecjohnson added a commit to alecjohnson/iPic3D that referenced this issue Oct 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant