1) Edit the Makefile.
The build variables at the top of the Makefile point to your local installation of the Cell 3.x SDK and, if you want to communicate across Cell blades, your local MPI installation.
Note thatincludes and definitions(-I and -D flags) should be
listed in*CPPFLAGS; other compiler flags should be listed in
*CFLAGS; library paths (-L flags) should be listed in*LDFLAGS;
and, libraries (-l flags) should be listed in*LIBS. The
CML_extra_opts variable lists extra flags to pass directly to
the configure script. Run "./configure --help" for a list of
acceptable options.
Unless you can configure your MPI implementation's mpicc command
to use a PPE C compiler, you may need to provide MPI build
information via the various PPE* variables. You may be able to
extract the appropriate information by running a command such as
"mpicc -show". (In Open MPI, "mpicc -show:compile" and "mpicc -show:link" conveniently split the build information into separate compile and link commands.)
2) Run "make config".
This step checks that the SPE and PPE compilers are able to find
various required header files and libraries. Be sure to verify
that the build parameters and installation directories look
correct for your system. (If not, return to Step 1 and try again.)
If any step in the configuration process fails unexpectedly,
refer to theconfig.logfile for an explanation. config.log
liststhe input file, executed command, and command output for
every test performed by "make config". These provide sufficient
information for diagnosing most configuration problems.
A side effect of "make config" is that a new Makefile is
generated. The new Makefile will contain your edited CML_*
flags at the top (albeit in expanded form), so you can always
return to Step 1 if necessary.
3) Run "make".
This builds both the PPE and SPE side of the Cell Messaging
Layer. In theory, all possible problems should have been caught
in Step 2, so Step 3 should complete without any trouble. If
not, go back to Step 1 and try again (and please report the
problem to the Cell Messaging Layer's maintainer).
4) Run "make install".
The Cell Messaging Layer installs the following files:
<PREFIX>/spe/include/mpi.h
<PREFIX>/spe/lib/libmpi.a
<PREFIX>/ppe/include/cellmsg.h
<PREFIX>/ppe/lib64/libcellmsg.a
where <PREFIX> is the prefix specified in the Makefile in Step 1.
You can in fact change the prefix at installation time with
"make prefix=<NEWPREFIX> install".
Don't forget: Every time you edit the Makefile build variables you
need to re-run "make config".
The Cell Messaging Layer does support the traditional "./configure ;
make ; make install" process, but this is not recommended because of
the large number of variables that need to be set on a typical
installation (PPECPPFLAGS, PPECFLAGS, PPELDFLAGS, PPELIBS,
SPECPPFLAGS, SPECFLAGS, etc.) It quickly becomes frustrating to have
configure complain that it can't find one header file, then another,
then a library, then another header file, and so forth, with each
attempt requiring another invocation of configure and an increasingly
long./configurecommand line.
The Cell Messaging Layer can be built with IBM's ppuxlc and spuxlc
compilers. Unfortunately, these compilers get confused by the
Makefile's automatic dependency tracking and complain that "1501-208
(S) command option D is missing a subargument". (The problem is that
ppuxlc and spuxlc claim to be gcc compatible yet don't accept all of
gcc's command-line options.) The solution is to add
"--disable-dependency-tracking" to theCML_extra_optsline in the
Makefile and re-run "make config". Alternatively, use the ppugxlc and
spugxlc wrappers to ppuxlc/spuxlc, as these accept or ignore all of
the options used for dependency tracking.
--with-max-msg-size=NUM limit the maximum message size to NUM bytes [262144]
--with-max-outstanding=NUM allow the PPE to have up to NUM incoming or outgoing messages outstanding at once [128]
CML_extra_opts = --with-max-outstanding=64 --with-max-msg-size=16384