Skip to content

Commit 5ab9bca

Browse files
committed
fixing merge
2 parents 969102b + 97e131e commit 5ab9bca

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

lessons/atpesc-instructions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
# Instructions for Numerical Package Hands-on
2+
# Instructions for Numerical Package Hands-on Setup (ATPESC 2017)
33

4-
ATPESC participants will work in groups of 2 for hands-on exercises. Forming groups of 2 helps us to cut in half the number of IT issues that may arise during hands-on exercises. Moreover, [pair programming](https://en.wikipedia.org/wiki/Pair_programming) (the practice of having two people work together on one machine, each taking turns between typing and commenting) results in real-time code review, which [research has shown](http://www.sciencedirect.com/science/article/pii/S0950584909000123) results in higher productivity. If you are not using an OSX or Linux laptop, it would be best to try to pair with someone who is.
4+
Participants in [ATPESC 2017](https://extremecomputingtraining.anl.gov) will work in groups of 2 for hands-on exercises. Forming groups of 2 helps us to cut in half the number of IT issues that may arise during hands-on exercises. Moreover, [pair programming](https://en.wikipedia.org/wiki/Pair_programming) (the practice of having two people work together on one machine, each taking turns between typing and commenting) results in real-time code review, which [research has shown](http://www.sciencedirect.com/science/article/pii/S0950584909000123) results in higher productivity. If you are not using an OSX or Linux laptop, it would be best to try to pair with someone who is.
55

66
## Basic Instructions
77

@@ -26,7 +26,7 @@ MPIEXEC=/soft/libraries/mpi/mvapich2/gcc/bin/mpiexec
2626
```
2727
resoft
2828
```
29-
- **WARNING: Do not attempt next step until after 9:30 am, when our cooley reservation begins.**
29+
- **WARNING: Do not attempt next step until after 9:30 am, when our Cooley reservation begins. Please be sure to work in pairs for the node reservations so that we have sufficient nodes for each pair to use 2 compute nodes for the exercises throughout the day.**
3030
- Obtain 2 compute nodes in _interactive_ (`-I`) mode to run the hands on exercises by running the following `qsub` command...
3131
```
3232
qsub -I -n 2 -t 720 -A ATPESC2017

lessons/iterativesolvers/lesson.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,54 +6,57 @@
66
```
77
Questions |Objectives |Key Points
88
--------------------------|-------------------------------|-------------------------------------
9-
Does the preconditioner | See that the preconditioner |
10-
affect the convergence | can be crucial for |
11-
rate? | convergence |
12-
9+
Does the preconditioner | See that the preconditioner | Through a single interface,
10+
affect the convergence | can be crucial for | PETSc supports runtime choices
11+
rate of Krylov solvers? | convergence. | of algorithms and options.
12+
| |
13+
How can I choose algs. | Learn the basics of using | Experimenting with
14+
and options at runtime | PETSc solvers & understanding | algorithms is essential
15+
when using PETSc? | output. | for good performance.
1316
```
1417

15-
Before running the examples you must switch to the bash shell by using
18+
Before running the examples, you must switch to the bash shell by using
1619

1720
```
1821
bash
1922
```
2023

2124
## Example 1: Structural Mechanics Beam Deflection:
2225

23-
This code uses MFEM and [PETSc/TAO](https://www.mcs.anl.gov/petsc/) to demonstrates convergence of Krylov methods.
26+
This code uses MFEM and [PETSc/TAO](https://www.mcs.anl.gov/petsc/) to demonstrate the convergence of Krylov methods.
2427

2528
The source code is included in [ex2p.c](./ex2p.c)
2629

27-
Notes: Normally PETSc options can be passed in as command line arguments but MFEM turns off this capability, thus they must be passed either in a file or in the PETSC_OPTIONS environmental variable. See the file rc_ex2p for the PETSc options that are supplied to the application in these examples.
30+
Notes: Normally PETSc options can be passed as command line arguments. But because MFEM turns off this capability, PETSc options must be passed either in a file or in the PETSC_OPTIONS environmental variable. See the file rc_ex2p for the PETSc options that are supplied to the application in these examples.
2831

2932
### Run 1: Run with Jacobi preconditioner
3033

3134
```
32-
PETSC_OPTIONS="-pc_type jacobi -ksp_max_it 25" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
35+
PETSC_OPTIONS="-pc_type jacobi -ksp_max_it 25" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
3336
```
3437

3538
The first column of the output is the residual norm. The next two are the maximum and minimum estimated eigenvalues of the operator and the final column is the condition number.
3639

3740
#### Questions
3841
> **Is the iteration converging?**
3942
40-
> **Read the output at the bottom from -ksp_view, what Krylov method and preconditioner is it using?**
43+
> **Read the output at the bottom from -ksp_view ... What Krylov method and preconditioner are being used?**
4144
4245
### Run 2: Run with the algebraic multigrid preconditioner
4346

4447
```
45-
./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
48+
./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
4649
```
4750

4851
#### Questions
4952
> **Is the iteration now converging?**
5053
51-
> **Read the output at the bottom from -ksp_view, what Krylov method and preconditioner is it using?**
54+
> **Read the output at the bottom from -ksp_view ... What Krylov method and preconditioner are being used?**
5255
5356
### Run 3: Run with the algebraic multigrid preconditioner but no conjugate gradient method
5457

5558
```
56-
PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type richardson -ksp_max_it 25" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
59+
PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type richardson -ksp_max_it 25" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
5760
```
5861

5962
#### Questions
@@ -62,25 +65,27 @@ PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type richardson -ksp_max_it 25
6265
### Run 4: Run with the algebraic multigrid preconditioner but with GMRES and a restart of 10
6366

6467
```
65-
PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type gmres -ksp_gmres_restart 10" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
68+
PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type gmres -ksp_gmres_restart 10" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
6669
```
6770

6871
Now run with a gmres restart of 30
6972

7073
```
71-
PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type gmres -ksp_gmres_restart 30" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
74+
PETSC_OPTIONS="-ksp_norm_type preconditioned -ksp_type gmres -ksp_gmres_restart 30" ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
7275
```
7376

7477
Note the convergence is now very similar to that with CG.
7578

76-
Now attempt to run this parallelly and obtain solver performance data
79+
Now attempt to run this in parallel and obtain solver performance data
7780
```
7881
PETSC_OPTIONS="-log_view -ksp_norm_type preconditioned -ksp_type gmres -ksp_gmres_restart 30" ${MPIEXEC_OMPI} -n 4 ./ex2p -petscopts rc_ex2p --mesh /projects/ATPESC2017/NumericalPackages/handson/mfem/data/beam-tri.mesh
7982
```
8083

8184
## Out-Brief
8285

83-
We have used [PETSc](https://www.mcs.anl.gov/petsc/) to demonstrate Krylov methods and nonlinear solver methods.
86+
We have used [PETSc](https://www.mcs.anl.gov/petsc/) to demonstrate the use of preconditioned Krylov methods. Many examples are available for various aspects of PETSc functionality, including
87+
* [Krylov solver examples](http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials)
88+
* [Nonlinear solver examples](http://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials)
8489

8590

8691
<!-- Insert space, horizontal line, and link to HandsOnLesson table -->

tools/atpesc2017_cooley_vnc_setup.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22
acct=ATPESC2017
3-
nnodes=1
3+
nnodes=2
44
tl=720
55
localos=`uname`
66
linuxvnc=''
@@ -96,7 +96,7 @@ done
9696
ssh ${cooley_username}@cooley-nph "rm -f ~/.vnc/passwd; echo $pw | vncpasswd -f > ~/.vnc/passwd; chmod 600 ~/.vnc/passwd"
9797

9898
#
99-
# Reserve 3 nodes for interactive use all day
99+
# Reserve 2 nodes for interactive use all day
100100
#
101101
ssh -t -t -f ${cooley_username}@cooley-nph "qsub -I -n $nnodes -t $tl -A $acct" > ./qsub-interactive.out 2>&1 &
102102

0 commit comments

Comments
 (0)