<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Here is the error message:<div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"></div><blockquote type="cite"><div style="margin: 0px; font-size: 11px; font-family: Menlo;">$ make ex2</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">cc ex2.c -o ex2</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><b>ex2.c:13:10: </b><span style="color: #c33720"><b>fatal error: </b></span><b>'petscsys.h' file not found</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">#include <petscsys.h></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(52, 189, 38);"><b> ^</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">1 error generated.</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">make: *** [ex2] Error 1</div></blockquote><div><br></div>and this is the entire makefile. It’s long but it’s literally a copy paste from the exercises. Also, I’ve fixed the issue with the PETSC_ARCH so it’s set to linux-gnu now. And when I do cd $PETSC_DIR, I’m moved to the correct directory.</div><div><div><br></div><div></div><blockquote type="cite"><div>ALL:</div><div><br></div><div>CFLAGS<span class="Apple-tab-span" style="white-space:pre"> </span> =</div><div>FFLAGS<span class="Apple-tab-span" style="white-space:pre"> </span> = -I${PETSC_DIR}/include/finclude</div><div>CPPFLAGS =</div><div>FPPFLAGS =</div><div>LOCDIR = src/sys/examples/tutorials/</div><div>EXAMPLESC = ex1.c ex2.c ex3.c ex4.c ex5.c ex6.c ex7.c ex9.c ex11.c</div><div>EXAMPLESF = ex3f.F ex4f.F ex4f90.F90 ex5f90.F90 ex8f90.F90 ex10f90.F90</div><div>MANSEC = Sys</div><div>CLEANFILES = binaryoutput binaryoutput.info</div><div><br></div><div>include ${PETSC_DIR}/conf/variables</div><div>include ${PETSC_DIR}/conf/rules</div><div><br></div><div>ex1: ex1.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex1 ex1.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex1.o</div><div><br></div><div>ex2: ex2.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex2 ex2.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex2.o</div><div><br></div><div>ex3: ex3.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex3 ex3.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex3.o</div><div><br></div><div>ex3f: ex3f.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${FLINKER} -o ex3f ex3f.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex3f.o</div><div><br></div><div>ex4: ex4.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex4 ex4.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex4.o</div><div><br></div><div>ex4f: ex4f.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${FLINKER} -o ex4f ex4f.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex4f.o</div><div><br></div><div>ex4f90: ex4f90.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${FLINKER} -o ex4f90 ex4f90.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex4f90.o</div><div><br></div><div>ex5: ex5.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex5 ex5.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex5.o</div><div><br></div><div>ex5f90: ex5f90.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${FLINKER} -o ex5f90 ex5f90.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} ex5f90.o</div><div><br></div><div>ex6: ex6.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex6 ex6.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex6.o</div><div><br></div><div>ex7: ex7.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex7 ex7.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex7.o</div><div><br></div><div>ex8f90: ex8f90.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${FLINKER} -o ex8f90 ex8f90.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} ex8f90.o</div><div><br></div><div>ex9: ex9.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex9 ex9.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex9.o</div><div><br></div><div>ex10f90: ex10f90.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${FLINKER} -o ex10f90 ex10f90.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex10f90.o</div><div><br></div><div>ex11: ex11.o chkopts</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-${CLINKER} -o ex11 ex11.o ${PETSC_SYS_LIB}</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>${RM} -f ex11.o</div><div>#</div><div># ------------------------------------------------------------------------</div><div>#</div><div>runex1:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex1 > ex1_1.tmp 2>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex1_1.out ex1_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex1_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex1_1.tmp</div><div><br></div><div>runex2:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex2 > ex2_1.tmp 2>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex2_1.out ex2_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex2_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex2_1.tmp</div><div><br></div><div>runex3:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex3</div><div><br></div><div>runex3f:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex3f</div><div><br></div><div>runex4:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 5 ./ex4 | sort > ex4_1.tmp 2>&1; \</div><div> if (${DIFF} output/ex4_1.out ex4_1.tmp) then true; \</div><div> else echo ${PWD} ; echo "Possible problem with with ex4_1, diffs above \n========================================="; fi; \</div><div> ${RM} -f ex4_1.tmp</div><div><br></div><div>runex4f:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 5 ./ex4f | sort > ex4f_1.tmp 2>&1; \</div><div> if (${DIFF} output/ex4f_1.out ex4f_1.tmp) then true; \</div><div> else echo ${PWD} ; echo "Possible problem with with ex4f_1, diffs above \n========================================="; fi; \</div><div> ${RM} -f ex4f_1.tmp</div><div><br></div><div>runex4f90:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex4f90 > ex4f90_1.tmp 5>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex4f90_1.out ex4f90_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex4f90_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex4f90_1.tmp</div><div><br></div><div>runex5:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex5 -pbag_rho 44 -pbag_do_output true > ex5_1.tmp 5>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex5_1.out ex5_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex5_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex5_1.tmp</div><div><br></div><div>runex5f90:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex5f90 -pbag_rarray 4,5,88 > ex5f90_1.tmp 5>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex5f90_1.out ex5f90_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex5f90_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex5f90_1.tmp</div><div><br></div><div>runex6:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex6</div><div><br></div><div>runex8f90:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex8f90 -joe_jeff b456 > ex8f90_1.tmp 8>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex8f90_1.out ex8f90_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex8f90_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex8f90_1.tmp</div><div><br></div><div>runex9_1:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@PETSC_OPTIONS= ${MPIEXEC} -n 1 ./ex9 -f petsc.yml > ex9_1.tmp 5>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex9_1.out ex9_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex9_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex9_1.tmp</div><div><br></div><div>runex9_2:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@PETSC_OPTIONS= ${MPIEXEC} -n 1 ./ex9 -options_file_yaml petsc.yml > ex9_2.tmp 5>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex9_2.out ex9_2.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex9_2, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex9_2.tmp</div><div><br></div><div>runex10f90_1:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@PETSC_OPTIONS= ${MPIEXEC} -n 1 ./ex10f90 -f petsc.yml > ex10f90_1.tmp 8>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex10f90_1.out ex10f90_1.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex10f90_1, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex10f90_1.tmp</div><div><br></div><div>runex10f90_2:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@PETSC_OPTIONS= ${MPIEXEC} -n 1 ./ex10f90 -options_file_yaml petsc.yml > ex10f90_2.tmp 8>&1; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> if (${DIFF} output/ex10f90_2.out ex10f90_2.tmp) then true; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> else echo ${PWD} ; echo "Possible problem with with ex10f90_2, diffs above \n========================================="; fi; \</div><div><span class="Apple-tab-span" style="white-space:pre"> </span> ${RM} -f ex10f90_2.tmp</div><div><br></div><div>runex11:</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>-@${MPIEXEC} -n 1 ./ex11</div><div><br></div><div>TESTEXAMPLES_C<span class="Apple-tab-span" style="white-space:pre"> </span> = ex1.PETSc runex1 ex1.rm ex2.PETSc runex2 ex2.rm \</div><div> ex3.PETSc runex3 ex3.rm ex4.PETSc runex4 ex4.rm ex6.PETSc runex6 ex6.rm ex11.PETSc runex11 ex11.rm</div><div>TESTEXAMPLES_C_NOCOMPLEX = ex5.PETSc runex5 ex5.rm</div><div>TESTEXAMPLES_C_X_MPIUNI = ex1.PETSc runex1 ex1.rm ex2.PETSc runex2 ex2.rm \</div><div> ex3.PETSc runex3 ex3.rm</div><div>TESTEXAMPLES_FORTRAN<span class="Apple-tab-span" style="white-space:pre"> </span> = ex3f.PETSc runex3f ex3f.rm ex4f.PETSc runex4f ex4f.rm</div><div>TESTEXAMPLES_F90<span class="Apple-tab-span" style="white-space:pre"> </span> = ex4f90.PETSc runex4f90 ex4f90.rm</div><div>TESTEXAMPLES_F2003 = ex5f90.PETSc runex5f90 ex5f90.rm ex8f90.PETSc runex8f90 ex8f90.rm</div><div>TESTEXAMPLES_YAML = ex9.PETSc runex9_1 runex9_2 ex9.rm ex10f90.PETSc runex10f90_1 runex10f90_2 ex10f90.rm</div><div>include ${PETSC_DIR}/conf/test</div></blockquote><div><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div><div>On Nov 20, 2013, at 8:05 PM, Jed Brown <<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">"Justin Dong (Me)" <</span><a href="mailto:jsd1@rice.edu" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">jsd1@rice.edu</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;">> writes:</span></blockquote></div><br></div></body></html>