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 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
DanRRight



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

PostPosted: Tue Jul 02, 2019 10:57 am    Post subject: Not Clear diagnostics Reply with quote

Usually spending hell of time to decipher where is my error due to such diagnostics. Would it be possible for compiler to tell exactly what's wrong - which variable is bad ? The one like below was acceptable when the cars were not self-driving Smile))

Code:
 i=winio@(' Angle, delta %30^sl %10`rf %30^sl %10`rf %ff&', &
 Slider_Angle,      0d0, 180.01d0, PrepDataForSlider_f_E, Angle_f_E,&
 Slider_AngleDelta, 0d0,  90.01d0, PrepDataForSlider_f_E, AngleDelta_f_E)

*** Error 1221: WINIO@ cannot process REAL(KIND=1) arguments, only CHARACTER,
    INTEGER(3), INTEGER(4) or REAL(2)

*** Error 1221: WINIO@ cannot process REAL(KIND=1) arguments, only CHARACTER,
    INTEGER(3), INTEGER(4) or REAL(2)
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Tue Jul 02, 2019 11:58 am    Post subject: Reply with quote

In similar situations, where it is not clear which variable has an improper type and causes the compiler to issue an error message but without the name of the variable that is responsible for the error, we can specify /xref and look at the types in the cross-reference listing.

I tried this code based on your report:
Code:
program drw
implicit none
integer i
real Angle_f_E  ! not suitable as argument to WINIO@
double precision Slider_Angle, PrepDataForSlider_f_E,AngleDelta_f_E, Slider_AngleDelta
!
i=winio@(' Angle, delta %30^sl %10`rf %30^sl %10`rf %ff&', &
   Slider_Angle,      0d0, 180.01d0, PrepDataForSlider_f_E, Angle_f_E,&
   Slider_AngleDelta, 0d0,  90.01d0, PrepDataForSlider_f_E, AngleDelta_f_E)
end program

The 8.51 compiler produced a zero-length file for the cross-reference list.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Tue Jul 02, 2019 5:38 pm    Post subject: Reply with quote

I am making so many typos and errors per day that usually avoid any xref or lis or any other additional files besides the standard output of diagnostics because afraid to break my head in these additional kilometer long files. The standard compilation output warning and comment output is also hell long but there it is possible to search for the pattern *** and this is the only i can afford doing 200 times per day Smile

BTW, in my case all variables were real*8. The final place for error was in not declaring
integer, external:: PrepDataForSlider_f_E.

Compiler kept mum about this and that caused me to lose an hour swearing on myself and a devilry Smile

Compiler diagnostics should be much more specific and more verbose in explaining errors. We are living in the times when computers with artificial intelligence overcome humans, why they can not find such easy for them errors for themselves?


Last edited by DanRRight on Wed Jul 03, 2019 4:10 am; edited 2 times in total
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Wed Jul 03, 2019 12:27 am    Post subject: Reply with quote

Mecej4 ...

The 8.51 compiler ?

where did that materialise from ?
_________________
''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
John-Silver



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

PostPosted: Wed Jul 03, 2019 12:29 am    Post subject: Reply with quote

Quote:
Compiler diagnostics should be much more specific and more verbose in explaining errors.

Agreed 100%

Quote:
We are living in the times when computers with artificial intelligence overcome humans

Not a chance ! computers with articiììficial intelligence are only as good as the human programming them ! (same goes for all programs actually Smile
_________________
''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
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Jul 03, 2019 3:45 am    Post subject: Re: Reply with quote

John-Silver wrote:
Mecej4 ...

The 8.51 compiler ?

where did that materialise from ?


See Paul's post of Fri May 31, 2019, http://forums.silverfrost.com/viewtopic.php?t=3999 .
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Wed Jul 03, 2019 3:46 am    Post subject: Re: Reply with quote

Duplicate, please DELETE!

Last edited by mecej4 on Wed Jul 03, 2019 8:00 am; edited 1 time in total
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Wed Jul 03, 2019 4:27 am    Post subject: Re: Reply with quote

[quote="John-Silver"]
Quote:
Not a chance ! computers with articiììficial intelligence are only as good as the human programming them ! (same goes for all programs actually Smile


We program into computer models so complex things that we can not find the solutions by ourselves. Computers can follow simultaneously 1000 things, we humans barely 1, 2 or 3. The most of human activity is usually just to choose one way which we think is optimal among several possible variants. Like one your guy ones said "Americans are always eventually doing things right way... after exhausting all other possibilities" Smile)) Not just Americans, obviously.

Computers can do optimization work much faster and take larger sample base. Generally we lose even to a fish or simple fly: the fly is smarter to escape than any human initially think, and it takes time before we really learn how to kill a fly (even then we lose in score win-lose ). Do you think 99% of people do way different things than simple ant is doing? Robots can substitute most of their activity in the life easily

Quantum mechanics theory for example was found by simple random try process to find the mathematical formulas which fit the experiment. We completely lost understanding of things at this moment, we can only find appropriate mathematics which fits the life. That what now is called "understanding". Robots will be able to do this even better. Not even mentioning again the solution of complex things we are barely capable of on very simplified models. That all means end of humans
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Wed Jul 03, 2019 9:12 am    Post subject: Reply with quote

