[mpich-discuss] Cannot build mpich2-1.0.8p1 (nemesis) with PGI 8.0-4 on Linux x86_64

Gus Correa gus at ldeo.columbia.edu
Wed Apr 1 12:14:57 CDT 2009


Hi Darius, list

Thank you for spotting this out.
However to the extent that I can tell, PGI pgcpp and pgCC are
C++ compilers on Linux (and hopefully do the same thing).
I may be wrong, though, and I would appreciate if somebody
could clarify this.

It's been a while since somebody here compiled and ran a C++ parallel
program here, hence the correctness of the resulting
mpiCC from MPICH builds hasn't been checked lately.
I also don't know to what extent the C++ compiler would somehow
interfere with building the MPICH2 F90 bindings, but it may.

I was confused about the PGI C++ compiler name before (and now).
First I thought that the naming convention would follow the Gnu style,
i.e., (pg)cpp for the pre-processor, and whatever else for the compiler.
However, at some point I convinced myself that on Linux pgcpp and pgCC
are both the PGI C++ compiler.
They are different executables, though, not a soft link to each other. 
Both executables are the same size:

-r-xr-xr-x 1 909 1004 173192 Feb 11 13:21 pgcpp
-r-xr-xr-x 1 909 1004 173192 Feb 11 13:21 pgCC

The PGI documentation is not any helpful in this regard.
For instance, the PGI User's Guide
says pgcpp is the C++ compiler for Windows,
and pgCC the C++ compiler for Linux.
The PGI preprocessor seems to be invoked using pgcpp -E or pgCC -E,
pgcc -E, pgf90 -E etc.
I couldn't find a specific PGI executable for preprocessing.

On the other hand,
the man pages (on Linux) tell you that both pgcpp and pgCC
are the C++ compiler.
See:

[man pgcpp]

pgcpp(1) 
pgcpp(1)

NAME
        pgcpp - The Portland Group Inc. C++ compiler

SYNOPSIS
        pgcpp [ -flag ]...  sourcefile...

DESCRIPTION
        pgcpp  is  the interface to the Portland Group Inc. (PGI) C++ 
compiler for AMD64 and IA32/EM64T processors.  pgcpp invokes the C++ 
compiler, assembler, and
        linker with options derived from its command line arguments.

...

******

[man pgCC]

pgCC(1) 
pgCC(1)

NAME
        pgCC - The Portland Group Inc. C++ compiler

SYNOPSIS
        pgCC [ -flag ]...  sourcefile...

DESCRIPTION
        pgCC is the interface to the Portland Group Inc. (PGI) C++ 
compiler for
        AMD64 and IA32/EM64T processors.  pgCC invokes the C++ compiler, 
assem-
        bler,  and linker with options derived from its command line 
arguments.

...

*****

Since I compiled MPICH2 and OpenMPI and other libraries (e.g. NetCDF),
building their C++ bindings, and using pgcpp, and there was never
any issue (until now), I thought pgcpp=pgCC in Linux.

***

A direct compilation test using pgcpp and pgCC also suggests this:

[gus at monk test_c++]$ cat hello_world.cc
#include <iostream.h>
int main()
{
	cout << "Hello, world!\n";
	return(0);
}

[gus at monk test_c++]$ pgcpp hello_world.cc
[gus at monk test_c++]$ ./a.out
Hello, world!
[gus at monk test_c++]$ rm -f a.out
[gus at monk test_c++]$ pgCC hello_world.cc
[gus at monk test_c++]$ ./a.out
Hello, world!

***

In addition, the PGI license file lists pgcpp, not pgCC.
At some point in the past this prevented us to use pgCC.
I switched from pgCC to pgcpp on my configuration scripts
at that point, and never revisited the issue again.
However, this license picky behavior may have been
superseded now.

In any case, since somehow the two (pgcpp and pgCC)
may be different, and behave differently
(although both seem to be C++ compiler interfaces),
I will try pgCC instead, and report to you what happens.

Thank you,

Gus Correa
---------------------------------------------------------------------
Gustavo Correa
Lamont-Doherty Earth Observatory - Columbia University
Palisades, NY, 10964-8000 - USA
---------------------------------------------------------------------

