replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - namelist regression?
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 

namelist regression?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
brucebowler
Guest





PostPosted: Tue Nov 27, 2012 4:40 pm    Post subject: namelist regression? Reply with quote

I have some code that has "just worked" "forever". I haven't had to run it in a couple of years, but now find that I need to run it again. Last time I ran it, the installed version of ftn95 was 5.{something}, I'm now running 6.3.

My namelist definition looks like this.
Code:
namelist /optlist/ &
ac9Cals, ac9ScatterType, &
ac9pretime,ac9posttime, ac9PreTemp, ac9PostTemp, ac9prea,ac9prec,ac9posta,ac9postc,&
ac9NumGooses,ac9Gooses, &
dawnCals, dawnpretime,dawnposttime,dawnprecal,dawnpostcal, &
chlCals, chlType, chlStart, chlEnd, chlCoeffCount, chlCoeff, &
hsNumSweeps, hsSweeps, &
gmtoffsethours, hscatinifile, sasinifile, firstStation


My input file looks like this...

Code:
&optlist
chlCoeff(1,1:3) =  -100602.0067, 620.2207, -0.9559
chlType  = 3
chlStart = 323.8
chlEnd   = 324.6
chlCoeffCount = 3
chlCals  = 1
/


My reading code looks like this...

Code:
  open (unit=optunit,file=filename,status='readonly')
  read (optunit, nml=optlist)
  close (unit=optunit)


When I run it, I get an "Error 204, invalid identifier in namelist input group"

The problem appears to be related to chlCoeff and chlCoeffCount. If I remove the 'e' from those names in both the namelist definition, declarations, and input file, everything works fine. I haven't tried changing the 'e' to some other letter to see if it's specifically the 'e', but I'd really like to leave the 'e' in there so I don't have to go and change roughly 1000 input files when I need to reprocess old data.

Any idea as to why the failure?

PS, there's an implicit none at the start of the code and all the variables have been properly defined. In particular,
Code:
real chlCoeff(10,10)
integer chlCoeffCount
Back to top
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Tue Nov 27, 2012 5:32 pm    Post subject: Re: namelist regression? Reply with quote

The reported error could not be reproduced using the code fragments posted and using implicit typing for variables whose declarations were not shown.

The complete test source needs to be shown to enable one to reproduce the reported behavior.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Nov 27, 2012 5:53 pm    Post subject: Reply with quote

It works OK for me so the first thing to check is that you are not accessing an old salflibc.dll by mistake.

I am running 64 bit Windows 7.
Back to top
View user's profile Send private message AIM Address
brucebowler
Guest





PostPosted: Tue Nov 27, 2012 6:54 pm    Post subject: Reply with quote

Only salflibc.dll's on the machine are in c:\program files\ftn95 and \redist. Both are dated 5/14/2012 and are 2007KB. Internal version for both is 14.5.14.22.

Original code is 1000's of lines long, but I will attempt to make a small reproducer in the mean time.

Bruce
Back to top
brucebowler
Guest





PostPosted: Tue Nov 27, 2012 7:51 pm    Post subject: Reply with quote

As presented, this works. If you do a global search and replace of Coff with Coeff, it fails for me.
Code:
program testing
implicit none
character (len=128) :: optfilename
integer :: optlen
optfilename = 'v:\gnats\2012\s121118e\s121118e.opt'
optlen = leng(optfilename)
call readOptFile(optfilename(1:optlen))
end
subroutine readOptFile(filename)
implicit none
character (len=*), intent(in) :: filename
integer :: ac9ScatterType, ac9Cals,ac9NumGooses
real :: ac9PreTime,ac9PostTime, ac9PreTemp,ac9PostTemp
real :: ac9PreA(9),ac9PreC(9),ac9PostA(9),ac9PostC(9)
real :: ac9Gooses(10,3)
integer:: dawnCals
real :: dawnPreTime,dawnPostTime, dawnPreCal, dawnPostCal
integer :: chlType(10), chlCoffCount(10), chlCals
real :: chlStart(10), chlEnd(10), chlCoff(10,10)
integer :: hsNumSweeps
real*8 :: hsSweeps(10,3)
integer :: gmtoffsethours,firstStation
character (len=128) :: hscatinifile, sasinifile
integer optunit
namelist /optlist/ &
ac9Cals, ac9ScatterType, ac9pretime,ac9posttime, ac9PreTemp, ac9PostTemp, &
ac9prea,ac9prec,ac9posta,ac9postc,ac9NumGooses,ac9Gooses, &
dawnCals, dawnpretime,dawnposttime,dawnprecal,dawnpostcal, &
chlCals, chlType, chlStart, chlEnd, chlCoffCount, chlCoff, &
hsNumSweeps, hsSweeps, gmtoffsethours, hscatinifile, sasinifile, firstStation
optunit=15
open (unit=optunit,file=filename,status='readonly')
read (optunit, nml=optlist)
close (unit=optunit)
return
end


.opt file

Code:
&optlist
chlCoff(1,1:3) =  -100602.0067, 620.2207, -0.9559
chlType  = 3
chlStart = 323.8
chlEnd   = 324.6
chlCoffCount = 3
chlCals  = 1
/
Back to top
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Tue Nov 27, 2012 8:13 pm    Post subject: Reply with quote

