[MPICH2-dev] MPICH2 1.0.5-rc1 PGI 64-bit compilers

Larry Baker baker at usgs.gov
Wed Nov 29 20:05:23 CST 2006


Bill,

I downloaded MPICH2 1.0.5 RC1 and compiled the library on our Opteron  
64-bit cluster with the PGI compilers.  Here's my results so far.

16-node Opteron Cluster, Rocks 4.1 ((based on CentOS 4.2, I think)  
Linux-x86_64, Portland Group Linux 6.2 C/C++/Fortran compilers.

# export LM_LICENSE_FILE=/opt/pgi/license.dat
# export PATH=${PATH}:/opt/pgi/linux86-64/current/bin
# export CC=pgcc
# export CXX=pgCC
# export FC=pgf77
# export F77=pgf77
# export F90=pgf90
# export CFLAGS="-O -tp k8-64 -fastsse"
# export FFLAGS="-O -tp k8-64 -fastsse"
# export F90FLAGS="-O -tp k8-64 -fastsse"
# ./configure --with-device=ch3:sock --with-pm=mpd --enable- 
g=dbg ‑‑enable-f77 --enable-f90 --enable-cxx --enable- 
romio ‑‑with‑file‑system=ufs+nfs --enable-debuginfo --enable- 
mpe ‑‑enable‑sharedlibs=gcc --prefix=/opt/mpich2/1.0.5-rc1/pgi/ 
6.2 >configure.log 2>&1

The initial make gave over 800 warnings, most of the form:

PGC-W-0114-More than one type specified (/usr/include/unistd.h: 243)
PGC-W-0143-Useless typedef declaration (no declarators present) (/usr/ 
include/unistd.h: 243)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

This is caused by a bug in ./configure which adds a #define socklen_t  
int to the header files src/mpid/common/sock/poll/mpidu_socki_conf.h  
and src/pmi/simple/pmiconf.h.  Each header file must first be edited  
to remove the #define socklen_t int.

Edit the line number below in src/mpid/common/sock/poll/ 
mpidu_socki_conf.h:

89:/* #undef socklen_t */

Edit the line number below in src/pmi/simple/pmiconf.h:

84:/* #undef socklen_t */

After that the make results were much more manageable.  Here's the  
warnings from make (numbers are keyed to fixups below):

9.  PGC-W-0136-Function MPIU_PG_Printall has non-prototype  
declaration in scope (mpidi_pg.c: 1067)
9.  PGC-W-0136-Function MPIDI_PG_CheckForSingleton has non-prototype  
declaration in scope (mpidi_pg.c: 1090)
9.  PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
9.  PGC-W-0136-Function MPIU_PG_Printall has non-prototype  
declaration in scope (mpidi_pg.c: 1067)
9.  PGC-W-0136-Function MPIDI_PG_CheckForSingleton has non-prototype  
declaration in scope (mpidi_pg.c: 1090)
9.  PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
13. PGC-W-0221-Redefinition of symbol MAXHOSTNAMELEN (/usr/include/ 
asm-x86_64/param.h: 18)
13. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
13. PGC-W-0221-Redefinition of symbol MAXHOSTNAMELEN (/usr/include/ 
asm-x86_64/param.h: 18)
13. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
14. PGC-W-0155-No va_start() seen  (pcontrol.c: 70)
14. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
14. PGC-W-0155-No va_start() seen  (pcontrol.c: 70)
14. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
15. PGC-W-0095-Type cast required for this conversion (test.c: 174)
15. PGC-W-0155-Pointer value created from a nonlong integral type   
(test.c: 174)
15. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
15. PGC-W-0095-Type cast required for this conversion (test.c: 174)
15. PGC-W-0155-Pointer value created from a nonlong integral type   
(test.c: 174)
15. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
16. PGC-W-0006-Empty translation unit (osserv.c: 5)
16. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
16. PGC-W-0006-Empty translation unit (osserv.c: 5)
16. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
17. PGC-W-0155-No va_start() seen  (log_mpi_core.c: 5550)
17. PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

The first 12 fixups are from my previous e-mail of 29-Nov-2006,  
MPICH2 1.0.5-rc1 Intel 32-bit compilers.  The only relevant one here  
is 9:

9.  Warnings for src/mpid/ch3/src/mpidi_pg.c:

PGC-W-0136-Function MPIU_PG_Printall has non-prototype declaration in  
scope (mpidi_pg.c: 1067)
PGC-W-0136-Function MPIDI_PG_CheckForSingleton has non-prototype  
declaration in scope (mpidi_pg.c: 1090)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

MPIU_PG_Printall() and MPIDI_PG_CheckForSingleton() are implemented  
in src/mpid/ch3/src/mpidi_pg.c, but there are no function prototype  
declarations for them in any header files.

Fixup: insert the line numbers below in src/mpid/ch3/include/ 
mpidimpl.h to add function prototype declarations for MPIU_PG_Printall 
() and MPIDI_PG_CheckForSingleton():

420:
421:int MPIU_PG_Printall( FILE * );
422:int MPIDI_PG_CheckForSingleton( void );

13. Warnings for src/mpid/ch3/util/sock/ch3u_init_sock.c:

PGC-W-0221-Redefinition of symbol MAXHOSTNAMELEN (/usr/include/asm- 
x86_64/param.h: 18)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

The value of MAXHOSTNAMELEN in the system heaader /usr/include/asm- 
x86_64/param.h is different than the value already #define'd.  src/ 
mpid/ch3/channels/sock/include/mpidi_ch3_impl.h #define's  
MAXHOSTNAMELEN 256 because the system #include files haven't had a  
chance yet to #define MAXHOSTNAMELEN 64.  (I don't know how dangerous  
it is to use the wrong value inside MPICH2.)  I have found it is  
usually best to #include all system header files before any of my own  
so that my #define's don't interfere with the OS #define's or #if 
(def)'s.  Or, in cases like this, when there are conditional  
#define's in my own headers that depend on values #define'd in system  
header files.

