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 

Optimiser bug

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Tue Aug 25, 2020 3:12 am    Post subject: Optimiser bug Reply with quote

The 8.64 compiler, when applied with /64 /opt to the test source (about 200 lines) at https://www.dropbox.com/s/u6fy00ypu3i8b65/ptbug.f90?dl=0 , prints out an incorrect result:

Code:
 Last day, indices where pop is .true. and R values /= 0
  (  1,  4)      (120,  4)      (  7, 12)      (104, 29)      (  8, 67)      ( 21,142)
  R(  1,  4) =  1,  R(120,  4) =  1,
 count(pop) =  4, sum(R) =  0  , (should be 6 and 2)
**** STOP: Please check for consistency


The line preceding the one with "STOP" should display:

Code:
 count(pop) =  6, sum(R) =  2  , (should be 6 and 2)


The program runs fine with /checkmate, /check and /debug. It runs fine even with /opt when a 32-bit program is built.

Since the program performs a random-walk, the output will probably not match the output when another compiler is used, since the sequence of random numbers from that compiler's runtime will be different.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Aug 25, 2020 10:23 am    Post subject: Reply with quote

mecej4

Thank you for the feedback. I can confirm that this program gives inconsistent results unless optimisation number 40 is inhibited.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Tue Aug 25, 2020 12:40 pm    Post subject: Reply with quote

Paul,

Thanks. Using /Inhibit_opt 40 also enables /opt /64 to be used with the larger application from which I obtained the reproducer.
Back to top
View user's profile Send private message
LitusSaxonicum



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

PostPosted: Tue Aug 25, 2020 4:41 pm    Post subject: Reply with quote

Just out of interest, what are the optimisations? Is there a list anywhere?

E
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Tue Aug 25, 2020 5:21 pm    Post subject: Reply with quote

There is a list but only for internal use. It is not comprehensive nor self explanatory.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



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

PostPosted: Tue Aug 25, 2020 6:11 pm    Post subject: Reply with quote

Hi Paul,

Yes, I already knew that. It was as gentle a push as I could make in the circumstances. I've stated my belief in the past that for many people, and for many purposes, FTN95 is adequately fast, and particularly so when there is a human interface to manage. I've certainly had peculiar things come up when I've used /opt, so much so that I never use it.

But I'd like to.

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



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

PostPosted: Tue Aug 25, 2020 11:02 pm    Post subject: Reply with quote

Quote:
There is a list but only for internal use. It is not comprehensive nor self explanatory.

shouldn't it be ?
isn't this a good example of where user input could be useful for the programmer - i.e. your good self Paul ?
_________________
''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
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Thu Aug 27, 2020 3:00 am    Post subject: Reply with quote

I would just like to say thank you to mecej4 and Paul,

Mecej4, thanks very much for finding and reporting all these /64 optimising bugs, and
Paul, thanks very much for your attention and prompt response to fixing these bugs as they are identified.

This is making FTN95 a better product.

I find it the best compiler for software development.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Aug 27, 2020 10:22 am    Post subject: Reply with quote

John

Thank you for the positive and encouraging feedback.
Back to top
View user's profile Send private message AIM Address
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Thu Aug 27, 2020 4:05 pm    Post subject: Reply with quote

John C.,

I appreciate your kind remarks.

Hats off to Paul, Robert and others at Silverfrost for their superb and prompt response to a large number of bug reports.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Sep 10, 2020 7:50 am    Post subject: Reply with quote

This failure has now been fixed for the next release of FTN95.

The failure related to the use of an ALLOCATABLE array which resulted in the optimiser extracting code from a DO loop that was not loop invariant.

I should also mention that inhibiting optimisation 40 was not a good fix as it takes out a whole raft of optimisations. The specific case was in fact optimisation 30.
Back to top
View user's profile Send private message AIM Address
John-Silver



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

PostPosted: Fri Sep 11, 2020 6:25 pm    Post subject: Reply with quote

... which would seel=m to be an even beter reason for having some clearer documentation about what each optimisation does ?
_________________
''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: Sat Sep 12, 2020 1:47 am    Post subject: Re: Reply with quote

JohnCampbell wrote:
I find it the best compiler for software development.

In one country and one of its largest research institutions many years ago even existed small but devoted club of fans of Salford, now Silverfrost, compilers. Every time we crossed somewhere the first question always was "Any new version of FTN77?". For us everyone who was not using FTN77 after we recommended it was like a non-recoverable dumbo or retard Smile. Time now shows they indeed were dumboretards
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 -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
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