Darius Buntinas wrote:
> Gus,
> 
> I just wanted to point out that you have "export CXX=pgcpp" in your
> configure script.  This should be "export CXX=pgCC", pgcpp is the c
> pre-preprocessor, pcCC is the c++ compiler.  (IMHO, cpp is an
> unfortunate name for the pre-processor.)
> 
> I'm not sure how related this is to what you're seeing.
> 
> -d
> 
> On 03/30/2009 06:12 PM, Gus Correa wrote:
>> Dear MPICH experts
>>
>> I tried to build the latest mpich2-1.0.8p1,
>> with the nemesis communication device,
>> using the PGI 8.0-4 compilers (pgcc, pgcpp, and pgf90)
>> on a Linux x86_64 computer, but it failed.
>>
>> The error message, which happens during the make phase, is:
>>
>> make[7]: Entering directory
>> `/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/mpid/ch3/channels/nemesis/nemesis/src'
>>
>> pgcc -DHAVE_CONFIG_H -I.
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/channels/nemesis/nemesis/src
>> -I. -I../include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/ch3/channels/nemesis/nemesis/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/include
>> -DNDEBUG -O2 -DUSE_PROCESS_LOCKS
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/mpid/ch3/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/mpid/common/datatype
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/common/datatype
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/mpid/common/locks
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/common/locks
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/mpid/ch3/channels/nemesis/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/channels/nemesis/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/build_pgi-8.0-4/src/mpid/common/locks
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/common/locks
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/channels/nemesis/nemesis/include
>> -I/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/channels/nemesis/nemesis/utils/monitor
>> -c
>> /home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_alloc.c
>>
>> PGC-F-0249-#error --  No swap function defined for this architecture
>> (/home/swinst/mpich2/1.0.8p1/mpich2-1.0.8p1/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_atomics.h:
>> 31)
>> PGC/x86-64 Linux 8.0-4: compilation aborted
>>
>> **
>>
>> Apparently all three pre-processor macros
>> HAVE_GCC_AND_PENTIUM_ASM,
>> HAVE_GCC_AND_X86_64_ASM, and
>> HAVE_GCC_AND_IA64_ASM
>> on the mpid_nem_atomics.h file are not defined.
>> Since I am working on an x86_64 Linux computer with gcc,
>> I thought configure would somehow define HAVE_GCC_AND_X86_64_ASM.
>> Or not?
>>
>> **
>>
>> More information about the computer, which is the
>> head of a cluster with similar compute nodes:
>>
>> 1. AMD Opteron Shanghai (dual socket, quad core)
>> 2. Linux kernel 2.6.18-92.1.22.el5 #1 SMP (CentOS 5.2)
>> 3. PGI 8.0.4
>> 4. Gnu/GCC 4.1.2
>>
>> **
>>
>> My configure script:
>>
>> #! /bin/sh
>> export MYINSTALLDIR=/some/directory/
>> export CC=pgcc
>> export CXX=pgcpp
>> export F77=pgf90
>> export F90=${F77}
>> # Note: Optimization flags for AMD Opteron "Shanghai"
>> export MPICH2LIB_CFLAGS='-tp shanghai-64 -fast -Mfprelaxed -static'
>> export MPICH2LIB_CXXFLAGS=${MPICH2LIB_CFLAGS}
>> export MPICH2LIB_FFLAGS=${MPICH2LIB_CFLAGS}
>> export MPICH2LIB_F90FLAGS=${MPICH2LIB_CFLAGS}
>> ####################################################
>> ../configure \
>> --prefix=${MYINSTALLDIR} \
>> --with-device=ch3:nemesis \
>> --enable-fast \
>> 2>&1 | tee configure_${build_id}.log
>>
>> **
>>
>> BTW, I built mpich2-1.0.8p1 with nemesis on the same computer
>> using Gnu compilers (gcc, g++, gfortran),
>> and also using Intel compilers (icc, icpc, ifort).
>> However, we also need the PGI build of MPICH2.
>>
>> I appreciate any help.
>>
>> Gus Correa
>> ---------------------------------------------------------------------
>> Gustavo Correa
>> Lamont-Doherty Earth Observatory - Columbia University
>> Palisades, NY, 10964-8000 - USA
>> ---------------------------------------------------------------------



More information about the mpich-discuss mailing list