| View previous topic :: View next topic |
| Author |
Message |
pekompi
Joined: 15 Nov 2004 Posts: 20
|
Posted: Wed Apr 04, 2012 7:00 am Post subject: 3F function and MPI |
|
|
Hi,
one user reported a problem using 3F functions.
Using the normal pgi comipler everything is fine.
using mpif90 (from pgi) the 3F functions are NOT working.
Whats wrong ?
mpif90 -o read_test read_test.f90
./read_test
0
0
Aber mit pgf90 compiliert funktioniert es richtig:
pgf90 -o read_test read_test.f90
./read_test
0
40
code:
program read_test
implicit none
integer :: ftell
integer :: ihead(8)
open(11, FILE="landsea.srv", STATUS='old', FORM='unformatted')
write(*,*) ftell(11)
read(11) ihead
write(*,*) ftell(11)
close(11)
end |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4995 Location: The Portland Group Inc.
|
Posted: Wed Apr 04, 2012 8:34 am Post subject: |
|
|
Hi pekompi,
It looks like a library ordering issue. The mpif90 driver is adding the F77 runtime before the F90 runtime library so ftell is pick-up up the F77 I/O. Since the F77 and F90 I/O are completely separate, ftell shows that the file hasn't moved.
The workaround is to add "-lpgf90rtl" to the mpif90 link so that the ftell uses the F90 I/O.
| Code: | % mpif90 mp.f90 ; a.out
0
0
% mpif90 mp.f90 -lpgf90rtl ; a.out
0
24 |
I have submitted a problem report (TPR#18598) requesting the mpif90 that we ship be updated.
- Mat |
|
| Back to top |
|
 |
jtull
Joined: 30 Jun 2004 Posts: 233
|
Posted: Tue May 28, 2013 6:48 pm Post subject: TPR 18598 - Using Lib3F "ftell" fails with mpif90 |
|
|
This TPR was fixed in our 12.5 release.
Sorry about the late word.
dave |
|
| Back to top |
|
 |
|