gridap / GridapGmsh.jl

Gmsh generated meshes for Gridap
MIT License
42 stars 20 forks source link

wrong placement of gmsh.dll inside gmsh_jll build? #38

Open c-schubert opened 3 years ago

c-schubert commented 3 years ago

Hi, hope this is the right place to post this issue...

In the artifact folder of the gmsh_jll.jl package, which is used by GridapGmsh ( if $GMSHROOT is not set) the gmsh.dll is placed inside the bin folder. The gmsh.initialize() in GmshDiscreteModels.jl (line 12)` of the gmsh.jl (which is placed in the lib folder of the gmsh_jll artifact) is looking in the same folder (lib folder) for the gmsh.dll, but as said its located inside the bin folder (which should be wrong, i guess).

fverdugo commented 3 years ago

Is this a problem that we can solve in GridapGmsh or is something that has to be done in https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/api/gmsh.jl ?

fverdugo commented 3 years ago

It seems that gmsh.jl in master version supports windows. See this line https://gitlab.onelab.info/gmsh/gmsh/-/blob/master/api/gmsh.jl#L25

(I do not have windows, so I cannot reproduce the issue and figure out what is happening in a more precise way)

Perhaps you can point GMSHROOT to a newer verion of gmsh and see what happens. If this works, we need to open PR in gmsh_jll to inlcude a newer version of gmsh.

c-schubert commented 3 years ago

Yes, it supports windows and if I download the gmsh SDK for Windows the gmsh.dll is located in the lib dir instead of the bin dir, as it is in the gmsh_jll artifacts folder. If i use the SDK with $GMSHROOT set GridapGmsh works fine. So I think that there are some "wrong" Parameters set in here: https://github.com/JuliaPackaging/Yggdrasil/blob/master/G/gmsh/build_tarballs.jl -> because the movement of the gmsh.dll to the bin folder is explicitly mentioned in the windows wrapper files i.e.: https://github.com/JuliaBinaryWrappers/gmsh_jll.jl/blob/main/src/wrappers/x86_64-w64-mingw32-cxx11.jl .

Maybe in GridapGmsh we could try to copy the file to the lib folder inside the gmsh_jll artifacts folder, but even if this should work, that would be some kind of dirty hack. I will try to find out, were exactly things go wrong an report back later ...

c-schubert commented 3 years ago

I opened a new issue here: https://github.com/JuliaPackaging/Yggdrasil/issues/2502 ,it would probably take me several hours to find the actual problem, so I hope that someone who knows better than me will figure out the exact cause (and possible solution)

I would suggest waiting to close this issue at this place until this issue in the build processes can be solved. In the meantime maybe some note in the README.md (under Installation requirements) could be written for windows user to only proceed with the second option (of course PR #37 had to be merged before to make this work for the windows users...)

fverdugo commented 3 years ago

Hi @c-schubert Yes, if you add a note for windows users, the PR #37 can be merged.