CS595. Homework 6 (Oct. 2010) =============================== 1) Build PETSc in debug mode (configure with ‘--with-debugging=1 PETSC_ARCH=arch-cs595’) and in optimized mode (configure with ‘--with-debugging=0 PETSC_ARCH=arch-cs595-o’) 2) Build $PETSC_DIR/src/ksp/ksp/examples/tutorials/ex2.c: cd $PETSC_DIR/src/ksp/ksp/examples/tutorials make ex2 PETSC_ARCH=arch-cs595 (or make ex2 PETSC_ARCH=arch-cs595-o) Run: mpiexec –n ./ex2 -m 300 -n 300 –ksp_type -pc_type -log_summary Fill the form HW6_report.docx with the result collected from . Methods 1. -ksp_type gmres -pc_type none -ksp_max_it 1000 2. -ksp_type cg -pc_type none -ksp_max_it 1000 3. -ksp_type gmres -pc_type bjacobi -sub_pc_type ilu 4. -ksp_type gmres -pc_type bjacobi -sub_pc_type lu 5. -ksp_type cg -pc_type bjacobi -sub_pc_type icc 6. -ksp_type gmres -pc_type asm -sub_pc_type lu 7. -ksp_type gmres -pc_type asm -sub_pc_type lu -pc_asm_overlap 2 8. -ksp_type cg -pc_type sor -pc_sor_local_symmetric This is a linear problem. We only consider matrix operations for "Dominating Operation", e.g., ./ex2 -m 300 -n 300 -ksp_type gmres -pc_type bjacobi -sub_pc_type ilu -log_summary |grep Mat MatMult 580 1.0 3.9221e+00 1.0 4.68e+08 1.0 0.0e+00 0.0e+00 0.0e+00 21 11 0 0 0 21 11 0 0 0 119 MatSolve 580 1.0 4.0558e+00 1.0 4.68e+08 1.0 0.0e+00 0.0e+00 0.0e+00 21 11 0 0 0 22 11 0 0 0 115 MatLUFactorNum 1 1.0 4.0746e-02 1.0 8.06e+05 1.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 20 MatILUFactorSym 1 1.0 4.9145e-02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 3.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatGetRowIJ 1 1.0 1.9073e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatGetOrdering 1 1.0 3.2486e-02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 2.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatAssemblyBegin 1 1.0 1.9073e-06 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 0 0 0 0 0 0 MatAssemblyEnd 1 1.0 1.8147e-02 1.0 0.00e+00 0.0 0.0e+00 0.0e+00 0.0e+00 0 0 0 0 0 14 0 0 0 0 0 thus, dominating operations are MatMult 580 1.0 3.9221e+00 MatSolve 580 1.0 4.0558e+00 3) $PETSC_DIR/snes/examples/tutorials/ex19.c: First, run following to understand the algorithm ./ex19 -dmmg_nlevels 7 -ksp_monitor -snes_monitor -snes_view Then run mpiexec –n ./ex19 -dmmg_nlevels 7 -log_summary This is non-linear problem. Check matrix operations and following three operations for "Dominating Operation" SNESLineSearch SNESFunctionEval SNESJacobianEval