Hi,
ElmerGrid can use extremely large amounts of memory when converting meshes from gmsh (e.g. ElmerGrid 14 2 foo.msh). I've encountered situations where the 32G of ram available to me is insufficient and ElmerGrid will crash with a failure to malloc in imatrix. The issue appears to be the invtopo matrix in femknot.c, will will allocate enough space for the maximum number of possible elements for each node. I have remedied the issue for myself with the attached patch, which replaces the matrix structure with a jagged array (with reallocation when necessary). It probably is more expensive computationally, but it drastically reduces memory use.
Excessive memory use in ElmerGrid conversion from gmsh
Excessive memory use in ElmerGrid conversion from gmsh
- Attachments
-
- invtopo.patch
- (3.1 KiB) Downloaded 395 times