This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Applied Mathematics E4302x Introduction to Parallel Scientific Computing PETSc Exercise assigned: Wednesday, 18 October 2006 1 PETSc Create a subdirectory and copy ex19.c and makefile from the PETSc source tree, at $PETSC DIR/src/snes/examples/tutorials . Customize the makefile to your personal taste, if desired, and build ex19 with: make BOPT=g ex19 Run interactively with: $MPIRUN -np 1 ex19 -da_grid_x 32 -da_grid_y 32 -grashof 1000. -snes_monitor -ksp_monitor Observe the rapid convergence of the nonlinear residual norm and of the linear subitera- tions. The solver executes twice, by default. In performance studies, this is done so that the maximum memory allocation is done the first time through, so that the second execution is not sensitive to disk paging. When not doing performance studies, the double execution can be annoying as a default and can be turned off by setting the preload variable to false: $MPIRUN -np 1 ex19 -da_grid_x 32 -da_grid_y 32 -grashof 1000. -snes_monitor -ksp_monitor -preload false Set xterm permissions for pop-up graphics windows and run: $MPIRUN -np 1 ex19 -da_grid_x 32 -da_grid_y 32 -grashof 1000. -contours Observe the solution field contour plots with legends for two velocity components, vortic- ity, and temperature in a square domain the lid- and thermally-driven cavity problem. Run again with the switches-log info and-log summary and try to make sense of the plethora of information you get, along with the convergence plots. You may want to pipe the output into a file for study in an editor, and you may want to supress graphics, as in: $MPIRUN -np 1 ex19 -da_grid_x 32 -da_grid_y 32 -grashof 1000. -log_info -log_summary-snes_monitor -ksp_monitor > ex19_log_np1.txt Run again with four processors, using the default parallel preconditioner, as follows (note that we save into a different file): $MPIRUN -np 4 ex19 -da_grid_x 32 -da_grid_y 32 -grashof 1000. -log_info -log_summary-snes_monitor -ksp_monitor > ex19_log_np4.txt Note that the number of processors comes in between the mpirun invocation and the executable name, whereas the executables optional arguments follow its name....
View Full Document
This note was uploaded on 08/30/2011 for the course APMA 4301 taught by Professor Keyes during the Fall '08 term at Columbia.
- Fall '08