Home My Page Projects PaStiX
Summary Activity Forums Lists Docs News Files

Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: pastix_checkMatrix with API_SYM_YES and diagonal matrix [ Reply ]
By: Azariah Cornish on 2014-08-01 15:12
[forum:148830]
Thanks!

I'll mention to the PETSc dev team that the bug is fixed in the newer builds of PasTiX.

RE: pastix_checkMatrix with API_SYM_YES and diagonal matrix [ Reply ]
By: Xavier Lacoste on 2014-08-01 07:23
[forum:148769]
Hello,

I have tested with this matrix :

%%MatrixMarket matrix coordinate real symmetric
10 10 10
1 1 1.0
2 2 2.0
3 3 3.0
4 4 4.0
5 5 5.0
6 6 6.0
7 7 7.0
8 8 8.0
9 9 9.0
10 10 10.0

Indeed, I got an error with the release 3725 but got no error with the developpement code, the code have been fixed already.

It has been fixed in Feb the 5th, this has been applyed to 5.2.2 release via a bugfix :
commit d0bbf4e671ff1978258f39b4e30c9736c5993da5
Author: Xavier <lacoste@inria.fr>
Date: Wed Feb 5 09:33:06 2014 +0100

BAD ACCESS on loc2glob in ternary operators


It was the fact that in this test (loc2glob == NULL)?itercol:((*loc2glob)[itercol]-1)) the second part is always estimated. It doesn't only occur when n == nnz but when their is as many terms in upper part and lower part of the matrix while the matrix is said symmetric. (In PETSc, if my memory is good it should only happen in your case, with n == nnz).

Thanks for the feedback.

XL.

RE: pastix_checkMatrix with API_SYM_YES and diagonal matrix [ Reply ]
By: Xavier Lacoste on 2014-07-31 16:39
[forum:148766]
Hello,

Thanks for the report, I'll have a look at this.

By the way, I still have to update PaStiX version in PETSc which is outdated. I have a patch nearly ready but I never had time to clean it up...

Regards,

Xavier.

pastix_checkMatrix with API_SYM_YES and diagonal matrix [ Reply ]
By: Azariah Cornish on 2014-07-31 15:13
[forum:148765]
Hello all,

I'm encountering an issue using PaStiX (release 3725) from PETSc with a diagonal matrix (tested both on one processor and in parallel, with a 400k x 400k matrix and a 2x2 matrix). Specifically, the graph symmetry check of pastix_checkMatrix appears to throw a segfault if the input matrix is diagonal while the API_SYM_YES flag is used.

When I get to the following function call from PETSc:
d_pastix_checkMatrix(MPI_COMM_WORLD,verb,(((isSym != 0)) ? API_SYM_YES : API_SYM_NO),API_YES,*n,&tmpcolptr,&tmprows,(double**)&tmpvalues,NULL,1);

If I am using a diagonal matrix (isSym=yes) I get the following result:

Check : Numbering OK
Check : Sort CSC OK
Check : Duplicates OK

WARNING: Upper and lower part given on a symmetric matrix, dropping upper

ERROR: Program terminated due to a Segmentation Violation
program failed on processor 0

If I instead change the function call to:
PASTIX_CHECKMATRIX(MPI_COMM_WORLD,verb,(((*n != nnz) && (isSym != 0)) ? API_SYM_YES : API_SYM_NO),API_YES,*n,&tmpcolptr,&tmprows,(double**)&tmpvalues,NULL,1);

which will pass API_SYM_NO for diagonal matrices, I get the following result (and no segfault):

Check : Numbering OK
Check : Sort CSC OK
Check : Duplicates OK
Check : Graph symmetry OK
+--------------------------------------------------------------------+
+ PaStiX : Parallel Sparse matriX package +
+--------------------------------------------------------------------+
Matrix size 2 x 2
Number of nonzeros in A 2
+--------------------------------------------------------------------+
+ Options +
+--------------------------------------------------------------------+
Version : 3725
SMP_SOPALIN : Defined
VERSION MPI : Defined
PASTIX_DYNSCHED : Not defined
STATS_SOPALIN : Not defined
NAPA_SOPALIN : Defined
TEST_IRECV : Not defined
TEST_ISEND : Defined
THREAD_COMM : Not defined
THREAD_FUNNELED : Not defined
TAG : Exact Thread
FORCE_CONSO : Not defined
RECV_FANIN_OR_BLOCK : Not defined
OUT_OF_CORE : Not defined
DISTRIBUTED : Defined
METIS : Not defined
WITH_SCOTCH : Defined
INTEGER TYPE : int32_t
FLOAT TYPE : double
+--------------------------------------------------------------------+
... etc.

Valgrind reports the following when I run it with the original function call:

==51105== Invalid read of size 8
==51105== at 0x64CE1D2: D_pastix_checkMatrix_int (in /home/user/petsc-3.4.5-opt/lib/libpetsc.so)
==51105== by 0x64D00F9: d_pastix_checkMatrix (in /home/user/petsc-3.4.5-opt/lib/libpetsc.so)
==51105== by 0x62080E8: MatConvertToCSC(_p_Mat*, PetscBool, int*, int**, int**, double**) (in /home/user/petsc-3.4.5-opt/lib/libpetsc.so)

It isn't a major issue to have to run the check as if the matrix is not symmetric when it's diagonal, but I assume this is not the expected behavior. I will also report this to the PETSc dev team so they can add a fix to not call diagonal matrices symmetric for use with PaStiX.

Thanks!
Azariah