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 

FTN95 beta testing
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1875
Location: Yateley, Hants, UK

PostPosted: Wed Aug 15, 2018 9:54 am    Post subject: Reply with quote

JC,

If you have an internal null data set at program initialisation, then you need to input all the data values before you can do a meaningful analysis, but if you launch your program with a data set that is internally complete, then you can (subject to what you do with the data values) update them one at a time.

In a Clearwin+ / Windows context, this is the difference between (say) ‘File | New’ and ‘File | New from template’.

In the former, you might present the user with a set of input boxes asking for ‘Number of elements’, ‘Number of nodes’, ‘Number of supports’, ‘Number of loads’ etc, then get the coordinates and connections – in other words, step through your traditional text file input. You will find doing the file in Excel far more effective than that. You don’t need NAMELIST.

The alternative approach (which I use) is to go for the ‘New from template’ approach. In a finite element context, it might start with a single element, with 2 support nodes and the third with a load on it, already supplied with a constitutive law and material properties. You could analyse that, and get an answer, although not very useful, I admit. Then, your user can add to it, maybe stretching and distorting that first element, then adding lines of elements (or areas that the program infills with a mesh), at all times keeping a dataset internally that is fully valid.

If there is only a small set of changes that the user can make, they are selected with appropriate mouse clicks, possibly with SHIFT, CTRL or ALT key modifiers. If there is a bigger set of editing options, the user must select each from a palette of options – in my case, one that pops up with a double click – but which can be on a toolbar. If you save such a dataset, there is no need to use NAMELIST, but you can, of course, because as the programmer you do know what the variable names are. However, it does make ‘File | Open’ and ‘File | Save’ (or ‘Save As’) callbacks far more complicated. I use formatted output, and unformatted input, when saving or opening such files.
The big advantage of the ‘New from template’ approach is that you never need to test your dataset for completeness.

My main interest is not FE analysis any more (it has been in the past) but I still dabble. I’m working (intermittently) on a system of creating closed polygons that the program fills with elements and nodes via a mesh generator.

For me, NAMELIST is, and always has been, a facility that I can see might have attractions to someone, although that someone is not me.

Eddie

PS. You can always fill your initial internal dataset with values that scream 'I am not defined'.
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1024

PostPosted: Wed Aug 15, 2018 11:29 am    Post subject: Reply with quote

NAMELIST is for formatted character mode I/O, and has been part of Fortran since Fortran IV. It is probably not useful in a GUI program or for programs that produce graphical output.

NAMELIST is appropriate when the programmer writes a tight and precise specification for the input to the program, and expects the users of the program to follow that specification. If the user's input is incorrect, eventually there may be an error message issued to say so, or the results output by the program may be wrong, but detecting such errors is the user's responsibility.

I am also a very infrequent user of NAMELIST. One situation where I have found it helpful: if a program that I am debugging has a large number of local variables, and I suspect that some of those are getting changed even when I did not expect them to change, I can put a selection of those into a NAMELIST, and add WRITE(*,NML=<namelist>) at a number of places. Or, if the compiler's symbolic debugger supports displaying the values of NAMELIST members, I can use that facility instead of WRITE.

Here are two examples of packages that use NAMELIST:

http://jules-lsm.github.io/vn4.2/namelists/contents.html

http://www.tampa.phys.ucl.ac.uk/rmat/
Back to top
View user's profile Send private message
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 1875
Location: Yateley, Hants, UK

PostPosted: Thu Aug 16, 2018 12:17 am    Post subject: Reply with quote

mecej4,

Yep, I think that NAMELIST may even have been in my now long-lost copy of McCracken's book. It turned out to be one of those facilities not always available (especially in 'subset' compilers like the IBM1130 or early MS Fortran on the PC), and therefore something to be avoided if one wanted to ensure programs worked on a variety of machines. It therefore fell outside my personal 'safe subset' of any breed of Fortran. After nearly 50 years of never finding a use for it, I suppose that I never will ...

Eddie
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 959
Location: Aerospace Valley

PostPosted: Fri Aug 17, 2018 2:42 am    Post subject: Reply with quote

Topic: Status of the SRC.exe Problem ?

Paul,
what's the status with looking into this problem with SRC.exe ? (ref. p.2 towards 18th July when mecej4 confirmed what I had been experiencing ?)

Any luck in finding the cause in the last month ?

It's a bit disconcering finding documented examples which won't run.
_________________
''Computers are incredibly rigid. They question nothing. Especialy input data.Human beings are incredibly trusting of computers and don't check input data. Together they are capable of cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Fri Aug 17, 2018 6:58 am    Post subject: Reply with quote

John

