Meshio does not read Gmsh physical groups

Hi @Nexius , thank you for your contribution to reading XDMF in parallel! Without any knowledge of MPI, I dared to try it just now for fun. My system is FEniCS docker on WIN10, on an I-7 4core system with 16GB (docker can use 4-core 8GB). Could you please address how to save results to XDMF file(s) in parallel computing. Following your example I added the following line to save the results.

file_results = fn.XDMFFile(MPI.COMM_SELF, "test_mpi.xdmf")
file_results.parameters['flush_output'] = True
file_results.parameters['functions_share_mesh'] = True
...
file_results.write(u, t)            #write u(displacement) at time-step t

I must have been wrong, and notice the following issues and successes:

  1. I have to use MPI.COMM_SELF instead of MPI.comm_self, otherwise it raises no attribute 'comm_self'. Out of curiosity, is it a version issue of mpi4py?
  2. With export HDF5_USE_FILE_LOCKING=FALSE, I run mpirun -np 4 python3 test.py. The code DOES run the FEA analysis MANY times (as I can see it prints the ‘u’ results many times). But in the end it halts and raises many blocks of errors as follows.
HDF5-DIAG: Error detected in HDF5 (1.10.0-patch1) MPI-process 1:
  #000: ../../../src/H5F.c line 579 in H5Fopen(): unable to open file
    major: File accessibilty
    minor: Unable to open file
  #001: ../../../src/H5Fint.c line 1168 in H5F_open(): unable to lock the file or initialize file structure
    major: File accessibilty
    minor: Unable to open file
  #002: ../../../src/H5FD.c line 1821 in H5FD_lock(): driver lock request failed
    major: Virtual File Layer
    minor: Can't update object
  #003: ../../../src/H5FDsec2.c line 939 in H5FD_sec2_lock(): unable to flock file, errno = 11, error message = 'Resource temporarily unavailable'
    major: File accessibilty
    minor: Bad file ID accessed
  1. with export HDF5_USE_FILE_LOCKING=TRUE, it raises error without performing any FEA analysis.
Traceback (most recent call last):
  File "test.py", line 66, in <module>
    infile.read(mvc, "name_to_read")
RuntimeError:

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
***     fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
*** include a *minimal* running example to reproduce the error.
***
*** -------------------------------------------------------------------------
*** Error:   Unable to find entity in map.
*** Reason:  Error reading MeshValueCollection.
*** Where:   This error was encountered inside HDF5File.cpp.
*** Process: 2
***
*** DOLFIN version: 2019.1.0
*** Git changeset:  74d7efe1e84d65e9433fd96c50f1d278fa3e3f3f
*** -------------------------------------------------------------------------

Do you have any insights? I can clean up my codes to provide a minimal working code if needed. Thank you!