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

PDSYRK causes MPI_Abort on non square matrices

Viv
Novice
2,093 Views

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?

Labels (2)
0 Kudos
1 Solution
GouthamK_Intel
Moderator
2,033 Views

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

 

View solution in original post

0 Kudos
5 Replies
GouthamK_Intel
Moderator
2,070 Views

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


0 Kudos
Viv
Novice
2,068 Views

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!
 

0 Kudos
GouthamK_Intel
Moderator
2,034 Views

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

 

0 Kudos
Viv
Novice
2,026 Views
0 Kudos
GouthamK_Intel
Moderator
2,015 Views

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


0 Kudos
Reply