[Dune] Parallel ALUGrid and gmshreader

Lukas Riedel riedel-lukas at gmx.de
Thu Jul 3 11:38:28 CEST 2014


Dear Developers,

I built a working code in PDELab for parallel computation using YaspGrid and OpenMPI.
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.

OS: Mac OS X 10.9.3 Mavericks
GCC: gcc (MacPorts gcc49 4.9-20140416_2) 4.9.0 20140416 (prerelease)
G++: g++ (MacPorts gcc49 4.9-20140416_2) 4.9.0 20140416 (prerelease)
clang: 	clang version 3.5.0 (trunk 210448)
	Target: x86_64-apple-darwin13.2.0
	Thread model: posix
CC: 		Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
	Target: x86_64-apple-darwin13.2.0
	Thread model: posix
DUNE-modules: 	dune-common.............: version 2.3.0
		dune-geometry...........: version 2.3.0
		dune-grid...............: version 2.3.0
		dune-istl...............: version 2.3.0
		dune-localfunctions.....: version 2.3.0
		dune-pdelab.............: version 2.0-dev
		dune-typetree...........: version 2.3-dev
		ALBERTA.................: version 2.0
		ALUGrid.................: version 1.52 (parallel)


With YaspGrid, I wrote a „YaspPartition“ class and passed the MPI communicator:

      int overlap=1;
      const YaspPartition<2> yp;
      Dune::YaspGrid<2> grid(helper.getCommunicator(),L,N,periodic,overlap,&yp);

Now, I use the gmshreader in the following way:

       typedef Dune::ALUGrid<2,2,Dune::simplex,Dune::conforming> GridType;
       Dune::shared_ptr<GridType> gridp(Dune::GmshReader<GridType>::read(meshfilename));

The check whether the created ALUGrid Type is parallel ( Dune::Capabilities::isParallel<GridType>::v ) returns false.

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:
(every line doubled, of course)

parallel run on 2 process(es)

Reading 2d Gmsh grid...
version 2.2 Gmsh file detected
file contains 378 nodes
file contains 754 elements
number of real vertices = 378
number of boundary elements = 68
number of elements = 686
Created serial ALUGrid<2,2,simplex,conforming>

rank 0 number of DOF = 378
number of DOF 378

I built ALUGrid using METIS, parMETIS and OpenMPI

	./configure CC=gcc CXX=g++ F77=gfortran —prefix=$HOME/opt/alugrid --with-metis=/usr/local --with-parmetis=/usr/local 
	CPPFLAGS="$CPPFLAGS `../dune-common*/bin/mpi-config --cflags --disable-cxx —mpicc=mpicc`" LDFLAGS="$LDFLAGS `../dune-common*/bin/mpi-config --libs --disable-cxx 
	--mpicc=mpicc`“ CXXFLAGS="-O3 -DNDEBUG“ CFLAGS="-O3 -DNDEBUG“

and DUNE successfully checks the serial and parallel usability of ALUGrid:

configure: searching for ALUGrid in /Users/lriedel/opt/alugrid...
checking ALUGrid version >= 1.52... yes (ALUGrid-1.52)
checking alugrid_serial.h usability... yes
checking alugrid_serial.h presence... yes
checking for alugrid_serial.h... yes
checking alugrid_parallel.h usability... yes
checking alugrid_parallel.h presence... yes
checking for alugrid_parallel.h… yes

How can i initialize a parallel ALUgrid using the gmshreader? How can i access/change the load balance of the grid?

Currently, i am using the following ISTL Solver Backend:

    typedef Dune::PDELab::ISTLBackend_BCGS_AMG_SSOR<IGO> LS;
    LS ls(gfs,5000,0,false,true);

As ALUgrid has no overlap but only ghosts, do i need to use a NOVLP solver backend then?
Are the ghosts assembled automatically?

Thank you for your help and best regards,
Lukas Riedel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20140703/7316ec55/attachment.htm>


More information about the Dune mailing list