A Monte Carlo-based Poisson's equation solver parallelized with Coarray Fortran

A Monte Carlo-based Poisson's equation solver parallelized with Coarray Fortran

Poisson s equation is found in many scientific problems, such as heat transfer and electric field calculations. Although many different techniques are involved in solving Poisson s equation, we focused on the Monte Carlo method (MCM). We preferred the MCM not only because of its simple algorithm but also for its excellent parallel efficiency. Parallelization is one of the most effective techniques for reducing computation time. Among many parallelization paradigms, such as OpenMP (open multiprocessing), MPI (message passing interface), and PGAS (partitioned global address space), we adopted the PGAS-based Coarray Fortran (CAF). In this paper, we demonstrated that parallelization of Poisson s equation solver with CAF was quite painless. After parallelization, we solved Poisson s equation for a nonrectangular domain. We started with a workstation that consisted of 8 cores and we continued with a Cray supercomputer of up to 512 cores. The results of the parallel solvers were validated using exact solutions. We demonstrated that the error was less than 1.6%. Additionally, solution times and speedups of the CAF-based solver were compared with a solver that utilized MPI or OpenMP. OpenMP was not able to compete against CAF and MPI because of the while loop restriction. The CAF-based solver performed slightly better (7.5%) than the MPI provided that core numbers were between 2 and 32. However, CAF and MPI performed similarly for higher numbers of cores.

___

  • [1] Budanur S, Mueller F, Gamblin T. Memory trace compression and replay for SPMD systems using extended PRSDs. Comput J 2012; 55: 206-217.
  • [2] Coarfa C, Dotsenko Y, Mellor-Crummey J. Experiences with Sweep3D implementations in Co-array Fortran. J Supercomput 2006; 36: 101-121.
  • [3] Wallcraft AJ. A comparision of Co-Array Fortran and OpenMP Fortran for SPMD programming. J Supercomput 2002; 22: 231-250.
  • [4] Barrett RF. Co-Array Fortran experiences with finite differencing methods. In: The 48th Cray User Group Meeting; 10 May 2006; Lugano, Switzerland.
  • [5] Sengil N, Tumuklu O, Celenligil MC. Implementation of a Monte Carlo method to a two-dimensional particle-in-cell solver using algebraic meshes. Nukleonika 2012; 57: 313-316.
  • [6] Wang T, Gu Y. Superconvergent biquadratic finite volume element method for two-dimensional Poisson’s equations. J Comput Appl Math 2010; 234: 447-460.
  • [7] Kim YP, Kweon JR. The Fourier-finite element method for the Poisson problem on a non-convex polyhedral cylinder. J Comput Appl Math 2009; 233: 951-968.
  • [8] Swarztrauber PN, Sweet RA. Vector and parallel methods for the direct solution of Poisson’s equation. J Comput Appl Math 1989; 27: 241-263.
  • [9] Hendrickx J, Barel MV, Kronecker A. Product variant of the FACR method for solving the generalized Poisson equation. J Comput Appl Math 2002; 140: 369-380.
  • [10] Liniger W, Odeh F, Hara VA. Second-order sparse factorization method for Poisson’s equation with mixed boundary conditions. J Comput Appl Math 1992; 44: 201-218.
  • [11] Hoshino S, Ichida K. Solution of partial differential equations by a modified random walk. Numer Math 1971; 8: 61-72.
  • [12] Shentu J, Yun S, Cho NA. Monte Carlo method for solving heat conduction problems with complicated geometry, Nucl Eng Technol 2007; 39: 207-214.
  • [13] Thompson J, Chen P. Heat conduction with internal sources by modified Monte Carlo methods. Nucl Eng Des 1970; 12: 207-214.
  • [14] DeLaurentis JM, Romero LA. A Monte Carlo method for Poisson’s equation. J Comput Phys 1990; 90: 123-140.
  • [15] Rosenthal JS. Parallel computing and Monte Carlo algorithms. Far East J Theor Stat 2000; 4: 207-236.
  • [16] Reid JK. Coarrays in the next Fortran Standard, Tech. Rep.: ISO/IEC JTC1/SC22/WG5 N1824. Geneva, Switzerland: ISO, 2010.
  • [17] Friedley A, Lumsdain A. Communication optimization beyond MPI. In: IEEE 2011 International Symposium on Parallel and Distributed Processing Workshops and PhD Forum; 16–20 May 2011; Shanghai, China. pp. 2018-2021.
  • [18] Numrich RW. Parallel numerical algorithms based on tensor notation and Coarray Fortran syntax. Parallel Comput 2005; 31: 588-607.
  • [19] Birdsall CK, Langdon AB. Plasma Physics Via Computer Simulation. New York, NY, USA: Taylor & Francis, 2005.
  • [20] Haveraaen M, Morris K, Rouson D, Radhakrishnan H, Carson C. High-performance design patterns for modern Fortran. Sci Prog 2015; 942059: 1-14.
  • [21] Chandra R. Parallel Programming in OpenMP. San Diego, CA, USA: Academic Press, 2001.
Turkish Journal of Electrical Engineering and Computer Sciences-Cover
  • ISSN: 1300-0632
  • Yayın Aralığı: Yılda 6 Sayı
  • Yayıncı: TÜBİTAK