[petsc-users] MatFindOffBlockDiagonalEntries error

Stefano Zampini stefano.zampini at gmail.com
Mon Jun 22 04:33:35 CDT 2020


It seems MatFindOffBlockDiagonalEntries_MPIAIJ is broken for a special
case. Can you send a MWE to reproduce problem so that we can fix it
properly and add it to the testsuite?

Il giorno lun 22 giu 2020 alle ore 12:20 Eda Oktay <eda.oktay at metu.edu.tr>
ha scritto:

> I am so sorry for the inconvenience, the last error I sent you was a
> different one, I forgot to change the codes. I am sending you the
> actual error where I used MatFindOffBlockDiagonalEntries again in the
> newest version.
>
> [1]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [1]PETSC ERROR: Null argument, when expecting valid pointer
> [2]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [2]PETSC ERROR: Null argument, when expecting valid pointer
> [2]PETSC ERROR: Null Object: Parameter # 1
> [2]PETSC ERROR: See
> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> shooting.
> [2]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> [2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [3]PETSC ERROR: Null argument, when expecting valid pointer
> [3]PETSC ERROR: Null Object: Parameter # 1
> [3]PETSC ERROR: See
> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> shooting.
> [3]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> [3]PETSC ERROR:
> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Mon Jun 22
> 12:11:44 2020
> [1]PETSC ERROR: Null Object: Parameter # 1
> [1]PETSC ERROR: See
> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> shooting.
> [1]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> [1]PETSC ERROR:
> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Mon Jun 22
> 12:11:44 2020
> [1]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --download-mpich --download-openblas --download-slepc --download-metis
> --download-parmetis --download-chaco --with-X=1
> [1]PETSC ERROR: #1 ISGetSize() line 1101 in
> /home/edaoktay/petsc-3.13.2/src/vec/is/is/interface/index.c
> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Mon Jun 22
> 12:11:44 2020
> [2]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> --download-mpich --download-openblas --download-slepc --download-metis
> --download-parmetis --download-chaco --with-X=1
> [2]PETSC ERROR: #1 ISGetSize() line 1101 in
> /home/edaoktay/petsc-3.13.2/src/vec/is/is/interface/index.c
> [2]PETSC ERROR: [3]PETSC ERROR: Configure options --with-cc=gcc
> --with-cxx=g++ --download-mpich --download-openblas --download-slepc
> --download-metis --download-parmetis --download-chaco --with-X=1
> [3]PETSC ERROR: #1 ISGetSize() line 1101 in
> /home/edaoktay/petsc-3.13.2/src/vec/is/is/interface/index.c
> [3]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 229 in
> /home/edaoktay/petsc-3.13.2/src/mat/impls/aij/mpi/mpiaij.c
> [1]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 229 in
> /home/edaoktay/petsc-3.13.2/src/mat/impls/aij/mpi/mpiaij.c
> [1]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 9824 in
> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
> #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 229 in
> /home/edaoktay/petsc-3.13.2/src/mat/impls/aij/mpi/mpiaij.c
> [2]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 9824 in
> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
> [3]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 9824 in
> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
>
> I think this is again the same error when I used an older version.
> Again, even though I am using a valid matrix and an index set, I don't
> know why I am getting this error.
>
> About the small test example, I couldn't understand what Junchao ment
> but this is the first time I am trying to use this function and my
> current matrix is quite small 72*72.
>
>   Mat Ais;
>   MatCreateSubMatrix(A,idUi,idUi,MAT_INITIAL_MATRIX,&Ais);
>   ISSetPermutation(idUi);
>   MatPermute(Ais,idUi,idUi,&PL);
> IS offd;
> MatFindOffBlockDiagonalEntries(PL,&offd);
>
> My matrix PL is working, I know that since I viewed it before the
> line: IS offd. And although it says null object for parameter 1,  I
> believe that other lines below this error are about IS. Should I
> create IS before using it in MatFindOffBlockDiagonalEntries?
>
> Mark Adams <mfadams at lbl.gov>, 19 Haz 2020 Cum, 20:37 tarihinde şunu yazdı:
> >
> > This is more useful and you are getting a new error. Maybe the old error
> is fixed.
> > It looks like you are trying to copy a matrix into another but they have
> different communicators.  For example, one is created with MPI_COMM_WOLD
> and the other with PETSC_COMM_WORLD.
> >
> > On Fri, Jun 19, 2020 at 12:48 PM Eda Oktay <eda.oktay at metu.edu.tr>
> wrote:
> >>
> >> Dear Mark,
> >>
> >> I updated Petsc and again, here's the error:
> >>
> >> [0]PETSC ERROR: --------------------- Error Message
> >> --------------------------------------------------------------
> >> [0]PETSC ERROR: Arguments must have same communicators
> >> [0]PETSC ERROR: [1]PETSC ERROR: --------------------- Error Message
> >> --------------------------------------------------------------
> >> [1]PETSC ERROR: Arguments must have same communicators
> >> [1]PETSC ERROR: Different communicators in the two objects: Argument #
> >> 1 and 2 flag 3
> >> [1]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [1]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [1]PETSC ERROR: [2]PETSC ERROR: [3]PETSC ERROR: ---------------------
> >> Error Message
> --------------------------------------------------------------
> >> [3]PETSC ERROR: Arguments must have same communicators
> >> [3]PETSC ERROR: Different communicators in the two objects: Argument #
> >> 1 and 2 flag 3
> >> [3]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [3]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [3]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [3]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> >> --download-mpich --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> Different communicators in the two objects: Argument # 1 and 2 flag 3
> >> [0]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [0]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [0]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> >> --download-mpich --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> [0]PETSC ERROR: #1 MatCopy() line 4044 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [1]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> >> --download-mpich --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> [1]PETSC ERROR: #1 MatCopy() line 4044 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
> >> [3]PETSC ERROR: #1 MatCopy() line 4044 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
> >> [0]PETSC ERROR: --------------------- Error Message
> >> --------------------------------------------------------------
> >> [0]PETSC ERROR: Nonconforming object sizes
> >> [1]PETSC ERROR: --------------------- Error Message
> >> --------------------------------------------------------------
> >> [1]PETSC ERROR: Nonconforming object sizes
> >> [1]PETSC ERROR: Non conforming matrix add: global sizes 1 x 72, 1 x 72
> >> [3]PETSC ERROR: --------------------- Error Message
> >> --------------------------------------------------------------
> >> [3]PETSC ERROR: Nonconforming object sizes
> >> [3]PETSC ERROR: Non conforming matrix add: global sizes 16 x 72, 16 x 72
> >> [3]PETSC ERROR: [0]PETSC ERROR: Non conforming matrix add: global
> >> sizes 52 x 72, 52 x 72
> >> [0]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [0]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [0]PETSC ERROR: [1]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [1]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [1]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> See https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> shooting.
> >> [3]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [3]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [3]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [0]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> >> --download-mpich --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> [0]PETSC ERROR: [1]PETSC ERROR: Configure options --with-cc=gcc
> >> --with-cxx=g++ --download-mpich --download-openblas --download-slepc
> >> --download-metis --download-parmetis --download-chaco --with-X=1
> >> [1]PETSC ERROR: #2 MatAXPY() line 72 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/utils/axpy.c
> >> Configure options --with-cc=gcc --with-cxx=g++ --download-mpich
> >> --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> [3]PETSC ERROR: #2 MatAXPY() line 72 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/utils/axpy.c
> >> #2 MatAXPY() line 72 in /home/edaoktay/petsc-3.13.2/src/mat/utils/axpy.c
> >>
> >> Elapsed time: 2.5e-01
> >>
> >> --------------------- Error Message
> >> --------------------------------------------------------------
> >> [2]PETSC ERROR: Arguments must have same communicators
> >> [2]PETSC ERROR: Different communicators in the two objects: Argument #
> >> 1 and 2 flag 3
> >> [2]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [2]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [2]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [2]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> >> --download-mpich --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> [2]PETSC ERROR: #1 MatCopy() line 4044 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/interface/matrix.c
> >> [2]PETSC ERROR: --------------------- Error Message
> >> --------------------------------------------------------------
> >> [2]PETSC ERROR: Nonconforming object sizes
> >> [2]PETSC ERROR: Non conforming matrix add: global sizes 3 x 72, 3 x 72
> >> [2]PETSC ERROR: See
> >> https://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> shooting.
> >> [2]PETSC ERROR: Petsc Release Version 3.13.2, Jun 02, 2020
> >> [2]PETSC ERROR:
> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on a
> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun 19
> >> 19:44:41 2020
> >> [2]PETSC ERROR: Configure options --with-cc=gcc --with-cxx=g++
> >> --download-mpich --download-openblas --download-slepc --download-metis
> >> --download-parmetis --download-chaco --with-X=1
> >> [2]PETSC ERROR: #2 MatAXPY() line 72 in
> >> /home/edaoktay/petsc-3.13.2/src/mat/utils/axpy.c
> >>
> >> What can be the reason?
> >>
> >> Mark Adams <mfadams at lbl.gov>, 19 Haz 2020 Cum, 18:41 tarihinde şunu
> yazdı:
> >> >
> >> > 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.
> >> >
> >> > We would need you to test with a current version.
> >> >
> >> > Mark
> >> >
> >> > On Fri, Jun 19, 2020 at 11:23 AM Eda Oktay <eda.oktay at metu.edu.tr>
> wrote:
> >> >>
> >> >> Hi all,
> >> >>
> >> >> I am trying to find off block diagonal entries of a matrix and I am
> >> >> trying to use MatFindOffBlockDiagonalEntries. However, although my
> >> >> matrix is not NULL, I am getting an error message as follows:
> >> >>
> >> >> 1]PETSC ERROR: --------------------- Error Message
> >> >> --------------------------------------------------------------
> >> >> [1]PETSC ERROR: [2]PETSC ERROR: --------------------- Error Message
> >> >> --------------------------------------------------------------
> >> >> [2]PETSC ERROR: Null argument, when expecting valid pointer
> >> >> [2]PETSC ERROR: Null Object: Parameter # 1
> >> >> [2]PETSC ERROR: See
> >> >> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> >> shooting.
> >> >> [2]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019
> >> >> [2]PETSC ERROR: [3]PETSC ERROR: --------------------- Error Message
> >> >> --------------------------------------------------------------
> >> >> [3]PETSC ERROR: Null argument, when expecting valid pointer
> >> >> [3]PETSC ERROR: Null Object: Parameter # 1
> >> >> [3]PETSC ERROR: See
> >> >> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> >> shooting.
> >> >> [3]PETSC ERROR: Null argument, when expecting valid pointer
> >> >> [1]PETSC ERROR: Null Object: Parameter # 1
> >> >> [1]PETSC ERROR: See
> >> >> http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble
> >> >> shooting.
> >> >> [1]PETSC ERROR: Petsc Release Version 3.11.1, Apr, 12, 2019
> >> >> [1]PETSC ERROR:
> >> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on
> a
> >> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun
> 19
> >> >> 18:19:11 2020
> >> >> [1]PETSC ERROR: Configure options --download-mpich
> --download-openblas
> >> >> --download-slepc --download-metis --download-parmetis
> --download-chaco
> >> >> --with-X=1
> >> >> [1]PETSC ERROR: #1 ISGetSize() line 510 in
> >> >> /home/edaoktay/petsc-3.11.1/src/vec/is/is/interface/index.c
> >> >> [1]PETSC ERROR:
> >> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on
> a
> >> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun
> 19
> >> >> 18:19:11 2020
> >> >> [2]PETSC ERROR: Configure options --download-mpich
> --download-openblas
> >> >> --download-slepc --download-metis --download-parmetis
> --download-chaco
> >> >> --with-X=1
> >> >> [2]PETSC ERROR: #1 ISGetSize() line 510 in
> >> >> /home/edaoktay/petsc-3.11.1/src/vec/is/is/interface/index.c
> >> >> [2]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 211
> in
> >> >> /home/edaoktay/petsc-3.11.1/src/mat/impls/aij/mpi/mpiaij.c
> >> >> [2]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 211
> in
> >> >> /home/edaoktay/petsc-3.11.1/src/mat/impls/aij/mpi/mpiaij.c
> >> >> [1]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 10502 in
> >> >> /home/edaoktay/petsc-3.11.1/src/mat/interface/matrix.c
> >> >> #3 MatFindOffBlockDiagonalEntries() line 10502 in
> >> >> /home/edaoktay/petsc-3.11.1/src/mat/interface/matrix.c
> >> >> Petsc Release Version 3.11.1, Apr, 12, 2019
> >> >> [3]PETSC ERROR:
> >> >> ./approx_cut_deneme_clustering_son_final_edgecut_without_parmetis on
> a
> >> >> arch-linux2-c-debug named b342.wls.metu.edu.tr by edaoktay Fri Jun
> 19
> >> >> 18:19:11 2020
> >> >> [3]PETSC ERROR: Configure options --download-mpich
> --download-openblas
> >> >> --download-slepc --download-metis --download-parmetis
> --download-chaco
> >> >> --with-X=1
> >> >> [3]PETSC ERROR: #1 ISGetSize() line 510 in
> >> >> /home/edaoktay/petsc-3.11.1/src/vec/is/is/interface/index.c
> >> >> [3]PETSC ERROR: #2 MatFindOffBlockDiagonalEntries_MPIAIJ() line 211
> in
> >> >> /home/edaoktay/petsc-3.11.1/src/mat/impls/aij/mpi/mpiaij.c
> >> >> [3]PETSC ERROR: #3 MatFindOffBlockDiagonalEntries() line 10502 in
> >> >> /home/edaoktay/petsc-3.11.1/src/mat/interface/matrix.c
> >> >>
> >> >> And the program is still running.
> >> >>
> >> >> The part of my program is :
> >> >>
> >> >>   Mat Ais;
> >> >>   MatCreateSubMatrix(A,idUi,idUi,MAT_INITIAL_MATRIX,&Ais);
> >> >>   ISSetPermutation(idUi);
> >> >>   MatPermute(Ais,idUi,idUi,&PL);
> >> >>   IS offd;
> >> >>   MatFindOffBlockDiagonalEntries(PL,&offd);
> >> >>
> >> >> Since there isn't any examples for this function, I couldn't
> >> >> understand what should I do. Since it says in the error that it is
> >> >> about parameter 1, the matrix, I don't know how to solve the problem.
> >> >> My matrix PL is parallel sparse. I know there shouldn't be any
> problem
> >> >> in PL since I can view PL by using MatView.
> >> >>
> >> >> Thanks!
> >> >>
> >> >> Eda
>


-- 
Stefano
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200622/6b71af5c/attachment-0001.html>


More information about the petsc-users mailing list