<div dir="ltr"><div dir="auto">Hi Barry,</div><div dir="auto"><br><div>Thanks a lot for getting back to me, I am quite stuck at the moment! </div><div><br></div><div dir="auto">Matt kindly added them in a dev branch I am using right now to test this pc.</div><div dir="auto"><br></div><div dir="auto">You are right I am declaring them badly, I am an idiot! My small test works now, but I'm still in trouble with the main code unfortunately. There the indices are integers, but I am invoking the field splitting before assembling the matrix (thus doing MatAssemblyBegin/End). Does the matrix need to be fully assembled before calling PCFieldSplitSetFields?</div><div dir="auto"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il Gio 10 Nov 2022, 20:14 Barry Smith <<a href="mailto:bsmith@petsc.dev" target="_blank">bsmith@petsc.dev</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><br></div>  These beasts should be PetscInt, not real<div><br></div><div> real :: ufields(2), pfields(1)</div><div><br></div><div><br></div><div>   Side note. We do not recommend using options like <b>-fdefault-real-8 </b>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.</div><div><br></div><div>   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.</div><div><br></div><div><br><div><br><blockquote type="cite"><div>On Nov 9, 2022, at 12:00 PM, Edoardo alinovi <<a href="mailto:edoardo.alinovi@gmail.com" rel="noreferrer" target="_blank">edoardo.alinovi@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hi Matt,<div><br></div><div>it took a bit more than 1s, but I can reproduce the error in the attached file.</div><div><br></div><div>To compile:</div><div><b>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</b><br></div><div><b><br></b></div><div>Please run it in serial as I have hardcoded some dimensions to code this up faster.</div><div><br></div><div>Thank you!</div></div>
<span id="m_1050225128107067981m_5762026340465633790cid:f_la9vxzcy0"><test.F90></span></div></blockquote></div><br></div></div></blockquote></div>