Hi,<br><br>I have installed two versions of PETSc on my computer,  the debug version petsc-3.1.p7 and petsc-dev. <br><br>However, when I try to compile my codes  with petsc-dev(which were successfully compiled and executed under the first version) <br>
I get lots of compile errors. <br><br>Why could this be happening? I have pasted the error message below.<br><br>gaurish108@telang:~/Desktop/LSQR_progress$ $PETSC_DIR<br>bash: /home/gaurish108/software/petsc-dev: is a directory<br>
<br>gaurish108@telang:~/Desktop/LSQR_progress$ make main<br>/home/gaurish108/software/petsc-dev/linux-gnu-c/bin/mpicc -o main.o -c -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3 -I/home/gaurish108/software/petsc-dev/include -I/home/gaurish108/software/petsc-dev/linux-gnu-c/include -D__INSDIR__= main.c<br>
main.c: In function ‘main’:<br>main.c:17: error: ‘PetscTruth’ undeclared (first use in this function)<br>main.c:17: error: (Each undeclared identifier is reported only once<br>main.c:17: error: for each function it appears in.)<br>
main.c:17: error: expected ‘;’ before ‘flg_b’<br>main.c:26: error: ‘flg_b’ undeclared (first use in this function)<br>main.c:27: error: macro &quot;SETERRQ&quot; requires 3 arguments, but only 2 given<br>main.c:27: error: ‘SETERRQ’ undeclared (first use in this function)<br>
main.c:30: warning: passing argument 1 of ‘VecLoad’ from incompatible pointer type<br>/home/gaurish108/software/petsc-dev/include/petscvec.h:419: note: expected ‘Vec’ but argument is of type ‘PetscViewer’<br>main.c:30: warning: passing argument 2 of ‘VecLoad’ from incompatible pointer type<br>
/home/gaurish108/software/petsc-dev/include/petscvec.h:419: note: expected ‘PetscViewer’ but argument is of type ‘const char *’<br>main.c:30: error: too many arguments to function ‘VecLoad’<br>main.c:37: error: ‘flg_A’ undeclared (first use in this function)<br>
main.c:38: error: macro &quot;SETERRQ&quot; requires 3 arguments, but only 2 given<br>main.c:41: warning: passing argument 1 of ‘MatLoad’ from incompatible pointer type<br>/home/gaurish108/software/petsc-dev/include/petscmat.h:493: note: expected ‘Mat’ but argument is of type ‘PetscViewer’<br>
main.c:41: warning: passing argument 2 of ‘MatLoad’ from incompatible pointer type<br>/home/gaurish108/software/petsc-dev/include/petscmat.h:493: note: expected ‘PetscViewer’ but argument is of type ‘const char *’<br>main.c:41: error: too many arguments to function ‘MatLoad’<br>
make: [main.o] Error 1 (ignored)<br>/home/gaurish108/software/petsc-dev/linux-gnu-c/bin/mpicc -Wall -Wwrite-strings -Wno-strict-aliasing -Wno-unknown-pragmas -g3  -o main main.o -L/home/gaurish108/software/petsc-dev/linux-gnu-c/lib  -lpetsc -lX11 -Wl,-rpath,/home/gaurish108/software/petsc-dev/linux-gnu-c/lib -lflapack -lfblas -lm -L/usr/lib/gcc/i686-linux-gnu/4.4.5 -L/usr/lib/i686-linux-gnu -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -lmpichf90 -lgfortran -lm -lm -ldl -lmpich -lopa -lmpl -lrt -lpthread -lgcc_s -ldl <br>
gcc: main.o: No such file or directory<br>make: [main] Error 1 (ignored)<br>/bin/rm -f main.o<br>gaurish108@telang:~/Desktop/LSQR_progress$ $PETSC_DIR<br>bash: /home/gaurish108/software/petsc-dev: is a directory<br>gaurish108@telang:~/Desktop/LSQR_progress$ <br>
<br>