Fixup: edit the line numbers below in src/mpid/ch3/util/sock/ 
ch3u_init_sock.c to move the system #include's before the MPICH2  
#include's to prevent the incorrect definition of MAXHOSTNAMELEN in  
src/mpid/ch3/channels/sock/include/mpidi_ch3_impl.h:

7:#ifdef HAVE_UNISTD_H
8:#include <unistd.h>
9:#endif
10:#ifdef HAVE_SYS_PARAM_H
11:#include <sys/param.h>
12:#endif
13:
14:#include "mpidi_ch3_impl.h"
15:#include "pmi.h"

14. Warnings for src/mpi/misc/pcontrol.c:

PGC-W-0155-No va_start() seen  (pcontrol.c: 70)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

These warnings are spurious; when no attempt is made to access the  
varying arguments, the C standard does not require va_start() and  
va_end().

15. Warnings for src/mpi/pt2pt/test.c:

PGC-W-0095-Type cast required for this conversion (test.c: 174)
PGC-W-0155-Pointer value created from a nonlong integral type   
(test.c: 174)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

src/mpi/pt2pt/test.c uses 32-bit (int) 0 instead of 64-bit (void *)  
NULL for the null pointer value passed to MPIR_Err_return_comm().

Fixup: edit the line number below in src/mpi/pt2pt/test.c to pass a  
64-bit (void *) NULL pointer to MPIR_Err_return_comm():

174:    mpi_errno = MPIR_Err_return_comm(request_ptr ? request_ptr- 
 >comm : NULL, FCNAME, mpi_errno);

16. Warnings for src/util/osserv/osserv.c:

PGC-W-0006-Empty translation unit (osserv.c: 5)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

The code in src/util/osserv/osserv.c is conditionalized on #if defined 
(USE_WINDOWS_OS) and #elif defined(USE_GENERIC_UNIX_OS).  Neither  
USE_WINDOWS_OS nor USE_GENERIC_UNIX_OS are #define'd.  Is  
USE_GENERIC_UNIX_OS supposed to be #define'd for Linux?  Absent more  
information, ignore this warning.

17. Warnings for src/mpe2/src/wrappers/src/log_mpi_core.c:

PGC-W-0155-No va_start() seen  (log_mpi_core.c: 5550)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

Same diagnosis as 14: this warning is spurious.

The only warnings that remain are nos. 14, 16, and 17, which can be  
ignored:

[root at hydra mpich2-1.0.5-rc1]# grep PGC make.log
PGC-W-0155-No va_start() seen  (pcontrol.c: 70)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
PGC-W-0155-No va_start() seen  (pcontrol.c: 70)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
PGC-W-0006-Empty translation unit (osserv.c: 5)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
PGC-W-0006-Empty translation unit (osserv.c: 5)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings
PGC-W-0155-No va_start() seen  (log_mpi_core.c: 5550)
PGC/x86-64 Linux/x86-64 6.2-4: compilation completed with warnings

The make install log file looked fine.

I plan to merge the fixups I made for the 32-bit Intel installation  
with the fixups I made here and then recompile the library before  
running the installation tests.

An question: If you have no C const (#ifdef HAVE_NO_C_CONST), why not  
just #define const as nothing?  Or, use CONST where you would  
normally use const and either #define CONST or #define CONST const?   
It would cut down on the number of #ifdef/#else/#endif's, the number  
of lines of code, and reduce the chance of improperly nested or  
mispositioned preprocessor conditionals.

Larry Baker
US Geological Survey
650-329-5608
baker at usgs.gov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mcs.anl.gov/mailman/private/mpich2-dev/attachments/20061129/b63bfd72/attachment.htm>


More information about the mpich2-dev mailing list