I am interested in solving a sequence of linear systems of the form: $$A x_i = b_i$$ That is, all the systems use the same matrix $A$ but they have different right hand sides. The matrix $A$ is sparse symmetric positive definite. I am currently using CHOLMOD to solve each system. Obviously, I factorize $A$ once (Cholesky factorization) and then I perform the forward/backward solves sequentially.
I am now trying to parallelize these operations. I would like to find the $x_i$'s in parallel. On my first attempt using pthreads
, I couldn't get more than 2X speed-up on a quad-core i7 machine. I am guessing that I couldn't go beyond 2X because the operations that I am trying to parallelize are so fast that their runtime is comparable to the time required to read the Cholseky factorization matrices from the memory and to send them to each core. I am not sure of that as I am not very experienced in parallel programming.
My question is: is there a better way of doing this? Would I expect higher speed-ups if I used other programming paradigms? Also, are you aware of any solvers out there that already perform this parallelization. (I am not interested in packages that parallelize one system solve).
The problem seems embarrassingly parallel and I expected speed-ups very close to 4X on a quad-core machine as there are no dependencies between the tasks.
Thank you