Yinan-Scott-Shi / fds-smv

Automatically exported from code.google.com/p/fds-smv
0 stars 0 forks source link

Request for change of EXIT namelist in evac.f90 #754

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please complete the following lines...

Application Version: All versions
SVN Revision Number: N/A
Compile Date: All versions
Operating System: N/A

Describe details of the issue below:

Currently there is a namelist group called EXIT in the evac.f90 group.  
While this is ok when using the intel compilers, there are a variety of 
other compilers (gnu and gfortran for example) that do not allow this 
namelist, as there is an EXIT command that conflicts with it.

Rather than trying to get all the various compilers to change, or having 
the users change this at each compile, it would be a big help if the EXIT 
namelist could be changed to something else, for instance EXXT.

Thanks!

Jamie

Original issue reported on code.google.com by jamie.l...@gmail.com on 22 May 2009 at 12:28

GoogleCodeExporter commented 9 years ago
I'll ask Timo about this. The question is whether it will cause too much 
confusion 
for those  using FDS+Evac. Has anyone reported this as a bug to the Gnu 
compiler 
developers? As far as we know, FDS is conforming to the Fortran 95 standard 
except 
for the "getarg" call to read the command line input.

Original comment by mcgra...@gmail.com on 22 May 2009 at 9:19

GoogleCodeExporter commented 9 years ago
Well, I more or less like "EXIT" in the user input for FDS+Evac. I'm not going 
to
change this right now, but perhaps in later major release of FDS+Evac I could 
just
use a namelist "DOOR" for all kind of doors. I guess that I should stick with 
four
letter word for the namelists, this seems to be the way all other namelists are 
named
in FDS. Is there any other English word for exit doors, which I could use? But 
as
said, the change (if it will happen) will be in the next major release, because 
then
I could say that the old input files will not work anymore.

TimoK

Original comment by tkorh...@gmail.com on 25 May 2009 at 7:43

GoogleCodeExporter commented 9 years ago
Thanks for giving it your consideration Timo.  I can see why you would want to 
stick 
with EXIT, but a small subset of us users would appreciate it if you decide to 
change it in the next major release!  I think DOOR would be nice, but I'll try 
to 
think up some other 4-letter words that might work...although none as good as 
DOOR 
or EXIT come to mind at the moment.

I have not yet reported this as a bug to the Gnu compiler developers.  However, 
I 
suspect that even if I can get them to fix it (I will try), the issue will 
continue 
to pop up with many other compilers.  While the use of EXIT may be compliant 
with 
standards, I see it as more of a coding best practice rule to avoid variables 
named 
the same as existing functions/routines/objects.  Sort of like having spaces in 
file 
names, which is usually ok in windows, but is still a good way to break 
programs 
based in other operating systems.

Whether you implement it or not, I appreciate the quick response and your 
consideration!

Original comment by jamie.l...@gmail.com on 26 May 2009 at 11:44

GoogleCodeExporter commented 9 years ago
This is not going to be in FDS version 5.4.0.

TimoK

Original comment by tkorh...@gmail.com on 17 Jun 2009 at 7:29

GoogleCodeExporter commented 9 years ago
So, I'm not changing the EXIT namelists until FDS 6.0. (Added 
"Milestone-FDS_6.0 to
the labels of this issue.) For the next major version I could make quite much 
changes
to the inputs, but not for the minor releases.

TimoK

Original comment by tkorh...@gmail.com on 4 Aug 2009 at 9:14

GoogleCodeExporter commented 9 years ago
Check also the discussion group "Need help to compile FDS ".
https://groups.google.com/group/fds-smv/browse_thread/thread/f4eea3182722fe8b#

I found that:

The new lines are like:

       INPUT_COUNT: DO
            IF (EDV%N_INPUTS==40) THEN
               EXIT INPUT_COUNT
            END IF
            IF (INPUT_ID(EDV%N_INPUTS+1)=='null') THEN
               EXIT INPUT_COUNT
            END IF
            EDV%N_INPUTS  = EDV%N_INPUTS + 1

And the old ones used to be:

       INPUT_COUNT: DO
            IF (EDV%N_INPUTS==40) EXIT INPUT_COUNT
            IF (INPUT_ID(EDV%N_INPUTS+1)=='null') EXIT INPUT_COUNT
            EDV%N_INPUTS  = EDV%N_INPUTS + 1

So, this is really a compiler bug (or feature...). Why the
branched version of the IF works, and the non-branched one not? 

So, I made this change to that loop, other loops might have
similar stuff. This might help for some compilers, but perhaps
not for all. I'll check the other loop right now and do that
modification if needed. Hope that this helps with your compiler.

TimoK

Original comment by tkorh...@gmail.com on 5 Nov 2010 at 9:04

GoogleCodeExporter commented 9 years ago
This is not going to fix totally. I hope that the 
compilers get better. But if one is compiling and
the compiler does not like EXIT namelist, then it
is easy to change these in the source code.

Maybe in some point I'll "clean up" the user input
and change the keywords, but not now.

TimoK

Original comment by tkorh...@gmail.com on 24 Mar 2011 at 3:25