Error compiling with mpif90 -> PGFIO-F-252/unformatted

Hi,

one user in our institute has the following problem.
When he compiles a small test sample with pgf90,
everything is working fine.
Compiling with mpif90 works, but running the binary fails.
The output looks like:

taiga:/tmp # pgf90 -o srich_test test_fileread.f90 -g
taiga:/tmp # ./srich_test
111 10 10 1.000000
222 10 10 3.000000
or
taiga:/tmp # mpif90 -o srich_test test_fileread.f90 -g
taiga:/tmp # ./srich_test
1065353216 1065353216 1065353216 3.000000
PGFIO-F-252/unformatted read/unit=11/operation attempted after end of file.
File name = zzz4.srv unformatted, sequential access record = 5
In source file test_fileread.f90, at line number 52

The problem seems to bee the linking step:
Using mpif90 … -dryrun shows


-lfmpich -lmpich -lpthread -lpgftnrtl
-lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl
-lpgftnrtl -lnspgc -lpgc -lrt -lpthread
^^^^^^^^ ^^^^^^^^^ second time

using

-lfmpich -lmpich
-lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl
-lpgftnrtl -lnspgc -lpgc -lrt -lpthread



Everything is fine. But where is it configured to set “-lfmpich -lmpich -lpthread -lpgftnrtl”
before the rest of the pgf-stuff ?

Bye, Peer

Hi Peer,

Do you mind posting your test or sending it to PGI Customer Service (trs@pgroup.com)? Duplicating libraries on the link line shouldn’t matter, but possibly it has to the library order. Either way, I’d like someone here to take a look to determine the actual cause.

Also, which mpif90 are you using? The pre-built MPICH that accompanies the compilers or your own build?

Thanks,
Mat

Hi,

you can download the files directly using:
ftp://ftp.bgc-jena.mpg.de/pub/outgoing/pkoch/PGI

We are using the preinstalled mpi1 stuff.
I’ve compiled mpich2 from scratch and this version is working correctly!
But the main source is not mpi2 save. So we need a solution for mpi1,
or I’ll have to compile it also …

Bye, Peer

Hi Peer,

I’m away at the NVIDIA GTC conference but will take a look once I’m back in the office.

Thanks,
Mat