I am developing a library on Visual Studio 2012 (Windows 10, x64).
I've hooked up ViennaCL to my code primarily to "invert" the sparse matrices I get out of Armadillo. The latter is used extensively in my code and can't be easily swapped out. I am using ViennaCL's bicgstab to invert a large sparse matrix. Armadillo is hooked up to Intel's MKL.
I have 3 questions about interfacing ViennaCL with Armadillo that the examples didn't quite make clear.
Is the standard bicgstab solver automatically parallelized with OpenMP even if a preconditioner isn't used? This doesn't seem to be the case, as my core utilization doesn't seem to show this.
How does one go about hooking up the ILU preconditioner to my Armadillo matrix? It is not symmetric, and Armadillo uses the CSC format.
Is the ILU-preconditioned bicgstab solver automatically parallelized on OpenMP?
I would appreciate your help, possibly with code examples for 2!
Thanks,
Varun Shankar
University of Utah
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
1.) BiCGStab is parallelized via OpenMP if VIENNACL_WITH_OPENMP is defined (before including any ViennaCL headers) and OpenMP support is enabled in the compiler.
2.) You have to transfer the data from your Armadillo matrix over to the viennacl::compressed_matrix if you want to use a preconditioner. Use viennacl::copy() to do so.
3.) ILU-preconditioned BiCGStab is only OpenMP-parallelized if the conditions of 1.) are fulfilled and if the ILU-preconditioner you use is the chow_patel_ilu. Standard ILU0 or ILUT are not parallelized, because these are inherently sequential algorithms.
Best regards,
Karli
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the prompt reply! This clears up a lot for me.
A follow-up question: Armadillo allows you to directly access the matrix data with a pointer. Can ViennaCL utilize this, rather than forcing a copy into a viennacl::compressed_matrix? I imagine these copies will slow down my program if my matrix is changing every time-step in a simulation.
Thanks again,
Varun
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am developing a library on Visual Studio 2012 (Windows 10, x64).
I've hooked up ViennaCL to my code primarily to "invert" the sparse matrices I get out of Armadillo. The latter is used extensively in my code and can't be easily swapped out. I am using ViennaCL's bicgstab to invert a large sparse matrix. Armadillo is hooked up to Intel's MKL.
I have 3 questions about interfacing ViennaCL with Armadillo that the examples didn't quite make clear.
Is the standard bicgstab solver automatically parallelized with OpenMP even if a preconditioner isn't used? This doesn't seem to be the case, as my core utilization doesn't seem to show this.
How does one go about hooking up the ILU preconditioner to my Armadillo matrix? It is not symmetric, and Armadillo uses the CSC format.
Is the ILU-preconditioned bicgstab solver automatically parallelized on OpenMP?
I would appreciate your help, possibly with code examples for 2!
Thanks,
Varun Shankar
University of Utah
Hi Varun,
1.) BiCGStab is parallelized via OpenMP if VIENNACL_WITH_OPENMP is defined (before including any ViennaCL headers) and OpenMP support is enabled in the compiler.
2.) You have to transfer the data from your Armadillo matrix over to the viennacl::compressed_matrix if you want to use a preconditioner. Use viennacl::copy() to do so.
3.) ILU-preconditioned BiCGStab is only OpenMP-parallelized if the conditions of 1.) are fulfilled and if the ILU-preconditioner you use is the chow_patel_ilu. Standard ILU0 or ILUT are not parallelized, because these are inherently sequential algorithms.
Best regards,
Karli
Hi Karli,
Thanks for the prompt reply! This clears up a lot for me.
A follow-up question: Armadillo allows you to directly access the matrix data with a pointer. Can ViennaCL utilize this, rather than forcing a copy into a viennacl::compressed_matrix? I imagine these copies will slow down my program if my matrix is changing every time-step in a simulation.
Thanks again,
Varun