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

PDSYRK causes MPI_Abort on non square matrices

Viv
新手
4,668 檢視

In the file that I am attaching, I am simply trying to compute the matrix multiplication A^T*A using the scalapack routine PDSYRK . Matrix A is randomly generated in row major order, and since scalapack uses column major order, I am calling pdsyrk_ in the non-transpose mode. The program works when A is a square matrix, but it calls MPI_Abort (error code -8) when I run it on non-square matrices. 

What am I doing wrong?

標籤 (2)
0 積分
1 解決方案
GouthamK_Intel
4,608 檢視

Hi,

Thanks for providing the source code and commands to reproduce the error.

We are able to reproduce the error which you are facing.

For Non-Square Matrix, use Transpose mode in the PDSYRK API call. We tried to run the code in Transpose mode and it is working.

Edit the below line in your code.

pdsyrk_("U", "T", &m, &n, &done, subA, &one, &one, descSubA, &dzero, subC, &one, &one, descSubC);

GouthamK_Intel_0-1608553932739.png

 

Let us know if you face any issues.

 

Regards

Goutham

 

在原始文章中檢視解決方案

5 回應
GouthamK_Intel
4,645 檢視

Hi,

Thanks for reaching out to us!

We have gone through the attached source code, could you please provide "matrices.h" and "common.h" source files.

Also, please provide steps to reproduce the error along with commands which you are using to compile the code.


Thanks

Goutham


Viv
新手
4,643 檢視

Here are the files that are included in the first code that I attached. 
In this program, they are useful only for defining the "real" type (either double or float), but at the moment I am not managing yet the possibility of using floats, as I am evoking pdsyrk directly. 

To compile, I use the following line: 

mpiicc -std=c99 -O3 -qopenmp -DMKL_ILP64 -I${MKLROOT}/include BenchScalapack.c matrices.c  -o main -L${MKLROOT}/lib/intel64 -mkl -lmkl_scalapack_ilp64 -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_intelmpi_ilp64 -liomp5 -lpthread -lm -ldl -DDOUBLE_PRECISION


And to run: 

mpirun -np 4 ./main 30 20


Matrix A in this case is 30x20 and I am getting the following error:

application called MPI_Abort(MPI_COMM_WORLD, -8) - process 0
application called MPI_Abort(MPI_COMM_WORLD, -8) - process 1
application called MPI_Abort(MPI_COMM_WORLD, -8) - process 2
application called MPI_Abort(MPI_COMM_WORLD, -8) - process 3


Thank you for your help!
 

GouthamK_Intel
4,609 檢視

Hi,

Thanks for providing the source code and commands to reproduce the error.

We are able to reproduce the error which you are facing.

For Non-Square Matrix, use Transpose mode in the PDSYRK API call. We tried to run the code in Transpose mode and it is working.

Edit the below line in your code.

pdsyrk_("U", "T", &m, &n, &done, subA, &one, &one, descSubA, &dzero, subC, &one, &one, descSubC);

GouthamK_Intel_0-1608553932739.png

 

Let us know if you face any issues.

 

Regards

Goutham

 

Viv
新手
4,601 檢視

Thank you for your help!

GouthamK_Intel
4,590 檢視

Hi, 

Thanks for the confirmation!

As this issue has been resolved, we will no longer respond to this thread. 

If you require any additional assistance from Intel, please start a new thread. 

Any further interaction in this thread will be considered community only. 

Have a Good day.


Thanks & Regards

Goutham


回覆