I think that you have misunderstood mecej4's comment. He can reproduce your problem by hiding SRC in some way (for example by changing its name).

I guess I could confirm this but otherwise it works OK for me.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 959
Location: Aerospace Valley

PostPosted: Sat Aug 18, 2018 11:02 pm    Post subject: Reply with quote

Paul,
I understood mecej4's post ok. It just proved the stage I'd got to.

So, let me be more precise.
The 'whittled down' problem involves runningjust SRC with a single icon definition in the RESOURCES FILE.

The RESOURCESredOnly.RC file contains ....

Quote:
RESOURCES
Red ICON RED.ICO


And when I run I have this (directory listing included so you can see that both SRC and the RESOURCES file and the ICON file exist.

I ran this in the FTN95 installation directory.
Quote:

14/03/2018 08:05 5,965 readme.txt
05/11/1999 14:26 766 RED.ICO
25/04/2018 19:48 <DIR> redist
03/07/2018 22:04 594 RESOURCES.RC
18/08/2018 23:33 35 RESOURCESredOnly.RC
30/06/2018 12:30 2,529,280 salflibc.dll
30/06/2018 12:30 3,081,756 salflibc.lib
30/06/2018 12:31 479,232 salflibc64.dll
13/03/2018 08:30 2,562 salflibc64.lib
06/01/2017 09:25 212,805 scc.chm
13/03/2018 21:37 1,221,632 scc.exe
13/03/2018 21:38 80,896 sdbg.exe
11/03/2018 10:41 1,447,424 sdbg64.exe
13/03/2018 21:38 513,536 sdbgdll.dll
21/02/2018 09:47 9,421,824 simdem32.dll
21/02/2018 09:57 10,382,848 simdem64.dll
09/10/1998 16:15 974,336 SIMPLE.DLL
13/03/2018 21:39 47,616 slim.exe
13/03/2018 21:39 222,208 slink.exe
13/03/2018 21:38 62,464 Slink64.exe
25/04/2018 19:48 <DIR> source64
13/03/2018 21:37 1,221,632 src.exe
25/04/2018 19:48 177,611 unins000.dat
25/04/2018 19:42 733,410 unins000.exe
13/03/2018 21:38 80,896 wsdbg.exe
41 File(s) 50,308,506 bytes
18 Dir(s) 22,010,978,304 bytes free

C:\Program Files (x86)\Silverfrost\FTN95>src.exe RESOURCESredOnly.RC
[Silverfrost SRC/WIN32 Ver 4.07 Copyright (c) Silverfrost Ltd 2018]
0002 Red ICON RED.ICO
*** Unable to open file ICON
1 ERRORS [<RESOURCESREDONLYSRC/WIN32 Ver 4.07]
*** Compilation failed

C:\Program Files (x86)\Silverfrost\FTN95>


It seems to be trying to open a file called ICON ? i.e. interpreting the 'ICON' keyword as a filename ?
So I'm flummoxed.
The error is within SRC.exe which seems to be aprsing the RESOURCE file incorrectly for some reason ???

I double checked and there's no ICON file anywhere in the download of the beta279 .

Remember, I'm using the beta279 update on top of v8.3 PE
_________________
''Computers are incredibly rigid. They question nothing. Especialy input data.Human beings are incredibly trusting of computers and don't check input data. Together they are capable of cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1024

PostPosted: Sun Aug 19, 2018 12:40 am    Post subject: Reply with quote

John S.: If you remove the line containing "RESOURCES" from the *.RC file before running SRC on it, things will work fine. This line is probably a label that is used by the compiler to separate the resource declarations from the preceding Fortran source lines.
Back to top
View user's profile Send private message
John-Silver



Joined: 30 Jul 2013
Posts: 959
Location: Aerospace Valley

PostPosted: Sun Aug 19, 2018 4:22 pm    Post subject: Reply with quote

Thanks mecej4 !

I'd already folled your advice regarding that on 4th July after your comment on 3rd July , but then when I created the last single resource file I dif it from the original and left the 'RESOURCES' key-line in.

Anyway, that now runs OK in the ftn95 install directory.

However, if I go back to my 'working direcory' and try the same it doesn't !

Here's what I get .....



so you can see firstly that src is found (issuing just the command 'src' gives error that no input file is specified.
But then repeating the command now working ok in ftn95 directory FAILS with the access violation.

I'm now stumped.

btw, adding /r to the commnd produces the same.
_________________
''Computers are incredibly rigid. They question nothing. Especialy input data.Human beings are incredibly trusting of computers and don't check input data. Together they are capable of cocking up even the simplest calculation ... Smile "
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 -> General All times are GMT + 1 Hour
Goto page Previous  1, 2, 3
Page 3 of 3

 
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