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 

Output profile information flag causes erroneous integer function outputs?

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





PostPosted: Mon May 22, 2006 4:39 pm    Post subject: Output profile information flag causes erroneous integer fun Reply with quote

The following code correctly returns the lout = 12 value via the get_unit functional call until the "Output Profile Information" flag is selected in Projects -> Properties, at which time it returns a huge integer (56687772 on my computer). Compaq Digital Fortran v6.6 cannot reproduce this phenomena.

Is this a compiler bug, or am I misunderstanding what the option is supposed to be doing?? I'm running Plato 3.30, with a very new Personal Edition of FTN95 (downloaded it a couple of weeks ago).

Thanks in advance!!

==============================

PROGRAM ldc

! --- Declare external modules
USE FileClass

! --- Strong typing imposed
IMPLICIT NONE

! --- Local integer variables
INTEGER, PARAMETER :: k4b = SELECTED_INT_KIND( 9 )
INTEGER, PARAMETER :: dp = KIND( 1.0D0 )
INTEGER( k4b ) :: lout = 0
CHARACTER( 3 ) :: caller = 'LDC'

! --- Open I/O units
CALL open_unit

! --- Determine the date/time for run tracking from intrinsic DATE_AND_TIME subroutine
lout = get_unit( caller, 'stdout' )

! --- End program
END PROGRAM ldc


============================


MODULE FileClass

IMPLICIT NONE
INTEGER, PARAMETER :: k4b = SELECTED_INT_KIND( 9 )
INTEGER, PARAMETER :: dp = KIND( 1.0D0 )
PRIVATE !! By default, make module contents private
PUBLIC get_unit, &
open_unit
TYPE io_unit_type !! Derived type for miscellaneous core data
INTEGER( k4b ) :: lerr = 10 !! Standard error file
INTEGER( k4b ) :: linp = 11 !! Standard input file
INTEGER( k4b ) :: lout = 12 !! Standard output file
INTEGER( k4b ) :: lecho = 13 !! Decommented file from echo subroutine
INTEGER( k4b ) :: lscratch = 14 !! Scratch file
INTEGER( k4b ) :: lgeom = 15 !! Geometry file
END TYPE io_unit_type
TYPE( io_unit_type ) :: io_unit !! Input/output unit numbers
!
INTEGER( k4b ) :: ios !! IOSTAT flag for general use in module
CHARACTER( 80 ) :: string !! General string buffer
CHARACTER( 80 ) :: string1 !! General string buffer
CHARACTER( 80 ) :: string2 !! General string buffer
CHARACTER( 1 ) :: space = ' ' !! Space character for string I/O
CHARACTER( 11 ) :: filename !! Filename buffer
CHARACTER( 20 ) :: chara !! I/O buffer string
INTEGER( k4b ) :: alloc_status !! Array allocation IOSTAT flag
!
!
! PUBLIC INTERFACE DEFINITIONS:
!
INTERFACE get_unit !! Use public method get_unit as an interface
MODULE PROCEDURE file_units !! to private procedure file_units
END INTERFACE get_unit
!
INTERFACE open_unit !! Use public method open_unit as an interface
MODULE PROCEDURE opener !! to private procedure opener
END INTERFACE open_unit


! --- Module subprograms follow
CONTAINS

! ----------------------------------------------------------------------------------!
! ----------------------------------------------------------------------------------!
! !
FUNCTION file_units( caller_in, unit_type ) RESULT( unit_number ) !
! !
! ----------------------------------------------------------------------------------!
! !
! Obtains a unit number. !
! !
! ----------------------------------------------------------------------------------!
Back to top
PaulLaidler
Site Admin


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

PostPosted: Tue May 23, 2006 1:02 pm    Post subject: Output profile information flag causes erroneous integer fun Reply with quote

Thomas

This is clearly caused by a bug in the compiler or the debugger.
The /PROFILE option is corrupting at least one of the variables in the program.

This should not limit the usefulness of /PROFILE which should only be used once to see which parts of the program are computationally intensive (i.e. where the work is done and the time is spent).
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Mon Jun 05, 2006 11:48 pm    Post subject: Output profile information flag causes erroneous integer fun Reply with quote

This bug has now been fixed for the next release.
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