{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

computing_exercise_draft

# computing_exercise_draft - Applied Mathematics E4302x...

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
This is the end of the preview. Sign up to access the rest of the 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 executable’s optional arguments follow its name....
View Full Document

{[ snackBarMessage ]}

### Page1 / 4

computing_exercise_draft - Applied Mathematics E4302x...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online