<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Thanks a lot, now it is working.
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><br/>
 </div>

<div name="quoted-content">
<div>I see the error now. You should pass SUBSET_NONZERO_PATTERN as MatStructure argument to MatAXPY
<div>DIFFERENT_NONZERO_PATTERN now triggers preallocation, and MATELEMENTAL does not support MatGetRow.
<div> 
<blockquote>
<div>On Feb 27, 2019, at 3:59 PM, Marius Buerkle <<a href="mailto:mbuerkle@web.de" onclick="parent.window.location.href='mailto:mbuerkle@web.de'; return false;" target="_blank">mbuerkle@web.de</a>> wrote:</div>
 

<div>
<div>
<div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div>Here is the error message and please find an example attached. </div>

<div>thanks for the efforts !</div>

<div> </div>

<div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br/>
[0]PETSC ERROR: No support for this operation for this object type<br/>
[0]PETSC ERROR: Mat type elemental<br/>
[0]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br/>
[0]PETSC ERROR: Petsc Development GIT revision: v3.10.3-1681-g73e1f9d014  GIT Date: 2019-02-24 19:52:00 +0100<br/>
[0]PETSC ERROR: ./a.out on a  named tono-hpc1 by marius Thu Feb 28 08:56:48 2019<br/>
[0]PETSC ERROR: Configure options --prefix=/home/marius/prog/petsc/intel_openmpi_openmp_mkl_dbg_with_slepc --with-fortran-kernels=0 --with-64-bit-indices=0 --CC=mpicc --COPTFLAGS="-g -O0 -qopenmp -std=c11" --CXX=mpicxx --CXXOPTFLAGS="-g -O0 -qopenmp -std=c++14" --FC=mpif90 --FOPTFLAGS="-g -O0 -qopenmp -traceback " --with-mpi=1 --with-x=0 --download-parmetis=1 --download-metis=1 --download-superlu_dist=1 --download-superlu_dist-commit=93a9aa53142253f2a56891e09c6f950d250ae251 --download-superlu_dist-cmake-arguments=-Denable_openmp=TRUE --download-hwloc=1 --download-sowing=1 --with-openmp=0 --with-pthread=0 --download-elemental=1 --download-elemental-commit=de7b5bea1abf5f626b91582f742cf99e2e551bff --with-cxx-dialect=c++11 --with-scalar-type=complex --with-debugging=1 --with-valgrind=0 --with-blaslapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-scalapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-mkl_pardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_cpardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse_optimize-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-valgrind=1<br/>
[0]PETSC ERROR: #1 MatGetRow() line 570 in /home/marius/prog/petsc/git/petsc/src/mat/interface/matrix.c<br/>
[0]PETSC ERROR: #2 MatAXPY_Basic_Preallocate() line 95 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[0]PETSC ERROR: #3 MatAXPY() line 51 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br/>
[1]PETSC ERROR: No support for this operation for this object type<br/>
[1]PETSC ERROR: Mat type elemental<br/>
[1]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br/>
[1]PETSC ERROR: Petsc Development GIT revision: v3.10.3-1681-g73e1f9d014  GIT Date: 2019-02-24 19:52:00 +0100<br/>
[1]PETSC ERROR: ./a.out on a  named tono-hpc1 by marius Thu Feb 28 08:56:48 2019<br/>
[1]PETSC ERROR: Configure options --prefix=/home/marius/prog/petsc/intel_openmpi_openmp_mkl_dbg_with_slepc --with-fortran-kernels=0 --with-64-bit-indices=0 --CC=mpicc --COPTFLAGS="-g -O0 -qopenmp -std=c11" --CXX=mpicxx --CXXOPTFLAGS="-g -O0 -qopenmp -std=c++14" --FC=mpif90 --FOPTFLAGS="-g -O0 -qopenmp -traceback " --with-mpi=1 --with-x=0 --download-parmetis=1 --download-metis=1 --download-superlu_dist=1 --download-superlu_dist-commit=93a9aa53142253f2a56891e09c6f950d250ae251 --download-superlu_dist-cmake-arguments=-Denable_openmp=TRUE --download-hwloc=1 --download-sowing=1 --with-openmp=0 --with-pthread=0 --download-elemental=1 --download-elemental-commit=de7b5bea1abf5f626b91582f742cf99e2e551bff --with-cxx-dialect=c++11 --with-scalar-type=complex --with-debugging=1 --with-valgrind=0 --with-blaslapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-scalapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-mkl_pardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_cpardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse_optimize-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-valgrind=1<br/>
[1]PETSC ERROR: #1 MatGetRow() line 570 in /home/marius/prog/petsc/git/petsc/src/mat/interface/matrix.c<br/>
[1]PETSC ERROR: #2 MatAXPY_Basic_Preallocate() line 95 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[1]PETSC ERROR: #3 MatAXPY() line 51 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[2]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br/>
[2]PETSC ERROR: No support for this operation for this object type<br/>
[2]PETSC ERROR: Mat type elemental<br/>
[2]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br/>
[2]PETSC ERROR: Petsc Development GIT revision: v3.10.3-1681-g73e1f9d014  GIT Date: 2019-02-24 19:52:00 +0100<br/>
[2]PETSC ERROR: ./a.out on a  named tono-hpc1 by marius Thu Feb 28 08:56:48 2019<br/>
[2]PETSC ERROR: Configure options --prefix=/home/marius/prog/petsc/intel_openmpi_openmp_mkl_dbg_with_slepc --with-fortran-kernels=0 --with-64-bit-indices=0 --CC=mpicc --COPTFLAGS="-g -O0 -qopenmp -std=c11" --CXX=mpicxx --CXXOPTFLAGS="-g -O0 -qopenmp -std=c++14" --FC=mpif90 --FOPTFLAGS="-g -O0 -qopenmp -traceback " --with-mpi=1 --with-x=0 --download-parmetis=1 --download-metis=1 --download-superlu_dist=1 --download-superlu_dist-commit=93a9aa53142253f2a56891e09c6f950d250ae251 --download-superlu_dist-cmake-arguments=-Denable_openmp=TRUE --download-hwloc=1 --download-sowing=1 --with-openmp=0 --with-pthread=0 --download-elemental=1 --download-elemental-commit=de7b5bea1abf5f626b91582f742cf99e2e551bff --with-cxx-dialect=c++11 --with-scalar-type=complex --with-debugging=1 --with-valgrind=0 --with-blaslapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-scalapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-mkl_pardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_cpardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse_optimize-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-valgrind=1<br/>
[2]PETSC ERROR: #1 MatGetRow() line 570 in /home/marius/prog/petsc/git/petsc/src/mat/interface/matrix.c<br/>
[2]PETSC ERROR: #2 MatAXPY_Basic_Preallocate() line 95 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[2]PETSC ERROR: #3 MatAXPY() line 51 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[3]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------<br/>
[3]PETSC ERROR: No support for this operation for this object type<br/>
[3]PETSC ERROR: Mat type elemental<br/>
[3]PETSC ERROR: See <a href="http://www.mcs.anl.gov/petsc/documentation/faq.html" target="_blank">http://www.mcs.anl.gov/petsc/documentation/faq.html</a> for trouble shooting.<br/>
[3]PETSC ERROR: Petsc Development GIT revision: v3.10.3-1681-g73e1f9d014  GIT Date: 2019-02-24 19:52:00 +0100<br/>
[3]PETSC ERROR: ./a.out on a  named tono-hpc1 by marius Thu Feb 28 08:56:48 2019<br/>
[3]PETSC ERROR: Configure options --prefix=/home/marius/prog/petsc/intel_openmpi_openmp_mkl_dbg_with_slepc --with-fortran-kernels=0 --with-64-bit-indices=0 --CC=mpicc --COPTFLAGS="-g -O0 -qopenmp -std=c11" --CXX=mpicxx --CXXOPTFLAGS="-g -O0 -qopenmp -std=c++14" --FC=mpif90 --FOPTFLAGS="-g -O0 -qopenmp -traceback " --with-mpi=1 --with-x=0 --download-parmetis=1 --download-metis=1 --download-superlu_dist=1 --download-superlu_dist-commit=93a9aa53142253f2a56891e09c6f950d250ae251 --download-superlu_dist-cmake-arguments=-Denable_openmp=TRUE --download-hwloc=1 --download-sowing=1 --with-openmp=0 --with-pthread=0 --download-elemental=1 --download-elemental-commit=de7b5bea1abf5f626b91582f742cf99e2e551bff --with-cxx-dialect=c++11 --with-scalar-type=complex --with-debugging=1 --with-valgrind=0 --with-blaslapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-scalapack-lib=" -L/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lmkl_blacs_openmpi_lp64 -liomp5 -lpthread -lm -ldl" --with-mkl_pardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_cpardiso-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-mkl_sparse_optimize-dir=/home/marius/intel/compilers_and_libraries_2019.1.144/linux/mkl --with-valgrind=1<br/>
[3]PETSC ERROR: #1 MatGetRow() line 570 in /home/marius/prog/petsc/git/petsc/src/mat/interface/matrix.c<br/>
[3]PETSC ERROR: #2 MatAXPY_Basic_Preallocate() line 95 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c<br/>
[3]PETSC ERROR: #3 MatAXPY() line 51 in /home/marius/prog/petsc/git/petsc/src/mat/utils/axpy.c</div>

