ZMP_LIB -- The absolute path to system libraries (e.g. HDF4).
ZMP_LDR -- The command invoked to link the object files.
Including MGMPI
ZEUS-MP supports the use of the MGMPI elliptic linear system solver for
the solution of Poisson's equation for problems that include self-gravity
on 3D Cartesian meshes with non-periodic boundary conditions. The
use of MGMPI in ZEUS-MP is enabled at compilation time by including the
string, "-DUSE_MGMPI" in the ZMP_CPP definition line. In this case,
the loader will look in the src90 subdirectory for a binary file
called "libdmgmpi.a" This file is not included in the ZEUS-MP distribution,
but rather must be built separately from the MGMPI source code, which
may be obtained
here.
If MGMPI is not used (USE_MGMPI is left undefined), then ZEUS-MP will
default to the 3D conjugate gradient linear solver for 3D non-periodic
meshes. Current (November 2005) research suggests that MGMPI will
perform better than the CG solver once the mesh size exceeds 256
3.
The FFTw Gravity Solver Libraries
Compiling the code with the FFTw solver enabled requires that the
Makefile
be edited such that:
- The string -DFFT be appended to the ZMP_CPP
definition.
- C routines fftw_ps.c and fftw_plan.c be included
in the COBJ file list.
Makefile.sdsc.datastar provides an example of a Makefile
properly
configured to include the needed ZEUS-MP source files and the system
library files on Datastar.
Makefile.nersc.seaborg is written
with
all FFT references eliminated and thus provides a template for machines
on which the FFTw libraries are absent.
Compilation
With a proper Makefile, the command
make compile is used to
compile the code (
gmake may also be used). During compilation,
each fortran file with
a ".F" suffix is processed by the C preprocessor, which generates a
corresponding file with a ".f" suffix. These processed files are then
used to create object files which are subsequently linked into the
executable.
Desired changes to any subroutine must be applied to the ".F"
copy of that routine.
Comments
-
The primary use of the C preprocessor is to expose/hide sections of the
code
to/from the compiler. The majority of macros defined in the ZMP_CPP
variable
pertain to MPI, and they are easily identified since "MPI" appears in
the
character string of each macro. Leaving "-DMPI_USED" out of the ZMP_CPP
macro
line causes all MPI code to be hidden from the compiler; in this way
ZEUS-MP
can be compiled as a serial code on systems which don't have MPI.
- The name of the subroutines which handle initialization specific
to the problem
and restarting a run for that particular problem are specified by the
"PROBLEM"
and "PROBRES" CPP macros, respectively. For example, to run the sod
shock test
included with the code, your ZMP_CPP line must include "-DPROBLEM=sod"
and would
also include "-DPROBRES=sodres" in the unlikely event that you need to
continue
the Sod test from a restart file.
-
The MGMPI multigrid Poisson solver is available as a separate package
from the MGMPI Web page.
It must be built as a separate library and included in the link path if it
is to be used. When building ZEUS-MP, all references to MGMPI can be
hidden from the compiler by leaving the "USE_MGMPI" CPP macro undefined,
so it is not necessary to download MGMPI to use ZEUS-MP.