Poly import core dumped

Asked by velimier

Hi there,
I am trying to import large number of polyhedra in my model by importing vertices of each poly.
Following script works until ~17k of polys is imported, then I receive Segmentation fault. Any thoughts?
Here is link for poly file, where vertex coordinates are written in each line; last point of each file line is polys centroid: https://drive.google.com/file/d/13lm7qvKHbHxteFKUB5tZejohU7jAjgCj/view?usp=share_link

model script:

from yade import polyhedra_utils
import ast

m = PolyhedraMat()
m.density = 2700
m.Ks = 10E8
m.Kn = 10E8
m.frictionAngle = radians(30)

file = open("Fragments")

for line in file:
    vertex=[]
    vertex.append(ast.literal_eval(line))
    t = polyhedra_utils.polyhedra(material=m, size=0, seed=0, color= polyhedra_utils.randomColor(), v=vertex[0][0:(len(vertex)-3)])
    t.state.pos=vertex[0][len(vertex)-2]
    O.bodies.append(t)
    del vertex[:]

Thanks
Veljko

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jérôme Duriez (jduriez) said :
#1

Hi,

In my experience (CGAL version 4.11 to 5.02), using Polyhedra is currently at a significant risk of segmentation faults, see https://gitlab.com/yade-dev/trunk/-/issues/242 and links therein.

You can tell us your YADE / CGAL version to try to see if your own issue can be related.

(You can also check RAM usage during your simulation to see how much this is a matter of data volume. Even though I'm not sure it would lead to a "Segmentation fault" in this case ?)

Revision history for this message
velimier (velimier) said :
#2

Thanks Jerome,
I will check those. I am using yade 2020.01a version, not sure about cgal.
Also, part of those that I was able to import resulted in complete mess, nothing as it should be.
I used same code with some earlier version of yade and it was flawless, so I will try with some oleder versions.

Regards
Veljko

Revision history for this message
Jan Stránský (honzik) said :
#3

> I will try with some oleder versions

a newer version is also worth trying IMO

Cheers
Jan

Revision history for this message
Jérôme Duriez (jduriez) said :
#4

You can check your CGAL version with printAllVersions() in YADE terminal. In my experience, Polyhedra simulations (CGAL library more than YADE version ?) was working several years ago (first half of 2020) indeed better than nowadays

Can you help with this problem?

Provide an answer of your own, or ask velimier for more information if necessary.

To post a message you must log in.