Re: [AMBER-Developers] Scalar vs. array mix-up in QMGB (fwd)

From: Scott Brozell <sbrozell.rci.rutgers.edu>
Date: Fri, 19 Feb 2010 21:01:34 -0500

Hi,

On Thu, Feb 11, 2010 at 04:47:32PM -0500, Ben Roberts wrote:
> Ross Walker wrote:
> >This should be perfectly legal and I am certain similar constructs are used
> >elsewhere in sander. This code looks perfectly legal to me but perhaps one
> >should check the standard to be sure. And see if there is a more 'correct'
> >way of accomplishing what is done here. Essentially providing an alias to
> >the middle of a large array as another array inside a subroutine.
>
> Apparently it does violate the standard. For example, see here:
>
> http://software.intel.com/en-us/blogs/2009/03/31/doctor-fortran-in-ive-come-here-for-an-argument/

Great find, Ben.
I added mention of that link to the wiki:
http://ambermd.org/pmwiki/index.php/Main/PointersAndAllocatables

In addition to being a good read, the article demonstrates that Fortran
is becoming more like C++ in the sense that compilers of these languages
are producing code that does things behind the scenes of which naive
programmers will be ignorant.

Scott


_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Feb 19 2010 - 18:30:02 PST
Custom Search