Re: [f2py] f2py-users Digest, Vol 61, Issue 1

Pearu Peterson <[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
If you had numpy and installed f2py2e, then the f2py script
from numpy might be overwritten by the f2py script from f2py2e.
To resolve this issue, the simplest way would be to remove f2py2e
and re-install numpy (so that you'll get f2py script from numpy).

If you are planning to wrap Fortran codes, then yes, you'll need
Fortran compiler.

Running f2py shows whether everything is correctly installed.
For successful installation, running f2py should show usage
message. At the end of the message, you should see the versions
of f2py and numpy. For example,
...
Version:     2_6882
numpy Version: 1.5.0.dev6882

If you get an error or no numpy version is displayed, then
goto to the first step (uninstall f2py2e, install numpy).
Let me know if it does not help.

HTH,
Pearu

isabel puchoc wrote:
> thank, well I already had numpy , well Do I need to install fortran for
> use f2py?,another question I have numpy How do I know if I have f2py? in
> a webpage I found this
> 
> RUN f2py
> 
> that is neccesary or no?, remember I have numpy
> 
> 2010/3/1 <f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]
> <mailto:f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]>>
> 
>     Send f2py-users mailing list submissions to
>            f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
> 
>     To subscribe or unsubscribe via the World Wide Web, visit
>            http://cens.ioc.ee/mailman/listinfo/f2py-users
>     or, via email, send a message with subject or body 'help' to
>            f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]>
> 
>     You can reach the person managing the list at
>            f2py-users-owner-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:f2py-users-owner-Y4l6ocDipWCuvFJfX82//[email protected]>
> 
>     When replying, please edit your Subject line so it is more specific
>     than "Re: Contents of f2py-users digest..."
> 
> 
>     Today's Topics:
> 
>       1. hi i need your help (isabel puchoc)
>       2. Re: f2py-users Digest, Vol 60, Issue 3 (pavanakumar mohanamuraly)
>       3. Re: hi i need your help (Pearu Peterson)
> 
> 
>     ----------------------------------------------------------------------
> 
>     Message: 1
>     Date: Sun, 28 Feb 2010 20:44:59 -0500
>     From: isabel puchoc <[email protected]
>     <mailto:[email protected]>>
>     Subject: [f2py] hi i need your help
>     To: f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
>     Message-ID:
>            <8d1a19a11002281744m62f02891tb53e5242c5589049-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
>     <mailto:8d1a19a11002281744m62f02891tb53e5242c5589049-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>>
>     Content-Type: text/plain; charset="iso-8859-1"
> 
>     hi, well i want to knok if you can hel me because I have a problem I
>     can't
>     install f2py, well the things is this one, i want to compile
>     laplace.py and
>     for that i need f2py, because when i compile laplace.py i have a
>     error, that
>     erro say: you need build flaplace and that is in f2py when i install
>     sudo
>     aptitude install f2py  i don't have any error , but when i want to
>     prove, I
>     have this
> 
>     isabel@isabel-laptop:~$ f2py
>     Traceback (most recent call last):
>      File "/usr/local/bin/f2py", line 3, in <module>
>        import f2py2e
>      File "/usr/local/lib/python2.6/dist-packages/f2py2e/__init__.py",
>     line 10,
>     in <module>
>        import f2py2e
>      File "/usr/local/lib/python2.6/dist-packages/f2py2e/f2py2e.py",
>     line 26,
>     in <module>
>        import crackfortran
>      File
>     "/usr/local/lib/python2.6/dist-packages/f2py2e/crackfortran.py", line
>     1586
>        as=b['args']
>         ^
>     SyntaxError: invalid syntax
> 
>     please help me
>     -------------- next part --------------
>     An HTML attachment was scrubbed...
>     URL:
>     http://cens.ioc.ee/pipermail/f2py-users/attachments/20100228/3423e091/attachment.html
> 
>     ------------------------------
> 
>     Message: 2
>     Date: Mon, 01 Mar 2010 09:54:53 +0530
>     From: pavanakumar mohanamuraly <[email protected]
>     <mailto:[email protected]>>
>     Subject: Re: [f2py] f2py-users Digest, Vol 60, Issue 3
>     To: <f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>>
>     Message-ID: <C7B13F6D.4AFE%[email protected]
>     <mailto:C7B13F6D.4AFE%[email protected]>>
>     Content-Type: text/plain;       charset="US-ASCII"
> 
>     Hi Strauss,
> 
> 
>     Yes. Looks like a good option. I have actually put all the 15 files
>     of my
>     f77 code and made a monolithic file and wrapped it. Seems like a
>     fair option
>     but haven't tried f2py on the file yet.
> 
>     Thanks for the tip.
> 
>     --
>     Pavanakumar Mohanamuraly
> 
>     On 2/26/10 3:30 PM, "f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]>"
>     <f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]>> wrote:
> 
>     > Send f2py-users mailing list submissions to
>     > f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
>     >
>     > To subscribe or unsubscribe via the World Wide Web, visit
>     > http://cens.ioc.ee/mailman/listinfo/f2py-users
>     > or, via email, send a message with subject or body 'help' to
>     > f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]>
>     >
>     > You can reach the person managing the list at
>     > f2py-users-owner-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-owner-Y4l6ocDipWCuvFJfX82//[email protected]>
>     >
>     > When replying, please edit your Subject line so it is more specific
>     > than "Re: Contents of f2py-users digest..."
>     >
>     >
>     > Today's Topics:
>     >
>     >    1. Re: COMMON BLOCK revisited (Charlie E. Strauss)
>     >
>     >
>     > ----------------------------------------------------------------------
>     >
>     > Message: 1
>     > Date: Thu, 25 Feb 2010 08:27:59 -0700 (MST)
>     > From: "Charlie E. Strauss" <[email protected] <mailto:[email protected]>>
>     > Subject: Re: [f2py] COMMON BLOCK revisited
>     > To: "For users of the f2py program" <f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>>
>     > Message-ID:
>     <35801.128.165.0.81.1267111679.squirrel-2RFepEojUI1g5Yqs9hTBYw@public.gmane.org
>     <mailto:35801.128.165.0.81.1267111679.squirrel-2RFepEojUI1g5Yqs9hTBYw@public.gmane.org>>
>     > Content-Type: text/plain;charset=iso-8859-1
>     >
>     > Why can't you put this all into one module?
>     >
>     >> Hi
>     >>
>     >> I dug the user mailing list and found this post on COMMON BLOCKS:
>     >>
>     >> -------- thread message ----------------------------------------
>     >>> Pearu,
>     >>>
>     >>> I have the same common blocks in different modules.  I'd like to
>     make
>     >>> common blocks from both modules reference the same variable.  I
>     can't
>     >>> seem to do it.
>     >>
>     >> Because it is not possible.
>     >>> .................
>     >> No. And it is not due to f2py limitations. Namely COMMON blocks
>     >> are 'common' only for routines that are inside of the same executable
>     >> (e.g. shared module). And each time a module is loaded, a memory is
>     >> allocated for COMMON blocks and pointers inside Fortran routines
>     (inside
>     >> that module) point to these COMMON blocks, roughly speaking.
>     >> If you load another module, it will have its own COMMON blocks and
>     >> pointers in its routines will point to that.
>     >>> ................
>     >> Sorry, not possible :( COMMON blocks just are sticked to one
>     executable
>     >> and I don't see any ways how they could be shared between different
>     >> executables.
>     >> ------ end of thread message --------------------------------
>     >>
>     >> I need to wrap a f77 code which has common block declared in
>     almost every
>     >> subroutine. There are inputs like max dimensions of arrays in the
>     common
>     >> block used by every subroutine.
>     >>
>     >> So explicitly using assignment to pass the value to every common
>     block in
>     >> each subroutine is not worth it (but definitely a solution).
>     Changing the
>     >> code by removing the common block is one thing, but are there
>     other ways ?
>     >>
>     >> Referencing a numpy variable to the variable in the COMMON BLOCK is
>     >> impossible according to the above post. And assignment of a numpy
>     array to
>     >> the wrapped COMMON BLOCK array (I believe) copies the contents
>     and does
>     >> not
>     >> reference (or is there a way).
>     >>
>     >>>> import WarppedSubroutine
>     >>>> NumpyReal = 0.1
>     >>>> WrappedSubroutine.CommonBlock.RealInBlock = NumpyReal
>     >>
>     >> I would appreciate if some one can give some hints.
>     >>
>     >> Regards,
>     >>
>     >> --
>     >> Pavanakumar Mohanamuraly
>     >>
>     >>
>     >>
>     >> _______________________________________________
>     >> f2py-users mailing list
>     >> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
>     >> http://cens.ioc.ee/mailman/listinfo/f2py-users
>     >>
>     >
>     >
>     >
>     >
>     > ------------------------------
>     >
>     > _______________________________________________
>     > f2py-users mailing list
>     > f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
>     > http://cens.ioc.ee/mailman/listinfo/f2py-users
>     >
>     >
>     > End of f2py-users Digest, Vol 60, Issue 3
>     > *****************************************
> 
> 
> 
> 
> 
>     ------------------------------
> 
>     Message: 3
>     Date: Mon, 01 Mar 2010 09:45:35 +0200
>     From: Pearu Peterson <[email protected]
>     <mailto:[email protected]>>
>     Subject: Re: [f2py] hi i need your help
>     To: For users of the f2py program <f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>>
>     Message-ID: <4B8B709F.9000004-Y4l6ocDipWCuvFJfX82//[email protected]
>     <mailto:4B8B709F.9000004-Y4l6ocDipWCuvFJfX82//[email protected]>>
>     Content-Type: text/plain; charset=ISO-8859-1
> 
>     Hi,
>     You don't need to install f2py, it is included in numpy package.
>     So, just remove any installed f2py scripts from your system and then
>     install numpy.
>     HTH,
>     Pearu
> 
> 
>     isabel puchoc wrote:
>     > hi, well i want to knok if you can hel me because I have a problem I
>     > can't install f2py, well the things is this one, i want to compile
>     > laplace.py and for that i need f2py, because when i compile
>     laplace.py i
>     > have a error, that erro say: you need build flaplace and that is
>     in f2py
>     > when i install sudo aptitude install f2py  i don't have any error
>     , but
>     > when i want to prove, I have this
>     >
>     > isabel@isabel-laptop:~$ f2py
>     > Traceback (most recent call last):
>     >   File "/usr/local/bin/f2py", line 3, in <module>
>     >     import f2py2e
>     >   File
>     "/usr/local/lib/python2.6/dist-packages/f2py2e/__init__.py", line
>     > 10, in <module>
>     >     import f2py2e
>     >   File "/usr/local/lib/python2.6/dist-packages/f2py2e/f2py2e.py", line
>     > 26, in <module>
>     >     import crackfortran
>     >   File
>     "/usr/local/lib/python2.6/dist-packages/f2py2e/crackfortran.py",
>     > line 1586
>     >     as=b['args']
>     >      ^
>     > SyntaxError: invalid syntax
>     >
>     > please help me
>     >
>     >
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > f2py-users mailing list
>     > f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
>     > http://cens.ioc.ee/mailman/listinfo/f2py-users
> 
> 
> 
>     ------------------------------
> 
>     _______________________________________________
>     f2py-users mailing list
>     f2py-users-Y4l6ocDipWCuvFJfX82//[email protected] <mailto:f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
>     http://cens.ioc.ee/mailman/listinfo/f2py-users
> 
> 
>     End of f2py-users Digest, Vol 61, Issue 1
>     *****************************************
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.