Re: [f2py] f2py-users Digest, Vol 81, Issue 5

"Jarrod Wilcox" <[email protected]> Wed, 16 Nov 2011 19:52:46 -0500
Newsgroups gmane.comp.python.f2py.user
Message-ID <000001cca4c3$392250f0$ab66f2d0$@net>
Pearu

Your detailed procedure worked.

Thank you!

Jarrod


-----Original Message-----
From: f2py-users-bounces-Y4l6ocDipWCuvFJfX82//[email protected] [mailto:f2py-users-bounces-Y4l6ocDipWCuvFJfX82//[email protected]]
On Behalf Of f2py-users-request-Y4l6ocDipWCuvFJfX82//[email protected]
Sent: Wednesday, November 16, 2011 6:14 PM
To: f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
Subject: f2py-users Digest, Vol 81, Issue 5

Send f2py-users mailing list submissions to
	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]

You can reach the person managing the list at
	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: Using the latest development version of f2py (Pearu Peterson)
   2. Re: Difficulties working on 64 bit windows platform.
      (Pearu Peterson)
   3. Re: Using the latest development version of f2py (Ben Forbes)


----------------------------------------------------------------------

Message: 1
Date: Wed, 16 Nov 2011 22:02:55 +0200
From: Pearu Peterson <[email protected]>
Subject: Re: [f2py] Using the latest development version of f2py
To: For users of the f2py program <f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
Message-ID:
	<CAPpwKcwb=1pNq51Uv8HX4ZkA42FhR865i+bCT2iojP9U7y+a3A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="iso-8859-1"

Hi Ben,
The third-generation f2py is not ready. I just haven't had time to finish
it.
If you need to wrap Fortran 90 types then take a look at the fwrap project:

  http://fwrap.sourceforge.net/

Regards,
Pearu

On Wed, Nov 16, 2011 at 5:24 AM, Ben Forbes <[email protected]> wrote:

> Hi,
>
> I've recently become aware of the third-generation f2py under
> development, that should be able to handle more advanced Fortran
> features. What is the best way of using this? Should I install numpy
> and scipy, then install the development version of f2py over the top
> of that?
>
> Cheers,
> Ben
>
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://cens.ioc.ee/pipermail/f2py-users/attachments/20111116/aae691b9/attach
ment-0001.htm 

------------------------------

Message: 2
Date: Wed, 16 Nov 2011 22:20:54 +0200
From: Pearu Peterson <[email protected]>
Subject: Re: [f2py] Difficulties working on 64 bit windows platform.
To: For users of the f2py program <f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
Message-ID:
	<CAPpwKcw=JcPNp9nfhio5fL_zeeQ+wZss3ksdiKeKBZnJyjK8vw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset="windows-1252"

On Wed, Nov 16, 2011 at 5:10 AM, David Wainwright
<[email protected]>wrote:

> Hello,****
>
> ** **
>
> I?m having difficulty building an f2py extension.****
>
> I have 64 bit Windows 7, running intel fortran (composerXE-2011) and am
> trying to create 64-bit modules to call from python.****
>
> I?ve attached a trace of my input command and the results below****
>
> It appears to be finding and using the fortran compiler correctly &
> building X64 modules,****
>
> ** **
>
> However, when it tries to link, I get a fatal error indicating that the
> module machine type ?x64? conflicts with the target machine ?x86?.  ****
>
> ** **
>
> It seems that the wrong linker may be being used, but I am unsure, there
> appears to be an alternative linker available in an /amd64 subdirectory.**
> **
>
> **
>

Try to define environment variable

  LDSHARED=<path to the linker in /amd64 subdirectory>

and rerun the f2py.py script.


> **
>
> Can anyone provide clues as to where I might look to fix this?****
>
> **
>

The support for intelvem compiler is defined in

  C:\Python27\Lib\site-packages\numpy\distutils\fcompiler\intel.py

See the end of this file, the last class definition might need an update..

HTH,
Pearu

