neperfepx / neper

Polycrystal generation and meshing
http://neper.info
GNU General Public License v3.0
198 stars 53 forks source link

initial 2d tesselation iteration segfaults with large number of cells #771

Closed jrorschach closed 7 months ago

jrorschach commented 8 months ago

2D tessellation with given -morpho 'gg' segfaults with large number of cells defined by from_morpho

Defining a square domain with -domain 'square(200,200), a grain size distribution with -morpho 'gg' and a number of cells automatically computed with -n from_morpho leads to a Segmentation fault. If the domain size is reduced to -domain 'square(150,150) tessellation optimization iterations start without issues.

Probably an issue with a too large number of cells? Is there a workaround?

I actually want to increase the domain size even further, but got into this SegFault here ... any ideas? neper -T -n from_morpho -reg 1 -mloop 3 -dim 2 -domain 'square(800,800)' -morpho 'diameq:lognormal(5,0.42),1-circularity:lognormal(0.100,0.03)'

All the best!

minimum reproducible example

$ neper -T -n from_morpho -dim 2 -domain 'square(200,200)' -morpho 'gg'

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.5.1-1
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 16 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found 
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n from_morpho -dim 2 -domain square(200,200) -morpho
         gg
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   :       . Number of cells: 43293
Info   :   - Setting seeds... 100%
Info   :   - Generating crystal orientations...
Info   :   - Running tessellation...
Info   :     > Initial solution: f   =0.442537487
Info   :     > Iteration      1: fmin=0.442537487 f=0.442537487Segmentation fault
rquey commented 8 months ago

It works for me with the latest version (4.6.1). Please update and have a try.

jrorschach commented 8 months ago

Thank you for your time and quick response. Tested now several things. It seems that it might not work with Debian 10 anymore, even with the latest build, but works fine with the latest build on Debian 11 and Ubuntu 20.04.6.

Identical Segmentation Fault as shown above with Debian 10 neper versions: 4.1.2,4.4.1,4.4.2-33,4.5.1-1, 4.6.1, 4.6.2-10 working Debian 11 neper version 4.6.2-10 working Ubuntu 20.04.6 LTS neper version 4.6.2-10