-
Notifications
You must be signed in to change notification settings - Fork 35
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
WIP: Multithreading #230
WIP: Multithreading #230
Conversation
Steps to reproduce:
|
What exactly are you multi-threading here? I couldn't tell from the diff - so would help to have a quick explanation. |
I am trying to spawn several tasks that independently solve linear systems and generate and write current maps |
@ranjanan Can you document what you tried here and experiments with RR? |
Currently runs but with returns incorrect result on raster pairwise. PR for AMG submitted: JuliaLinearAlgebra/AlgebraicMultigrid.jl#68 |
Say I have 4 cores, and hence 4 threads, but I spawn 100 solves. Won't those 100 solves be concurrently updating this data structure, unless you schedule the solves to ensure that each processor is only working on one solve at a time? I think you need to implement locking in the AMG code, so that each thread that is solving has a lock on the AMG data structure until its job is done, you should get it to work correctly. |
I had a similar issue with Omniscape, which is why I had to expand the array along a third dimension, with one slice per thread -- not the most ideal solution memory-wise, but not sure what the lock/unlock overhead might be with so many solves (can be one solve per second or even faster). |
Seeing errors with SharedArrays makes me feel that we really should just get multi-threading done. I feel like we were really close the last time and need to correctly handle a couple of races in AMG. |
Yes, you are right. Trying to find bandwidth, which is a little elusive. |
Will try to make a push this month |
Error I'm stuck on just now: when I'm running multi-threaded, I get NaNs for my voltages