{"action":"created","issue":{"url":"https://api.github.com/repos/nschloe/meshio/issues/154","repository_url":"https://api.github.com/repos/nschloe/meshio","labels_url":"https://api.github.com/repos/nschloe/meshio/issues/154/labels{/name}","comments_url":"https://api.github.com/repos/nschloe/meshio/issues/154/comments","events_url":"https://api.github.com/repos/nschloe/meshio/issues/154/events","html_url":"https://github.com/nschloe/meshio/issues/154","id":278208133,"number":154,"title":"meshio takes up a huge amount of RAM","user":{"login":"massimiliano-leoni","id":12351309,"avatar_url":"https://avatars0.githubusercontent.com/u/12351309?v=4","gravatar_id":"","url":"https://api.github.com/users/massimiliano-leoni","html_url":"https://github.com/massimiliano-leoni","followers_url":"https://api.github.com/users/massimiliano-leoni/followers","following_url":"https://api.github.com/users/massimiliano-leoni/following{/other_user}","gists_url":"https://api.github.com/users/massimiliano-leoni/gists{/gist_id}","starred_url":"https://api.github.com/users/massimiliano-leoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massimiliano-leoni/subscriptions","organizations_url":"https://api.github.com/users/massimiliano-leoni/orgs","repos_url":"https://api.github.com/users/massimiliano-leoni/repos","events_url":"https://api.github.com/users/massimiliano-leoni/events{/privacy}","received_events_url":"https://api.github.com/users/massimiliano-leoni/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2017-11-30T17:38:16Z","updated_at":"2017-12-20T11:58:47Z","closed_at":null,"author_association":"NONE","body":"For example, to convert a 283.3MB msh file into a 520.3MB xml file the peak RAM allocated was 9.8GB. Is this normal? Can it be optimized?"},"comment":{"url":"https://api.github.com/repos/nschloe/meshio/issues/comments/353044941","html_url":"https://github.com/nschloe/meshio/issues/154#issuecomment-353044941","issue_url":"https://api.github.com/repos/nschloe/meshio/issues/154","id":353044941,"user":{"login":"massimiliano-leoni","id":12351309,"avatar_url":"https://avatars0.githubusercontent.com/u/12351309?v=4","gravatar_id":"","url":"https://api.github.com/users/massimiliano-leoni","html_url":"https://github.com/massimiliano-leoni","followers_url":"https://api.github.com/users/massimiliano-leoni/followers","following_url":"https://api.github.com/users/massimiliano-leoni/following{/other_user}","gists_url":"https://api.github.com/users/massimiliano-leoni/gists{/gist_id}","starred_url":"https://api.github.com/users/massimiliano-leoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/massimiliano-leoni/subscriptions","organizations_url":"https://api.github.com/users/massimiliano-leoni/orgs","repos_url":"https://api.github.com/users/massimiliano-leoni/repos","events_url":"https://api.github.com/users/massimiliano-leoni/events{/privacy}","received_events_url":"https://api.github.com/users/massimiliano-leoni/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T11:58:47Z","updated_at":"2017-12-20T11:58:47Z","author_association":"NONE","body":"I am trying to convert to dolfin-xml with the latest meshio for Python2 but I get the following error:\r\n\r\n```\r\nNumber of points: 18417\r\nElements:\r\n  Number of tetras: 81062\r\n  Number of lines: 236\r\n  Number of triangles: 17788\r\nCell data: geometrical, physical\r\nWARNING:root:Dolfin's XML is a legacy format. Consider using XDMF instead.\r\nWARNING:root:DOLFIN XML can only handle one cell type at a time. Using tetra, discarding line, triangle.\r\nTraceback (most recent call last):\r\n  File \"/home/mleoni/.local/bin/meshio-convert\", line 135, in <module>\r\n    _main()\r\n  File \"/home/mleoni/.local/bin/meshio-convert\", line 75, in _main\r\n    field_data=field_data\r\n  File \"/home/mleoni/.local/lib/python2.7/site-packages/meshio/helpers.py\", line 178, in write\r\n    dolfin_io.write(filename, points, cells, cell_data=cell_data)\r\n  File \"/home/mleoni/.local/lib/python2.7/site-packages/meshio/dolfin_io.py\", line 251, in write\r\n    _write_mesh(filename, points, cell_type, cells)\r\n  File \"/home/mleoni/.local/lib/python2.7/site-packages/meshio/dolfin_io.py\", line 185, in _write_mesh\r\n    tree.write(filename)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 820, in write\r\n    serialize(write, self._root, encoding, qnames, namespaces)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 932, in _serialize_xml\r\n    v = _escape_attrib(v, encoding)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1092, in _escape_attrib\r\n    _raise_serialization_error(text)\r\n  File \"/usr/lib/python2.7/xml/etree/ElementTree.py\", line 1052, in _raise_serialization_error\r\n    \"cannot serialize %r (type %s)\" % (text, type(text).__name__)\r\nTypeError: cannot serialize {'dolfin': 'https://fenicsproject.org/'} (type dict)\r\n\r\n```\r\n\r\nI could convert with the old `dolfin-convert`, the resulting mesh is here https://drive.google.com/open?id=1ruIs5N2gExnS0tuKodZj6sqEyRZCSUO_\r\nWhen read with meshio, memory goes up to 500MB and then stabilized at 200MB, for a 10MB mesh file."}}
{"actor":{"display_login":"massimiliano-leoni"}}