SCDzine
N E W S

More efficient, parallelizable MUDPACK accessible from web

Popular new version has been simplified, modernized . . .

MUDPACK grid
Grid coarsening
with MUDPACK


Contents

Search

Article index

Back issues

Subscribe

Contact us

SCD

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.


Widespread early distribution

Since version 4.0 of MUDPACK was first announced in September 1998, and as of mid-December, scientists from 72 domestic and foreign institutions have downloaded the entire software package from the web site above.


Version 4.0 incompatible with earlier versions

Version 4.0 of MUDPACK is the latest in a series of revisions since the software was first released in 1990. Changes in argument lists, work space requirements, and file organization make the current version incompatible with earlier versions of MUDPACK.

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.


Outline of major changes

(1) Code simplification and modernization

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.


(2) Ease of parallelization

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.

Table 1
97x65x129 Grid
method time(sec) mp maxcy
0 9.49 1 5
0 6.85 2 5
0 4.29 4 5
0 3.00 8 5
0 2.21 16 5
0 2.17 32 5
7 15.32 1 3
7 11.29 2 3
7 7.03 4 3
7 4.54 8 3
7 3.59 16 3
7 3.06 32 3


Table 2 tabulates results from solving a two-dimensional nonseparable PDE on a high resolution 1025x1529 grid using line relaxation in both directions (method=3) and executing maxcy=3 multigrid cycles. The solver mud2 is used.

Table 2
1025x1529 Grid
method time(sec) mp maxcy
3 34.25 1 3
3 24.71 2 3
3 18.49 4 3
3 16.20 8 3
3 14.06 16 3


Table 3 illustrates the unfavorable cost overhead when attempting to parallelize the same two-dimensional problem on a coarser 129x93 grid with mud2.

Table 3
129x93 Grid
method time(sec) mp maxcy
3 .091 1 3
3 .159 2 3
3 .200 4 3
3 .277 8 3
3 .350 16 3
3 .500 32 3


(3) Separation of discretization and approximation calls

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.


(4) Simplification of multigrid options

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.


(5) New three-dimensional solvers

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.


(6) Four-color relaxation

Four-color relaxation has replaced red/black relaxation for PDEs with cross-derivative terms. This can provide better convergence rates.


(7) Correction in planar relaxation

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.

rule
Contents || Search || Article index || Back issues || Subscribe || Contact us || SCD