**
>
> Many thanks,****
>
> ** **
>
> David.****
>
> ** **
>
> ** **
>
> ********************************************
>
> g:\Development\python\testingf2py\hwtest>f2py.py -m hw -c hw.f
> --fcompiler=intelvem --f90exec="C:\Program Files
> (x86)\Intel\ComposerXE-2011\bin\intel64\ifort.exe"****
>
> ** **
>
> f2py.py -m hw -c hw.f --fcompiler=intelvem --f90exec="C:\Program Files
> (x86)\Intel\ComposerXE-2011\bin\intel64\ifort.exe"****
>
> running build****
>
> running config_cc****
>
> unifing config_cc, config, build_clib, build_ext, build commands
> --compiler options****
>
> running config_fc****
>
> unifing config_fc, config, build_clib, build_ext, build commands
> --fcompiler options****
>
> running build_src****
>
> build_src****
>
> building extension "hw" sources****
>
> f2py options: []****
>
> f2py:>
c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hwmodule.c
> ****
>
> creating c:\users\david\appdata\local\temp\tmp3zzc9s****
>
> creating c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7****
>
> Reading fortran codes...****
>
>                 Reading file 'hw.f' (format:fix,strict)****
>
> Post-processing...****
>
>                 Block: hw****
>
>                                                 Block: hw1****
>
>                                                 Block: hw2****
>
> Post-processing (stage 2)...****
>
> Building modules...****
>
>                 Building module "hw"...****
>
>                                 Creating wrapper for Fortran function
> "hw1"("hw1")...****
>
>                                 Constructing wrapper function "hw1"...****
>
>                                   hw1 = hw1(r1,r2)****
>
>                                 Constructing wrapper function "hw2"...****
>
>                                   hw2(r1,r2)****
>
>                 Wrote C/API module "hw" to file
> "c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hwmodule.c"****
>
>                 Fortran 77 wrappers are saved to
>
"c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.f
"
> ****
>
>   adding
>
'c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\fortranobject.c'
> to sources.****
>
>   adding 'c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7' to
> include_dirs.****
>
> copying C:\Python27\lib\site-packages\numpy\f2py\src\fortranobject.c ->
> c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7****
>
> copying C:\Python27\lib\site-packages\numpy\f2py\src\fortranobject.h ->
> c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7****
>
>   adding
>
'c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.f
'
> to sources.****
>
> build_src: building npy-pkg config files****
>
> running build_ext****
>
> No module named msvccompiler in numpy.distutils; trying from distutils****
>
> customize MSVCCompiler****
>
> customize MSVCCompiler using build_ext****
>
> customize IntelEM64VisualFCompiler****
>
> Found executable C:\Program Files
> (x86)\Intel\ComposerXE-2011\bin\intel64\ifort.exe****
>
> Could not locate executable ifort****
>
> Could not locate executable ifl****
>
> customize IntelEM64VisualFCompiler using build_ext****
>
> building 'hw' extension****
>
> compiling C sources****
>
> creating c:\users\david\appdata\local\temp\tmp3zzc9s\Release****
>
> creating c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users****
>
> creating c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david**
> **
>
> creating
> c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata***
> *
>
> creating
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l
> ****
>
> creating
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp
> ****
>
> creating
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s
> ****
>
> creating
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7
> ****
>
> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c
> /nologo /Ox /MD /W3 /GS- /DNDEBUG
> -Ic:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7
> -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include
> -IC:\Python27\PC
> /Tcc:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hwmodule.c
>
/Foc:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\l
ocal\temp\tmp3zzc9s\src.win32-2.7\hwmodule.obj
> ****
>
> Found executable c:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\BIN\cl.exe****
>
> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c
> /nologo /Ox /MD /W3 /GS- /DNDEBUG
> -Ic:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7
> -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include
> -IC:\Python27\PC
>
/Tcc:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\fortranobject.c
>
/Foc:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\l
ocal\temp\tmp3zzc9s\src.win32-2.7\fortranobject.obj
> ****
>
> compiling Fortran sources****
>
> Fortran f77 compiler: C:\Program Files
> (x86)\Intel\ComposerXE-2011\bin\intel64\ifort.exe -72 -w90 -w95 /nologo
/MD
> /nbs /Qlowercase /us /O1 /QaxM****
>
> Fortran f90 compiler: C:\Program Files
> (x86)\Intel\ComposerXE-2011\bin\intel64\ifort.exe -FR /nologo /MD /nbs
> /Qlowercase /us /O1 /QaxM****
>
> Fortran fix compiler: C:\Program Files
> (x86)\Intel\ComposerXE-2011\bin\intel64\ifort.exe -FI /nologo /MD /nbs
> /Qlowercase /us /O1 /QaxM****
>
> compile options:
> '-Ic:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7
> -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include
> -IC:\Python27\PC -c'****
>
> ifort.exe:f77: hw.f****
>
> ifort.exe:f77:
>
c:\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.f
> ****
>
> c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL
> /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs
> /LIBPATH:C:\Python27\PCbuild /LIBPATH:C:\Python27\libs
> /LIBPATH:C:\Python27\PCbuild /EXPORT:inithw
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7\hwmodule.obj
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7\fortranobject.obj
> c:\users\david\appdata\local\temp\tmp3zzc9s\Release\hw.o
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.o
> /OUT:.\hw.pyd
>
/IMPLIB:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appd
ata\local\temp\tmp3zzc9s\src.win32-2.7\hw.lib
>
/MANIFESTFILE:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\davi
d\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw.pyd.manifest
> ****
>
> Found executable c:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\BIN\link.exe****
>
> c:\users\david\appdata\local\temp\tmp3zzc9s\Release\hw.o : fatal error
> LNK1112: module machine type 'x64' conflicts with target machine type
'X86'
> ****
>
> error: Command "c:\Program Files (x86)\Microsoft Visual Studio
> 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C:\Python27\libs
> /LIBPATH:C:\Python27\PCbuild /LIBPATH:C:\Python27\libs
> /LIBPATH:C:\Python27\PCbuild /EXPORT:inithw
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7\hwmodule.obj
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7\fortranobject.obj
> c:\users\david\appdata\local\temp\tmp3zzc9s\Release\hw.o
>
c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\loca
l\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.o
> /OUT:.\hw.pyd
>
/IMPLIB:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appd
ata\local\temp\tmp3zzc9s\src.win32-2.7\hw.lib
>
/MANIFESTFILE:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\davi
d\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw.pyd.manifest"
> failed with exit status 1112****
>
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://cens.ioc.ee/pipermail/f2py-users/attachments/20111116/17413aa5/attach
ment-0001.htm 

