[petsc-users] On PCFIELDSPLIT and its implementation

Barry Smith bsmith at petsc.dev
Thu Nov 10 13:14:22 CST 2022


  These beasts should be PetscInt, not real

 real :: ufields(2), pfields(1)


   Side note. We do not recommend using options like -fdefault-real-8 because the compiler may change values in surprising ways.  You can use PetscReal to declare real numbers and this will automatically match with single or double precision based on the PETSc configure options.

   What version of PETSc are you using? We don't have Fortran stubs for the calls to PCFieldSplitSetFields in the latest release. I should add them.



> On Nov 9, 2022, at 12:00 PM, Edoardo alinovi <edoardo.alinovi at gmail.com> wrote:
> 
> Hi Matt,
> 
> it took a bit more than 1s, but I can reproduce the error in the attached file.
> 
> To compile:
> mpifort -L$PETSC_DIR/$PETSC_ARCH/lib -lpetsc -fdefault-real-8 -o test test.F90 -I$PETSC_DIR/include -I$PETSC_DIR/$PETSC_ARCH/include
> 
> Please run it in serial as I have hardcoded some dimensions to code this up faster.
> 
> Thank you!
> <test.F90>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221110/084e37b8/attachment-0001.html>


More information about the petsc-users mailing list