Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
6433 Discussions

PDSYRK causes MPI_Abort on non square matrices

Viv
Novice
543 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
483 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

5 Replies
GouthamK_Intel
Moderator
520 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


Viv
Novice
518 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!
 

GouthamK_Intel
Moderator
484 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

Viv
Novice
476 Views
GouthamK_Intel
Moderator
465 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


Reply