MmgTools / ParMmg

Distributed parallelization of 3D volume mesh adaptation
Other
34 stars 19 forks source link

Diagnose gatherv overflow #113

Closed mpotse closed 3 months ago

mpotse commented 5 months ago

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.

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (develop@eaebcbe). Learn more about missing BASE report.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #113 +/- ## ========================================== Coverage ? 63.05% ========================================== Files ? 46 Lines ? 18924 Branches ? 3533 ========================================== Hits ? 11933 Misses ? 6068 Partials ? 923 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Algiane commented 3 months ago

Thanks!