Re: [petsc-users] petsc configure problem

2023-06-21 Thread Satish Balay via petsc-users
> --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’:

Re: [petsc-users] Inquiry about the c++ destructor and PetscFinalize.

2023-06-21 Thread neil liu
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 = dmDist; > > > } > > > DMDestroy(); > > > This is because you are

Re: [petsc-users] Inquiry about the c++ destructor and PetscFinalize.

2023-06-21 Thread Jacob Faibussowitsch
> If the line "DMDestroy(dmDist)" is commented out, the error will go away > > if (dmDist) { > > DMDestroy(); > > dm = dmDist; > > } > > DMDestroy(); This is because you are double-destroying dmDist here. Note that all petsc objects are pointers, so assignment may not do what you

Re: [petsc-users] Inquiry about the c++ destructor and PetscFinalize.

2023-06-21 Thread neil liu
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

Re: [petsc-users] How to efficiently fill in, in parallel, a PETSc matrix from a COO sparse matrix?

2023-06-21 Thread Matthew Knepley
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,

Re: [petsc-users] How to efficiently fill in, in parallel, a PETSc matrix from a COO sparse matrix?

2023-06-21 Thread Diego Magela Lemos via petsc-users
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