PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

3F function and MPI

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
pekompi



Joined: 15 Nov 2004
Posts: 22

PostPosted: Wed Apr 04, 2012 7:00 am    Post subject: 3F function and MPI Reply with quote

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
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Wed Apr 04, 2012 8:34 am    Post subject: Reply with quote

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
View user's profile
jtull



Joined: 30 Jun 2004
Posts: 395

PostPosted: Tue May 28, 2013 6:48 pm    Post subject: TPR 18598 - Using Lib3F "ftell" fails with mpif90 Reply with quote

This TPR was fixed in our 12.5 release.

Sorry about the late word.

dave
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group