1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
<Chapter><Heading>Parallel computation</Heading>
<Section><Heading>An embarassingly parallel computation</Heading>
<P/>The following example creates fifteen child processes and uses them simultaneously to compute
the second integral homology of each of the <M>2328</M>
groups of order <M>128</M>. The final command shows that
<P/><M>H_2(G,\mathbb Z)=\mathbb Z_2^{21}</M>
<P/>for the <M>2328</M>-th group <M>G</M> in <B>GAP</B>'s library of small groups.
The penulimate command shows that the parallel computation achieves a speedup of 10.4 .
<Example>
<#Include SYSTEM "tutex/10.1.txt">
</Example>
<P/>The function <C>ParallelList()</C> is built from <B>HAP</B>'s
six core functions for parallel computation.
</Section>
<Section><Heading>A non-embarassingly parallel computation</Heading>
<P/>The following commands use core functions to compute the product <M>A=M\times N</M> of two random matrices by distributing the work over two processors.
<Example>
<#Include SYSTEM "tutex/10.2.txt">
</Example>
<P/>The next commands compute the product <M>A=M\times N</M> of two random matrices by distributing the work over fifteen processors. The parallelization is very naive (the entire matrices <M>M</M> and <M>N</M> are communicated to all processes) and the computation achieves a speedup of 7.6.
<Example>
<#Include SYSTEM "tutex/10.3.txt">
</Example>
</Section>
<Section><Heading>Parallel persistent homology</Heading>
Section <Ref Sect="secAltPersist"/> illustrates an alternative method of computing the persitent Betti numbers
of a filtered pure cubical complex.
The method lends itself to parallelisation.
However, the following parallel computation of persistent Betti numbers achieves only a speedup of <M>1.5</M> due to a significant time spent transferring data structures between processes. On the other hand, the persistent Betti
function could
be used to distribute computations over several computers. This might be useful for larger computations that require significant memory resources.
<Example>
<#Include SYSTEM "tutex/10.4.txt">
</Example>
</Section>
</Chapter>
|