<div dir="ltr"><div>This happens fairly frequently when I try to switch/update branches of PETSc (here invoked by building my own code, but the error message looks the same with "make check"):</div><div><br></div><div>$ make</div><div>/Users/patrick/petsc-stagbl/arch-darwin-stagbl-double-extra-debug/bin/mpicc -o runme.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3   -I/Users/patrick/petsc-stagbl/include -I/Users/patrick/petsc-stagbl/arch-darwin-stagbl-double-extra-debug/include -I/opt/X11/include    `pwd`/runme.c</div><div>/Users/patrick/petsc-stagbl/arch-darwin-stagbl-double-extra-debug/bin/mpicc -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind -Wl,-multiply_defined,suppress -Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs -Wl,-search_paths_first -Wl,-no_compact_unwind    -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -fstack-protector -fvisibility=hidden -g3  -o runme runme.o -Wl,-rpath,/Users/patrick/petsc-stagbl/arch-darwin-stagbl-double-extra-debug/lib -L/Users/patrick/petsc-stagbl/arch-darwin-stagbl-double-extra-debug/lib -Wl,-rpath,/Users/patrick/petsc-stagbl/arch-darwin-stagbl-double-extra-debug/lib -Wl,-rpath,/opt/X11/lib -L/opt/X11/lib -Wl,-rpath,/opt/local/lib/gcc7/gcc/x86_64-apple-darwin17/7.3.0 -L/opt/local/lib/gcc7/gcc/x86_64-apple-darwin17/7.3.0 -Wl,-rpath,/opt/local/lib/gcc7 -L/opt/local/lib/gcc7 -lpetsc -lcmumps -ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lumfpack -lklu -lcholmod -lbtf -lccolamd -lcolamd -lcamd -lamd -lsuitesparseconfig -lsuperlu_dist -lHYPRE -lsundials_cvode -lsundials_nvecserial -lsundials_nvecparallel -llapack -lblas -lparmetis -lmetis -lX11 -lyaml -lstdc++ -ldl -lmpifort -lmpi -lpmpi -lgfortran -lquadmath -lm -lstdc++ -ldl</div><div>Undefined symbols for architecture x86_64:</div><div>  "_kspfgmresmodifypcksp_", referenced from:</div><div>      import-atom in libpetsc.dylib</div><div>  "_kspfgmresmodifypcnochange_", referenced from:</div><div>      import-atom in libpetsc.dylib</div><div>ld: symbol(s) not found for architecture x86_64</div><div>collect2: error: ld returned 1 exit status</div><div><br></div><div>I don't know why this is, exactly. Maybe it's more obvious from the perspective of someone more expert on the Fortran interface, and we could save some time reconfiguring (if these two symbols are really the only issue).</div><div><br></div><div> For these two symbols, the corresponding functions are declared but not defined in</div><div><br></div><div>    src/ksp/ksp/impls/gmres/fgmres/ftn-custom/zmodpcff.c<br></div><div><br></div><div>"make deletefortranstubs" by itself doesn't seem to solve the problem. My sledgehammer workaround is to do everything short of blowing away my entire $PETSC_ARCH directory:</div><div><br></div><div>    make deletefortranstubs && make allclean && make reconfigure && make && make check</div><div><br></div><div>but I'm sure that's suboptimal, and in particular I'd like to avoid the reconfigure. </div><div><br></div><div>Any useful community knowledge on this point? </div></div>