Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The displacements argument to MPI_Gatherv() in PMMG_gather_parmesh() overflows when the combined packed mesh size exceeds 2^31. This commit does not solve the problem but it produces the right error message and an MPI_Abort() before an allocation error would occur. It also changes MEM_CHK_AVAIL to show the allocation size when an allocation fails, to make this kind of situation easier to diagnose.
Btw it looks like the size limit of ParMmg is actually smaller than that of mmg3d compiled with 32-bit indices; I encountered this problem with an input that takes 1.6GB storage while with mmg3d I have successfully treated a mesh that took 6.3GB storage. Also in terms of vertices and tetrahedra that mesh was much larger.
Of all possible solutions for this problem, I think the best would be to replace the gather operation by send/receive pairs. This would avoid the allocation of a buffer for the whole (packed) mesh.