Thanks for your prompt response yesterday.

I have been using ViennaCL for a number of months and only joined the support group yesterday ! I therefore have a back catologue of queries that I hope you can assist with.

_Background _
1. writing a bundle least squares adjustment for my masters.
The matrices I am solving have the following properties.
1. Design matrices are large and very sparse
2. The Normal matrice (I have seen this called the Hessian) is also large and sparse but has a systematic structure (with correct parameter arrangement
- One partition is comprised of 3x3 blocks down the diagonal
- One partition is effectively a solid block of data
- The matrix is symetrical (not sure that is the right term). The upper triangular data is mirrored in the lower triangular part.

_Matrix Formation
_
From the ViennaCL help I interpreted that there is a overhead associated with computing on the CPU and then copying element by element to the GPU. Therefore I am using Eigen matrices to form the design matrices (which are sparse).

I continue using Eigen to multiple the matrices to get the Normal Matrix (or Hessian). I have found that multipling sparse matrices is very efficient even on the CPU so have kept uses Eigen.

_Normal Equation solution_

I then do the solution using ViennaCL.

_Question 1._

I am using the Levenberg-Marquardt method to assist in the solution. This applies a damping term down the main diagonal which assists in convergence and minimizing iterations. - Currently I apply this damping term by multiplying element by element down the diagonal.

Is there a more efficient way to do this in ViennaCL (i.e. multiplying a scalar along the diagonal)?

_Question 2._

The Normal equation is sparse but the resultant Inverse is dense.
I solve using Norm_inv = viennacl::linalg::solve(Norm, I, upper_tag()); // I is the identity matrix

The Normal inverse is required as it contains information required for statistical analysis of the solution.

Is it possible to solve a sparse matrix and generate a dense matrix solution ?

_Question 3.
_
What is the suggested solver to use for a symmetric matrix with the block structure I describe above.
upper_tag() or cg_tag() ?

_Question 4.
_
I have looked at the reorder function. However I am not sure whether I need this as I can control the matrix structure by organizing the parameter order in the design matrix.

Just for my own interest I found bandwidth-reduction.cpp on the website.

I cut out these three lines which I believe are the main function calls

std::vector<int> r = generate_random_reordering(n);
std::vector< std::map<int, double> > matrix2 = reorder_matrix(matrix, r);
r = viennacl::reorder <http://viennacl.sourceforge.net/doc/namespaceviennacl.html#af22338e452cee008bee5e38070ddc611>(matrix2, viennacl::gibbs_poole_stockmeyer_tag <http://viennacl.sourceforge.net/doc/structviennacl_1_1gibbs__poole__stockmeyer__tag.html>());

I don't understand how this works (I haven't looked up the map class).
A. Does the original Matrix get rearranged ?
B. How is the resultant Vector used elsewhere.
C. Do you need to unorder later on ?
- I need to multiple the Inverse by another matrix to generate the final solution. - I would need to unorder the inverse or reorder this second matrix the same way.
   - I also need to know how to find the correct solution elements.

_Question 5.
_
I am currently using a computer with a AMD Radeon HD 7600M Series graphics card.
My understanding is that I can only use OpenCL for GPU operations.

I am considering getting a machine with a NVIDIA graphics card as I understand that this enable using CUDA.

Is CUDA the most mature and best option for GPU processing (specifically for ViennaCL).

I notice that ViennaCL has an open for VIENNACL_WITH_OPENMP define.
I am not sure what OpenMP actually does but should this be enabled and I assume OpenMP installed ?

I apologize for all the questions at once.

Regards,

Alan Buchanan



------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
ViennaCL-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-support

Reply via email to