Dear community,
I am trying a simple test for the parallel version of mesh adaptation using parmmg
, but I encountered an unexpected buffer overflow error.
Here is the code (taken from the example provided):
// Run with MPI: ff-mpirun -np 4 script.edp
// NBPROC 4
load "medit"
load "PETSc"
load "parmmg"
macro dimension()3// EOM
include "macro_ddm.idp"
mesh3 Th = cube(getARGV("-global", 30), getARGV("-global", 30), getARGV("-global", 30));
DmeshCreate(Th);
fespace Vh(Th, P1);
{
mesh3 ThParMmg;
int[int] n2o;
int[int][int] communicators;
ParMmgCreateCommunicators(Th, ThParMmg, n2o, communicators);
fespace VhParMmg(ThParMmg, P1);
VhParMmg met = sqrt((x-0.5)^2 + (y-0.5)^2 + (z-0.5)^2) - 0.3;
real hmin = 2.0e-2;
real hmax = 1.0e-0;
met = max(hmin, min(hmax, abs(met)));
mesh3 ThNew = parmmg3d(ThParMmg, metric = met[], hausd = 0.05, nodeCommunicators = communicators);
DmeshReconstruct(ThNew);
DmeshCopy(ThNew, Th);
savevtk("ThNew_"+mpisize+".vtu", ThNew, bin = 0);
}
Vh u = sqrt((x-0.5)^2 + (y-0.5)^2 + (z-0.5)^2) - 0.3;
medit("Th", Th, u);
When I run this script on my machine with FreeFem++ version 4.15 (fresh installation), I get a buffer overflow error during the parmmg
stage:
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
MODULE PARMMGLIB_DISTRIBUTED: IMB-LJLL : 1.5.0 (Nov. 01, 2024)
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
git branch: HEAD
git commit: cd8a6e340e466e857b0bb9952f115d8999337167
git date: 2024-11-01 09:12:00 +0100
-- PMMG: CHECK INPUT DATA
-- CHECK INPUT DATA COMPLETED. 0.000s
-- PHASE 1 : ANALYSIS
** SURFACE ANALYSIS
** SETTING TOPOLOGY
-- PARALLEL MESH QUALITY 29791 162000
BEST 0.657267 AVRG. 0.657267 WRST. 0.657267 (ELT 16880)
-- PHASE 1 COMPLETED. 0.102s
-- PHASE 2 : ISOTROPIC MESHING
*** buffer overflow detected ***: terminated
Does anyone know why this might be happening, and if there is a workaround or fix?
Thank you very much in advance!