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 

Not Clear diagnostics
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
John-Silver



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

PostPosted: Wed Sep 25, 2019 11:15 pm    Post subject: Reply with quote

n the subject of confusing/mistyping o-0 or l-1, etc ..... we had a discussion quite recently about the philosophy of whether the program/compiler should be allowed to run through completely or stop at every (certain) error messages.
In that context what would be extremely useful would be a pre-compiler module which would simply scan for and print out all variable names, in tabular format in alhabetical order, and from which the user could very quickl scan through and identify such subtle errors, as 2 different variables would be listed.being

I'm sure that there could quickly appear other suggestions for candidates for such a 'run through' error checking module the key point being WITH USER-FRIENDLY OUTPUT !

I remember Dan has previously on other posts made the point about the tediousness, not to mention the eror-proneness of hving to scan through acres of output where error messages are repeated in full multiple times, and I myself got so fed up with missing errors in NASTRAN output that I wrote a program to process the output file and seperate out the various error message types and print thm in seperate files. Easily tone of the best time-saving steps I ever did !
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... Smile "
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Sun Oct 06, 2019 4:15 pm    Post subject: Reply with quote

I have three cases to report as possible problem or a bug but have no time to extract that from the code. So here is simplest one.

More examples of not clear diagnostics. It is not related to Clearwin. If you forget to allocate an array you will get this confusing message
Code:
Run time error 420 Reference through NULL fortran POINTER


There are no pointers in the program. Could this be resolved with more relevant message?
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Sun Oct 06, 2019 4:48 pm    Post subject: Reply with quote

Dan,

What do you mean by 'lazy allocation'?

Eddie
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Mon Oct 07, 2019 12:11 am    Post subject: Reply with quote

It was hard for me to write the words above (in the thread General about zeroising allocated arrays) suggesting to kill lazy allocation if it is not killed already.

Lazy allocation was the genial trick of this compiler which i still think saved my scientific life and made my codes over jump probably all other codes in the world by ages, even made by national labs with their infinite resources, and implement unbelievable features at the times when "640k was enough for everyone".

This feature allowed to claim as used memory only those memory cells of the formally unimaginable 1 gigabytes size matrices ( in 1990 RAM sizes of PC were 1-2 MB) which were actually used. That means in the sparse matrices only allocated at the run time elements used tiny RAM of personal computers.

I remember i tried to compile my codes in other compilers and after half an hour compilation they were creating 350MB file while commonly we had only 1MB of RAM. Many supercomputers used just 250MB at that time. That was like a spit into your face! FTN77 though in seconds created tiny file and ran the code no one believed it is actually running.

And then finally with huge difficulties i got time on Cray supercomputers. Joke was that i was getting 1 hour per day while it was only 3 times faster than my FTN77 on a PC. Plus the diagnostics of their Fortran compilers was so terrible that i laughed in disbelief.

I remember i wrote to Salford a letter suggesting them to write compiler for supercomputers. I invited them to visit our place which was #1 in the world in computational resources having all 5 top places in the "top 500 supercomputers" list there. I was sure their compiler would kill all others. But got no respond. Now China will only invite them Smile. I said byebye to supercomputers for a long time (just until few years ago). And then all other people my colleagues abandoned them in favor of PC or MAC.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue Oct 08, 2019 1:11 am    Post subject: Reply with quote

The code
Code:
i = winio@ ('%^bt[OK]&',
    'Exit')

Gave error
Code:
*** Error 58: Unpaired right bracket(s)

which is correct given just fixed right-left wording but more relevant error is missing continuation symbol & at the end of first line
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Oct 08, 2019 7:36 am    Post subject: Reply with quote

Yes an "unpaired left bracket" report could occasionally be the result of a missing trailing ampersand. But would this rare mistake justify changing the report to "unpaired left bracket or missing trailing ampersand"?
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue Oct 08, 2019 8:19 pm    Post subject: Reply with quote