<div> 
<div style="margin: 10.0px 5.0px 5.0px 10.0px;padding: 10.0px 0 10.0px 10.0px;border-left: 2.0px solid rgb(195,217,229);">
<div style="margin: 0 0 10.0px 0;"><br/>
<b>Von:</b> "Stefano Zampini" <<a href="mailto:stefano.zampini@gmail.com" onclick="parent.window.location.href='mailto:stefano.zampini@gmail.com'; return false;" target="_blank">stefano.zampini@gmail.com</a>><br/>
<b>An:</b> "Marius Buerkle" <<a href="mailto:mbuerkle@web.de" onclick="parent.window.location.href='mailto:mbuerkle@web.de'; return false;" target="_blank">mbuerkle@web.de</a>><br/>
<b>Cc:</b> "Matthew Knepley" <<a href="mailto:knepley@gmail.com" onclick="parent.window.location.href='mailto:knepley@gmail.com'; return false;" target="_blank">knepley@gmail.com</a>>, "PETSc users list" <<a href="mailto:petsc-users@mcs.anl.gov" onclick="parent.window.location.href='mailto:petsc-users@mcs.anl.gov'; return false;" target="_blank">petsc-users@mcs.anl.gov</a>><br/>
<b>Betreff:</b> Re: [petsc-users] Nonconforming object sizes in axpy</div>

