Dear Libmesh develepers, I want to create different instances of mesh on several MPI processes. Then I want to output the mesh from one MPI process.
I am facing problems with the following code: #include "libmesh/libmesh.h" #include "libmesh/mesh_generation.h" #include "libmesh/mesh.h" int main(int argc, char ** argv) { MPI_Init(&argc, &argv); { libMesh::LibMeshInit init (argc, argv,MPI_COMM_WORLD); libMesh::Mesh mesh(libMesh::Parallel::Communicator(MPI_COMM_SELF)); libMesh::MeshTools::Generation::build_cube (mesh, 10, 10, 5, 0.0, 2.0, 0.0, 3.0, 0.0, 4.0,libMesh::HEX8); int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); if (rank == 0) { mesh.write("mesh1.vtu"); } } MPI_Finalize(); return 0; } The problems are as follows: Problem #1) If I run the code in serial, I'm getting warning: Warning: This MeshOutput subclass only supports meshes which have been serialized! Warning: This MeshOutput subclass only supports meshes which have been serialized! The .pvtu extension should be used when writing VTK files in libMesh. My question: a) how to avoid the first waning about the mesh not being serialized? b) I tried to change the filename to mesh1.pvtu In this case I'm getting an error message: ERROR: Unrecognized file extension: mesh1.pvtu I understand the following: *.dat -- Tecplot ASCII file *.e -- Sandia's ExodusII format *.exd -- Sandia's ExodusII format *.fro -- ACDL's surface triangulation file *.gmv -- LANL's GMV (General Mesh Viewer) format *.mesh -- MEdit mesh format *.mgf -- MGF binary mesh format *.msh -- GMSH ASCII file *.n -- Sandia's Nemesis format *.nem -- Sandia's Nemesis format *.plt -- Tecplot binary file *.poly -- TetGen ASCII file *.ucd -- AVS's ASCII UCD format *.ugrid -- Kelly's DIVA ASCII format *.unv -- I-deas Universal format *.vtu -- VTK (paraview-readable) format *.xda -- libMesh ASCII format *.xdr -- libMesh binary format, Exiting without writing output Problem #2) If I run the code in serial, namely mpiexec -n 2 a.out, then the program gets frozen. It is frozen in the output. Thank you for your help, Michael. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users