More efficient, parallelizable MUDPACK accessible from web
Popular new version has been simplified, modernized . . .
![]() Grid coarsening with MUDPACK
|
by John C. Adams A new, much-improved version 4.0 of the multigrid software package MUDPACK is now available on the World Wide Web. It has been rewritten to be simpler, more efficient, and more amenable to parallelization. Version 4.0 includes 124 files containing more than 100,000 lines of Fortran code and documentation. The Fortran subroutines in MUDPACK discretize a variety of elliptic partial differential equations (PDEs) and boundary conditions using finite difference formula on grids superimposed on the rectangular solution regions. Then multigrid iterative techniques are used with point, line, or planar relaxation to generate second- and fourth-order approximations to the underlying real and complex, two- and three-dimensional continuous problems. The web site
http://www.scd.ucar.edu/css/software/mudpack contains a detailed software package description. It also includes instructions for downloading the MUDPACK 4.0 Fortran source code after signing a UCAR licensing agreement.
The functionality has been expanded by adding new solvers. To ensure portability, all MUDPACK 4.0 software has been passed through Fortran verification software and compiled and executed on different platforms with both Fortran 77 and Fortran 90 compilers.
Code simplification has been achieved by expanding internal arrays to include virtual boundaries. This has reduced the code complexity required to handle the variety of boundary conditions MUDPACK software allows. Tests have indicated the resulting streamlining has yielded a 10-30% speedup depending on the problem and resolution. Use of equivalencing between arrays has been eliminated. Statement labels have been eliminated, all variable types declared, and nested loops have been streamlined and indented.
The simplifications in (1) make the MUDPACK 4.0 solvers more amenable to parallelization efforts. For example, with relatively straightforward insertion of parallel directives in relevant loops within relaxation and residual restriction kernels, significant speedups can be obtained for three-dimensional and high-resolution two-dimensional problems. This is now being investigated using OpenMP shared-memory directives with the Fortran 90 compiler on the SGI Origin. The cost overhead associated with parallelization make it unsuitable for low- to medium-resolution two-dimensional problems and low-resolution three-dimensional problems. All of this is illustrated in tables 1, 2, and 3 below, which measure execution times with increasing numbers of processors (mp) on the SGI Origin at NCAR. In Table 1, the solver mud3 is used to approximate a three-dimensional nonseparable elliptic PDE on a 97x65x129 grid. Results are given for red/black Gauss-Seidel point relaxation (method=0) executing maxcy=5 multigrid cycles and the more robust (and expensive) line relaxations in three directions (method=7) with maxcy=3 multigrid cycles.
The first call to a solver discretizes the continuous elliptic PDE and boundary conditions using standard second-order finite-difference formula. Afterwards, calls to generate approximations can be made. This is a natural separation analogous to separating the LUD factorization and solution phase in matrix solvers. Further it allows more appropriate efficiency monitoring of MUDPACK software, since the discretization phase is heavily dependent upon user-provided subroutines for inputing coefficients and boundary conditions. Only the approximation phase should be monitored for efficiency. Earlier versions of MUDPACK allowed discretization and approximation to occur with the same call.
The variants in multgrid cycling have been simplified in version 4.0. F cycling and unweighted or half-weighted residual restriction were deemed unnecessary and have been eliminated. V cycles or W cycles with fully weighted residual restriction are retained as the optimal choices. More general multigrid cycling is allowed but flagged as a nonfatal error indicating probable inefficient use of multigrid. The prolongation operator can still be either linear or cubic interpolation.
New "hybrid" three-dimensional multigrid/direct method solvers muh3 and cuh3 along with a quasi-multigrid solver, mud3cr, for three-dimensional problems with cross-derivative terms and possibly oblique derivative boundary have been added to the package. Use of hybrid solvers for nonsingular two- and three-dimensional problems is encouraged since they can be more robust then their "multgrid only" counterparts and they cost only marginally more in computation and storage. The hybrid solvers provide more choices of grid resolution by eliminating the usual multigrid constraint that the coarsest grid consist of a few (3 or 4) grid points in each direction.
Four-color relaxation has replaced red/black relaxation for PDEs with cross-derivative terms. This can provide better convergence rates.
If planar relaxation is selected for three-dimensional anisotropic PDEs, full two-dimensional multigrid cycling is implemented for each plane visited during three-dimensional multigrid cycling. Earlier versions of MUDPACK did not use full two-dimensional cycling. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||