This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
scaling:start [2014/12/11 17:06] dane created |
scaling:start [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| It is extremely important to verify that your code/ | It is extremely important to verify that your code/ | ||
| - | First one should start with a relatively small problem -- say one that would take 10 minutes or so on a single node((This may not always | + | First one should start with a problem |
| - | Then one submits the jobs on increasing numbers of nodes and observes to see if the runtime comes down as expected. As an example of how you may go about this I have two scripts -- one is the PBS job script, and the second is a simple shell script that allows | + | Then one submits the jobs on increasing numbers of nodes and observes to see if the runtime comes down as expected. As an example of how one may go about this, here are two scripts -- one is the PBS job script, and the second is a simple shell script that allows |
| - | <file bash example_script.qsub> | + | <file bash scaling_test.qsub> |
| #!/bin/bash | #!/bin/bash | ||
| #PBS -l walltime=10: | #PBS -l walltime=10: | ||
| - | #PBS -q specialq | + | #PBS -q normal |
| - | #PBS -M dkennedy1@csir.co.za | + | #PBS -M YOUR@EMAIL.ADDRES |
| #PBS -m be | #PBS -m be | ||
| #PBS -V | #PBS -V | ||
| - | #PBS -e /export/home/username/scratch5/ | + | #PBS -e /mnt/lustre/users/USERNAME/ |
| - | #PBS -o /export/home/username/scratch5/ | + | #PBS -o /mnt/lustre/users/USERNAME/ |
| #PBS -mb | #PBS -mb | ||
| - | MODULEPATH=/ | + | |
| - | source / | + | module add ### MODULES NEEDED |
| - | module add gromacs/ | + | |
| NP=`cat ${PBS_NODEFILE} | wc -l` | NP=`cat ${PBS_NODEFILE} | wc -l` | ||
| Line 27: | Line 26: | ||
| ARGS=" | ARGS=" | ||
| - | cd /export/home/username/scratch5/ | + | cd /mnt/lustre/users/USERNAME/ |
| mpirun -np ${NP} -machinefile ${PBS_NODEFILE} ${EXE} ${ARGS} | mpirun -np ${NP} -machinefile ${PBS_NODEFILE} ${EXE} ${ARGS} | ||
| </ | </ | ||
| Line 36: | Line 35: | ||
| first=1 | first=1 | ||
| - | for i in 1 2 4 8 10 16 20 32 40 64 | + | for i in 1 2 4 8 10 |
| do | do | ||
| - | select=" | + | select=" |
| name=" | name=" | ||
| if [ ${first} -eq 1 ] | if [ ${first} -eq 1 ] | ||
| then | then | ||
| - | previous=`qsub -l ${select} -N ${name} | + | previous=`qsub -l ${select} -N ${name} |
| first=0 | first=0 | ||
| else | else | ||
| - | current=`qsub -l ${select} -N ${name} -W depend=afterok: | + | current=`qsub -l ${select} -N ${name} -W depend=afterok: |
| previous=${current} | previous=${current} | ||
| fi | fi | ||
| done | done | ||
| </ | </ | ||
| - | When I look at the results | + | |
| + | The (fake) | ||
| ^ Number of nodes ^ Runtime (seconds) | ^ Number of nodes ^ Runtime (seconds) | ||
| - | | 1 | | + | | 1 | |
| | 2 | 181| | | 2 | 181| | ||
| | 4 | 105| | | 4 | 105| | ||
| | 8 | 55| | | 8 | 55| | ||
| | 10 | 43| | | 10 | 43| | ||
| - | | 16 | 30| | + | |
| - | | 20 | 25| | + | |
| - | | 32 | 21| | + | These results are best interpreted in the form of a graph: |
| - | | 40 | 15| | + | |
| - | | 64 | 13| | + | {{: |
| + | |||
| + | This graph looks OK (the run time comes down as the number of nodes goes up), but is actually quite difficult to interpret, in terms of finding the optimum number of nodes to use. It is much more useful to plot the reciprocal of the runtime, such as the number of runs per hour: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | This clearly shows that the application is scaling linearly. | ||
| + | |||
| + | The following two graphs illustrate a case which does **not** scale well. The runtime graph does not look as good as the first example, but it is not immediately clear where the scaling starts worsening. | ||
| + | |||
| + | {{: | ||
| + | |||
| + | {{: | ||
| + | |||
| + | In this case there is definitely no point in trying to use more than 8 nodes, and the scaling is already showing diminishing returns after 2 nodes. | ||