[Numpy-discussion] f2py with allocatable arrays
Casey W. Stark
Thu Jul 5 14:12:55 CDT 2012
Thanks for the help again. I ended up going with running it twice -- once
for the final number of particles and second for the positions.
Sturla, given that this functionality is so standard dependent, I decided
to ditch it. It works with my gfortran, but who knows with other machines
Paul, I also stick with .f90 for everything.
On Tue, Jul 3, 2012 at 9:51 PM, Paul Anton Letnes <
> On 4. juli 2012, at 02:23, Sturla Molden wrote:
> > Den 03.07.2012 20:38, skrev Casey W. Stark:
> >> Sturla, this is valid Fortran, but I agree it might just be a bad
> >> idea. The Fortran 90/95 Explained book mentions this in the
> >> allocatable dummy arguments section and has an example using an array
> >> with allocatable, intent(out) in a subrountine. You can also see this
> >> in the PDF linked from
> >> http://fortranwiki.org/fortran/show/Allocatable+enhancements.
> > Ok, so it's valid Fortran 2003. I never came any longer than to Fortran
> > 95 :-) Make sure any Fortran code using this have the extension .f03 --
> > not .f95 or .f90 -- or it might crash horribly.
> To be pedantic: to my knowledge, the common convention is .f for fixed and
> .f for free form source code. As is stated in the link, "..the Fortran
> standard itself does not define any extension..."
> As one example, ifort doesn't even want to read files with the .f95
> suffix. You'll have to pass it a flag stating that "yep, that's a fortran
> file all right".
> I use the .f90 suffix everywhere, but maybe that's just me.
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion