Problems Compiling mpich-1.2.7p1 with PGI 6.2.3 on 64 bit

Hi,

I’m having this message when trying to compile mpich-1.2.7p1 on my AMD 64 bit computer (Linux Ubuntu) with the PGI Fortran Compiler v. 6.2.3

/opt/pgi/linux86-64/6.2/lib/libpgc.a(trace_lin.o): In function findrout': trace_lin.c:(.text+0x10): undefined reference to __pgi_trace’
trace_lin.c:(.text+0x18): undefined reference to `__pgi_tracee’

This is my configure setting status:

./configure --prefix=/opt/mpich/1.2.7/pgi --enable-c++ --enable-f90 -opt=-O2 --enable-traceback --with-mpe --enable-f90modules --with-file-system=nfs+ufs

and I set the following environment variables:

setenv RSHCOMMAND ssh
setenv F77 pgf90
setenv FC pgf90
setenv F90 pgf90

setenv CFLAGS -I/usr/local/include
setenv LDFLAGS -L/usr/local/lib
setenv LIBS “-lpvfs2 -lpthread”

I succesfully compiled the mpich2 on the same machine.

Thanks in advance for any help.

Hi gaetano,

This is a compatability issue PGI’s new trace back feature where binaries needed to be linked with a PGI driver. In your case, “mpicc” is using gcc. The work around is to add “$PGI/linux86-64/6.2-3/lib/pgi.ld” to the link line where $PGI is the path to your PGI install directory.

Note that this issue has been resolved as of the 6.2-4 compilers.

Hope this helps,
Mat

Dear Mat

thank for your help. But where should I add this line?
I’m compiling the mpich 1.2.7p1. Should I add this line in the Makefile of this project?

Regards

gaetano

Add it to the LDFLAGS before you run configure and make.

For example:

setenv LDFLAGS "-L/usr/local/lib /usr/pgi/linux86-64/6.2-3/lib/pgi.ld"
  • Mat

It seems to work!

Thank you very much for the help!

gaetano

I have installed pgi7.1 in my PC, and the path is ‘/usr/local/pgi’. Then I edited the
.bath_profile file like this :
‘if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/bin
PATH=/usr/local/pgi/linux86/7.1/bin:$PATH
export PATH
MANPATH=$MANPATH:/usr/local/pgi/linux86/7.1/man
export MANPATH
LM_LICENSE_FILE=/usr/local/pgi/license.dat
export LM_LICENSE_FILE
export PGI=/usr/local/pgi
unset USERNAME’

When I run ‘pgf90 -V’ , the PC give the information:
‘pgf90 7.1-5 32-bit target on x86 Linux -tp p7
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2007, STMicroelectronics, Inc. All Rights Reserved.’

I considered that I have successfully install it. But when I run the
‘make -f Makefile-lxif install’, there are two errs like this:
‘/usr/bin/ld: cannot find -lcfitsio make: *** [fitme] Error 2’.
I don’t know how to solve it. Could someone help me?

Hi,

Are you trying to compile mpich? I don’t see Makefile-lxif in mpich package. I could not find library cfitsio in any file in mpich package either.

Which application are you trying to compile?

Hongyon