Author Topic: MKL Pardiso Solver - Thread Parallel  (Read 14502 times)

trustetj

  • New Member
  • *
  • Posts: 3
MKL Pardiso Solver - Thread Parallel
« on: April 30, 2014, 07:15:40 AM »
Dear Forum Users,

I recently created a interface to use the Intel MKL Pardiso sparse direct solver within FEAP version 8.4. For those of you who are using Intel Fortran and C compilers, this would be a natural inclusion in your code. The implementation is based off of the modules for various solvers for version 7.5 that are posted on the main FEAP website.

The benefit is that you can run a thread-safe parallel solver within the serial FEAP implementation to take advantage of multi-CPU workstations. The solver simply "overloads" the TANGent and UTANgent functions, similar to the MPI parallel FEAP implementation.

As an example, with 16 threads on an Dell Precision T7800 workstation solving a linear elasticity problem with 120,000 equations, the factorization time is only a few seconds.

The only modifications required are to the usolve.f subroutine and a user macro (e.g. umarc1.f) to initialize the module.

Attached are the source files along with the makefile.in file with the compiler options. I have tested for unoptimized (-g) and basic optimization (-02); the other important point is to add -mkl to LDOPTIONS.

I have tested the solver for symmetric and nonsymmetric matrices, for solid mechanics problems and Lagrange multiplier problems with zeros on the diagonal; problem sizes ranged from 20 nodes to 20,000 nodes. I also want to acknowledge a reminder from FEAP_Admin to use the OPTImize command to improve the profile of the stiffness matrix before the solution phase.

Also attached is a brief file with documentation along with a sample input/output file containing multiple example methods for calling the solver. Further documentation about the solver can be found from Intel https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mklman/GUID-7E829836-0FEF-46B2-8943-86A022193462.htm. The number of threads is controlled through an environmental variable (in Linux/Unix) MKL_NUM_THREADS.

Feel free to download and adapt to your needs.

Hope you find this helpful,

Tim

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: MKL Pardiso Solver - Thread Parallel
« Reply #1 on: April 30, 2014, 11:25:52 PM »
Tim,
  Thanks for posting this.  I am sure it will be helpful to lots of other FEAP users.

M. Kurdi

  • Full Member
  • ***
  • Posts: 149
Re: MKL Pardiso Solver - Thread Parallel
« Reply #2 on: May 08, 2014, 06:25:06 AM »
This is neat. Thanks for sharing the solver. I'm wondering if you had experience using the non MKL version of the Paradiso solver within FEAP. I believe it has more features and would be independent of MKL license.

trustetj

  • New Member
  • *
  • Posts: 3
Re: MKL Pardiso Solver - Thread Parallel
« Reply #3 on: May 09, 2014, 05:27:28 PM »
No, I haven't yet tried the non MKL version of Pardiso. When I had looked online, it seemed like the order of the arguments and a few of the iparm options were different between the standalone and MKL versions, but otherwise the modules looked very similar. One other difference would be how to declare the number of threads to employ (instead of MKL_NUM_THREADS).

I based my implementation off of the examples that Intel provided for the solver. Similarly, I think the standalone Pardiso examples (http://www.pardiso-project.org/index.php?p=manual) would show what needs to get modified. I can give it a try at some point over the summer.

Tim

Yaakov

  • Sr. Member
  • ****
  • Posts: 323
Re: MKL Pardiso Solver - Thread Parallel
« Reply #4 on: January 11, 2018, 05:14:06 AM »
Deall all,

Kindly I would like to add some information about  Intel® Parallel Studio in LINUX.

A student license for Intel® Parallel Studio XE Cluster Edition for Linux* is only available for one year.

After that we have to apply for a new student license in https://software.intel.com/en-us/qualify-for-free-software/student again.

Then we just need a new student license file using Host ID. Here, new download & installation of Intel® Parallel Studio is not necessary (4Gb ....).

At last, we put this student license file into /opt/intel/licenses (root).

Best
« Last Edit: January 11, 2018, 05:18:58 AM by Yaakov »
Let's boost FEAP's performance!

MF87

  • Jr. Member
  • **
  • Posts: 15
Re: MKL Pardiso Solver - Thread Parallel
« Reply #5 on: August 28, 2018, 09:46:41 AM »
Dear trustetj,

thank you for your template! If I get it right, the MKL Pardiso Solver uses parallelization. Where can I set how many processors are used?

Thanks,
Marek

JStorm

  • Sr. Member
  • ****
  • Posts: 250
Re: MKL Pardiso Solver - Thread Parallel
« Reply #6 on: August 28, 2018, 11:40:34 AM »
MKL Pardiso uses OpenMP paralelisation which can be controlled via the environment variable OMP_NUM_THREADS. (https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.3.0/com.ibm.zos.v2r3.bpxa500/ruomprun.htm)