Skip to content

Fix memory alignment bug in PackInfo codegen

Jean-Noël Grad requested to merge jngrad/walberla:codegen into master

The PackInfo class design requires the memory-aligned buffer class templates mpi::GenericSendBuffer and mpi::GenericRecvBuffer to be concretized with the unsigned char underlying type, instead of the codegen floating-point type dtype, negating the benefits of the memory-aligned allocator. This leads to random runtime errors due to store operations to misaligned addresses. The PackInfo class now extends the buffer length by the size of a single floating-point value and advances the pointer to yield a memory-aligned buffer.

Merge request reports