Please, could you provide a minimal working example (or link) of how to do
this?
Thank you.
Em ter., 20 de jun. de 2023 às 15:08, Matthew Knepley
escreveu:
> On Tue, Jun 20, 2023 at 2:02 PM Diego Magela Lemos
> wrote:
>
>> So... what do I need to do, please?
>> Why am I getting wrong results wh
On Wed, Jun 21, 2023 at 9:22 AM Diego Magela Lemos
wrote:
> Please, could you provide a minimal working example (or link) of how to do
> this?
>
You can see here
https://petsc.org/main/src/ksp/ksp/tutorials/ex2.c.html
that each process only sets values for the rows it owns.
Thanks,
It works well for one processor; but when I tried two processors using
mpiexec -n 2 ./ex1,
there is an error shown as belows. If the line "DMDestroy(dmDist)" is
commented out, the error will go away. This is a little confusing for me.
[1]PETSC ERROR: - Error Message
---
> If the line "DMDestroy(dmDist)" is commented out, the error will go away
> > if (dmDist) {
> > DMDestroy(&dm);
> > dm = dmDist;
> > }
> > DMDestroy(&dmDist);
This is because you are double-destroying dmDist here. Note that all petsc
objects are pointers, so assignment may not do
Great, thanks a lot.
On Wed, Jun 21, 2023 at 5:12 PM Jacob Faibussowitsch
wrote:
> > If the line "DMDestroy(dmDist)" is commented out, the error will go away
>
> > > if (dmDist) {
> > > DMDestroy(&dm);
> > > dm = dmDist;
> > > }
> > > DMDestroy(&dmDist);
>
>
> This is because you a
> --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpi PETSC_ARCH=intel_2020
> Executing: mpicc --version
> stdout:
> gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5)
Did you intend to use Intel compilers?
>
/tmp/petsc-sMhvLh/config.setCompilers/conftest.c: In function ‘main’:
/tmp/petsc-sMhvLh/config