DMplex can not read region number

Hello, I am trying to read a binary mesh from GMSH by DMplex; However, it seems DMplex can not read the correct region number; I also tried gmshload3 which works well. I am attaching my code and input mesh here for your information. Thx for the help.

The mesh CUBE1_TEST.msh has region 1 inside; DMplex only have region 0 when read this file

DMPLEX_DEBUG.zip (1.3 MB)

I will have a look at this after the FreeFEM days. Thanks for the reproducer.

This should be fixed in Missing DMGetLabelValue(). · FreeFem/FreeFem-sources@da34345 · GitHub. In fact, gmshload3 is wrong, I think. You can see from within Gmsh directly that there is no region 1, only region 2. The surface label is 1, however.

Indeed, just to confirm gmshload3 is broken. If you output labels(Th), you get

6
	  1	  2	  3	  4	  5
	  6

whereas with DMPlex, you get

1
	  1

Thank you prj, I will go back to double check