This document discusses building the Collective Communications Module from the reference source. In particular, it discusses building CCM from the MPI and Shmem reference implementations on the platforms listed below. It also discusses building for various sets of array ranks and porting the module to other platforms.
There are two primary versions and reference implementations of the Collective Communications Module. The first is based on MPI or the Message Passing Interface. A good discussion on MPI can be found in www-unix.mcs.anl.gov/mpi/. The second reference implementation is based on the Shared Memory or shmem routines defined by Cray and adapted by SGI. The company's links for information on the shmem routines are www.cray.com/products/software/mpt.html and www.sgi.com/software/mpt/.
The make files distributed with the reference implementations will compile for the platforms listed below. There are no differences in MPI source for the various platforms for which it is compiled. Except for some minor differences, the shmem implementation has the same source for each platform. Obviously, there are different compilers and library settings for each machine and implementation. These differences are isolated into a small make include file.
To build the reference implementations do the following.
mkdir mpi_src mv mpi_src.tar mpi_src cd mpi_src tar -xf mpi_src.tar
cd mpi_src mkdir shmem_src mv shmem_src.tar shmem_src cd shmem_src tar -xf shmem_src.tar
There is an environmental variable referenced in the make file that points to a make include file. The variable is CCM_COM. It needs to be set as follows:
setenv CCM_COM | Communications Library |
||
---|---|---|---|
MPI | Shmem | ||
Platform | |||
Apple OSX | darwin | NA | |
IBM SP | aix | NA | |
SGI | sgi_mpi | sgi_shmem | |
Cray SV1 | NA | sv1_shmem | |
Cray T3e | t3e_mpi | t3e_shmem |
For example on an IBM SP running tcsh you would type:
setenv CCM_COMM aix
make make_mod make
and the Collective Communications Module will be built.
The final products of the make are a library, libccm.a and a module file. The name of the module file is system dependent but is something like ccm.mod or CCM.mod. On most systems, both the library and mod files are required to run a program using the module.
There are a large number of intermediate of "*.o" or object files created. These are made from "*.f90" source files. Most of the "*.f90" files are created by a preprocessor make_mod. The Fortran source for make_mod is included with the distribution. Make_mod is actually run by the make file using a script make_mod_script. The script/program take as input "*.input" files and produce the "*.f90" files. The preprocessor is discussed in more detail below.
There is also a file created called build_report. Build_report contains a collection of html formatted tables. The tables show the data types and ranks of arrays that are supported by different routines in the module. For example for ccm_gather we have the entries:
gather | 1 | 2 | 3 |
0 | y | y | y |
1 | y | y | y |
2 | y | y | y |
3 | y | y | y |
gather | real(b4) | real(b8) | integer(def_int) | complex(c4) | complex(c8) | logical |