JOINT   INSTITUTE   FOR   NUCLEAR   RESEARCH
lit PROGRAM   LIBRARY   JINRLIB

Split - a parallel implementation of the numerical solution
of a system of algebraic equations with a tridiagonal matrix
using the partition algorithm and the MPI technique


Author: A.V.Volokhova
rus
You are
counter
visitor here.

Language: C++


The Split program calculates solutions of a system of algebraic equations of the form

                                 Aixi-1+Bixi+Cxi+1=Di,    i=1,...,N,    A1=CN=0                         (1)           

by splitting in parallel, using the MPI technique.

The parallel algorithm is described in detail in [1]. The calculations presented in [2-4] demonstrate a significant reduction in the calculation time in parallel mode, which allowed us to successfully conduct a numerical study of the system of polaron equations where the partition algorithm was used within the implicit finite difference numerical scheme.

The procedure is called simultaneously by all MPI processes involved in solving the problem:

Split(A,B,C,D,m1,m2,X)   

Input:

- A, B, C, D are the double type arrays containing coefficients of the system of equations (1). Each MPI process performs calculations and provides values of X in its segment of the system (1);
- m1 - index of placement of the first segment equation in arrays A, B, C, D, X in each MPI process;
- m2 - index of placement of the last segment equation in arrays A, B, C, D, X in each MPI process.

Output:

X - the double type array containing a segment of solutions of a system (1) calculated by each MPI process.

The values of the m1 and m2 indexes are different for each MPI process, they also determine the size of the segment assigned to this process.

Limitations of this version:

1. number of MPI-processes <= 50;
2. m2-m1 >= 2 for all segments.

Note that the effect of parallelism is noticeable if system (1) has a large dimension, and the number of equations in the system is significantly greater than the number of MPI processes involved in the calculation.

To use the Split procedure, the user must do the following:

- connect the MPI library;
- initialize MPI using the MPI_Init function;
- determine the splitting of the system of equations into segments (see the example test.cpp, fragment "processes Markup");
- fill in the input arrays A,B,C,D on each process;
- upload results from the output array X, if necessary, collecting all the fragments of results in a single array;
- terminate MPI mode using the MPI_Finalize function.

The program archive contains:

1. procedure file Split.cpp;
2. test program test.cpp for the system of 10 equations;
3. file test.txt of coefficients A,B,C,D of the system 10 equations input parameters for the test example;
4. outcome files for the cases of 1,2, and 3 MPI-processes;
5. Preprint [1] in the file Preprint_P11-2015-19.pdf.

Download program archive.

References:

  1. Volokhova A.V., Zemlyanaya E.V., Rikhvitsky V.S. Parallel optimization of the method for solving the system of polaron equations using the partition algorithm. JINR Preprint P11-2-15-19, 2015; // Computational methods and programming, 2015. - Vol. 16. - p. 281-289.
  2. E.V. Zemlyanaya, A.V. Volokhova, V.D. Lakhno, I.V. Amirkhanov, I.V. Puzynin, T.P. Puzynina, V.S. Rikhvitskiy, P.Kh. Atanasova. Numerical simulation of photoexcited polaron states in water. // AIP Conference Proceedings, 2015. - Vol. 1684, - p. 100006.
  3. Alina Volokhova, Elena Zemlyanaya, Viktor Lakhno, Ilkizar Amirkhanov, Maxim Bashashin, Igor Puzynin, Taisiya Puzynina. Numerical Simulation of the Formation of Hydrated Electron States. // European Physics Journal, 2018. Web of Conferences. -Vol. 173. - p. 06013.
  4. E.V. Zemlyanaya, A.V. Volokhova, V.D. Lakhno, M.V. Bashashin, I.V. Amirkhanov, I.V. Puzynin, T.P. Puzynina, and P.Kh. Atanasova. Numerical study of formation of hydrated electron states. // AIP Conference Proceedings, 2018. - Vol. 2025. - p. 110008.



home up e-mail