WELCOME!

SOCIS 2014 Dune::ThreadCommunicator improved

Hi everybody, I have improved the class for the communication. See my previous post here for more details. I have finally decoupled the interface from the parallel implementation underneath. The interface is class Dune::Communicator which is present in the following header communicator.hh while the two available implementation are Dune::ThreadCommunicator (described in the previous post) and Dune::MPICommunicator (based on the old Dune::BufferedCommunicator), threadcommunicator.hh mpicommunicator.hh. Therefore, in order to use the MPI version the user will create the class [Read More]

SOCIS 2014 Dune::ThreadCommunicator

Hi everybody, I have finally implemented class which performs the communication among threads for a given interface. The original MPI version is implemented in communicator.hh. Here you can find a sightly modified version communicator.hh. At the beginning, I tried to generalized this class for a generic parallel paradigm but it was very complicated since the MPI and the thread implementation have very little in common. Therefore I decided to write a completely different class, Dune::ThreadCommunicator, to manage the communication among threads. [Read More]

SOCIS 2014 Thread-paradigm implementation for Dune::RemoteIndices

Hi everybody, I have finished the implementation of the thread-paradigm for the class RemoteIndices. Now it is possible to construct the remote indices both in the MPI scenario that in the thread scenario. In the usual branch remoteindices there is a new header file threadparallelparadigm.hh which contains the implementation of the thread-paradigm and the same toy example to test this new implementation using thread instead of MPI can be found here [Read More]

SOCIS 2014 Generalization of Dune::RemoteIndices

Hi everybody, I am back :) In the last weeks I worked on the re-factoring of Dune class RemoteIndices. See here for more details about this class and its purpose. In the original implementation RemoteIndices stored all the data relative to the indices present on remote processes and it contained all the methods to compute them. It supported only MPI as parallel paradigm therefore it was strongly coupled with MPI functions and types. [Read More]

SOCIS 2014 Algebraic system assembly using threads and MPI

Hi, today a lot of posts :) In a previous post, see here, I have explained how to assemble a FEM scheme in parallel using threads. Starting from that code, I added also the MPI support. At the following link femthreadsmpitest.cc you can find the full code. There are several differences compered to the thread only code. First of all, each thread computes a piece of the local stiffness matrix and of the RHS. [Read More]

SOCIS 2014 Augmented partitions

Hello, welcome back. In the following I will explain how define an index set which describes an augmented partition of a matrix among two processes. Let’s suppose to have a global matrix \(A\) and a global vector \(x\) defined as $$ A = \begin{pmatrix} 1 & 0 & 2 \\ 2 & 0 & 3 \\ 0 & 1 & 0 \end{pmatrix},\qquad x = \begin{pmatrix} 3 \\ 2 \\ 1 \end{pmatrix} $$ [Read More]

SOCIS 2014 Algebraic system assembly with threads

Hello, I am back. Today I will describe briefly two possible ways to assemble the algebraic system originated by a FEM method. More precisely I am going to solve the 1D problem $$ \frac{\mathrm{d}^2 u}{\mathrm{d}x^2}=2,\qquad \text{in }\Omega=[0,1] $$ with initial condition $$ u(0)=u_0=1,\qquad u(1)=u_1=2. $$ The solution of this problem is obviously \(u=x^2+1\). The first code which I implemented is available at this link (always the same repository :)) femthreadstest. [Read More]

SOCIS 2014 Threads

Hi everybody, welcome back! The objective of the SOCIS project is to add support for threads in dune-common in order to have an hybrid MPI-threads approach to boost up performance. There are a three different thread models which can be used: POSIX threads; external libraries (boost, OpenMP, Intel TBB); C++11 threads. The choice of the C++11 seems the most reasonable for several reasons: no need of additional libraries; standardized; type-safe; perfect integration with C++ (use of lambdas, functors and no need of using macros and void*); simply notation; different levels of concurrency support, from lowest level to the highest, atomic operations, threads and task; every C++ developer is familiar with it therefore it is more simple for everyone to contribute to the code without spending time learning new libraries. [Read More]

SOCIS 2014 DUNE parallel communication

Hi, I will describe very briefly the infrastructure which allows DUNE to run in parallel, based on Indexsets, which can be found in the module dune-common. The module dune-common contains the basic classes used by all DUNE modules. It provides some infrastructural classes for debugging and exception handling as well as a library to handle dense matrices and vectors. Moreover it provides an abstraction for parallel computing and it implements all the classes for syncing distributed indexed data structures. [Read More]

SOCIS 2014 Introduction

Hi, I am very pleased to announce that I have been selected for the 2014 edition of SOCIS. ESA Summer of Code in Space (SOCIS) is a program run by the European Space Agency. It aims at offering student developers stipends to write code for various space-related open source software projects. Through SOCIS, accepted student applicants are paired with a mentor or mentors from the participating projects. For the next 3 month I will work for the DUNE framework. [Read More]