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

Compatibility with multithreading #12

Open
mjyshin opened this issue Jun 21, 2021 · 3 comments
Open

Compatibility with multithreading #12

mjyshin opened this issue Jun 21, 2021 · 3 comments

Comments

@mjyshin
Copy link

mjyshin commented Jun 21, 2021

I wanted to look at a range of parameters on the same system, so I tried using Threads.@threads on the for loop, and I got the following error:

    nested task error: Allocations in assembly loop: cells: 208, bfaces: 0
    See the documentation of `check_allocs!` for more information

It runs just fine if I run it in series, but I thought I would try to speed up the process any way I could. Is this something VoronoiFVM cannot handle (yet), or did I fumble somewhere? Thank you!

@j-fu
Copy link
Owner

j-fu commented Jun 21, 2021

Hi, thanks for asking. Parallelization is in the plans, but this will need some work:

  • grid partitioning + partition graph coloring
  • multithreaded sparse matrix assembly
  • parallel iterative solvers
    The later point possibly can be handeled relatively independently, there is a master thesis running on this and we will see if this functionality could be added first.

In the moment the multithreaded loop would end up in write conflicts.

@mjyshin
Copy link
Author

mjyshin commented Jun 21, 2021

Thank you for your reply, that sounds great, and I will patiently await the updates!

Two unrelated questions I had were 1) if there was a way to do unstructured/random Delaunay triangulation, even on a domain like (0,1) x (0,1), and 2) if you had any plans for an adaptive (i.e., time dependent) mesh at any point in the future?

@j-fu
Copy link
Owner

j-fu commented Jun 22, 2021

Hi,

as for 1) Have a look at SimplexGridFactory.jl - this package has been made for this purpose.
For 2): this has lesser priority than other things (and would need some input from math regarding error estimators etc.)

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