JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for COMP-FORTRAN-90 Archives


COMP-FORTRAN-90 Archives

COMP-FORTRAN-90 Archives


COMP-FORTRAN-90@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

COMP-FORTRAN-90 Home

COMP-FORTRAN-90 Home

COMP-FORTRAN-90  1998

COMP-FORTRAN-90 1998

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: performances, again.....

From:

Ian Chivers <[log in to unmask]>

Reply-To:

Ian Chivers <[log in to unmask]>

Date:

Mon, 21 Sep 1998 17:27:48 +0100 (GDT)

Content-Type:

TEXT/PLAIN

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (143 lines)


On Mon, 21 Sep 1998 11:39:13 -0400 Peter Shenkin 
<[log in to unmask]> wrote:

> On Sep 21, 10:08am, Pierre Hugonnet wrote:
> > Subject: Re: performances, again.....
> > Dan Nagle wrote:
> > > My gripe with IBM's xlf compiler is that it's a great compiler, provided
> > > one writes a novel on the command line ... 
> ...
> > That's true that despite the novels on the command line, xlf is one
> > of the best f90 compilers, if we consider the balance between
> > performances (good), reliability (excellent: almost no bug),
> > and easy-to-use (the novels...)
> ...
> 
> I have also found xlf90 to be robust and reasonably efficient.
> 
> > The problem is not to find a good f90 compiler -I'm conviced that
> > they exist-, but rather to to be sure that the code you write
> > will be efficiently compiled on various machines with various
> > compilers, which is fundamental when working in heterogeneous
> > environment.
> 
> This will inevitably take time for F90.
> 
> ...
> > Wouldn't it be possible to introduce in the standard the concept
> > of "performance issue", by clearly saying that a given construction
> > is provided to make easier the code generation, but is not likely 
> > to be efficient (pointers vs arrays, assumed shape vs explicit
> > shape,...) ? 
> ...
> 
> I would be against this.  There are many constructs which will
> in fact be inefficient on many, most or all compilers, but
> which could in fact be efficient if the compilers went to the
> trouble to do a better job of optimization -- as they will
> be programmed to do, over time.
> 
> Books on F90 might profitably point such things out, however.
> 
> The problem still remains:  what about a construct which
> is optimized well on compiler X but not on compiler Y?  Should
> the user stick with the F90 subset that optimizes well on both?
> And then what if a member of this subset optimizes poorly on
> compiler Z, which the user has just decided to port to?
> 
> Finally, one thing that I've learned since beginning to use
> Fortran 90 is that though many things are gained, some are
> lost.  One is a rather close correspondence between what
> the user code looks like and what the compiled code is doing.
> I don't want to exaggerate the closeness of this correspondence
> in F77 -- which, like all computer languages, has its share
> of "gotchas" -- but F90 introduces many more.  
> 
> A simple statement like "A = B" may, especially with defined types,
> be hiding an extremely complex sequence of events.  The naive user
> of a library using these types is unlikely to be aware of this.  

i don't know if you can reconcile higher levels of abstraction
with efficiency and getting the end user to learn enough
to fully appreciate what is going on behind the scenes.

i have a pathological C++ example that i ask the students
to predict what will happen when the program executes. 
there are a small numbers of functions called that all
involve constructors being called behind the scenes.
there are no exact signature matches and predicting what will
happen is quite difficult.

> In F90, it is very easy to write code that looks simple but
> does very complicated things.  This is usually viewed
> as an advantage;  what's lost is that it's not obvious
> to the user that complicated things are being done

i agree but isn't that a problem with a black box - and we all
rely on them to some degree. i'm just as lazy as some of the
user community i critcise at  times.

;  there
> may be far more efficient ways of doing things.
> 
> Simple example:
> 
> 	REAL :: A( 100 ), B( 100 ), C( 100 )
> 	
> 	A = B + 2
> 	!!! intervening statements
> 	C = B * 3
> 
> Is the F90 compiler going to be smart enough to know when the 
> two implicit DO-loops can be fused?
> 
> How about if A, B and C are ALLOCATABLE (and are all ALLOCATEd
> to the same shape)?
> 
> The F77 programmer would naturally be looking for opportunities
> to carry out the two operations shown above in the same DO-loop;
> so if the F77 compiler doesn't know how to do loop fusion, it's
> not as big a deal;  but depending on what the intervening
> statments look like, it might be difficult for an F90 compiler
> to generate code as efficient as that which the F77 programmer would
> have written.
> 
> The worst F90 gotcha I've encountered in practice is the
> deceptively simple syntax for automatic arrays.  The problem is that
> if the implicit allocation request cannot be satisfied, there is
> nearly no way to reliably diagnose the problem from within
> the program and exit gracefully with an informative message;
> usually, a SEGV occurs, but a SEGV can also arise from other
> causes.  This is just awful.

maybe some of this will be addressed by newer texts. there is now a 
lot more hard evidence about f90. i liked the ideas of modules
having had to support modula 2, but had little idea what was going
to pan out in fortran 90 in practice. better education always helps.

also is some of the above quality of implementation? the
you asked for it your going to get it approach really makes
the language suffer. things surely could be better than a core dump?

rm core

is one of the first things i teach :-)

> 
> 	-P.
> 
> 
> -- 
> *** "Freedom's just another word for nothing left to lose." (B. Yeltsin)***
> *Peter Shenkin; Chemistry, Columbia U.; [log in to unmask] (212)854-5143*
> *MacroModel WWW page: http://www.columbia.edu/cu/chemistry/mmod/mmod.html *

----------------------
Ian Chivers
[log in to unmask]



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

December 2023
February 2023
November 2022
September 2022
February 2022
January 2022
June 2021
November 2020
September 2020
June 2020
May 2020
April 2020
December 2019
October 2019
September 2019
March 2019
February 2019
January 2019
November 2018
October 2018
September 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
December 2015
November 2015
October 2015
September 2015
August 2015
June 2015
April 2015
March 2015
January 2015
December 2014
November 2014
October 2014
August 2014
July 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
July 2013
June 2013
May 2013
April 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
August 2010
July 2010
June 2010
March 2010
February 2010
January 2010
December 2009
October 2009
August 2009
July 2009
June 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager