[MPICH] mpich-1.2.7 pgcc and gcc

William Gropp gropp at mcs.anl.gov
Wed Oct 5 08:52:20 CDT 2005


At 08:12 AM 10/5/2005, Stephen Wornom wrote:
>I configured mpich with FC=pgf90 and CC=pgcc. I am trying to run on a
>GRID. Unfortunately the other cluster on the GRID do not have pgi
>products installed.
>question: What can I expect when I execute mpirun? (recall that my mpich
>is configure with pg and the other sites configures without pg)
>Hope my question is clear.
>Stephen
>p.s.
>The pgf90 and pgcc have runtime permissions at all sites, the question
>concerns mpich.

All other things being equal (I'll be more precise below) it should not 
matter which compilers were used to configure and build MPICH (either 
MPICH1 or MPICH2).  It is unfortunate that many sites appear to build the 
entire MPICH distribution with each available library; this is rarely 
necessary.

More precisely, if the compilers generate compatible code, with the same 
sizes for data items and the same structure padding (sometimes a problem on 
systems with 32-bit and 64-bit integers) and same calling sequence 
convention (sometimes a problem on Windows systems) and for the same 
instruction set, then the only difference in the steps used to compile and 
link an MPICH application may be the libraries needed when linking.  The 
last problem for Fortran90+ users are the values of the basic INTEGER 
KINDS; these are not standardized (e.g., KIND=4 is not always a 4 byte 
integer).

Now, it can be exactly here where you run into problems.  Some compilers 
generate calls into their own runtime libraries for some basic operations, 
such as multiplication of 8-byte integers.  If those libraries are 
shared-only (cannot be linked statically), you won't be able to run on a 
different platform.  In that case, the best thing to do is to usually:

build MPICH with the GNU compilers
build your application with the appropriate compilers at each site (e.g., 
use pgf90 for local runs, g95 or gfortran systems without the pg runtime 
libraries).

There are some instructions on using multiple compilers in the MPICH1 
manuals.  Also, MPICH2 has an even more convenient approach (a simple 
environment variable can select different compilers for a single build).

If this doesn't help, send us an example of what goes wrong.

Bill



William Gropp
http://www.mcs.anl.gov/~gropp 




More information about the mpich-discuss mailing list