[Mpi-forum] Compile problems with examples in MPI Standard

William Gropp wgropp at illinois.edu
Tue Jul 24 09:32:33 CDT 2012

I've run my code checker over the examples in the MPI-3 Standard, and I've found some issues.  Perhaps the biggest is this (a typical example):

Opening file one-side-2.tex
ex5501.c: In function ‘main’:
ex5501.c:58: warning: passing argument 2 of ‘MPI_Init’ from incompatible pointer type

This occurs everywhere we include MPI_Init in an example.  The compiler is gcc 4.2.1 .  The corresponding 
declaration of argv is as intended:

int main(int argc, char *argv[]) 

The declaration in MPI_Init looks correct (argv is a pointer to an array of pointers to char).  Is this a place where we should stick with the *** notation just to keep compilers happy?  Or is there something I'm missing in the declaration?

There are a number of other errors as well.  Three examples in the new tools chapter don't compile.  There are a number of problems in the datatype chapter, most minor.

I can fix the obvious ones or leave them to the chapter authors.  Let me know what is preferred.

I can't check the Fortran 08 examples because I only have gfortran :( 


William Gropp
Director, Parallel Computing Institute
Deputy Director for Research
Institute for Advanced Computing Applications and Technologies
Paul and Cynthia Saylor Professor of Computer Science
University of Illinois Urbana-Champaign

More information about the mpi-forum mailing list