Error Compiling mpich1.2.7p1

I’m trying to re-compile mpich1.2.7p1 on a Mandrive 2006 Linux Cluster (Kernel 2.6.12-27mdk-i686-up-4GB) to include the last pvfs2 support.
I have pgif90 6.2.3 fortran compiler.
I’m unable to compile mpich1.2.7p1 also without pvfs2 support (I was able to compile this mpich version before, but using an old pgi compiler) due to a lot of undefined references in making Fortran 90 module for MPI.
Some of them are:

/home/bellanca/software/mpi/mpich-1.2.7p1/mpich-1.2.7p1_pgi/bin/mpicc -o overtake overtake.o test.o
/opt/pgi/linux86/6.2/lib/libpgf90.a(initpar.o): In function __hpf_abortp': initpar.c:(.text+0xe7): undefined reference to __pgio_stderr’
/opt/pgi/linux86/6.2/lib/libpgf90.a(initpar.o): In function __hpf_exit': initpar.c:(.text+0x157): undefined reference to __pgi_abort’
/opt/pgi/linux86/6.2/lib/libpgf90.a(initpar.o): In function __hpf_initarg': initpar.c:(.text+0x184): undefined reference to __pgio_get_argv’
initpar.c:(.text+0x1e3): undefined reference to `__pgio_set_argc’

Before these errors, I have the messages:
make --no-print-directory mpi-lib-test
make --no-print-directory profileliblink
Testing that MPI applications can be linked…
make --no-print-directory linktest

Any ideas?

Thanks in advance.


Hi Gaetano,

This error is caused by linking F90 objects using a C compiler. To fix, add the flag “-pgf90libs” to your link or use mpif90 (pgf90) instead of mpicc. This will add the pgf90 runtime librares to the link and resolve the missing symbol names.

Hope this helps,

Dear Mat

thank you for your help. Tomorrow I’ll be at the Faculty and I’ll try your suggestion. Anyway, I’m trying to compile mpich; therefore, I’m not using mpicc or mpif90 to compile, but the script generated by mpich itself, which will create mpicc and mpif90.
aybe adding the flag “-pgf90libs” to the options of the configure for mpich will help in solving the problem.
Another possible solution is to download the new version of the PGI compiler. This will be done as the first thing tomorrow morning!

I’ll send you a report as soon as possible.

Thank you again.


Dear Mat,

I installed this morning the new 6.2.5 version of the pgi compiler and using the configuration string:

./configure --prefix=/opt/mpich/1.2.7/pgi --enable-c++ --enable-f90 -opt=-O2 --enable-traceback --with-mpe --enable-f90modules
–with-java2=/usr/local/java -f90flags=’-fast -fastsse -tp p7 -pgf90libs’
-cc=gcc -fc=pgf77 -f90=pgf90 --with-file-system=ufs+nfs+pvfs2 -cflags=’-I/usr/local/include -L/usr/local/lib’
-lib=’-lpvfs2 -lpthread -lcrypto’

I was successfully able to compile both mpich1.2.7p1 and my simulation code in a i32 linux architecture. It seems to work now. I still need to test the pvfs2 performances.
I’m going to test the i64 version next week.

Do you have any suggestions for the compilation process, in order to increase the speed performance of the final code?

Anyway, thank you very much for your help.


“-fast” should be fine for MPICH. For your application, I would recommend “-fastsse -Mipa=fast,inline” to give the best overall performance.

  • Mat