Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error reading .msh #75

Closed
fihu55 opened this issue Mar 8, 2024 · 6 comments
Closed

Error reading .msh #75

fihu55 opened this issue Mar 8, 2024 · 6 comments

Comments

@fihu55
Copy link

fihu55 commented Mar 8, 2024

Hello together,

I tried simply to load the demo.msh file as follows with Julia 1.10.2

using Gridap
using GridapGmsh

# load msh
model = GmshDiscreteModel("./demo/demo.msh")

getting this error message:

Info    : Reading './demo/demo.msh'...
Info    : 188 entities
Info    : 10257 nodes
Info    : 41006 elements
Info    : Done reading './demo/demo.msh'

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x7fffa8f339e8 -- gc_try_claim_and_push at C:/workdir/src\gc.c:1834 [inlined]
gc_mark_obj8 at C:/workdir/src\gc.c:1856
in expression starting at none:0
gc_try_claim_and_push at C:/workdir/src\gc.c:1834 [inlined]
gc_mark_obj8 at C:/workdir/src\gc.c:1856
gc_mark_outrefs at C:/workdir/src\gc.c:2634 [inlined]
gc_mark_loop_serial_ at C:/workdir/src\gc.c:2690
gc_mark_loop_serial at C:/workdir/src\gc.c:2713
gc_mark_loop at C:/workdir/src\gc.c:2908 [inlined]
_jl_gc_collect at C:/workdir/src\gc.c:3241
ijl_gc_collect at C:/workdir/src\gc.c:3538
maybe_collect at C:/workdir/src\gc.c:937 [inlined]
jl_gc_pool_alloc_inner at C:/workdir/src\gc.c:1293 [inlined]
jl_gc_pool_alloc_noinline at C:/workdir/src\gc.c:1350 [inlined]
jl_gc_alloc_ at C:/workdir/src\julia_internal.h:476 [inlined]
jl_gc_alloc at C:/workdir/src\gc.c:3590
_new_array_ at C:/workdir/src\array.c:134
_new_array at C:/workdir/src\array.c:198 [inlined]
ijl_alloc_array_1d at C:/workdir/src\array.c:436
Array at .\boot.jl:477 [inlined]
Array at .\boot.jl:496 [inlined]
DomTreeNode at .\compiler/ssair\domtree.jl:207 [inlined]
compute_domtree_nodes! at .\compiler/ssair\domtree.jl:253
update_domtree! at .\compiler/ssair\domtree.jl:247 [inlined]
construct_domtree at .\compiler/ssair\domtree.jl:229
get! at .\compiler\inferencestate.jl:178 [inlined]
perform_lifting! at .\compiler/ssair\passes.jl:686
sroa_pass! at .\compiler/ssair\passes.jl:1113
run_passes at .\compiler\optimize.jl:489
run_passes at .\compiler\optimize.jl:504 [inlined]
optimize at .\compiler\optimize.jl:453 [inlined]
_typeinf at .\compiler\typeinfer.jl:272
typeinf at .\compiler\typeinfer.jl:216
typeinf_edge at .\compiler\typeinfer.jl:930
abstract_call_method at .\compiler\abstractinterpretation.jl:629
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:95
abstract_call_known at .\compiler\abstractinterpretation.jl:2087
abstract_call at .\compiler\abstractinterpretation.jl:2169
abstract_call at .\compiler\abstractinterpretation.jl:2162
abstract_call at .\compiler\abstractinterpretation.jl:2354
abstract_eval_call at .\compiler\abstractinterpretation.jl:2370
abstract_eval_statement_expr at .\compiler\abstractinterpretation.jl:2380
abstract_eval_statement at .\compiler\abstractinterpretation.jl:2624
abstract_eval_basic_statement at .\compiler\abstractinterpretation.jl:2913
typeinf_local at .\compiler\abstractinterpretation.jl:3098
typeinf_nocycle at .\compiler\abstractinterpretation.jl:3186
_typeinf at .\compiler\typeinfer.jl:247
typeinf at .\compiler\typeinfer.jl:216
typeinf_ext at .\compiler\typeinfer.jl:1051
typeinf_ext_toplevel at .\compiler\typeinfer.jl:1082
typeinf_ext_toplevel at .\compiler\typeinfer.jl:1078
jfptr_typeinf_ext_toplevel_38986.1 at [...]\AppData\Local\Programs\Julia-1.10.2\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2894 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:3076 [inlined]
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_type_infer at C:/workdir/src\gf.c:394
jl_generate_fptr_impl at C:/workdir/src\jitlayers.cpp:502
jl_compile_method_internal at C:/workdir/src\gf.c:2480
jl_compile_method_internal at C:/workdir/src\gf.c:2372 [inlined]
_jl_invoke at C:/workdir/src\gf.c:2886 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:3076
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:812
#invokelatest#2 at .\essentials.jl:892 [inlined]
invokelatest at .\essentials.jl:889 [inlined]
display_error at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\eval.jl:375
unknown function (ip: 000001dbf27f128f)
#67 at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\eval.jl:223
withpath at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\repl.jl:274
#66 at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\eval.jl:179
hideprompt at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\repl.jl:38
#65 at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\eval.jl:150
unknown function (ip: 000001dbf27ec64b)
with_logstate at .\logging.jl:515
with_logger at .\logging.jl:627 [inlined]
#64 at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\eval.jl:255
unknown function (ip: 000001dbf27eae4b)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:812
#invokelatest#2 at .\essentials.jl:892 [inlined]
invokelatest at .\essentials.jl:889
unknown function (ip: 000001dbf27e089b)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
do_apply at C:/workdir/src\builtins.c:768
#62 at [...]\.vscode\extensions\julialang.language-julia-1.65.2\scripts\packages\VSCodeServer\src\eval.jl:34
unknown function (ip: 000001dbf27c9764)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
start_task at C:/workdir/src\task.c:1238
Allocations: 10650842 (Pool: 10641834; Big: 9008); GC: 15
@JordiManyer
Copy link
Member

