neperfepx / neper

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

meshing fails #74

Closed NotRealEngineering closed 4 years ago

NotRealEngineering commented 4 years ago

I am using neper 4.0.2 along with Gmsh 4.6.0 (compiled from source) on a windows machine using the Ubuntu app.

I installed the following dependencies:

$ sudo apt-get install libgsl-dev $ sudo apt-get install libnlopt-dev $ sudo apt-get install libomp-dev $ sudo apt-get install libscotch-dev $ sudo apt-get install libpthread-stubs0-dev $ sudo apt-get install povray

Now I am facing a strange error. Meshing works fine for Hex elements but for tet elements, the core gets dumped. Also it gives different errors every time. Please see the errors below:

1. Info : Meshing... Info : - Preparing... (cl = 0.1077) 100% Info : - 0D meshing... 100% Info : - 1D meshing... 100% Info : - 2D meshing... 0% (0|0/ 0%| 0%| 0%)bnodeqty = 17 (*pN).NodeQty = 3 Error : You have discovered a bug in Neper! Please file an issue at https://github.com/rquey/neper/issues. Thank you.

Aborted (core dumped)

  1. Info : Meshing... Info : - Preparing... (cl = 0.1077) 100% Info : - 0D meshing... 100% Info : - 1D meshing... 100% Info : - 2D meshing... 3% (0|0.63/96%| 4%| 0%)Error : > Meshing of face 19 failed Aborted (core dumped)

  2. Info : Meshing... Info : - Preparing... (cl = 0.1077) 100% Info : - 0D meshing... 100% Info : - 1D meshing... 100% Info : - 2D meshing... 2% (0.39|0.62/100%| 0%| 0%)Error : Bad msh file format version detected! 6/100%| 0%| 0%)Aborted (core dumped)

Please let me know if you have a solution for this. Thank you.

rquey commented 4 years ago

It looks like it does not find Gmsh or Gmsh is broken.

NotRealEngineering commented 4 years ago

Thank you for your response.

  1. Gmsh is available from the command line.
  2. I am not using -gmsh option. I am using this command to mesh: neper -M n100-id1.tess -order 2 -meshqualexpr Odis -meshqualmin 1
  3. This I am not sure. How to check if all the dependencies are resolved or not?

Thank you for your help.

On Fri, Oct 2, 2020 at 8:59 AM Romain Quey notifications@github.com wrote:

It looks like it does not find Gmsh or Gmsh is broken.

  • Is Gmsh available as gmsh from the command line?
  • Are you using option -gmsh? Does it point to a valid Gmsh binary?
  • Did you resolve all dependencies (cmake .. stage) when compiling Gmsh?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rquey/neper/issues/74#issuecomment-702719768, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARAJPWYLJBEHED24LIJZPPDSIXFDZANCNFSM4SA2K4MA .

-- Regards, Not Real Engineering

rquey commented 4 years ago

When you run cmake .., there are messages about whether the dependencies are found or not.

NotRealEngineering commented 4 years ago

Thank you. Indeed some dependencies were missing for Gmsh. I installed them all and now while running cmake .. for gmsh all dependencies are found. I installed the gmsh and neper again after this but still the same issue is there. When I run make test for neper. The following tests fail.

90% tests passed, 29 tests failed out of 282

Total Test time (real) = 160.77 sec

The following tests FAILED: 142 - M_mesh2dalgo_netg (Child aborted) 151 - M_remesh3 (Child aborted) 154 - M_nset3 (Child aborted) 170 - M_interface2 (Child aborted) 175 - V_pretest3 (Child aborted) 177 - V_pretest5 (Child aborted) 242 - V_nodecol (Child aborted) 243 - V_nodecol_real (Child aborted) 244 - V_nodecolscheme (Child aborted) 245 - V_nodescale (Child aborted) 246 - V_nodescale2 (Child aborted) 247 - V_elsetcol (Child aborted) 248 - V_elsetcol_real (Child aborted) 249 - V_elsetcolscheme (Child aborted) 250 - V_elsetscale (Child aborted) 251 - V_elsetscale2 (Child aborted) 252 - V_elsetscaletitle (Child aborted) 253 - V_elsetcol_ori (Child aborted) 254 - V_nodecoo (Child aborted) 255 - V_nodecoo_disp (Child aborted) 256 - V_nodecoofact (Child aborted) 257 - V_slicemesh (Child aborted) 258 - V_slicemesh2 (Child aborted) 267 - V_showelt (Child aborted) 268 - V_dataelt3d (Child aborted) 270 - V_cameracoo2 (Child aborted) 271 - V_cameracoo3 (Child aborted) 273 - V_cameralookat2 (Child aborted) 282 - V_loop (Child aborted) Errors while running CTest make: *** [Makefile:107: test] Error 8

Any help is appreciated.

NotRealEngineering commented 4 years ago

If I run the make test again, this time only 9 tests failed.

97% tests passed, 9 tests failed out of 282

Total Test time (real) = 195.79 sec