Similar issues have been reported with the names and NAMELIST before, see for example this from 2010.

http://forums.silverfrost.com/viewtopic.php?t=1692&highlight=namelist
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Tue Nov 27, 2012 8:16 pm    Post subject: Reply with quote

Yep, saw that (and even commented on it back then), but I don't think it's related...

edit=== rereading, yes, I think it is related.

Paul, any chance of getting this looked at?


Last edited by brucebowler on Tue Nov 27, 2012 8:50 pm; edited 1 time in total
Back to top
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Tue Nov 27, 2012 8:34 pm    Post subject: Reply with quote

If I run "my" code from the other post with the name PROGNAME for one of the items in the namelist, I get the same error as you.

Error 204, invalid identifier in namelist input group

Edit. Re-reading the posts on the other thread it looks like this Error 204 was reported back then. There is also this post from someone called Martin (presumably from Silverfrost), who reproduced the behaviour.

http://forums.silverfrost.com/viewtopic.php?p=7681&sid=45a3a42c1f90c62bd843d75c11e74430

It seems that some names are just not liked, though I haven't figured out what the pattern is.

I get a similar error with another compiler (won't mention which one), which reports erroneous ',' when reading in the namelist. Its all a bit strange.
_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl


Last edited by davidb on Tue Nov 27, 2012 9:37 pm; edited 2 times in total
Back to top
View user's profile Send private message
brucebowler
Guest





PostPosted: Tue Nov 27, 2012 8:45 pm    Post subject: Reply with quote

I know my code fails in 6.0 and 6.3 (and I presume those in between) and worked in 5.x (I just don't recall which values of x :-)
Back to top
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 28, 2012 9:53 am    Post subject: Reply with quote

There was a bug that Martin reported as fixed and this appears to be the case on some operating systems. If you can provide a complete but short sample program together with details of your operating system then we can take another look at it.

David, could you verify that you are not accessing an old salflibc.dll.
Back to top
View user's profile Send private message AIM Address
brucebowler
Guest





PostPosted: Wed Nov 28, 2012 12:55 pm    Post subject: Reply with quote

See complete short example above. If that's not short enough, I'll try and make it shorter.

Win XP, service pack 3, 32bit. up to date with all windows patches etc as of yesterday. multi-processor "hardware" (it's really a VMware virtual machine)
Back to top
PaulLaidler
Site Admin


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

PostPosted: Wed Nov 28, 2012 4:00 pm    Post subject: Reply with quote

Your sample runs OK for me under Windows 7 and XP.
I have changed the names to include the e.
I thought that the fact that chlCoeffCount is declared as an array may be a problem but the program executes to the end either way.

I will check to see if the namelist bug fix was made after the last release.
Back to top
View user's profile Send private message AIM Address
davidb



Joined: 17 Jul 2009
Posts: 560
Location: UK

PostPosted: Wed Nov 28, 2012 7:14 pm    Post subject: Reply with quote

Hi Paul,

I am accessing the DLL that is in the install folder. The file version is 14.5.14.22. Date modified is 14/05/2012.

This is the short example I have the same problem with. I'm running Windows Vista 32bit and FTN95 6.3.

Code:

PROGRAM MAIN

   INTEGER MAXLINES, I
   PARAMETER(MAXLINES=5)
   CHARACTER*100 ASSOCIATE,PROGNAME,TITLE,ROWHEAD,LINE(MAXLINES)

   NAMELIST /MENUSLIST/ ASSOCIATE,PROGNAME,TITLE,ROWHEAD,LINE

   ! Set all character arrays to values
   ASSOCIATE = 'A'
   PROGNAME = 'B'
   TITLE = 'C'
   ROWHEAD = 'D'
   LINE = 'E'

   OPEN(99,FILE='MENUSFILE')
   WRITE(99,MENUSLIST)
   CLOSE(99)

   ! corrupt variables
   ASSOCIATE = 'X'
   PROGNAME = 'X'
   TITLE = 'X'
   ROWHEAD = 'X'
   LINE = 'X'
   
   ! Read file back in and print
   OPEN(99,FILE='MENUSFILE')
   READ(99,MENUSLIST)
   CLOSE(99)

   PRINT *,ASSOCIATE
   PRINT *,PROGNAME
   PRINT *,TITLE
   PRINT *,ROWHEAD
   DO I=1,MAXLINES
      PRINT *,LINE(I)
   END DO
END PROGRAM MAIN

_________________
Programmer in: Fortran 77/95/2003/2008, C, C++ (& OpenMP), java, Python, Perl


Last edited by davidb on Thu Nov 29, 2012 8:27 am; edited 1 time in total
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1899

PostPosted: Thu Nov 29, 2012 1:28 am    Post subject: Re: Reply with quote

DavidB's example (self-contained, write/read namelist) exhibits the problem on Windows 7 X64 SP1, as well, when FTN95 6.30 is used.
Back to top
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2923
Location: South Pole, Antarctica

PostPosted: Thu Nov 29, 2012 7:03 pm    Post subject: Reply with quote

And while fixing this, can additional option be made not to convert printed variables to capital letters? NowItKillsTheIdea_of_SelfExplanatoryCode
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 1, 2  Next
Page 1 of 2

 
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