JordiManyer commented Mar 9, 2024

@fihu55 I'm looking into it, but basically it's caused by the new version on the gmsh_jll artifact. A temporary fix would be to pin that package to 4.11.1.
I'll try to see what can be done to get this working also with 4.12.2, but I'm afraid I know very little about Gmsh.

EDIT:

After having a look at the changelog for Gmsh 4.12, some API calls seem be changed:

4.12.2 (January 21, 2024): small bug fixes.

4.12.1 (January 11, 2024): small bug fixes.

4.12.0 (December 21, 2023): new high-order mesh optimisation mode for periodic
meshes; new element qualities available through API; new IGES export; new volume
glyph; OCC curve loops can now be oriented based on the sign of the first curve;
better mesh node visualization; added suppport for model attributes in MSH2
files; new mesh renumbering capabilities in the API; new GAMBIT mesh reader;
replaced Geometry.OCCSafeUnbind with more flexible Geometry.OCCFastUnbind (which
can be set for boolean operations as well); added support for editing STEP
headers; small bug fixes.

* New API functions: model/getEntitiesForPhysicalName, mesh/computeRenumbering,
  mesh/getVisibility.

* Incompatible API changes: new optional argument to occ/addCircleArc,
  mesh/renumberNodes, mesh/renumberElements and view/getListData; new optional
  "interruptible" argument to gmsh.initialize() in Python

In particular, I thing we are using the renumberXXX functions. This is where the error lies.

@fihu55
Copy link
Author

fihu55 commented Mar 9, 2024

@JordiManyer thanks very much, now it works as intended.

@JordiManyer
Copy link
Member

Hey @fihu55 , I can no longer reproduce the error.
Can you see if it's also resolved for you? Unpin the gmsh_jll artifact and try again. Hopefully it is resolved for you as well. If so, I believe it might have been caused by one of the sub-dependencies of gmsh_jll.

@fihu55
Copy link
Author

fihu55 commented Mar 11, 2024

@JordiManyer still have the same issue with gmsh_jll 4.12.2 :(

@JordiManyer
Copy link
Member

JordiManyer commented Mar 11, 2024

@fihu55 Just to be sure, can you Pkg.update() and Pkg.build() and then try again?

@fihu55
Copy link
Author

fihu55 commented Mar 11, 2024

@JordiManyer now it works, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants