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

A performance issue #43

Open
zkk960317 opened this issue Dec 1, 2024 · 11 comments
Open

A performance issue #43

zkk960317 opened this issue Dec 1, 2024 · 11 comments

Comments

@zkk960317
Copy link

There may be performance issues in FerriteGmsh, as importing such a small-scale grid actually took 2 minutes.

using Ferrite,  FerriteGmsh
@time grid = togrid("periodic-rve.msh")

Output:

Info    : Reading 'periodic-rve.msh'...
Info    : 38 entities
Info    : 6097 nodes
Info    : 12192 elements
Info    : Done reading 'periodic-rve.msh'
119.920582 seconds (132.54 k allocations: 8.574 MiB)
Grid{2, Triangle, Float64} with 11904 Triangle cells and 6097 nodes 
@zkk960317 zkk960317 changed the title performance issue A performance issue Dec 1, 2024
@koehlerson
Copy link
Member

Are you on master or latest release?

@zkk960317
Copy link
Author

zkk960317 commented Dec 5, 2024

Are you on master or latest release?

cpu: Ryzen 2700
windows 10 + julia 1.10 + Ferrite 1.0 + FerriteGmsh 1.2.1

@fredrikekre
Copy link
Member

Can you upload the grid file?

@zkk960317
Copy link
Author

@fredrikekre periodic-rve.zip
This is from the example "heat equation" in the document of FerriteInterfaceElements.jl.

@koehlerson
Copy link
Member

I think you should try master there are performance improvements on the branch

@fredrikekre
Copy link
Member

For me reading that file is around 1 second on both the latest release and the master branch.

@zkk960317
Copy link
Author

I found that most of the time is spent on Gmsh initialization in Line 184 of FerriteGmsh.jl, but I don't know why.

using FerriteGmsh, Gmsh
@timev should_finalize = Gmsh.initialize()

Output:

113.228773 seconds (3 allocations: 160 bytes)
elapsed time (ns):  113228773100
gc time (ns):       0
bytes allocated:    160
pool allocs:        3
non-pool GC allocs: 0
minor collections:  0
full collections:   0
true

@fredrikekre
Copy link
Member

Whats the output of versioninfo() on your machine?

@zkk960317
Copy link
Author

Whats the output of versioninfo() on your machine?

Julia Version 1.10.1
Commit 7790d6f064 (2024-02-13 20:41 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 16 × AMD Ryzen 7 2700 Eight-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, znver1)
Threads: 12 default, 0 interactive, 6 GC (on 16 virtual cores)
Environment:
JULIA_PKG_SERVER = https://mirrors.pku.edu.cn/julia/
JULIA_EDITOR = code
JULIA_NUM_THREADS = 12

@zkk960317
Copy link
Author

When I updated Julia to 1.10.7 with Gmsh 0.3.1, the problem still exists.

@KnutAM
Copy link
Member

KnutAM commented Dec 9, 2024

I sometimes had issues with gmsh on windows, and it worked better with wsl.
Also, just a hunch, did you check the system monitor - did some virus software run heavy (that has given me issues before)

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

4 participants