<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>Dear Developers,</div><div><br></div><div>I built a working code in PDELab for parallel computation using YaspGrid and OpenMPI.</div><div>Now i want to use the gmshreader and the ALUgrid (simplex,2D) for the same code but i cannot find out how to initialize the ALUgrid in parallel mode.</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><div style="font-family: Helvetica; font-size: 12px;">OS: Mac OS X 10.9.3 Mavericks</div><div style="font-family: Helvetica; font-size: 12px;">GCC: <span style="font-family: Menlo; font-size: 11px;">gcc (MacPorts gcc49 4.9-20140416_2) 4.9.0 20140416 (prerelease)</span></div><div style="font-family: Helvetica; font-size: 12px;">G++: <span style="font-family: Menlo; font-size: 11px;">g++ (MacPorts gcc49 4.9-20140416_2) 4.9.0 20140416 (prerelease)</span></div><div style="font-family: Helvetica; font-size: 12px;">clang: <span class="Apple-tab-span" style="white-space: pre;">       </span><span style="font-family: Menlo; font-size: 11px;">clang version 3.5.0 (trunk 210448)</span></div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">  </span>Target: x86_64-apple-darwin13.2.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">   </span>Thread model: posix</div><div style="font-family: Helvetica; font-size: 12px;">CC: <span class="Apple-tab-span" style="white-space: pre;">            </span><span style="font-family: Menlo; font-size: 11px;">Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)</span></div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">      </span>Target: x86_64-apple-darwin13.2.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">   </span>Thread model: posix</div><div style="font-family: Helvetica; font-size: 12px;">DUNE-modules: <span class="Apple-tab-span" style="white-space: pre;">  </span><span style="font-family: Menlo; font-size: 11px;">dune-common.............: version 2.3.0</span></div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">             </span>dune-geometry...........: version 2.3.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">             </span>dune-grid...............: version 2.3.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">             </span>dune-istl...............: version 2.3.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">             </span>dune-localfunctions.....: version 2.3.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">             </span>dune-pdelab.............: version 2.0-dev</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">           </span>dune-typetree...........: version 2.3-dev</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">           </span>ALBERTA.................: version 2.0</div><div style="margin: 0px;"><span class="Apple-tab-span" style="white-space: pre;">               </span>ALUGrid.................: version 1.52 (parallel)</div><div style="margin: 0px;"><br></div></div></div><div><br></div><div>With YaspGrid, I wrote a „YaspPartition“ class and passed the MPI communicator:</div><div><br></div><div><div>      int overlap=1;</div><div>      const YaspPartition<2> yp;</div><div>      Dune::YaspGrid<2> grid(helper.getCommunicator(),L,N,periodic,overlap,&yp);</div></div><div><br></div><div>Now, I use the gmshreader in the following way:</div><div><br></div><div><div>       typedef Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming> GridType;</div><div>       Dune::shared_ptr<GridType> gridp(Dune::GmshReader<GridType>::read(meshfilename));</div></div><div><br></div><div>The check whether the created ALUGrid Type is parallel ( Dune::Capabilities::isParallel<GridType>::v ) returns false.</div><div><br></div><div>The output when executing $mpirun -n 2 <myProgram> reveals that two processes are executed, but both seem to calculate the whole problem on their own:</div><div>(every line doubled, of course)</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">parallel run on 2 process(es)</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">Reading 2d Gmsh grid...</div></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">version 2.2 Gmsh file detected</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">file contains 378 nodes</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">file contains 754 elements</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">number of real vertices = 378</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">number of boundary elements = 68</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">number of elements = 686</div></div><div><span style="font-family: Menlo; font-size: 11px;">Created serial ALUGrid<2,2,simplex,conforming></span></div><div><span style="font-family: Menlo; font-size: 11px;"><br></span></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">rank 0 number of DOF = 378</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">number of DOF 378</div></div><div><span style="font-family: Menlo; font-size: 11px;"><br></span></div><div>I built ALUGrid using METIS, parMETIS and OpenMPI</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>./configure CC=gcc CXX=g++ F77=gfortran —prefix=$HOME/opt/alugrid --with-metis=/usr/local --with-parmetis=/usr/local </div><div><span class="Apple-tab-span" style="white-space:pre">   </span>CPPFLAGS="$CPPFLAGS `../dune-common*/bin/mpi-config --cflags --disable-cxx —mpicc=mpicc`" LDFLAGS="$LDFLAGS `../dune-common*/bin/mpi-config --libs --disable-cxx </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>--mpicc=mpicc`“ CXXFLAGS="-O3 -DNDEBUG“ CFLAGS="-O3 -DNDEBUG“</div><div><br></div><div>and DUNE successfully checks the serial and parallel usability of ALUGrid:</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">configure: searching for ALUGrid in /Users/lriedel/opt/alugrid...</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking ALUGrid version >= 1.52... yes (ALUGrid-1.52)</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking alugrid_serial.h usability... yes</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking alugrid_serial.h presence... yes</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking for alugrid_serial.h... yes</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking alugrid_parallel.h usability... yes</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking alugrid_parallel.h presence... yes</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">checking for alugrid_parallel.h… yes</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px;">How can i initialize a parallel ALUgrid using the gmshreader? How can i access/change the load balance of the grid?</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">Currently, i am using the following ISTL Solver Backend:</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"><div style="margin: 0px;">    typedef Dune::PDELab::ISTLBackend_BCGS_AMG_SSOR<IGO> LS;</div><div style="margin: 0px;">    LS ls(gfs,5000,0,false,true);</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">As ALUgrid has no overlap but only ghosts, do i need to use a NOVLP solver backend then?</div><div style="margin: 0px;">Are the ghosts assembled automatically?</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">Thank you for your help and best regards,</div><div style="margin: 0px;">Lukas Riedel</div></div></body></html>