Menu

No scale with openMP

Dmitriy
2018-04-20
2018-04-23
  • Dmitriy

    Dmitriy - 2018-04-20

    Hello.
    Using ViennaCl to solve large linear system for finite element geomechanics.

    Can't get speed up using #define VIENNACL_WITH_OPENMP.

    This is a code:

    omp_set_num_threads(8);
    viennacl::linalg::ilut_precond< ublas::compressed_matrix<double> > ublas_ilut(matrix,viennacl::linalg::ilut_tag()
    viennacl::linalg::bicgstab_tag tag(1.0e-13, 1000, 300);
    res = viennacl::linalg::solve(matrix, B, tag, ublas_ilut);

    As i see, i have only speed up during making preconditioner (proc load go up to 80%)
    during solve operation I have 25%.

    I have a -fopenmp flag)

    Maybe a problem because i launch a solver from separate thred (GUI launch a solver in separate thread, and as I think this thred need to lauch more threads for parallel solving).

    Will be very grateful for some ideas abou it..

     
  • Karl Rupp

    Karl Rupp - 2018-04-20

    Hi,
    ILUT is not a parallel preconditioner, so it can only work with a single thread. Consider the chow_patel_ilu0 preconditioner, which works in parallel, or the algebraic multigrid preconditioners. If your system is well-behaved, you may also try to run without a preconditioner.

     
  • Dmitriy

    Dmitriy - 2018-04-20

    So I tried without preconditioner at all, and proc load remain 25%. Do you know if bicgstab solver parallel using openMP?

     

    Last edit: Dmitriy 2018-04-20
  • Dmitriy

    Dmitriy - 2018-04-20

    about 3millions of unknowns.
    And in each row of a matrix about 60 non-zero elements

     
  • Dmitriy

    Dmitriy - 2018-04-20

    So in my iterative_operations.hpp no such lines:
    #pragma omp parallel for reduction(+: inner_prod_ApAp, inner_prod_pAp, inner_prod_Ap_r0star)
    I downloaded it from http://viennacl.sourceforge.net/.
    Do I need to take a dev version from github?

     
    • Karl Rupp

      Karl Rupp - 2018-04-20

      Yes, please try dev-version from GitHub. I don't remember the exact timeline; it is possible that OpenMP-support has only been added after the last release.

       
  • Dmitriy

    Dmitriy - 2018-04-23

    Hello. I tried different iterative solvers and a clear cpp code, not launched from another thread (without GUI). I compiled it on MinGW, g++, but I have not scale in no case. Maybe you have an example with OpenMp Acceleration? To test it.

     
    • Karl Rupp

      Karl Rupp - 2018-04-23

      Which hardware do you run on? On desktop CPUs with just 2-4 cores it's often hard to see notable performance gains, because memory channels may be saturated with just a single core.

       

Log in to post a comment.