forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problems using f77 code in Plato

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
jnp



Joined: 16 Jul 2007
Posts: 2

PostPosted: Tue Jul 17, 2007 12:39 pm    Post subject: Problems using f77 code in Plato Reply with quote

Hi,
I have recently downloaded FTN95PE (and Plato 3.50), as I was looking for a Fortran compiler for Windows 2000.

I have done some tests using old programs which I have compiled and run before on Windows (using g95) and on Linux (using pgf90) without problems. However, using FTN95 and building a project using Plato I get problems. I have not changed any of the standard settings in Plato (at least I hope so…).

The problem occurs when I try to use the standard Fast-Fourier-Transform routine dcfftb.f (downloaded from http://gams.nist.gov/serve.cgi/ModuleComponent/5683/Fullsource/ITL/dcfftb.f and put in a separate file).

Using the program below I get the following error message:

--------------------------------------------------------------------------
Runtime error from program:c:\ …\win32\testdcfftb.exe
Run-time Error
Attempt to call a routine with argument number three as a real(kind=2) when an integer(kind=3) was required

DCFTI1 - in file dcfftb.f at line 398 [+008a]
DCFFTI - in file dcfftb.f at line 116 [+0181]
HILBERTFFTINSTALL - in file testdcfftb.f90 at line 28 [+0153]
main - in file testdcfftb.f90 at line 16 [+0041]
--------------------------------------------------------------------------

It seems to an internal call in ‘DCFFTB’ which causes the problems.
Does it matter that the ‘DCFFTB’-code is written in F77?

I hope that someone can tell what I am doing wrong.

Thanks for any help I can get!

Best regards,

Jonas

------- Here is the program -------

! Test of FFT-routine dcfftb.f from
! "http://gams.nist.gov/serve.cgi/ModuleComponent/5683/Fullsource/ITL/dcfftb.f"

MODULE ModHilbertFFT
INTEGER :: NLength,NHilbertFFT
REAL(KIND(0.0D0)), DIMENSION(Smile, allocatable :: WhilbertFFT
END MODULE ModHilbertFFT

program testDCFFTB !**********************************
USE ModHilbertFFT
IMPLICIT none
INTEGER ESTEP

ESTEP = 2**12

CALL HilbertFFTInstall(ESTEP) !**********************************

END testDCFFTB

SUBROUTINE HilbertFftInstall(N) !**********************************
USE ModHilbertFft
IMPLICIT NONE
INTEGER, INTENT(IN):: N
Nlength = N
NHilbertFft = 2*N
ALLOCATE(WhilbertFft(4*NHilbertFft+15))

CALL DCFFTI(NHilbertFft,WHilbertFft)

END SUBROUTINE HilbertFftInstall !*********************************


! put the file 'dcfftb.f' from
! http://gams.nist.gov/serve.cgi/ModuleComponent/5683/Fullsource/ITL/dcfftb.f
! into the project.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Tue Jul 17, 2007 12:56 pm    Post subject: Reply with quote

You can use Fortran 77.

There is a bug in dcfftb.f exactly as described.

The call is

CALL DCFTI1 (N,WSAVE(IW1),WSAVE(IW2))

and the definition is

SUBROUTINE DCFTI1(N,WA,IFAC)

The third argument is double precision in the call and default integer in the definition.
Back to top
View user's profile Send private message AIM Address
jnp



Joined: 16 Jul 2007
Posts: 2

PostPosted: Tue Jul 17, 2007 1:39 pm    Post subject: Reply with quote

Thanks a lot for the very quick reply!

I do not see how I can use F77, as some of the program parts are using modules etc?!

Maybe I can try to fix the subroutine ‘dcfftb.f’ - I naively expected that these old subroutines did not contain that kind of errors Very Happy .

I also still find it very strange that the other compilers I have used did not give any error/warning messages.

Jonas.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7925
Location: Salford, UK

PostPosted: Wed Jul 18, 2007 6:31 am    Post subject: Reply with quote

I misunderstood your question. You cannot use a Fortran 77 compiler to compile Fortran 90 code.

The ability of FTN95 to do runtime checking may be unique, at least for some of the checks.
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
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 © 2001, 2005 phpBB Group