Hi,

make sure to use Eigen's head, and to compile with OpenMP enabled on your
compiler, for instance with -fopenmp with GCC.

Gaël

On Thu, Sep 10, 2020 at 6:25 AM ztdepyahoo <[email protected]> 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);
>
>
>
>
>
>
>
> ztdepyahoo
> [email protected]
>
> <https://maas.mail.163.com/dashi-web-extend/html/proSignature.html?ftlId=1&name=ztdepyahoo&uid=ztdepyahoo%40gmail.com&iconUrl=https%3A%2F%2Fmail-online.nosdn.127.net%2Fsmac21b248a56949de9f08898ddfa22c2b.jpg&items=%5B%22ztdepyahoo%40gmail.com%22%5D>
> 签名由 网易邮箱大师 <https://mail.163.com/dashi/dlpro.html?from=mail81> 定制
>

Reply via email to