2008/9/2

How to compiler PETSc's program and run

Makefile:

include ${PETSC_DIR}/bmake/common/base
include ${PETSC_DIR}/bmake/common/test
print.out: p-hellow.o
${CLINKER} -o print.out p-hellow.o ${PETSC_LIB}

Note: It will find correspond file name automatically.
For example: p-hellow.o -> p-hellow.cpp

runfile:
${PETSC_DIR}/bin/petscmpiexec -np 2 ./print.out
OR
mpirun -np 2 ./print.out