------------------------------

Message: 3
Date: Thu, 17 Nov 2011 10:14:47 +1100
From: Ben Forbes <[email protected]>
Subject: Re: [f2py] Using the latest development version of f2py
To: For users of the f2py program <f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]>
Message-ID:
	<CACc3ktRRXrHNvA80sPROXJBQAQsV9bEuU3__G76J7tZ8hQUhPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Content-Type: text/plain; charset=ISO-8859-1

Thanks Pearu, I'll have a look at that. Will you ever get a chance to
continue working on f2py? I'd consider lending a hand if you needed
help.

Cheers,
Ben

On Thu, Nov 17, 2011 at 7:02 AM, Pearu Peterson <[email protected]> wrote:
> Hi Ben,
> The third-generation f2py is not ready. I just haven't had time to finish
> it.
> If you need to wrap Fortran 90 types then take a look at the fwrap
project:
>
> ? http://fwrap.sourceforge.net/
>
> Regards,
> Pearu
>
> On Wed, Nov 16, 2011 at 5:24 AM, Ben Forbes <[email protected]> wrote:
>>
>> Hi,
>>
>> I've recently become aware of the third-generation f2py under
>> development, that should be able to handle more advanced Fortran
>> features. What is the best way of using this? Should I install numpy
>> and scipy, then install the development version of f2py over the top
>> of that?
>>
>> Cheers,
>> Ben
>>
>> _______________________________________________
>> f2py-users mailing list
>> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
>> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
>
> _______________________________________________
> f2py-users mailing list
> f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
> http://cens.ioc.ee/mailman/listinfo/f2py-users
>
>



------------------------------

_______________________________________________
f2py-users mailing list
f2py-users-Y4l6ocDipWCuvFJfX82//[email protected]
http://cens.ioc.ee/mailman/listinfo/f2py-users


End of f2py-users Digest, Vol 81, Issue 5
*****************************************