Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ivan_K_6
Beginner
38 Views

Using cluster_sparse_solver with 64 bit integers

I am trying to use `cluster_sparse_solver` with 64-bit integers (longs) for extended matrix sizes. 

The first thing that I have tried is compiling my code with `-DMKL_ILP64`, which changed the `MKL_INT` type size, but had `cluster_sparse_solver` return `-2` (insufficient memory, as per docs here: https://software.intel.com/en-us/node/521694). I assume this means that under the hood, `cluster_sparse_solver` is casting `MKL_INT` into an `int` (or is linked with standard integer size), which results in a bogus number, which in turn results in the error.

I know that the call sequence for `cluster_sparse_solver` is similar to `PARDISO` (is based on it?), and I assume that `cluster_sparse_solver` used to be called `CPARDISO`. If I am correct, `PARDISO` should support extended integer sizes.

I wonder if there is an easy way to have `cluster_sparse_solver` work with larger integers.

The version of MKL in question is mkl 11.2u3, which was bundled with composer_xe 2015 3.187. My compiler flags are: `-m64 -mkl -lm -openmp -lmkl_blacs_intelmpi_ilp64 -lmkl_scalapack_ilp64 -DMKL_ILP64`

 

Thanks!

0 Kudos
2 Replies
Gennady_F_Intel
Moderator
38 Views

Ivan,

yes, cluster_sparse_solver works with ILP64 API - you need explicitly link your application with ILP64 binaries ( you may better to use MKL Linker adviser - https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/  to take which libraries you need to link. Into your case – you tried to use  option –mkl, This option says compiler to link with LP64 interfaces by the default. 

Ivan_K_6
Beginner
38 Views

In my case, it was necessary to change `-lmkl` to `-lmkl_intel_ilp64 -lmkl_core`.

Thank you very much, Gennady!

Reply