In future these error messages for winio@ will take the form

Code:
error 140 - WINIO@ cannot process REAL(KIND=1) argument XMAX, only CHARACTER, INTEGER(3) or REAL(2)


for a REAL(1) variable XMAX.

For an invalid constant it will give the number of the argument.
Back to top
View user's profile Send private message AIM Address
John-Silver



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

PostPosted: Wed Jul 03, 2019 5:12 pm    Post subject: Reply with quote

Paul
'for argument XMAX' would be even better Smile



mecej4
- thanks very much for the pointer to v8.51 updated dlls
_________________
''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
John-Silver



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

PostPosted: Wed Jul 03, 2019 6:28 pm    Post subject: Reply with quote

Dan,
+I'm with you all the way regqrding robotidìcs, after all what could possibly go wrong ? Smile
_________________
''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: 2813
Location: South Pole, Antarctica

PostPosted: Wed Jul 03, 2019 10:43 pm    Post subject: Re: Reply with quote

PaulLaidler wrote:
In future these error messages for winio@ will take the form
Code:
error 140 - WINIO@ cannot process REAL(KIND=1) argument XMAX, only CHARACTER, INTEGER(3) or REAL(2)
for a REAL(1) variable XMAX.
For an invalid constant it will give the number of the argument.

Nice addition. So now wrong variable will be called by name explicitly together with its position, like "argument #21 in continuation @143 ? That would be great. I think almost all winio@ code should be compiled with the switch /full_debug even if the entire fortran source is compiled /nodebug /nocheck /optimize because nobody cares how superfast windows are popping into face. Much more important that GUI will diagnose itself fully when problems occur. Clearwin is not a standard Fortran and people forget its rules easily, or even did not even know at all, and almost definitely do not understand how its magic works.

And also how about real source of this error in my code (missing function, or not declaring it as integer, external) if none of the real*8 violations would be found? Would it be possible to have diagnostics like "Declaration of the function PrepDataForSlider_f_E as integer, external is missing?"

One more suggestion - Error diagnostics should not mention Integer where there is no integers, and REAL, where is no specific reals. Also i still mix up in my head all the KINDs of this Fortran, KIND(1), KIND(3), KIND(7)... the naming scheme made by Standard is an absurd made to make Fortran to die slowly and painfully among engineering and even scientific crowd. May be a hint has to be made to name KINDs more bytes-specific. Computers are smart and can do that. People by great majority are stupid or at least for sure lazy and have great inertia.

For the FTN95, the best diagnostics compiler (but too laconic and cryptic on that) offering user friendly deep (a la "Level 3") diagnostics is just some minor cosmetic change. This is not of any priority of course, just the suggestion for the potential distant goal. I'd personally see the Polyhedron tests speedup first
Back to top
View user's profile Send private message
John-Silver



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

PostPosted: Thu Jul 04, 2019 8:52 am    Post subject: Reply with quote

Of course, all program have their error reporting foibles and indeed bugs.
I once witnessed a group of people waste a week 'investigating' a NASTRAN error.
There was a messag pointing to a particular degree of freedom in the model as the source of the problem.
After 4 days I suggested they look in the NASTRAN Error List (sadly not what it once was) and presto ! they found an error saying theìat the particular error message they had had a bug and the degree of freedon flagged was not the correct one !!!
Boy were they happy bunnies when they found out !

The point is .e deleted from the list when fixed ! .... there should be both a list of the error messages given by the compiler, with, in the case where the error message is not specific enough, some comments about possible reasons (which could be added to as and when anomalies are found.

All progams ahould also have a current bug list, with dte added when they are fixed.
The bugs should NOT be removed from the list when they are fixed !!! Someone with a different machine, or OS at some later date will surely come across the same bug , evn though it as thought to be fixed ! Such are the foibles of OS's and the natural limitations off the human bug-fixer to consider all possible possibilities.
_________________
''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
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Jul 04, 2019 4:00 pm    Post subject: Re: Reply with quote

DanRRight wrote:
...
One more suggestion - Error diagnostics should not mention Integer where there is no integers, and REAL, where is no specific reals.

If you did not put in IMPLICIT NONE, either as a statement or a compiler option, Fortran implicit type rules were in force. The argument PrepDataForSlider_f_E has the implicit type REAL, so the compiler is correct to mention "REAL" as the incorrect type for an argument that had to be integer -- indeed, the behaviour that we expect from the compiler.
Back to top
View user's profile Send private message
DanRRight



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

PostPosted: Thu Jul 04, 2019 10:55 pm    Post subject: Reply with quote

In our specific case compiler was simply too lazy. In "...%30^sl..." compiler knows for sure what ^ means. It means here is expected not a variable but a function. Despite of that it did not check if something where it should be placed a function was declared as a function. Functions for winio always have to be declared, here no freedom is given like avoiding using implicit none.
And by the way for more general case the compiler also knows if "implicit none" was declared or not. If not it can give more precise diagnostics about expected reals and integers just by first letter. So, here we return to our forgotten sheep: don't use implicit none! 😁
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 1, 2, 3, 4, 5, 6, 7, 8  Next
Page 1 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