<div dir="ltr"><div>I don't know what is going on here. There was an update to this function about a year ago, so that might fix your problem.</div><div><br></div><div>We would need you to test with a current version.</div><div><br></div><div>Mark</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 19, 2020 at 11:23 AM Eda Oktay <<a href="mailto:eda.oktay@metu.edu.tr">eda.oktay@metu.edu.tr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I am trying to find off block diagonal entries of a matrix and I am<br>
trying to use MatFindOffBlockDiagonalEntries. However, although my<br>
matrix is not NULL, I am getting an error message as follows:<br>
<br>
1]PETSC ERROR: --------------------- Error Message<br>
--------------------------------------------------------------<br>
[1]PETSC ERROR: [2]PETSC ERROR: --------------------- Error Message<br>
--------------------------------------------------------------<br>
[2]PETSC ERROR: Null argument, when expecting valid pointer<br>
[2]PETSC ERROR: Null Object: Parameter # 1<br>
[2]PETSC ERROR: See<br>
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble<br>
shooting.<br>
[2]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019<br>
[2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message<br>
--------------------------------------------------------------<br>
[3]PETSC ERROR: Null argument, when expecting valid pointer<br>
[3]PETSC ERROR: Null Object: Parameter # 1<br>
[3]PETSC ERROR: See<br>
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble<br>
shooting.<br>
[3]PETSC ERROR: Null argument, when expecting valid pointer<br>
[1]PETSC ERROR: Null Object: Parameter # 1<br>
[1]PETSC ERROR: See<br>
<a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" rel="noreferrer" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble<br>
shooting.<br>
[1]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019<br>
[1]PETSC ERROR:<br>
./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a<br>
arch-linux2-c-debug named <a href="http://b342.wls.metu.edu.tr" rel="noreferrer" target="_blank">b342.wls.metu.edu.tr</a> by edaoktay Fri Jun 19<br>
18:19:11 2020<br>
[1]PETSC ERROR: Configure options --download-mpich --download-openblas<br>
--download-slepc --download-metis --download-parmetis --download-chaco<br>
--with-X=1<br>
[1]PETSC ERROR: #1 ISGetSize() line 510 in<br>
/home/edaoktay/petsc-3.11.1/src/vec/is/is/interface/index.c<br>
[1]PETSC ERROR:<br>
./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a<br>
arch-linux2-c-debug named <a href="http://b342.wls.metu.edu.tr" rel="noreferrer" target="_blank">b342.wls.metu.edu.tr</a> by edaoktay Fri Jun 19<br>
18:19:11 2020<br>
[2]PETSC ERROR: Configure options --download-mpich --download-openblas<br>
--download-slepc --download-metis --download-parmetis --download-chaco<br>
--with-X=1<br>
[2]PETSC ERROR: #1 ISGetSize() line 510 in<br>
/home/edaoktay/petsc-3.11.1/src/vec/is/is/interface/index.c<br>
[2]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 211 in<br>
/home/edaoktay/petsc-3.11.1/src/mat/impls/aij/mpi/mpiaij.c<br>
[2]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 211 in<br>
/home/edaoktay/petsc-3.11.1/src/mat/impls/aij/mpi/mpiaij.c<br>
[1]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 10502 in<br>
/home/edaoktay/petsc-3.11.1/src/mat/interface/matrix.c<br>
#3 MatFindOffBlockDiagonalEntries() line 10502 in<br>
/home/edaoktay/petsc-3.11.1/src/mat/interface/matrix.c<br>
Petsc Release Version 3.11.1, Apr, 12, 2019<br>
[3]PETSC ERROR:<br>
./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a<br>
arch-linux2-c-debug named <a href="http://b342.wls.metu.edu.tr" rel="noreferrer" target="_blank">b342.wls.metu.edu.tr</a> by edaoktay Fri Jun 19<br>
18:19:11 2020<br>
[3]PETSC ERROR: Configure options --download-mpich --download-openblas<br>
--download-slepc --download-metis --download-parmetis --download-chaco<br>
--with-X=1<br>
[3]PETSC ERROR: #1 ISGetSize() line 510 in<br>
/home/edaoktay/petsc-3.11.1/src/vec/is/is/interface/index.c<br>
[3]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 211 in<br>
/home/edaoktay/petsc-3.11.1/src/mat/impls/aij/mpi/mpiaij.c<br>
[3]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 10502 in<br>
/home/edaoktay/petsc-3.11.1/src/mat/interface/matrix.c<br>
<br>
And the program is still running.<br>
<br>
The part of my program is :<br>
<br>
  Mat Ais;<br>
  MatCreateSubMatrix(A,idUi,idUi,MAT_INITIAL_MATRIX,&Ais);<br>
  ISSetPermutation(idUi);<br>
  MatPermute(Ais,idUi,idUi,&PL);<br>
  IS offd;<br>
  MatFindOffBlockDiagonalEntries(PL,&offd);<br>
<br>
Since there isn't any examples for this function, I couldn't<br>
understand what should I do. Since it says in the error that it is<br>
about parameter 1, the matrix, I don't know how to solve the problem.<br>
My matrix PL is parallel sparse. I know there shouldn't be any problem<br>
in PL since I can view PL by using MatView.<br>
<br>
Thanks!<br>
<br>
Eda<br>
</blockquote></div></div>