<div><br/>
<br/>
> On Feb 27, 2019, at 3:25 PM, Marius Buerkle <<a href="mailto:mbuerkle@web.de" onclick="parent.window.location.href='mailto:mbuerkle@web.de'; return false;" target="_blank">mbuerkle@web.de</a>> wrote:<br/>
><br/>
> Ok. I also tried without openmp which gave the same error.<br/>
> The segfault left aside, is MatAXPY supposed to work when Y is of type ELEMENTAL and X of type MATMPIAIJ ? It worked before but now it stops with mat elemental not supported.<br/>
><br/>
<br/>
I cannot find the error line that says Not supported for elemental.<br/>
The error PETSc is raising in the log you sent is with respect to the nonconforming object sizes (which BTW are correct).<br/>
Could you please send the backtrace (without openmp) for the error regarding “mat elemental not supported”?<br/>
<br/>
<br/>
<br/>
><br/>
>> Von: "Stefano Zampini" <<a href="mailto:stefano.zampini@gmail.com" onclick="parent.window.location.href='mailto:stefano.zampini@gmail.com'; return false;" target="_blank">stefano.zampini@gmail.com</a>><br/>
>> An: "Marius Buerkle" <<a href="mailto:mbuerkle@web.de" onclick="parent.window.location.href='mailto:mbuerkle@web.de'; return false;" target="_blank">mbuerkle@web.de</a>><br/>
>> Cc: "Matthew Knepley" <<a href="mailto:knepley@gmail.com" onclick="parent.window.location.href='mailto:knepley@gmail.com'; return false;" target="_blank">knepley@gmail.com</a>>, "PETSc users list" <<a href="mailto:petsc-users@mcs.anl.gov" onclick="parent.window.location.href='mailto:petsc-users@mcs.anl.gov'; return false;" target="_blank">petsc-users@mcs.anl.gov</a>><br/>
>> Betreff: Re: [petsc-users] Nonconforming object sizes in axpy<br/>
>><br/>
>> If you check ALL ERROR CODES by doing<br/>
>> ierr = _AnyPetscCall_();CHKERRQ(ierr);<br/>
>> The code will stop at the first error<br/>
>><br/>
>> I see you are using openmp. Probably this is causing the problem, I don’t know what to say without a MWE.<br/>
>><br/>
>><br/>
>>> On Feb 25, 2019, at 10:50 PM, Marius Buerkle <<a href="mailto:mbuerkle@web.de" onclick="parent.window.location.href='mailto:mbuerkle@web.de'; return false;" target="_blank">mbuerkle@web.de</a>> wrote:<br/>
>>><br/>
>>> <error_output.tar.gz><br/>
>><br/>
>><br/>
 </div>
</div>
</div>
</div>
</div>
</div>
<span id="cid:8144F291-7136-455E-AFF4-820A7CB3CD0E"><output.tar.gz></span></div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div></div></body></html>