<div dir="ltr"><div dir="ltr">On Fri, Nov 4, 2022 at 4:32 AM Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com">edoardo.alinovi@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">It is working like a charm now! <div><br></div><div>Is it mandatory to use VecSetValuesBlocked to assemble the rhs? Does the Vec need to be of any other type than VECMPI?</div></div></blockquote><div><br></div><div>SetValuesBlocked() is never required. You can always use the normal versions, but you would have to supply all the indices, not just the block indices.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am assembling it like this: </div><div> brhs(1:3-bdim) = this%Ueqn%bC(iElement,1:3-bdim)<br> brhs(4-bdim) = this%Peqn%bC(iElement,1)<br> call VecSetValuesBlocked(this%rhs, 1, mesh%cellGlobalAddr(iElement)-1, brhs, INSERT_VALUES, ierr)<br></div><div><br></div><div>But I am getting into troubles: </div><div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div>[0]PETSC ERROR: <b>PetscSegBufferAlloc_Private</b></div><div>[0]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.</div><div>[0]PETSC ERROR: Petsc Release Version 3.18.0, Sep 30, 2022 </div><div>[0]PETSC ERROR: flubio_coupled on a gnu named alienware by edo Fri Nov 4 09:31:03 2022</div><div>[0]PETSC ERROR: Configure options PETSC_ARCH=gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack -download-ml -download-slepc -download-hpddm -download-cmake -with-mpi-dir=/home/edo/software/openmpi-4.1.1/build/</div><div>[0]PETSC ERROR: #1 PetscMallocAlign() at /home/edo/software/petsc-3.18.0/src/sys/memory/mal.c:55</div><div>[0]PETSC ERROR: #2 PetscSegBufferAlloc_Private() at /home/edo/software/petsc-3.18.0/src/sys/utils/segbuffer.c:31</div><div>[0]PETSC ERROR: #3 PetscSegBufferGet() at /home/edo/software/petsc-3.18.0/src/sys/utils/segbuffer.c:94</div><div>[1]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div>[1]PETSC ERROR: General MPI error</div><div>[1]PETSC ERROR: MPI error 1 MPI_ERR_BUFFER: invalid buffer pointer</div><div>[1]PETSC ERROR: See <a href="https://petsc.org/release/faq/" target="_blank">https://petsc.org/release/faq/</a> for trouble shooting.</div><div>[1]PETSC ERROR: Petsc Release Version 3.18.0, Sep 30, 2022 </div><div>[1]PETSC ERROR: flubio_coupled on a gnu named alienware by edo Fri Nov 4 09:31:03 2022</div><div>[1]PETSC ERROR: Configure options PETSC_ARCH=gnu FOPTFLAGS=-O3 COPTFLAGS=-O3 CXXOPTFLAGS=-O3 -with-debugging=no -download-fblaslapack=1 -download-superlu_dist -download-mumps -download-hypre -download-metis -download-parmetis -download-scalapack -download-ml -download-slepc -download-hpddm -download-cmake -with-mpi-dir=/home/edo/software/openmpi-4.1.1/build/</div><div>[1]PETSC ERROR: #1 VecAssemblySend_MPI_Private() at /home/edo/software/petsc-3.18.0/src/vec/vec/impls/mpi/pbvec.c:133</div><div>[1]PETSC ERROR: #2 PetscCommBuildTwoSidedFReq_Reference() at /home/edo/software/petsc-3.18.0/src/sys/utils/mpits.c:314</div><div>[1]PETSC ERROR: #3 PetscCommBuildTwoSidedFReq() at /home/edo/software/petsc-3.18.0/src/sys/utils/mpits.c:526</div><div>[1]PETSC ERROR: [0]PETSC ERROR: #4 VecAssemblyRecv_MPI_Private() at /home/edo/software/petsc-3.18.0/src/vec/vec/impls/mpi/pbvec.c:164</div><div>[0]PETSC ERROR: #5 PetscCommBuildTwoSidedFReq_Reference() at /home/edo/software/petsc-3.18.0/src/sys/utils/mpits.c:320</div><div>[0]PETSC ERROR: #6 PetscCommBuildTwoSidedFReq() at /home/edo/software/petsc-3.18.0/src/sys/utils/mpits.c:526</div><div>[0]PETSC ERROR: #7 VecAssemblyBegin_MPI_BTS() at /home/edo/software/petsc-3.18.0/src/vec/vec/impls/mpi/pbvec.c:238</div><div>#4 VecAssemblyBegin_MPI_BTS() at /home/edo/software/petsc-3.18.0/src/vec/vec/impls/mpi/pbvec.c:238</div><div>[1]PETSC ERROR: #5 VecAssemblyBegin() at /home/edo/software/petsc-3.18.0/src/vec/vec/interface/vector.c:124</div><div>[1]PETSC ERROR: #6 VecAssemblyEnd_MPI_BTS() at /home/edo/software/petsc-3.18.0/src/vec/vec/impls/mpi/pbvec.c:337</div><div>[1]PETSC ERROR: #7 VecAssemblyEnd() at /home/edo/software/petsc-3.18.0/src/vec/vec/interface/vector.c:158</div><div>[1]PETSC ERROR: #8 VecView() at /home/edo/software/petsc-3.18.0/src/vec/vec/interface/vector.c:719</div><div>[0]PETSC ERROR: #8 VecAssemblyBegin() at /home/edo/software/petsc-3.18.0/src/vec/vec/interface/vector.c:124</div><div>Vec Object: 2 MPI processes</div><div><br></div></blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>