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 

Fortran 95 code problem
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
arctica



Joined: 10 Sep 2006
Posts: 148
Location: United Kingdom

PostPosted: Fri Jul 19, 2013 9:01 am    Post subject: Reply with quote

Hi John,

Thanks for the pointers.

I copied the compiled program to work for use and when run it gave a run-time error with the following:

C:\F95-Temp\FA2BOUG>FA2Boug_CGv1D

Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'FA2Boug_CGv1D' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'ftn95lib, Version=1.1.0.0, Culture=neutral, PublicKeyToken=626494245e82c014' or one of its dependencies. The system cannot find the file specified.
File name: 'ftn95lib, Version=1.1.0.0, Culture=neutral, PublicKeyToken=626494245
e82c014'
at FA2Boug_CGv1D..cctor()

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

--- End of inner exception stack trace ---
at FA2Boug_CGv1D.Main()

I am on Windows 7 enterprise, but do not as yet have ftn95 on this machine. Do I need that installed ? Compiled the code on my home PC (Win7 Home edition 64 bit).

Cheers
Lester
Back to top
View user's profile Send private message
arctica



Joined: 10 Sep 2006
Posts: 148
Location: United Kingdom

PostPosted: Fri Jul 19, 2013 3:38 pm    Post subject: Reply with quote

Got our IT guys to install FTN95 and compiled the program, although it had issues with Pi at run-time. Had to re-instate the value of pi as originally there to get it running.

Bit odd, as I used and compiled the same code on my home pc and it went fine with the changes made.

Bit slow running but guess its due to the /debug and /checkmate options - couldn't see how to remove that.

Cheers

Lester
Back to top
View user's profile Send private message
arctica



Joined: 10 Sep 2006
Posts: 148
Location: United Kingdom

PostPosted: Sat Jul 20, 2013 1:06 pm    Post subject: Re: Reply with quote

JohnCampbell wrote:
Lester,

to overcome the warning about PI, change write_pi to:
Code:
      subroutine write_pi
!  example of kind options
      USE MOD_PARAM
!
      pi  = 4.0_dp * ATAN (1.0_dp)
      piq = 4.0_qp * ATAN (1.0_qp)
      pis = 4.0_sp * ATAN (1.0_sp)
      write (*,*) pis, kind(pis), sp, precision(pis)
      write (*,*) pi,  kind(pi),  dp, precision(pi)
      write (*,*) piq, kind(piq), qp, precision(piq)
      write (*,'(f27.19)') pis
      write (*,'(f27.19)') pi
      write (*,'(f27.19)') piq
!
      END


The only warning that is important is #298, which implies that PI, that is defined in MOD_PARAM is not being used at line 267 and 566 ?
You should make sure you either call write_pi, or include it's definition at the start.
I really do not understand the comments about qp. The following is a valid definition for real*10, which should be in MOD_Precision
INTEGER, PARAMETER :: qp=SELECTED_REAL_KIND(18,500)

John


I managed to fix the issue with pi, not sure how but I had commented out the qp entries and then uncommented and it seemed to be happy - odd!

Got a Fortran95 text on order so will brush up on things , but this has been a useful exrcise and thanks for the guidance John, much appreciated.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
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