  
  [1X11 [33X[0;0YParallel computation[133X[101X
  
  
  [1X11.1 [33X[0;0YAn embarassingly parallel computation[133X[101X
  
  [33X[0;0YThe   following   example   creates  five  child  processes  and  uses  them
  simultaneously  to  compute  the second integral homology of each of the [22X267[122X
  groups of order [22X64[122X. The final command shows that[133X
  
  [33X[0;0Y[22XH_2(G, Z)= Z_2^15[122X[133X
  
  [33X[0;0Yfor the [22X267[122X-th group [22XG[122X in [12XGAP[112X's library of small groups.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XProcesses:=List([1..5],i->ChildProcess());;[127X[104X
    [4X[25Xgap>[125X [27Xfn:=function(i);return GroupHomology(SmallGroup(64,i),2);end;;[127X[104X
    [4X[25Xgap>[125X [27Xfor p in Processes do[127X[104X
    [4X[25X>[125X [27XChildPut(fn,"fn",p);[127X[104X
    [4X[25X>[125X [27Xod;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XNrSmallGroups(64);[127X[104X
    [4X[28X267[128X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XL:=ParallelList([1..267],"fn",Processes);;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XL[267];[127X[104X
    [4X[28X[ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 ][128X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
  [33X[0;0YThe  function  [10XParallelList()[110X  is  built  from  [12XHAP[112X's six core functions for
  parallel computation.[133X
  
  
  [1X11.2 [33X[0;0YAn non-embarassingly parallel computation[133X[101X
  
  [33X[0;0YThe  following  commands use core functions to compute the product [22XA=M× N[122X of
  two random matrices by distributing the work over two processors.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XM:=RandomMat(2000,2000);; [127X[104X
    [4X[25Xgap>[125X [27XN:=RandomMat(2000,2000);;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27Xs:=ChildProcess();;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XMtop:=M{[1..1000]};; [127X[104X
    [4X[25Xgap>[125X [27XMbottom:=M{[1001..2000]};;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XChildPut(Mtop,"Mtop",s); [127X[104X
    [4X[25Xgap>[125X [27XChildPut(N,"N",s);[127X[104X
    [4X[25Xgap>[125X [27XNextAvailableChild([s]);;[127X[104X
    [4X[28X[128X[104X
    [4X[25Xgap>[125X [27XChildCommand("Atop:=Mtop*N;;",s);; [127X[104X
    [4X[25Xgap>[125X [27XAbottom:=Mbottom*N;; [127X[104X
    [4X[25Xgap>[125X [27XA:=ChildGet("Atop",s);;[127X[104X
    [4X[25Xgap>[125X [27XAppend(A,Abottom);;                [127X[104X
    [4X[28X[128X[104X
  [4X[32X[104X
  
