#1610: Switch Cactus to 64 bits -------------------------+-------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: major | Milestone: Component: Cactus | Version: development version Keywords: | -------------------------+-------------------------------------------------- Although pointers can have 64 bits, integers in Cactus are de facto (since we use "int" in many places) restricted to 32 bits. This limit is easily reached, and this has in fact been a problem on at least two occasions.
One issue comes from Carpet's numbering of grid points. With 25 refinement levels, the coarse grid can be at most 127^3, and this limit was reached in production simulations years ago.
Another issue comes from large 1D arrays. It is easily possible to have a 1D array with 10M (10^7) elements that is replicated across processes (distrib=const). In this case, one can use at most 200 MPI processes.
We should devise a plan to switch Cactus to 64 bits. One option would be to replace most "int" by "CCTK_INT", so that those affected can switch these to 64 bits.
I want to note that using 64-bit loop counters is often slightly faster than using 32-bit loop counters (on 64-bit architectures), since the 32->64 bit conversion for array indexing can be omitted.