[f2py] Difficulties working on 64 bit windows platform.

David Wainwright d.wainwright2 at uq.edu.au
Wed Nov 16 05:10:01 EET 2011


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.

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

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\local
creating c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\temp
creating c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\temp\tmp3zzc9s
creating c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\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\local\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\local\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\local\temp\tmp3zzc9s\src.win32-2.7\hwmodule.obj c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\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\local\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.o /OUT:.\hw.pyd /IMPLIB:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw.lib /MANIFESTFILE:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\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\local\temp\tmp3zzc9s\src.win32-2.7\hwmodule.obj c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\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\local\temp\tmp3zzc9s\src.win32-2.7\hw-f2pywrappers.o /OUT:.\hw.pyd /IMPLIB:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw.lib /MANIFESTFILE:c:\users\david\appdata\local\temp\tmp3zzc9s\Release\users\david\appdata\local\temp\tmp3zzc9s\src.win32-2.7\hw.pyd.manifest" failed with exit status 1112
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cens.ioc.ee/pipermail/f2py-users/attachments/20111116/ced127f6/attachment.html 


More information about the f2py-users mailing list