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 

Incorrect assignment in case of /64

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
Thomas



Joined: 18 Feb 2005
Posts: 43
Location: Gummersbach, Germany

PostPosted: Fri Feb 19, 2021 7:39 pm    Post subject: Incorrect assignment in case of /64 Reply with quote

The following code is extracted from about 300,000 lines of Fortran code. It behaves differently if compiled with /64 and slink64 than for 32 bit. It took some effort to reduce the amount of code to a minimum, where the error can still be reproduced.

First source file:
Code:

Program Test_Module
Use CFB_Interface
Implicit None
call InitCombustionData()
call WriteCFBData()
End Program Test_Module

Second source file:
Code:

Module CFB_Interface
Implicit None

Type :: TCFB_O2Carrier
  Integer                        :: iA, Anz
  Integer,          Dimension(8) :: iM, iT, Ana
  Double Precision, Dimension(8) :: M, MSt, MU, XO2
End Type TCFB_O2Carrier

Type :: TCFB_InternalData
  Type(TCFB_O2Carrier), Dimension(3) :: O2C
End Type TCFB_InternalData

Type(TCFB_InternalData) :: IntDat

CONTAINS
!========================================================================================================================
  Subroutine InitCombustionData()
    call GetO2CarrierData(1)

    CONTAINS
     
      Subroutine GetO2CarrierData(iIndex)
      Integer, Intent(in) :: iIndex
      IntDat%O2C(iIndex)%Anz = 1
      End Subroutine GetO2CarrierData

  End Subroutine InitCombustionData
!========================================================================================================================
  Subroutine WriteCFBData()
  Integer :: iAnz

  ! FTN95 Error with 64bit: The following assignment will not be executed correctly despite of "IntDat%O2C(iC)%Anz = 1"
  iAnz = IntDat%O2C(1)%Anz

  write (*,*) iAnz

  End Subroutine WriteCFBData
!========================================================================================================================
End Module

In 32-bit case iAnz is correctly assigned to the value 1. In 64-bit case the assignment is 0 (normal execution) or -1163005939 (sdbg64).

We compiled with the following options:
/check
/intl
/logl
/save

For a longer period we were progressing successfully with 64-bit versions despite various obstacles, e.g. integer kind of handles. Now we are a litlle bit worried.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Sat Feb 20, 2021 10:26 am    Post subject: Reply with quote

Thomas

Which version of FTN95 are you using. I get the result 1 for both Win32 and x64.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 43
Location: Gummersbach, Germany

PostPosted: Sat Feb 20, 2021 10:58 am    Post subject: Reply with quote

My ftn95 environment:
ftn95.exe 8.70.220.0
salflibc.dll 23.1.4.9
salflibc64.dll 23.1.4.9
clearwin64.dll 23.1.4.9
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


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

PostPosted: Sat Feb 20, 2021 11:47 am    Post subject: Reply with quote

Thomas

I can confirm that the version you are using gives the incorrect result. I don't know offhand what has changed but I will send a link to a new version of FTN95 via a personal message once I have run a few tests.
Back to top
View user's profile Send private message AIM Address
Thomas



Joined: 18 Feb 2005
Posts: 43
Location: Gummersbach, Germany

PostPosted: Sat Feb 20, 2021 11:50 am    Post subject: Reply with quote

Paul,

Once again many thanks for extraordinary good support.
_________________
Thomas
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit 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