If there are 20 lines of continuation and 100 brackets in one line then sure yes
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Tue Oct 08, 2019 8:36 pm    Post subject: Reply with quote

Dan,

If you program in that style, then you should expect His Satanic Majesty to occupy that particular tract of the underworld.

Especially when you could, instead, write a single line 1000 characters long!!!

Eddie
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue Oct 08, 2019 11:10 pm    Post subject: Reply with quote

We see the trend that compilers become more and more capable and precise. So that we humans will be able continue to do more and more stupid things and not get caught.
The most crazy programming style i saw was HTML file 40 KB in size all written in one single line. I am still far from that
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2144
Location: Sydney

PostPosted: Wed Oct 09, 2019 9:11 am    Post subject: Reply with quote

Paul,

Regarding "unpaired left bracket" report, I could imagine that gFortran would report the line of code and also place a "1" under that unpaired left bracket, not that I am familiar with this message in gFortran.

Could it be possible for FTN95 to provide an indicator of the position of the offending line of code and the position of this lonely bracket ?
For the case of Dan's 100's of continuation lines, it would also be important to identify the correct line of code. (Often the line number is the start of the continuation, rather than the line in the 100's of lines.)

The other related type of error that I have found confusing is when I omit an END IF or END DO in a multi-level IF or DO coding, the reporting is not always clear. Could the report identify the IF or DO level where the problem was identified or the range of lines associated with this DO or IF structure. (This could be identified by BOTH the line where the IF started and the line where it was identified it was not terminated.)
Often, I have coded with my informative (to me) indents, but they are not recognisable to the compiler. It becomes difficult to identify the mistake as the code looks clearly set out!
Could the .lis report annotate DO or IF by there start and end levels ?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Oct 09, 2019 11:06 am    Post subject: Reply with quote

John

FTN95 starts by taking out all redundant white space so the column positions are not available when the error is reported. In theory the files could be revisited to do the matching but the information is not immediately available..
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Oct 09, 2019 3:46 pm    Post subject: Reply with quote

Adding that will be great. I even did not miss enddo and still suffering in my damn spaghetti code which abruptly reached unmanageable state! Sad
As to showing unmatched bracket additionally - adding that would be also very cool.

By the way I still did not find matching enddo in my source code I mentioned few days back. When I start searching for this enddo again, it hurts my brain quickly. That was the cost for not marking and commenting enddos for easy search done clearly in the hurry. Downloaded Notepad++ but it does not mark matching do/enddos, only if/endifs. Will try Plato next
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 654
Location: Morrison, CO, USA

PostPosted: Wed Oct 09, 2019 11:39 pm    Post subject: Reply with quote

I use a text editor called EditPad (I have the Pro version). It has a way of looking at your FORTRAN code, highlighting keywords, matching parentheses across continuation lines, etc. I find it very useful.Personally, I'm bad about miscounting parens.

DO and END DO are in bold, making them easier to find. Same for SELECT CASE and END SELECT, as well as each CASE() construct, and others.

The editor itself has a lot of other features, like comparing two (or more) files for differences, making a selected region UPPERCASE, split screen in a file, two active copies of the editor, etc.

Worth a look at if, as I do, you spend a lot of time in the text editor!
https://www.editpadlite.com/
Back to top
View user's profile Send private message Visit poster's website
LitusSaxonicum



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

PostPosted: Thu Oct 10, 2019 4:19 pm    Post subject: Reply with quote

Dan,

I went all the way back to page 1 to see how you started the topic.

The best advice I can possibly give you is to shorten your WINIO@ format strings, and only have one format code that requires multiple parameters or a callback at a time.

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



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

PostPosted: Sun Oct 13, 2019 12:35 am    Post subject: Reply with quote

another editor option is TextPad , to be found here:
https://www.textpad.com/products/textpad/index.html
_________________
''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together 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 -> ClearWin+ All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 7 of 8

 
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