Hello f2py users,
I'm having problems using f2py on WinXP using the Intel Fortran Compiler
(v8.1). My problem appears similar to a previous inquiry described here:
http://cens.ioc.ee/pipermail/f2py-users/2004-November/000971.html
However, I can't seem to resolve the issue as the previous poster did.
It looks like when I use the compiler argument --fcompiler=intel then
the object file hello.o does not get built. When I use the argument
--fcompiler=intelv the libraries can't be found (though they're
correctly set with the environment variable LIB).
I'd like to use some features of Fortran 90 so using g77 via
cygwin/mingw doesn't work for me. Has anybody else gotting f2py working
smoothly on Win32 using the Intel Fortran compiler?
Thanks,
Paul
My relevant configuration info is:
WinXP
Python 2.3.4
F2PY (F2PY-2-latest.win32.exe -- Downloaded 3 January 2004)
scipy_distutils-latest.win32.exe (downloaded 3 January 2004)
Intel Fortran compiler v8.1 (w_fc_pc_8.1.025)
I'm trying to build a simple 'hello.f90':
! File hello.f90
subroutine foo (a)
integer a
print*, "Hello from Fortran!"
print*, "a=",a
end
I'm running f2py from the command line as follows:
f2py.py --build-dir . -m hello -c --fcompiler=intel hello.f90
The output and error message I get is:
numpy_info:
FOUND:
define_macros = [('NUMERIC_VERSION', '"\\"23.5\\""')]
include_dirs = ['C:\\Python23\\include']
running build
running config_fc
running build_src
building extension "hello" sources
adding '.\src\fortranobject.c' to sources.
adding '.\src' to include_dirs.
running build_ext
No module named msvccompiler in scipy_distutils, trying from distutils..
customize MSVCCompiler
customize MSVCCompiler using build_ext
0
1
2
3
Could not locate executable ifc
Could not locate executable efort
Could not locate executable efc
customize IntelFCompiler
Could not locate executable C:\Program
Executable C:\Program does not exist
customize IntelFCompiler using build_ext
building 'hello' extension
compiling C sources
compiling Fortran sources
ifort.exe(f77) options: '-72 -w90 -w95 /w /I:C:\Program
Files\VNI\CTT5.0\include \IA32 /fpe:3 /nologo -O3 -unroll -tpp7 -xW -xM'
ifort(f90) options: '-FR /w /I:C:\Program Files\VNI\CTT5.0\include\IA32
/fpe:3 /nologo /w /I:C:\Program Files\VNI\CTT5.0\include\IA32 /fpe:3
/nologo -O3 -unroll -tpp7 -xW -xM'
ifort(fix) options: '-FI /w /I:C:\Program Files\VNI\CTT5.0\include\IA32
/fpe:3 /nologo /w /I:C:\Program Files\VNI\CTT5.0\include\IA32 /fpe:3
/nologo -O3 -unroll -tpp7 -xW -xM'
compile options: '-IC:\Python23\include -I.\src -IC:\Python23\include
-IC:\Python23\PC -c'
ifort:fix: hello.f90
C:\Program Files\Microsoft Visual Studio\VC98\Bin\link.exe /DLL /nologo
/INCREMENTAL:NO /LIBPATH:C:\Python23\libs /LIBPATH:C:\Python23\PCBuild
/LIBPATH:C:\Python23\libs /LIBPATH:C:\Python23\PCBuild /EXPORT:inithello
.\Release\.\src\hellomodule.obj .\Release\.\src\fortranobject.obj
.\Release\hello.o /OUT:.\hello.pyd /IMPLIB:.\Release\.\src\hello.lib
LINK : fatal error LNK1181: cannot open input file ".\Release\hello.o"
error: Command ""C:\Program Files\Microsoft Visual
Studio\VC98\Bin\link.exe" /DLL /nologo /INCREMENTAL:NO
/LIBPATH:C:\Python23\libs /LIBPATH:C:\Python23\PCBuild
/LIBPATH:C:\Python23\libs /LIBPATH:C:\Python23\PCBuild /EXPORT:inithello
.\Release\.\src\hellomodule.obj .\Release\.\src\fortranobject.obj
.\Release\hello.o /OUT:.\hello.pyd /IMPLIB:.\Release\.\src\hello.lib"
failed with exit status 1181
When I try building with --fcompiler=intelv I fail with:
LINK : fatal error LNK1104: cannot open file "ifconsol.lib"
This is despite the fact that the proper lib is defined in the
environment variable "LIB"
The output of "fcompiler.py" in scipy_distutils is:
C:\Python23\Lib\site-packages\scipy_distutils>fcompiler.py
0
1
2
3
customize CompaqFCompiler
customize AbsoftFCompiler
Could not locate executable ifc
Could not locate executable efort
Could not locate executable efc
customize IntelFCompiler
Could not locate executable C:\Program
Executable C:\Program does not exist
Could not locate executable g77
Could not locate executable f77
customize GnuFCompiler
Could not locate executable f77
Executable f77 does not exist
Could not locate executable f77
Executable f77 does not exist
Could not locate executable f77
Executable f77 does not exist
customize SunFCompiler
customize VastFCompiler
Could not locate executable vifort
Executable vifort does not exist
customize GnuFCompiler
Could not locate executable f77
Executable f77 does not exist
Could not locate executable f77
Executable f77 does not exist
Could not locate executable f77
Executable f77 does not exist
Could not locate executable g77
Executable g77 does not exist
Could not locate executable g77
Executable g77 does not exist
customize IbmFCompiler
Could not locate executable xlf
Executable xlf does not exist
customize LaheyFCompiler
Could not locate executable lf95
Executable lf95 does not exist
customize IntelVisualFCompiler
customize IntelItaniumFCompiler
Could not locate executable C:\Program
Executable C:\Program does not exist
customize PGroupFCompiler
Could not locate executable pgf77
Executable pgf77 does not exist
customize CompaqVisualFCompiler
customize MipsFCompiler
customize HPUXFCompiler
customize IntelItaniumVisualFCompiler
Could not locate executable efl
Executable efl does not exist
customize NAGFCompiler
Could not locate executable f95
Executable f95 does not exist
List of available Fortran compilers:
List of unavailable Fortran compilers:
--fcompiler=absoft Absoft Corp Fortran Compiler
--fcompiler=compaq Compaq Fortran Compiler
--fcompiler=compaqv DIGITAL|Compaq Visual Fortran Compiler
--fcompiler=gnu GNU Fortran Compiler
--fcompiler=hpux HP Fortran 90 Compiler
--fcompiler=ibm IBM XL Fortran Compiler
--fcompiler=intel Intel Fortran Compiler for 32-bit apps
--fcompiler=intele Intel Fortran Compiler for Itanium apps
--fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps
--fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps
--fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler
--fcompiler=mips MIPSpro Fortran Compiler
--fcompiler=nag NAGWare Fortran 95 Compiler
--fcompiler=pg Portland Group Fortran Compiler
--fcompiler=sun Sun|Forte Fortran 95 Compiler
--fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler
List of unimplemented Fortran compilers:
--fcompiler=f Fortran Company/NAG F Compiler
For compiler details, run 'config_fc --verbose' setup command.
The output of "intelfcompiler.py" is:
C:\Python23\Lib\site-packages\scipy_distutils>intelfcompiler.py
0
1
2
3
Could not locate executable ifc
Could not locate executable efort
Could not locate executable efc
0
1
2
3
find_executable('ifort')
Found executable C:\Program
Files\Intel\Fortran\Compiler80\Ia32\Bin\ifort.exe
find_executable('ifc')
Could not locate executable ifc
find_executable('efort')
Could not locate executable efort
find_executable('efc')
Could not locate executable efc
find_executable('ifort')
Found executable C:\Program
Files\Intel\Fortran\Compiler80\Ia32\Bin\ifort.exe
new_fcompiler returns scipy_distutils.intelfcompiler.IntelFCompiler
customize IntelFCompiler
Could not locate executable C:\Program
Executable C:\Program does not exist
None
removed c:\docume~1\pmagwene\locals~1\temp\tmpprausd__dummy.f
removed c:\docume~1\pmagwene\locals~1\temp\tmp72rgdx__dummy.f
removed c:\docume~1\pmagwene\locals~1\temp\tmplcvtif__dummy.f
removed c:\docume~1\pmagwene\locals~1\temp\tmpaozmqv__dummy.f