Error using LaGrit mesh in examples/3d/tet4


I am working through the 3d/tet4 example to gain some understanding in meshing using LaGrit. I am experiencing a runtime error when reading the binary pset file provided in the example (error below). Conversely, the simulation runs fine when I use the ascii pset file.

The error suggests that there is a problem with the binary file’s header. Can this be remedied by editing the file using a hex editor? Furthermore, is this a version issue between PyLith 2.2.2 and the pset file that may come up later when meshing with LaGrit?

Stay well,


-- Reading binary Pset file 'mesh/tet4_1000m_binary.pset'. Fatal error. Calling MPI_Abort() to abort PyLith application. Traceback (most recent call last): File "/home/pj/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/", line 74, in onComputeNodes self.main(*args, **kwds) File "/home/pj/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/apps/", line 115, in main mesh = self.mesher.create(self.problem.normalizer, interfaces) File "/home/pj/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/topology/", line 100, in create mesh =, self.interpolate) File "/home/pj/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/meshio/", line 71, in read, mesh) File "/home/pj/pylith/pylith-2.2.2-linux-x86_64/lib/python2.7/site-packages/pylith/meshio/", line 86, in read def read(self, *args): return _meshio.MeshIO_read(self, *args) RuntimeError: Header in binary Pset file '0000:' does not match anticipated header 'pset'. application called MPI_Abort(MPI_COMM_WORLD, -1) - process 0 /home/pj/pylith/pylith-2.2.2-linux-x86_64/bin/nemesis: mpirun: exit 255 /home/pj/pylith/pylith-2.2.2-linux-x86_64/bin/pylith: /home/pj/pylith/pylith-2.2.2-linux-x86_64/bin/nemesis: exit 1

Are you using the binary pset file that is included with PyLith or did you generate it by running LaGriT? The one included with PyLith works with the PyLith Linux x86_64 and MacOS binary packages.

PyLith support for importing meshes from LaGriT is very limited as we have not used LaGriT in about 12 years. We maintain the example as a demonstration of how to import meshes from LaGriT and that is about it.


Thank you for the quick reply.

I am using the file provided by the example, thus the header must have been edited at some point. With that said, since LaGrit support is limited, I may look into the other meshing options.