The following tests FAILED: 139 - M_mesh2dalgo_mead (Child aborted) 140 - M_mesh2dalgo_dela (Child aborted) 144 - M_mesh3dalgo_netggmsh (Child aborted) 145 - M_mesh3dalgo_netggmne (Child aborted) 150 - M_remesh2 (Child aborted) 151 - M_remesh3 (Child aborted) 154 - M_nset3 (Child aborted) 155 - M_faset (Child aborted) 177 - V_pretest5 (Child aborted) Errors while running CTest make: *** [Makefile:107: test] Error 8

rquey commented 4 years ago

@NotRealEngineering: Please provide the terminal output for this:

neper --rcfile none -T -n 2 -id 1 -reg 1
neper --rcfile none -M n2-id1.tess -mesh3dclreps 1 -mesh2dalgo mead
NotRealEngineering commented 4 years ago

Terminal output for 1st line:

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.0.2
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt
Info   : Running on 12 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey.
Info   : Ignoring initialization file.
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 2 -id 1 -reg 1
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   :   - Setting seeds...
Info   :   - Generating crystal orientations...
Info   :   - Running tessellation...
Info   : Regularizing tessellation...
Info   :   - loop 1/2: 100% del=3
Info   : Writing results...
Info   :     [o] Writing file `n2-id1.tess'...
Info   :     [o] Wrote file `n2-id1.tess'.
Info   : Elapsed time: 0.016 secs.
========================================================================

Terminal output for the second line:

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.0.2
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt
Info   : Running on 12 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey.
Info   : Ignoring initialization file.
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n2-id1.tess -mesh3dclreps 1 -mesh2dalgo mead
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n2-id1.tess'...
Info   :     [i] Parsed file `n2-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.3969) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing... 100% (0.85|0.89/100%)
Info   :   - Fixing 2D-mesh pinches...
Info   :   - 3D meshing... 100% (0.91|0.91/100%| 0%| 0%)
Info   : Searching nsets and fasets...
Info   : Writing mesh results...
Info   :   - Preparing mesh...
Info   :   - Mesh properties:
Info   :     > Node number:       79
Info   :     > Elt  number:      209
Info   :     > Mesh volume:    1.000
Info   :   - Writing mesh...
Info   :     [o] Writing file `n2-id1.msh'...
Info   :     [o] Wrote file `n2-id1.msh'.
Info   : Elapsed time: 0.481 secs.
========================================================================

Thank you.

NotRealEngineering commented 4 years ago

Also would like to mention that meshing works fine for Hex elements. The problem happens only in the case of tet elements.

rquey commented 4 years ago

And can you run

ctest -R M_mesh2dalgo_mead

The commands I made you run previously correspond to this test; so, it should pass.

I think this is a problem with the tests rather than with Neper itself...

As for hex vs tet elements, this is expected, since Gmsh is used only for tet meshing.

NotRealEngineering commented 4 years ago

But still, I am not able to get mesh with tet elements. Following commands still fails

neper -T -n 100 -id 1 neper -M n100-id1.tess -order 2 -meshqualexpr Odis -meshqualmin 1

Output for running:

Test project /mnt/c/Ubuntu_onWin/neper-4.0.2/src/build Start 139: M_mesh2dalgo_mead 1/1 Test #139: M_mesh2dalgo_mead ................Child aborted***Exception: 0.46 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 0.48 sec

The following tests FAILED: 139 - M_mesh2dalgo_mead (Child aborted) Errors while running CTest

rquey commented 4 years ago

So, please provide the terminal output for this one:

neper -T -n 100 -id 1
neper -M n100-id1.tess -order 2 -meshqualexpr Odis -meshqualmin 1
NotRealEngineering commented 4 years ago

The output of the first line:

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.0.2
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt
Info   : Running on 12 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/kulk969/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 100 -id 1
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   :   - Setting seeds...
Info   :   - Generating crystal orientations...
Info   :   - Running tessellation...
Info   : Writing results...
Info   :     [o] Writing file `n100-id1.tess'...
Info   :     [o] Wrote file `n100-id1.tess'.
Info   : Elapsed time: 0.041 secs.
========================================================================

The output of the second line:

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.0.2
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt
Info   : Running on 12 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/kulk969/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n100-id1.tess -order 2 -meshqualexpr Odis
         -meshqualmin 1
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n100-id1.tess'...
Info   :     [i] Parsed file `n100-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.1077) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing...   5% (0|0.97/36%|25%|39%)Error  :     > Meshing of face 34 failed
Aborted (core dumped)
rquey commented 4 years ago

Let's try this:

neper -T -n 10 -dim 2 -o test
neper -M test.tess

If it works, switch dim to 3 and/or n to 100; if it does not, switch n to 1.

NotRealEngineering commented 4 years ago

