Re: [petsc-users] Strange CUDA failure with a second petscfinalize with PETSc 3.16

2022-01-17 Thread Hao DONG
Dear Junchao and Jacob, Thanks a lot for the response – I also don’t understand why this is related to the device, especially on why the procedure can be successfully finished for *once* – As instructed, I tried to add a CHKERRA() macro after (almost) every petsc line – such as the

Re: [petsc-users] PETSc MUMPS interface

2022-01-17 Thread Zhang, Hong via petsc-users
Varun, I created a branch hzhang/feature-mumps-mem-estimate, see https://gitlab.com/petsc/petsc/-/merge_requests/4727 You may give it a try and let me know if this is what you want. src/ksp/ksp/tutorials/ex52.c is an example. Hong From: Varun Hiremath Sent:

Re: [petsc-users] MatMPIBAIJSetPreallocation() diagonal block:

2022-01-17 Thread Mark Adams
On Mon, Jan 17, 2022 at 6:40 PM Ferrand, Jesus A. wrote: > Greetings! > > I have a question about preallocating memory for a parallel BAIJ matrix. > From the documentation of MatMPIBAIJSetPreallocation(), the preallocation > is divided between the so-called "diagonal" and "off-diagonal" sub >

[petsc-users] MatMPIBAIJSetPreallocation() diagonal block:

2022-01-17 Thread Ferrand, Jesus A.
Greetings! I have a question about preallocating memory for a parallel BAIJ matrix. From the documentation of MatMPIBAIJSetPreallocation(), the preallocation is divided between the so-called "diagonal" and "off-diagonal" sub matrices. In the example from the documentation, the following

Re: [petsc-users] PETSc MUMPS interface

2022-01-17 Thread Varun Hiremath
Hi Hong, Thanks for looking into this. Here is the workflow that I might use: MatLUFactorSymbolic(F,A,perm,iperm,); // get memory estimates from MUMPS e.g. INFO(3), INFOG(16), INFOG(17) // find available memory on the system e.g. RAM size if (estimated_memory > available_memory) { // inform

Re: [petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Jed Brown
Matthew Knepley writes: > What you suggest (flux boundary conditions) would require short-circuiting > the Riemann solver loop to stick in the flux. It is doable, but we opted > against it in the initial > design because it seemed more complex than ghost cells and did not seem to > have any

Re: [petsc-users] PETSc MUMPS interface

2022-01-17 Thread Zhang, Hong via petsc-users
Varun, I am trying to find a way to enable you to switch options after MatLUFactorSymbolic(). A hack is modifying the flag 'mumps->matstruc' inside MatLUFactorSymbolic_AIJMUMPS() and MatFactorNumeric_MUMPS(). My understanding of what you want is: // collect mumps memory info ...

Re: [petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Thibault Bridel-Bertomeu
Le lun. 17 janv. 2022 à 17:19, Matthew Knepley a écrit : > On Mon, Jan 17, 2022 at 10:49 AM Jed Brown wrote: > >> Thibault Bridel-Bertomeu writes: >> >> > Sorry I wasn't clear I think. >> > I was thinking that for finite volume codes, you have two options: >> either >> > you use ghost cells

Re: [petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Matthew Knepley
On Mon, Jan 17, 2022 at 10:49 AM Jed Brown wrote: > Thibault Bridel-Bertomeu writes: > > > Sorry I wasn't clear I think. > > I was thinking that for finite volume codes, you have two options: either > > you use ghost cells that you fill up with the appropriate primitive state > > for the

Re: [petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Jed Brown
Thibault Bridel-Bertomeu writes: > Sorry I wasn't clear I think. > I was thinking that for finite volume codes, you have two options: either > you use ghost cells that you fill up with the appropriate primitive state > for the boundary condition, or you directly enforce the boundary condition >

Re: [petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Thibault Bridel-Bertomeu
Hello everyone, Thank you for your answer Jed. Le lun. 17 janv. 2022 à 15:52, Jed Brown a écrit : > Thibault Bridel-Bertomeu writes: > > > Hi everyone, > > > > I was wondering if it was possible to build a solver based on PetscFV > > without using ghost cells for the boundary conditions ? > >

Re: [petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Jed Brown
Thibault Bridel-Bertomeu writes: > Hi everyone, > > I was wondering if it was possible to build a solver based on PetscFV > without using ghost cells for the boundary conditions ? > Would it be possible to call PetscDSAddBoundary with DM_BC_ESSENTIAL and so > on instead of DM_BC_NATURAL_RIEMANN

[petsc-users] PetscFV without ghost boundary conditions

2022-01-17 Thread Thibault Bridel-Bertomeu
Hi everyone, I was wondering if it was possible to build a solver based on PetscFV without using ghost cells for the boundary conditions ? Would it be possible to call PetscDSAddBoundary with DM_BC_ESSENTIAL and so on instead of DM_BC_NATURAL_RIEMANN ? Mostly in the case of an hybrid problem