Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7019 Discussions

memory overwrite when using cluster solver with one MPI process

Charlotte_Ching
Beginner
757 Views

I tried to run cluster solver with one MPI process to solve a symmetric sparse linear system. 

The software settings are:

  • mkl 2022.2.0
  • windows 10
  • c++

The parameter are defined as follows

 

iparm[0] = 1; // no solver default
iparm[1] = 3; // parallel version of the nested dissection algorithm
iparm[5] = 1; // write solution to b
iparm[7] = 2; // max numbers of iterative refinement steps
iparm[9] = 8; // perturb pivot tolerance
iparm[10] = 1; // use nonsymmetric permutation and scaling MPS
iparm[12] = 1; // maximum weighted matching
iparm[27] = 0; // double precision
iparm[34] = 1; // C-style indexing
iparm[39] = 2; // distributed input
iparm[59] = 0; // cluster sparse solver mode

 

Since we write solution to b, I suppose the input for solution can be a dummy double. So I create a dummy double `ddum` and use `&ddum` as input for solution . 

It works when I run with multiple processes. However, if I run with single process, it will overwrite the memory at the address of the solution. I check the length of the overwritten memory, it is of the size of the linear system (The example I test is 1188). I tried with a very small matrix (3x3), it did not give me any error.

Could anyone help me with the problem? 

0 Kudos
4 Replies
VarshaS_Intel
Moderator
717 Views

Hi,

 

Thanks for posting in Intel Communities.

 

We had tried with the sample example(C:\Program Files (x86)\Intel\oneAPI\mkl\latest\examples\examples_cluster_c.zip\c_mpi\cluster_sparse_solver\source\cl_solver_sym_sp_0_based_c.c) where it is using cluster_sparse_solver, we are able to run the code without any errors with single and multiple processes.

VarshaS_Intel_0-1687864469778.png

 

Could you please provide us with the complete sample reproducer code(data file if any) along with the steps if you had followed to investigate more on your issue?

 

Thanks & Regards,

Varsha

 

0 Kudos
Charlotte_Ching
Beginner
703 Views

Thank you for your reply.

For the example you tested, you can try set ipam[5] = 1 (write solution to b) and print the x array. Cluster solver will write values to x as well.

 

 

0 Kudos
VarshaS_Intel
Moderator
666 Views

Hi,


Thanks for your reply.


Could you please let us know what exact errors you are getting at the time of running the code on a single process?


And also, could you please let us know what compilation and running commands you are using for your code?


Thanks & Regards,

Varsha


0 Kudos
VarshaS_Intel
Moderator
622 Views

Hi,


We have not heard back from you. Could you please let us know what exact errors you are getting at the time of running the code on a single process?


And also, could you please let us know what compilation and running commands you are using for your code?


Thanks & Regards,

Varsha



0 Kudos
Reply