next up previous
Next: Code Structure Up: PCCM2 Internals Previous: PCCM2 Internals

Building the Model

The basic model parameters controlling the setup of the code (not the physical parameters of the model) are specified in the file params.h. This file is included in the source of every routine and must be modified before compilation for a given machine. Current machine options for PCCM2 are INTEL, RS6000, SUN and CRAY.

The source code in .F files must be run through a preprocessing step with /lib/cpp to pull out those sections of code appropriate to the build configuration. The preprocessing step produces .f files which are then compiled and linked to produce the executable. A makefile is provided which contains particular machine compilation options. It is necessary to edit the makefile only once for each computing platform. The location of message passing libraries and optimization options are set in the makefile.

PP_PCCM: The parallel model is obtained by defining PP_PCCM. All modifications to the sequential code for parallelism have been surrounded by #ifdef PP_PCCM ...#endif .

PP_TRIANG_TRUNC: A triangular spectral truncation specifies the horizontal resolution of the model. The default set in params.h is T42, but a variety of other resolutions are also supported. From the triangular truncation the number of grid points in the longitudinal direction, PP_GLON, and the number of grid points in the latitudinal direction, PP_GLAT, are defined. The number of levels, PP_PLEV, is always set at 18 to match the physics parameterizations.

PP_NPROC_LT: The number of processors to be used in the latitude direction. The number of processors must evenly divide the number of latitudes, PP_GLAT. We also require that at least 2 latitudes per processor be configured. This allows an efficient Legendre transform taking advantage of the symmetry of the spherical harmonics.

PP_NPROC_LN: This must be a power of two and for the distributed FFT algorithms, the PP_GLAT/PP_NPROC_LT must be greater than or equal to four.

PP_NPROC: The total number of processors used in the execution of the model will be PP_NPROC_LT*PP_NPROC_LN.

INTEL: Machine target is an Intel RX, DELTA or PARAGON.

RS6000: Machine target is an IBM SP2, or cluster of RS6000 workstations.

SUN: Machine target is cluster of SUN workstations.

CRAY: Machine target is a cluster of CRAY's or a T3D.

PP_RADLB: To load balance the short-wave radiation calculation.

PP_FFTX: To use the transpose algorithm for parallel computation of FFT's.

BLOCK_FFT: Block the computation of FFT's for efficiency. Adds storage but generally improves execution time significantly.

PP_GLAT: Global number of latitudes for truncation.

PP_GLON: Global number of longitudes for truncation.

PP_PLEV: Number of vertical levels in the model. Climate parameterizations assume 18 levels.

WORD4: Computational precision. For 32-bit architectures (4 bytes per floating point number) this value defined will generate a single precision (real*4) code. Undefined (the default) will generate double precision (real*8) code. Note that intrinsic functions are renamed in params.h depending on WORD4. For the real*8 implementations the promotion of constants MUST be done on the compile line. (See the example makefiles for appropriate compiler flags.)

I_SIZE: Number of bytes in an integer.

R_SIZE: Number of bytes in a real.

D_SIZE: Number of bytes in a double precision real.

PP_INTEL_PFS: For INTEL only. Do output and input using the Intel Parallel File System.

NX_FORCETYPE: For INTEL only. Message passing protocol.

MPI: For MPI Standard message passing.

MPL: For MPL message passing.

Special debugging flags useful for new installations.

PP_ERROR: To enable error and debug messages to stderr on each node. The routine error_dup.c determines whether each node opens a file pccm.error.???? or only node zero.

NOOUT: Disable history output.

PP_NORESTART: Disable restart output.

In addition to these flags there are several other definitions in the code that are only for the use of the developers.



next up previous
Next: Code Structure Up: PCCM2 Internals Previous: PCCM2 Internals



John B. Drake
Wed May 15 09:51:22 EDT 1996