Works for 2D only. If I switch dim to 3 I get the following error again.

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.0.2
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt
Info   : Running on 12 threads.
Info   : <http://neper.info>
Info   : Copyright (C) 2003-2020, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/kulk969/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] test.tess
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `test.tess'...
Info   :     [i] Parsed file `test.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.2321) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing...  23% (0.38|0.68/100%| 0%| 0%)Error  :     > Meshing of face 17 failed
Aborted (core dumped)
rquey commented 4 years ago

Can you run export OMP_NUM_THREADS=1 and run again Neper. Does it fail always for the same face?

(Enclose your code by ```s when you paste.)

NotRealEngineering commented 4 years ago

Now it works! No error with more number of grains as well.

Can you please explain what was wrong? so that I will keep the note for the future.

Thanks a lot.

rquey commented 4 years ago

export OMP_NUM_THREADS=1 makes Neper run on 1 core only (no multithreading)...

So, it seems that multithreading does not work properly on Windows 10 / Ubuntu App. Good to know...

You can also compile Neper without openMP support, so that Neper won't try to multithread. To do so, use cmake -DHAVE_OPENMP=OFF .. (instead of cmake ..) before running make. You will then not need to run export OMP_NUM_THREADS=1.

NotRealEngineering commented 4 years ago

Sure. I will do that.

Just wanted to share with you, I make educational YouTube videos on many topics related to modeling and did a few about software Neper.

You can find them here:

https://youtu.be/ImOU7ZysEH4

https://youtu.be/HEOJiO_r1NU

https://youtu.be/YlQjMjUDkTE

Thank you very much for your help. Keep up the good work.

rquey commented 4 years ago

Yes, I saw that. Nice!

NotRealEngineering commented 4 years ago

Thank you again.

sameeraljanaby commented 9 months ago

Hi sir : i have another problem if you can help me plaese becouse it take along time from me and i cant solve it i use ubuntu on win 10 and i do the same instructions that ( Not Real Engineering) do in the channel on youtube and i install all dependancies as he do. i will send you the running terminal .

export OMP_NUM_THREADS=1
sameer@DESKTOP-JSN2KJA:/mnt/e/neper$ neper -T -n 100 -id 1

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.8.0
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 1 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/sameer/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -T loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] -n 100 -id 1
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   : Creating domain...
Info   : Creating tessellation...
Info   :   - Setting seeds...
Info   :   - Running tessellation...
Info   : Generating crystal orientations...
Info   : Writing results...
Info   :     [o] Writing file `n100-id1.tess'...
Info   :     [o] Wrote file `n100-id1.tess'.
Info   : Elapsed time: 0.033 secs.
========================================================================

sameer@DESKTOP-JSN2KJA:/mnt/e/neper$  neper -V n100-id1.tess -datacellcol id -print Image_1

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.8.0
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 1 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/sameer/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -V loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n100-id1.tess -datacellcol id -print Image_1
Info   : ---------------------------------------------------------------
Info   :   - Reading arguments...
Info   : Loading tessellation...
Info   :     [i] Parsing file `n100-id1.tess'...
Info   :     [i] Parsed file `n100-id1.tess'.
Info   : Reading data (cell, col)...
Info   : Printing image...
Info   :   - Printing tessellation...
Info   :   - Generating png file (1200x900 pixels)...
Info   :     [o] Writing file `Image_1.png'...
Info   :     [o] Wrote file `Image_1.png'.
Info   : Printing scale...
Info   : Elapsed time: 1.594 secs.
========================================================================

sameer@DESKTOP-JSN2KJA:/mnt/e/neper$ neper -M n100-id1.tess -meshqualmin 1

========================    N   e   p   e   r    =======================
Info   : A software package for polycrystal generation and meshing.
Info   : Version 4.8.0
Info   : Built with: gsl|muparser|opengjk|openmp|nlopt|libscotch (full)
Info   : Running on 1 threads.
Info   : <https://neper.info>
Info   : Copyright (C) 2003-2022, and GNU GPL'd, by Romain Quey.
Info   : No initialization file found (`/home/sameer/.neperrc').
Info   : ---------------------------------------------------------------
Info   : MODULE  -M loaded with arguments:
Info   : [ini file] (none)
Info   : [com line] n100-id1.tess -meshqualmin 1
Info   : ---------------------------------------------------------------
Info   : Reading input data...
Info   :   - Reading arguments...
Info   : Loading input data...
Info   :   - Loading tessellation...
Info   :     [i] Parsing file `n100-id1.tess'...
Info   :     [i] Parsed file `n100-id1.tess'.
Info   : Meshing...
Info   :   - Preparing... (cl = 0.1077) 100%
Info   :   - 0D meshing... 100%
Info   :   - 1D meshing... 100%
Info   :   - 2D meshing... 100% (0.045|0.64/95%| 4%| 1%)
Info   :   - Fixing 2D-mesh pinches...
Info   :   - 3D meshing... Error  :   - Failed to read msh file
Aborted (core dumped)
that the error . plaese if you can help me . thank you 
rquey commented 9 months ago

Update to version 4.8.1.

sameeraljanaby commented 9 months ago

@rquey its solved thank you very much ... neper now worked without any problems after update.