Practical
Test the heat_petsc example:
- cd ~/PETSC/#nr
- mpirun –np 4 ./heat_petsc
- mpirun –np 4 ./heat_petsc –wrong_option –options_left
- mpirun –np 4 ./heat_petsc –ksp_monitor –sles_view –view_sol –view_mat_x –view_sol_x –options_left
Which is default KSP? / Compare the execution time:
- mpirun –np 4 ./heat_petsc –m 300 –n 300 –log_summary –options_left
- mpirun –np 4 ./heat_petsc –m 300 –n 300 –ksp_type cg –log_summary –op...
- mpirun –np 4 ./heat_petsc –m 300 –n 300 –ksp_type cr –log_summary ...
- mpirun –np 4 ./heat_petsc –m 300 –n 300 –ksp_type bcgs –log_summary ...
Calculate Speeup of CG:
- mpirun –np 1 ./heat_petsc –m 300 –n 300 –ksp_type cg –log_summary ...
- mpirun –np 16 ./heat_petsc –m 300 –n 300 –ksp_type cg –log_summary ...
If you want to compile:
- setenv PETSC_DIR ... or export PETSC_DIR=...
- setenv PETSC_ARCH ... or export PETSC_ARCH=...
- make BOPT=O heat_petsc