[Numpy-discussion] f2py with allocatable arrays

Casey W. Stark caseywstark@gmail....
Thu Jul 5 14:12:55 CDT 2012


Hi all.

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
and compilers.

Paul, I also stick with .f90 for everything.

Best,
Casey


On Tue, Jul 3, 2012 at 9:51 PM, Paul Anton Letnes <
paul.anton.letnes@gmail.com> wrote:

>
> 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..."
>
> http://fortranwiki.org/fortran/show/File+extensions
>
> 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.
>
> Paul
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120705/a13b909a/attachment.html 


More information about the NumPy-Discussion mailing list