<div dir="ltr">Greetings<div>I hope this email reaches you well. I'm new to using PETSc and so I thought a good way to familiarize myself with the tools would be to noodle around with a simple problem and see how different setups of the same problem play out. I thought it would be prudent to try ex50.c with different linear solvers to see how they compare on a simple problem that was easy enough to tweak. However I'm having some trouble, when I try to set the KSP type the only one that seems to work is KSP_CG_SYMMETRIC, all others throw up an error like this<br><br><font face="verdana, sans-serif">/home/cattaneo/petsc-3.19.1/include/petscksp.h:59:23: error: incompatible type for argument 2 of ‘KSPCGSetType’<br> 59 | #define KSPTCQMR "tcqmr"<br> | ^~~~~~~<br> | |<br> | const char *<br>/home/cattaneo/petsc-3.19.1/include/petscerror.h:473:28: note: in definition of macro ‘PetscCall’<br> 473 | ierr_petsc_call_q_ = __VA_ARGS__; \<br> | ^~~~~~~~~~~<br>ex50B.c:56:29: note: in expansion of macro ‘KSPTCQMR’<br> 56 | PetscCall(KSPCGSetType(ksp,KSPTCQMR));<br> | ^~~~~~~~<br>In file included from ex50B.c:25:<br>/home/cattaneo/petsc-3.19.1/include/petscksp.h:884:47: note: expected ‘KSPCGType’ but argument is of type ‘const char *’<br> 884 | PETSC_EXTERN PetscErrorCode KSPCGSetType(KSP, KSPCGType);</font><br><br>When trying to make the file. I suspect I'm missing something fundamental, but I can't seem to chase whatever it is down. I am using PETSc on WSL2 on Windows 10 which I know is not the standard, but so far it hasn't seemed to cause trouble. I'm confused because I'm using the same make that is used for all the examples, and it doesn't seem to have an issue using
KSPGMRES for ex62 as an example. Sorry if this is a basic question, I'm just a little unsure where to turn as I don't really know anyone that uses PETSc. Thank you for your time.</div><div>Respectfully:</div><div>Alberto</div></div><img src="https://email-signature-image.com/signature.gif?u=140704&e=392800098&v=96750344e9a5c60b29c3264f47b556f3c0eec2978aec76bef7f072f1424fabe1" alt="" width="0" height="0" style="width:2px;max-height:0;overflow:hidden">