[petsc-dev] reading gmsh into DMPlex

Matthew Knepley knepley at gmail.com
Mon Jan 16 20:52:08 CST 2017


On Mon, Jan 16, 2017 at 8:37 PM, Adrian Croucher <a.croucher at auckland.ac.nz>
wrote:

> hi
>
> When I read the attached gmsh mesh using DMPlexCreateFromFile(), I get the
> following error:
>
> [0]PETSC ERROR: --------------------- Error Message-----------------------
> ---------------------------------------
> [0]PETSC ERROR: Invalid argument
> [0]PETSC ERROR: File is not a valid Gmsh file
> [0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html
> for trouble shooting.
> [0]PETSC ERROR: Petsc Development GIT revision: v3.7.4-2811-gfbb304f  GIT
> Date: 2016-11-09 16:5
> 2:07 +0300
> [0]PETSC ERROR: waiwera on a linux-gnu-c-opt named en-354401 by acro018
> Tue Jan 17 11:52:23 201
> 7
> [0]PETSC ERROR: Configure options --with-x --download-hdf5
> --download-netcdf --download-exodusi
> i --download-triangle --download-ptscotch --download-chaco
> --download-hypre --with-debugging=0
> COPTFLAGS="-O3 -march=native -mtune=native" CXXOPTFLAGS="-O3 -march=native
> -mtune=native" FOPTF
> LAGS="-O3 -march=native -mtune=native"
> [0]PETSC ERROR: #1 DMPlexCreateGmsh() line 207 in
> /home/acro018/software/PETSc/code/src/dm/impl
> s/plex/plexgmsh.c
> [0]PETSC ERROR: #2 DMPlexCreateGmshFromFile() line 59 in
> /home/acro018/software/PETSc/code/src/
> dm/impls/plex/plexgmsh.c
> [0]PETSC ERROR: #3 DMPlexCreateFromFile() line 1998 in
> /home/acro018/software/PETSc/code/src/dm
> /impls/plex/plexcreate.c
>
> This mesh was created using the meshio Python library (
> https://github.com/nschloe/meshio).
>
> Gmsh itself seems to think it is valid. What is PETSc's problem with it?
>
> It appears to be complaining about the $EndElements line not matching
> properly, but it looks ok to me.


Its a DOS file and has no newline at the end. Thus, when I read
$EndElements, it has no termination and you
can something weird. I put a newline on that line and its fine.

   Matt


> - Adrian
>
> --
> Dr Adrian Croucher
> Senior Research Fellow
> Department of Engineering Science
> University of Auckland, New Zealand
> email: a.croucher at auckland.ac.nz
> tel: +64 (0)9 923 4611
>
>


-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170116/28a11a16/attachment.html>


More information about the petsc-dev mailing list