neperfepx / neper

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

log File for debugging option in tessellation module #41

Closed theo258 closed 4 years ago

theo258 commented 4 years ago

Hello, I tried to produce my own tessellation file (.tess) with the documentation provided in the manual (version 3.5.1). I decided to do so because I want have the crystals different than all the options offered by the tessellation module right now. I'm first trying to do this in 2D. I managed to produce a file which seems to look like a proper .tess file, like it would be produced by the tessellation module. Now I tried to check this file with the debugging option provided in the tessellation module (-T) (like this: neper -T -checktess name.tess). The checking process is working for files produced by neper, so the process itself shouldn't be the problem. Now when I'm trying to check my self produced file I get the following error:

======================== N e p e r ======================= Info : A software package for polycrystal generation and meshing. Info : Version 3.5.1 Info : Built with: gsl|muparser|opengjk|openmp|nlopt Info : Running on 1 threads. Info : http://neper.info Info : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey. Info : No initialization file found (`/home/user12/.neperrc').

Info : --------------------------------------------------------------- Info : MODULE -T loaded with arguments: Info : [ini file] (none) Info : [com line] -checktess name.tess Info : --------------------------------------------------------------- Info : Reading input data... Info : Checking tessellation... Info : [i] Parsing file `name.tess'... Aborted (core dumped)

So obviously my file is not yet working and I think the problem is somewhere in what I generated. My question is, if there is somewhere some kind of a log file where the possible error is described in more detail, to help me finding it. As I'm also having non-convex (concave) crystals, I'm wondering if this could be a general problem. This is also the reason why I tried to create this file seperatly from the tessellation module, to be able to have concave crystals. I know that therefor it might not be possible to use neper for meshing or other functions, but I was hoping to be at least able to visualize using the (-V) module. In case this is helping someone I attached my current file (I had to rename it from .tess to .txt to upload it here, so don't wonder).

name.txt

Edit: I generated a file with fully convex crystals and still the same error. So I think my mistake is still somewhere else.

concave.txt

Edit: I read the manual once more and carefully and right in the first sentences of the tessellation module description it says only the domain has to be convex, which is the case here.

rquey commented 4 years ago

Right now, the best way to get some information on what is going wrong is to recompile neper with debugging on and optimization off:

cmake -DDEVEL_DEBUGGING_FLAG=ON -DDEVEL_OPTIMIZATION=OFF ..
make

and run neper through gdb:

gdb ./neper
(gdb) run -T -checktess name.tess
Starting program: neper/src/build/neper -T -checktess name.tess
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 3.5.2-18
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Warning: Built with: no optimization.            NOT FOR PRODUCTION USE.
Warning: Built with: debugging compilation flag. NOT FOR PRODUCTION USE.
[New Thread 0x7ffff6110700 (LWP 13875)]
[New Thread 0x7ffff590f700 (LWP 13876)]
[New Thread 0x7ffff510e700 (LWP 13877)]
[New Thread 0x7ffff490d700 (LWP 13878)]
[New Thread 0x7ffff410c700 (LWP 13879)]
[New Thread 0x7ffff390b700 (LWP 13880)]
[New Thread 0x7ffff310a700 (LWP 13881)]
Info   : Running on 8 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2019, and GNU GPL'd, by Romain Quey.
Info   : Loading initialization file `/home/rquey/.neperrc'...
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] -format tess,geo -tesrformat ascii
Info   : [com line] -checktess name.tess
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Checking tessellation...
Info   :     [i] Parsing file `name.tess'...

Thread 1 "neper" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) where
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff6355801 in __GI_abort () at abort.c:79
#2  0x0000555555786613 in neut_tess_fscanf_face (pTess=0x555555a55e10, file=0x555555a52d30)
    at neper/src/neut/neut_tess/neut_tess_fscanf/neut_tess_fscanf2.c:300
#3  0x000055555572f8f6 in neut_tess_fscanf (file=0x555555a52d30, pTess=0x555555a55e10)
    at neper/src/neut/neut_tess/neut_tess_fscanf/neut_tess_fscanf1.c:29
#4  0x000055555572fae1 in neut_tess_name_fscanf (name=0x555555a5d760 "name.tess", pTess=0x555555a55e10)
    at neper/src/neut/neut_tess/neut_tess_fscanf/neut_tess_fscanf1.c:76
#5  0x00005555555f8390 in neper_t (fargc=5, fargv=0x555555a52510, argc=3, argv=0x7fffffffd7a0)
    atneper/src/neper_t/neper_t.c:62
#6  0x00005555555d4465 in main (argc=4, argv=0x7fffffffd798)
    at neper/src/neper.c:109

Looking at src/neut/neut_tess/neut_tess_fscanf/neut_tess_fscanf2.c, you can see that there is an error while reading the faces.

Going back to name.txt, you can see that, for the first face, you have declared 5 edges but you are providing 6 ids:

 **face
 38
 1 [...]
     5 1 2 3 4 5 6

PS. I'm curious about your tessellation and why you cannot generate it with Neper.

theo258 commented 4 years ago

Yes, as you described this debugging is working well. Thank you.