replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Error with /DREAL Option
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 

Error with /DREAL Option

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



Joined: 16 Nov 2009
Posts: 155

PostPosted: Wed Apr 28, 2010 7:47 am    Post subject: Error with /DREAL Option Reply with quote

Dear colleagues,

I made the experience that errors labelled "Access Violation" are most difficult to overcome. When such an error occurs in a huge program, it takes normally very long to correct. My first question is therefore whether it would be possible in the future to add some more information.

Such an error happened, when I ran a (huge) problem with the option /DREAL. I have condensed the problem to a few lines, in which I cannot find an error. Access Violation is reported when line 36 is uncommented, whereas no error is reported when it is commented out, althought line 35 and 36 are similar. This error does not occur without the option /DREAL.

Please note that it is not the problem to overcome the error in this (meaningless) program but to ensure that a similar problem does not occur in a much more complicated program environment.

My second question is whether this is a compiler problem with the /DREAL option or a programming error.

Best regards,

Klaus Lassmann

The test consists of the files
COMMON
Test52.for
Run.bat and
comp.lis:


Code:
 
      Common /b00/ nwrite
 
      Double Precision     Fpcre3   
 
      Common / FisPro_b /  Fpcre3     ( 2 )
 
!     ==================================================================
!                             Save Statement
      Save
 


Code:
      Winapp

      Program Test52

        Include 'Common'

        nwrite    = 10
        Open ( Unit = nwrite, File = 'Test52.out' )

        Fpcre3 (1) = 1.d+00
        Fpcre3 (2) = 2.d+00

        Call Fwrit0_6

      End Program Test52
!     ------------------------------------------------------------------
      Real Function Fgr_rel3 ( i )
 
        Include 'COMMON'
 
        Fgr_rel3 = + Fpcre3 (i)
 
        Return
      End
!     ------------------------------------------------------------------
      Subroutine FWRIT0_6
 
        INCLUDE 'COMMON'
 
        Do i = 1,2
 
          ii = i
 
          write (nwrite, * )   Fgr_rel3  ( ii ) ! OK
          write (nwrite, * ) - Fgr_rel3  ( ii ) ! OK
          write (nwrite, * ) + Fgr_rel3  ( ii ) ! access violation
 
        end do
 
      return
      end



Code:
del comp.lis
del *.obj
del *.exe
ftn95 Test52.for    /Dreal /checkmate /Link >> comp.lis
sdbg  Test52.exe


Code:
[FTN95/Win32 Ver. 5.50.0 Copyright (c) Silverfrost Ltd 1993-2010]
     Licensed to:  Institut f�r Transurane, Karlsruhe
     Organisation: Europ�ische Kommission

    NO ERRORS  [<TEST52> FTN95/Win32 v5.50.0]
    NO ERRORS  [<FGR_REL3> FTN95/Win32 v5.50.0]
    NO ERRORS  [<FWRIT0_6> FTN95/Win32 v5.50.0]
Creating executable: Test52.EXE
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Apr 28, 2010 9:34 am    Post subject: Reply with quote

The best way to diagnose this kind of problem is to load the program into SDBG and click on the run button (you can do this directly within Plato if you wish). This immediately highlights the offending line of code.

Then it may be necessary to break the line up into a few statements in order to find out exactly where the problem is. If you are brave enough, you can look at the assembly code and the registers at the point of failure.

In this particular case there is a problem with FTN95 and I suspect that it may concern the bit size of the real value returned by the function call when DREAL is used. Removing the redundant plus sign avoids the FTN95 bug.
Back to top
View user's profile Send private message AIM Address
KL



Joined: 16 Nov 2009
Posts: 155

PostPosted: Wed Apr 28, 2010 9:45 am    Post subject: Problem with /DREAL Reply with quote

Thank you very much Paul for your quick reply.

SDBG helps to find out where the problem is manifested, but this does not always help finding the source of the error. Unfortunately, I am no expert in assembler code or other mysteries but I do hope that my case helps to solve this problem for FTN95.

Klaus
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
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