Author Topic: Using the Pastix and Pardiso solver  (Read 1014 times)

AWinterstein

  • Newbie
  • *
  • Posts: 21
Using the Pastix and Pardiso solver
« on: March 18, 2016, 10:39:12 AM »
Hello together,

we want to use the Pastix and the Pardiso solver in Kratos in order to solve a large structural mechanics problem.
Is there some How to for the use of the Pastix?

When using the Pardiso with the MKL application we receive the following error:

ImportError: /opt/intel/composerxe/mkl/lib/intel64/libmkl_intel_ilp64.so: undefined symbol: mkl_vsl_serv_threader_for​

Thank you in advance for your help.

Regards

Andreas

Hgiang

  • Newbie
  • *
  • Posts: 3
Re: Using the Pastix and Pardiso solver
« Reply #1 on: March 19, 2016, 04:49:30 PM »
Hi Andreas

It likely happens that the current search for MKL libraries in the cmake module does not have a good sequence, hence some symbols may be missed during dynamic linking. In my experience, one way to bypass it is to force system to preload the libraries, i.e add

source /opt/intel/bin/compilervars.sh intel64
export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_intel_thread.so:$LD_PRELOAD
export LD_PRELOAD=/opt/intel/mkl/lib/intel64/libmkl_core.so:$LD_PRELOAD
export LD_PRELOAD=/opt/intel/composer_xe_2013.1.117/compiler/lib/intel64/libiomp5.so:$LD_PRELOAD

to your .bashrc

Hope it helps

Giang

AWinterstein

  • Newbie
  • *
  • Posts: 21
Re: Using the Pastix and Pardiso solver
« Reply #2 on: March 21, 2016, 03:15:13 PM »
Hi Giang,

thank you. This worked.
But now we get another error. Do you know anything about this?

Traceback (most recent call last):
  File "KratosStructuralOpenMP.py", line 202, in <module>
    main_step_solver.Initialize()
  File "/home/emiroglu/software/kratos/applications/SolidMechanicsApplication/python_scripts/mechanical_solver.py", line 154, in Initialize
    self.SetBuilderAndSolver()
  File "/home/emiroglu/software/kratos/applications/SolidMechanicsApplication/python_scripts/mechanical_solver.py", line 238, in SetBuilderAndSolver
    self.builder_and_solver = ResidualBasedBuilderAndSolver(self.linear_solver)
Boost.Python.ArgumentError: Python argument types in
    ResidualBasedBuilderAndSolver.__init__(ResidualBasedBuilderAndSolver, ParallelMKLPardisoSolver)
did not match C++ signature:
    __init__(_object*, boost::shared_ptr<Kratos::LinearSolver<Kratos::UblasSpace<double, boost::numeric::ublas::compressed_matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, 0ul, boost::numeric::ublas::unbounded_array<unsigned long, std::allocator<unsigned long> >, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >, Kratos::UblasSpace<double, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >, Kratos::Reorderer<Kratos::UblasSpace<double, boost::numeric::ublas::compressed_matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, 0ul, boost::numeric::ublas::unbounded_array<unsigned long, std::allocator<unsigned long> >, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > >, Kratos::UblasSpace<double, boost::numeric::ublas::matrix<double, boost::numeric::ublas::basic_row_major<unsigned long, long>, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > >, boost::numeric::ublas::vector<double, boost::numeric::ublas::unbounded_array<double, std::allocator<double> > > > > > >)



Thank you.

Regards

Andreas

Hgiang

  • Newbie
  • *
  • Posts: 3
Re: Using the Pastix and Pardiso solver
« Reply #3 on: March 23, 2016, 01:09:42 AM »
Hi Andreas

ResidualBasedBuilderAndSolver takes the UblasSpace as its linear algebra backend. ParallelMKLPardisoSolver takes ParallelUblasSpace so it's a misfit. Just replace ParallelMKLPardisoSolver by MKLPardisoSolver.

Hope it helps.

Giang

riccardo

  • Global Moderator
  • Newbie
  • *****
  • Posts: 47
Re: Using the Pastix and Pardiso solver
« Reply #4 on: April 11, 2016, 06:04:30 PM »
actually I think we shall remove the ParallelUblasSpace which is purely legacy.

The ublas space is currently OpenMP parallel

cheers
Riccardo
« Last Edit: April 12, 2016, 08:46:02 AM by riccardo »