Re: [eigen] help: eigen3.3 desn't imporve the speed with multitreading.

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


sory for that. the "return 1" is my first question, i have solved it.
regards

On 9/11/2020 01:20David Tellenbach<david.tellenbach@xxxxxx> wrote:
Hi,

Sorry, I'm a bit confused:

I have set the tread =12 in the program .  Eigen::nbThreads( ) also feedbacks correct number. 

So Eigen::nbThreads() returns the correct number of threads but in your code snippet you say

     std::cout << "THREADS = " << nthreads <<std::ends; // returns '1'

What's the case?

Thanks,
David

On 10. Sep 2020, at 06:24, ztdepyahoo <ztdepyahoo@xxxxxxxxx> wrote:

I have set the tread =12 in the program .  Eigen::nbThreads( ) also feedbacks correct number. 
but the speed of solution seems doesn't change. 
what is the reason.
Regards



    Eigen::setNbThreads(12);
     int nthreads = Eigen::nbThreads( );
     std::cout << "THREADS = " << nthreads <<std::ends; // returns '1'
    BiCGSTAB<SparseMatrix<double, RowMajor>, IncompleteLUT<double>> solver;
    solver.setTolerance(1e-10);
    solver.setMaxIterations(1000);
    solver.compute(A);
    VectorXd x = solver.solve(b);




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/