f2py : NotImplementedError: Only MS compiler supported with gfortran on win64
Hello All, I'm attempting to create a python wrapper, for a Fortran subroutine, using f2py. My system details are:
sys.version '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]' sys.getwindowsversion() (5, 1, 2600, 2, 'Service Pack 3') scipy.__version__ '0.7.1' numpy.__version__ '1.4.0' C:\>gfortran -dumpversion 4.7.0
C:\Python26\Lib\site-packages\numpy\f2py>f2py.py -c --help-fcompiler Traceback (most recent call last): File "C:\Python26\Scripts\f2py.py", line 24, in <module> main() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 557, in main run_compile() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 543, in run_compile setup(ext_modules = [ext]) File "C:\Python26\lib\site-packages\numpy\distutils\core.py", line 186, in setup return old_setup(**new_attr) File "C:\Python26\lib\distutils\core.py", line 138, in setup ok = dist.parse_command_line() File "C:\Python26\lib\distutils\dist.py", line 460, in parse_command_line args = self._parse_command_opts(parser, args) File "C:\Python26\lib\distutils\dist.py", line 574, in _parse_command_opts func() File "C:\Python26\lib\site-packages\numpy\distutils\command\config_compiler.py", line 13, in show_fortran_compilers show_fcompilers(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 855, in show_fcompilers c.customize(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 525, in customize self.set_libraries(self.get_libraries()) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\gnu.py", line 306, in get_libraries raise NotImplementedError("Only MS compiler supported with gfortran on win64") NotImplementedError: Only MS compiler supported with gfortran on win64 Could someone help me to resolve this? Thanks, -- jv
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)? Armando On 08/09/2011 13:56, Jim Vickroy wrote:
Hello All, I'm attempting to create a python wrapper, for a Fortran subroutine, using f2py.
My system details are:
sys.version '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]' sys.getwindowsversion() (5, 1, 2600, 2, 'Service Pack 3') scipy.__version__ '0.7.1' numpy.__version__ '1.4.0' C:\>gfortran -dumpversion 4.7.0
C:\Python26\Lib\site-packages\numpy\f2py>f2py.py -c --help-fcompiler Traceback (most recent call last): File "C:\Python26\Scripts\f2py.py", line 24, in<module> main() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 557, in main run_compile() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 543, in run_compile setup(ext_modules = [ext]) File "C:\Python26\lib\site-packages\numpy\distutils\core.py", line 186, in setup return old_setup(**new_attr) File "C:\Python26\lib\distutils\core.py", line 138, in setup ok = dist.parse_command_line() File "C:\Python26\lib\distutils\dist.py", line 460, in parse_command_line args = self._parse_command_opts(parser, args) File "C:\Python26\lib\distutils\dist.py", line 574, in _parse_command_opts func() File "C:\Python26\lib\site-packages\numpy\distutils\command\config_compiler.py", line 13, in show_fortran_compilers show_fcompilers(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 855, in show_fcompilers c.customize(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 525, in customize self.set_libraries(self.get_libraries()) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\gnu.py", line 306, in get_libraries raise NotImplementedError("Only MS compiler supported with gfortran on win64") NotImplementedError: Only MS compiler supported with gfortran on win64
Could someone help me to resolve this?
Thanks, -- jv _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote:
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)?
Armando
Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011". f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran. The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
On 08/09/2011 13:56, Jim Vickroy wrote:
Hello All, I'm attempting to create a python wrapper, for a Fortran subroutine, using f2py.
My system details are:
sys.version '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]' sys.getwindowsversion() (5, 1, 2600, 2, 'Service Pack 3') scipy.__version__ '0.7.1' numpy.__version__ '1.4.0' C:\>gfortran -dumpversion 4.7.0
C:\Python26\Lib\site-packages\numpy\f2py>f2py.py -c --help-fcompiler Traceback (most recent call last): File "C:\Python26\Scripts\f2py.py", line 24, in<module> main() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 557, in main run_compile() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 543, in run_compile setup(ext_modules = [ext]) File "C:\Python26\lib\site-packages\numpy\distutils\core.py", line 186, in setup return old_setup(**new_attr) File "C:\Python26\lib\distutils\core.py", line 138, in setup ok = dist.parse_command_line() File "C:\Python26\lib\distutils\dist.py", line 460, in parse_command_line args = self._parse_command_opts(parser, args) File "C:\Python26\lib\distutils\dist.py", line 574, in _parse_command_opts func() File "C:\Python26\lib\site-packages\numpy\distutils\command\config_compiler.py", line 13, in show_fortran_compilers show_fcompilers(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 855, in show_fcompilers c.customize(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 525, in customize self.set_libraries(self.get_libraries()) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\gnu.py", line 306, in get_libraries raise NotImplementedError("Only MS compiler supported with gfortran on win64") NotImplementedError: Only MS compiler supported with gfortran on win64
Could someone help me to resolve this?
Thanks, -- jv _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 08/09/2011 16:16, Jim Vickroy wrote:
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote:
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)?
Armando Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011".
f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran.
The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
Oh! I totally misunderstood the situation. I thought the problem was the missing compiler. All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs): "C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH% Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler. Good luck, Armando
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote:
On 08/09/2011 16:16, Jim Vickroy wrote:
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote:
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)?
Armando Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011".
f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran.
The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
Oh! I totally misunderstood the situation. I thought the problem was the missing compiler.
All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs):
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH%
Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler.
Good luck,
Armando
Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py. From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 9/9/2011 7:22 AM, Jim Vickroy wrote:
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote:
On 08/09/2011 16:16, Jim Vickroy wrote:
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote:
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)?
Armando Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011".
f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran.
The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
Oh! I totally misunderstood the situation. I thought the problem was the missing compiler.
All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs):
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH%
Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler.
Good luck,
Armando
Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py.
From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
There should be a file named "ifortvars.bat" in the Intel Compiler bin directory. Call it with the right arguments before using f2py. On my system it is: "C:\Program Files (x86)\Intel\Compiler\11.1\070\bin\ifortvars.bat" intel64 vs2008 Christoph
On 9/9/2011 11:46 AM, Christoph Gohlke wrote:
On 9/9/2011 7:22 AM, Jim Vickroy wrote:
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote:
On 08/09/2011 16:16, Jim Vickroy wrote:
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote:
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)?
Armando Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011".
f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran.
The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
Oh! I totally misunderstood the situation. I thought the problem was the missing compiler.
All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs):
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH%
Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler.
Good luck,
Armando Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py.
From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
There should be a file named "ifortvars.bat" in the Intel Compiler bin directory. Call it with the right arguments before using f2py. On my system it is:
"C:\Program Files (x86)\Intel\Compiler\11.1\070\bin\ifortvars.bat" intel64 vs2008
Christoph
Thanks Christoph. Unfortunately, this does not seem to enable f2py to find ifort. Here is the result of running ifortvars.bat immediately followed by f2py:
"C:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat" ia32 Intel(R) Parallel Studio XE 2011 Update 1 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Intel(R) Composer XE 2011 Update 3 (package 175) Setting environment for using Microsoft Visual Studio 2008 x86 tools.
f2py.py -c --help-fcompiler Gnu95FCompiler instance properties: archiver = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- cr'] compile_switch = '-c' compiler_f77 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-O3', '-funroll-loops'] compiler_f90 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '- funroll-loops'] compiler_fix = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '-funroll-loops'] libraries = ['gfortran'] library_dirs = ["gfortran.exe: error: unrecognized command line option '-mno-cygwin'\nc:\\program files\\gfortran\\lib\\gcc\\i586 -pc-mingw32\\4.7.0"] linker_exe = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin'] linker_so = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin', '-shared'] object_switch = '-o ' ranlib = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe'] version = LooseVersion ('4.7.0') version_cmd = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '-- version', '-mno-cygwin'] Fortran compilers found: --fcompiler=gnu95 GNU Fortran 95 compiler (4.7.0) Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compiler --fcompiler=g95 G95 Fortran Compiler --fcompiler=gnu GNU Fortran 77 compiler --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps Compilers not available on this platform: --fcompiler=compaq Compaq 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=intelem Intel Fortran Compiler for EM64T-based apps --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler --fcompiler=mips MIPSpro Fortran Compiler --fcompiler=nag NAGWare Fortran 95 Compiler --fcompiler=none Fake Fortran compiler --fcompiler=pg Portland Group Fortran Compiler --fcompiler=sun Sun or Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler For compiler details, run 'config_fc --verbose' setup command.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 9/9/2011 11:43 AM, Jim Vickroy wrote:
On 9/9/2011 11:46 AM, Christoph Gohlke wrote:
On 9/9/2011 7:22 AM, Jim Vickroy wrote:
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote:
On 08/09/2011 16:16, Jim Vickroy wrote:
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote:
Have you tried to install Visual Studio 2008 Express edition (plus the windows SDK to be able to compile 64 bit code)?
Armando Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011".
f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran.
The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
Oh! I totally misunderstood the situation. I thought the problem was the missing compiler.
All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs):
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH%
Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler.
Good luck,
Armando Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py.
From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
There should be a file named "ifortvars.bat" in the Intel Compiler bin directory. Call it with the right arguments before using f2py. On my system it is:
"C:\Program Files (x86)\Intel\Compiler\11.1\070\bin\ifortvars.bat" intel64 vs2008
Christoph
Thanks Christoph.
Unfortunately, this does not seem to enable f2py to find ifort.
Here is the result of running ifortvars.bat immediately followed by f2py:
"C:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat" ia32 Intel(R) Parallel Studio XE 2011 Update 1 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Intel(R) Composer XE 2011 Update 3 (package 175) Setting environment for using Microsoft Visual Studio 2008 x86 tools.
f2py.py -c --help-fcompiler Gnu95FCompiler instance properties: archiver = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- cr'] compile_switch = '-c' compiler_f77 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-O3', '-funroll-loops'] compiler_f90 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '- funroll-loops'] compiler_fix = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '-funroll-loops'] libraries = ['gfortran'] library_dirs = ["gfortran.exe: error: unrecognized command line option '-mno-cygwin'\nc:\\program files\\gfortran\\lib\\gcc\\i586 -pc-mingw32\\4.7.0"] linker_exe = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin'] linker_so = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin', '-shared'] object_switch = '-o ' ranlib = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe'] version = LooseVersion ('4.7.0') version_cmd = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '-- version', '-mno-cygwin'] Fortran compilers found: --fcompiler=gnu95 GNU Fortran 95 compiler (4.7.0) Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compiler --fcompiler=g95 G95 Fortran Compiler --fcompiler=gnu GNU Fortran 77 compiler --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps Compilers not available on this platform: --fcompiler=compaq Compaq 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=intelem Intel Fortran Compiler for EM64T-based apps --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler --fcompiler=mips MIPSpro Fortran Compiler --fcompiler=nag NAGWare Fortran 95 Compiler --fcompiler=none Fake Fortran compiler --fcompiler=pg Portland Group Fortran Compiler --fcompiler=sun Sun or Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler For compiler details, run 'config_fc --verbose' setup command.
What is your numpy version and the output of ifort.exe? Maybe numpy.distutils needs to be updated for ComposerXE-2011. Christoph
On 9/9/2011 1:14 PM, Christoph Gohlke wrote:
On 9/9/2011 11:43 AM, Jim Vickroy wrote:
On 9/9/2011 11:46 AM, Christoph Gohlke wrote:
On 9/9/2011 7:22 AM, Jim Vickroy wrote:
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote:
On 08/09/2011 16:16, Jim Vickroy wrote:
On 9/8/2011 6:09 AM, "V. Armando Solé" wrote: > Have you tried to install Visual Studio 2008 Express edition (plus the > windows SDK to be able to compile 64 bit code)? > > Armando Armando, "Visual Studio 2008 Professional" is installed on the computer as well as "Intel Visual Fortran Composer XE 2011".
f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I tried gfortran.
The "Win64" reference, in the Exception, is puzzling to me since this is a 32-bit computer.
Oh! I totally misunderstood the situation. I thought the problem was the missing compiler.
All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs):
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH%
Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler.
Good luck,
Armando Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py.
From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
There should be a file named "ifortvars.bat" in the Intel Compiler bin directory. Call it with the right arguments before using f2py. On my system it is:
"C:\Program Files (x86)\Intel\Compiler\11.1\070\bin\ifortvars.bat" intel64 vs2008
Christoph Thanks Christoph.
Unfortunately, this does not seem to enable f2py to find ifort.
Here is the result of running ifortvars.bat immediately followed by f2py:
"C:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat" ia32 Intel(R) Parallel Studio XE 2011 Update 1 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Intel(R) Composer XE 2011 Update 3 (package 175) Setting environment for using Microsoft Visual Studio 2008 x86 tools.
f2py.py -c --help-fcompiler Gnu95FCompiler instance properties: archiver = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- cr'] compile_switch = '-c' compiler_f77 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-O3', '-funroll-loops'] compiler_f90 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '- funroll-loops'] compiler_fix = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '-funroll-loops'] libraries = ['gfortran'] library_dirs = ["gfortran.exe: error: unrecognized command line option '-mno-cygwin'\nc:\\program files\\gfortran\\lib\\gcc\\i586 -pc-mingw32\\4.7.0"] linker_exe = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin'] linker_so = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin', '-shared'] object_switch = '-o ' ranlib = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe'] version = LooseVersion ('4.7.0') version_cmd = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '-- version', '-mno-cygwin'] Fortran compilers found: --fcompiler=gnu95 GNU Fortran 95 compiler (4.7.0) Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compiler --fcompiler=g95 G95 Fortran Compiler --fcompiler=gnu GNU Fortran 77 compiler --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps Compilers not available on this platform: --fcompiler=compaq Compaq 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=intelem Intel Fortran Compiler for EM64T-based apps --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler --fcompiler=mips MIPSpro Fortran Compiler --fcompiler=nag NAGWare Fortran 95 Compiler --fcompiler=none Fake Fortran compiler --fcompiler=pg Portland Group Fortran Compiler --fcompiler=sun Sun or Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler For compiler details, run 'config_fc --verbose' setup command.
What is your numpy version and the output of ifort.exe? Maybe numpy.distutils needs to be updated for ComposerXE-2011.
The (edited) output from f2py -v is: Version: 2 numpy Version: 1.4.0 Requires: Python 2.3 or higher. License: NumPy license (see LICENSE.txt in the NumPy source code) Copyright 1999 - 2005 Pearu Peterson all rights reserved. http://cens.ioc.ee/projects/f2py2e/ and for ifort:
ifort Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.3.175 Build 20110309 Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
Thanks for your assistance.
Christoph
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 9/9/2011 12:22 PM, Jim Vickroy wrote:
On 9/9/2011 1:14 PM, Christoph Gohlke wrote:
On 9/9/2011 11:43 AM, Jim Vickroy wrote:
On 9/9/2011 11:46 AM, Christoph Gohlke wrote:
On 9/9/2011 7:22 AM, Jim Vickroy wrote:
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote:
On 08/09/2011 16:16, Jim Vickroy wrote: > On 9/8/2011 6:09 AM, "V. Armando Solé" wrote: >> Have you tried to install Visual Studio 2008 Express edition (plus the >> windows SDK to be able to compile 64 bit code)? >> >> Armando > Armando, "Visual Studio 2008 Professional" is installed on the computer > as well as "Intel Visual Fortran Composer XE 2011". > > f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I > tried gfortran. > > The "Win64" reference, in the Exception, is puzzling to me since this is > a 32-bit computer. > Oh! I totally misunderstood the situation. I thought the problem was the missing compiler.
All what I do with python and the intel fortran compiler is to compile numpy. Just in case it helps you, I set my environment from the console by running a bat file with the following content (I am on 64 bit but you could easily tailor it to your needs):
"C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" -version:v7.0 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat" call "C:\Program Files (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell rem call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64" rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" /x64 /Release set PATH=C:\Python27;C:\Python27\Scripts;%PATH% set PATH="C:\Program Files (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH%
Perhaps that helps you to set a working environment. All what I can tell you is that with that environment, if I run "python f2py.py -c --help-fcompiler" it finds the intel compiler.
Good luck,
Armando Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py.
From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
There should be a file named "ifortvars.bat" in the Intel Compiler bin directory. Call it with the right arguments before using f2py. On my system it is:
"C:\Program Files (x86)\Intel\Compiler\11.1\070\bin\ifortvars.bat" intel64 vs2008
Christoph Thanks Christoph.
Unfortunately, this does not seem to enable f2py to find ifort.
Here is the result of running ifortvars.bat immediately followed by f2py:
>"C:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat" ia32 Intel(R) Parallel Studio XE 2011 Update 1 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Intel(R) Composer XE 2011 Update 3 (package 175) Setting environment for using Microsoft Visual Studio 2008 x86 tools.
>f2py.py -c --help-fcompiler Gnu95FCompiler instance properties: archiver = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- cr'] compile_switch = '-c' compiler_f77 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-O3', '-funroll-loops'] compiler_f90 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '- funroll-loops'] compiler_fix = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '-funroll-loops'] libraries = ['gfortran'] library_dirs = ["gfortran.exe: error: unrecognized command line option '-mno-cygwin'\nc:\\program files\\gfortran\\lib\\gcc\\i586 -pc-mingw32\\4.7.0"] linker_exe = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin'] linker_so = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin', '-shared'] object_switch = '-o ' ranlib = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe'] version = LooseVersion ('4.7.0') version_cmd = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '-- version', '-mno-cygwin'] Fortran compilers found: --fcompiler=gnu95 GNU Fortran 95 compiler (4.7.0) Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compiler --fcompiler=g95 G95 Fortran Compiler --fcompiler=gnu GNU Fortran 77 compiler --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps Compilers not available on this platform: --fcompiler=compaq Compaq 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=intelem Intel Fortran Compiler for EM64T-based apps --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler --fcompiler=mips MIPSpro Fortran Compiler --fcompiler=nag NAGWare Fortran 95 Compiler --fcompiler=none Fake Fortran compiler --fcompiler=pg Portland Group Fortran Compiler --fcompiler=sun Sun or Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler For compiler details, run 'config_fc --verbose' setup command.
What is your numpy version and the output of ifort.exe? Maybe numpy.distutils needs to be updated for ComposerXE-2011.
The (edited) output from f2py -v is:
Version: 2 numpy Version: 1.4.0 Requires: Python 2.3 or higher. License: NumPy license (see LICENSE.txt in the NumPy source code) Copyright 1999 - 2005 Pearu Peterson all rights reserved. http://cens.ioc.ee/projects/f2py2e/
and for ifort:
ifort Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.3.175 Build 20110309 Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
Thanks for your assistance.
Numpy 1.4.0 doesn't work for me either. Try upgrading to numpy 1.6.1. Christoph
On 9/9/2011 1:59 PM, Christoph Gohlke wrote:
On 9/9/2011 12:22 PM, Jim Vickroy wrote:
On 9/9/2011 1:14 PM, Christoph Gohlke wrote:
On 9/9/2011 11:43 AM, Jim Vickroy wrote:
On 9/9/2011 11:46 AM, Christoph Gohlke wrote:
On 9/9/2011 7:22 AM, Jim Vickroy wrote:
On 9/8/2011 10:44 AM, "V. Armando Solé" wrote: > On 08/09/2011 16:16, Jim Vickroy wrote: >> On 9/8/2011 6:09 AM, "V. Armando Solé" wrote: >>> Have you tried to install Visual Studio 2008 Express edition (plus the >>> windows SDK to be able to compile 64 bit code)? >>> >>> Armando >> Armando, "Visual Studio 2008 Professional" is installed on the computer >> as well as "Intel Visual Fortran Composer XE 2011". >> >> f2py was not finding the Intel compiler (f2py -c --help-fcompiler) so I >> tried gfortran. >> >> The "Win64" reference, in the Exception, is puzzling to me since this is >> a 32-bit computer. >> > Oh! I totally misunderstood the situation. I thought the problem was the > missing compiler. > > All what I do with python and the intel fortran compiler is to compile > numpy. Just in case it helps you, I set my environment from the console > by running a bat file with the following content (I am on 64 bit but you > could easily tailor it to your needs): > > "C:\Program Files\Microsoft SDKs\Windows\v7.0\Setup\WindowsSdkVer.exe" > -version:v7.0 > call "C:\Program Files (x86)\Microsoft Visual Studio > 9.0\VC\bin\vcvars64.bat" > call "C:\Program Files > (x86)\Intel\ComposerXE-2011\bin\ipsxe-comp-vars.bat" intel64 vs2008shell > rem call "C:\Program Files (x86)\Microsoft Visual Studio > 9.0\VC\bin\vcvars64" > rem call "C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin\setenv.cmd" > /x64 /Release > set PATH=C:\Python27;C:\Python27\Scripts;%PATH% > set PATH="C:\Program Files > (x86)\Intel\ComposerXE-2011\redist\intel64\mkl";"C:\Program Files > (x86)\Intel\ComposerXE-2011\mkl\lib\intel64";%PATH% > > Perhaps that helps you to set a working environment. All what I can tell > you is that with that environment, if I run "python f2py.py -c > --help-fcompiler" it finds the intel compiler. > > Good luck, > > Armando Thanks for the suggestion. So far I have not been able to modify the above for use on my 32-bit machine such that ifort is found by f2py.
From the f2py documentation, I assumed this was going to be rather straightforward, but it is not.
There should be a file named "ifortvars.bat" in the Intel Compiler bin directory. Call it with the right arguments before using f2py. On my system it is:
"C:\Program Files (x86)\Intel\Compiler\11.1\070\bin\ifortvars.bat" intel64 vs2008
Christoph Thanks Christoph.
Unfortunately, this does not seem to enable f2py to find ifort.
Here is the result of running ifortvars.bat immediately followed by f2py:
>"C:\Program Files\Intel\ComposerXE-2011\bin\ifortvars.bat" ia32 Intel(R) Parallel Studio XE 2011 Update 1 Copyright (C) 1985-2011 Intel Corporation. All rights reserved. Intel(R) Composer XE 2011 Update 3 (package 175) Setting environment for using Microsoft Visual Studio 2008 x86 tools.
>f2py.py -c --help-fcompiler Gnu95FCompiler instance properties: archiver = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- cr'] compile_switch = '-c' compiler_f77 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-O3', '-funroll-loops'] compiler_f90 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '- funroll-loops'] compiler_fix = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-mno- cygwin', '-Wall', '-fno-second-underscore', '-mno-cygwin', '-O3', '-funroll-loops'] libraries = ['gfortran'] library_dirs = ["gfortran.exe: error: unrecognized command line option '-mno-cygwin'\nc:\\program files\\gfortran\\lib\\gcc\\i586 -pc-mingw32\\4.7.0"] linker_exe = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin'] linker_so = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-mno-cygwin', '-Wall', '-mno-cygwin', '-shared'] object_switch = '-o ' ranlib = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe'] version = LooseVersion ('4.7.0') version_cmd = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '-- version', '-mno-cygwin'] Fortran compilers found: --fcompiler=gnu95 GNU Fortran 95 compiler (4.7.0) Compilers available for this platform, but not found: --fcompiler=absoft Absoft Corp Fortran Compiler --fcompiler=compaqv DIGITAL or Compaq Visual Fortran Compiler --fcompiler=g95 G95 Fortran Compiler --fcompiler=gnu GNU Fortran 77 compiler --fcompiler=intelev Intel Visual Fortran Compiler for Itanium apps --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps Compilers not available on this platform: --fcompiler=compaq Compaq 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=intelem Intel Fortran Compiler for EM64T-based apps --fcompiler=lahey Lahey/Fujitsu Fortran 95 Compiler --fcompiler=mips MIPSpro Fortran Compiler --fcompiler=nag NAGWare Fortran 95 Compiler --fcompiler=none Fake Fortran compiler --fcompiler=pg Portland Group Fortran Compiler --fcompiler=sun Sun or Forte Fortran 95 Compiler --fcompiler=vast Pacific-Sierra Research Fortran 90 Compiler For compiler details, run 'config_fc --verbose' setup command.
What is your numpy version and the output of ifort.exe? Maybe numpy.distutils needs to be updated for ComposerXE-2011. The (edited) output from f2py -v is:
Version: 2 numpy Version: 1.4.0 Requires: Python 2.3 or higher. License: NumPy license (see LICENSE.txt in the NumPy source code) Copyright 1999 - 2005 Pearu Peterson all rights reserved. http://cens.ioc.ee/projects/f2py2e/
and for ifort:
ifort Intel(R) Visual Fortran Compiler XE for applications running on IA-32, Version 12.0.3.175 Build 20110309 Copyright (C) 1985-2011 Intel Corporation. All rights reserved.
Thanks for your assistance.
Numpy 1.4.0 doesn't work for me either. Try upgrading to numpy 1.6.1.
Christoph
f2py.py -c --help-fcompiler IntelVisualFCompiler instance properties: archiver = ['C:\\Program Files\\Intel\\ComposerXE- 2011\\bin\\ia32\\ifort.exe', '/verbose', '/OUT:'] compile_switch = '/c ' compiler_f77 = ['C:\\Program Files\\Intel\\ComposerXE- 2011\\bin\\ia32\\ifort.exe', '-FI', '-w90', '-w95', '/nologo', '/MD', '/nbs', '/Qlowercase', '/us', '/O1', '/QaxM'] compiler_f90 = ['C:\\Program Files\\Intel\\ComposerXE- 2011\\bin\\ia32\\ifort.exe', '-FR', '/nologo', '/MD', '/nbs', '/Qlowercase', '/us', '/O1', '/QaxM'] compiler_fix = ['C:\\Program Files\\Intel\\ComposerXE- 2011\\bin\\ia32\\ifort.exe', '-FI', '-4L72', '-w', '/nologo', '/MD', '/nbs', '/Qlowercase', '/us', '/O1', '/QaxM']
That worked! Thanks so much for your help! P.S. ... been away from Python for a year and have fallen behind in updates so I also upgraded scipy and matplotlib. libraries = [] library_dirs = [] linker_exe = None linker_so = ['C:\\Program Files\\Intel\\ComposerXE- 2011\\bin\\ia32\\ifort.exe', '-shared', '-shared'] object_switch = '/Fo' ranlib = None version = LooseVersion ('12.0.3.175') version_cmd = ['C:\\Program Files\\Intel\\ComposerXE- 2011\\bin\\ia32\\ifort.exe', '/FI', '/c', 'c:\\docume~1\\jim~1.vic\\locals~1\\temp\\tmp4ypyfm\\3zikj 7.f', '/o', 'c:\\docume~1\\jim~1.vic\\locals~1\\temp\\tmp4ypyfm\\3zikj 7.o'] Gnu95FCompiler instance properties: archiver = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- cr'] compile_switch = '-c' compiler_f77 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-O3', '- funroll-loops'] compiler_f90 = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-fno-second-underscore', '-O3', '-funroll-loops'] compiler_fix = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-ffixed-form', '-fno-second-underscore', '-Wall', '-fno-second-underscore', '-O3', '-funroll-loops'] libraries = ['gfortran'] library_dirs = ['c:\\program files\\gfortran\\lib', 'c:\\program files\\gfortran\\lib\\gcc\\i586-pc-mingw32\\4.7.0'] linker_exe = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-Wall'] linker_so = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '- Wall', '-Wall', '-shared'] object_switch = '-o ' ranlib = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe'] version = LooseVersion ('4.7.0') version_cmd = ['C:\\Program Files\\gfortran\\bin\\gfortran.exe', '-- version'] Fortran compilers found: --fcompiler=gnu95 GNU Fortran 95 compiler (4.7.0) --fcompiler=intelv Intel Visual Fortran Compiler for 32-bit apps (12.0.3.175)
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 9/8/2011 5:56 AM, Jim Vickroy wrote:
Hello All, I'm attempting to create a python wrapper, for a Fortran subroutine, using f2py.
My system details are:
sys.version '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]' sys.getwindowsversion() (5, 1, 2600, 2, 'Service Pack 3') scipy.__version__ '0.7.1' numpy.__version__ '1.4.0' C:\>gfortran -dumpversion 4.7.0
C:\Python26\Lib\site-packages\numpy\f2py>f2py.py -c --help-fcompiler Traceback (most recent call last): File "C:\Python26\Scripts\f2py.py", line 24, in<module> main() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 557, in main run_compile() File "C:\Python26\lib\site-packages\numpy\f2py\f2py2e.py", line 543, in run_compile setup(ext_modules = [ext]) File "C:\Python26\lib\site-packages\numpy\distutils\core.py", line 186, in setup return old_setup(**new_attr) File "C:\Python26\lib\distutils\core.py", line 138, in setup ok = dist.parse_command_line() File "C:\Python26\lib\distutils\dist.py", line 460, in parse_command_line args = self._parse_command_opts(parser, args) File "C:\Python26\lib\distutils\dist.py", line 574, in _parse_command_opts func() File "C:\Python26\lib\site-packages\numpy\distutils\command\config_compiler.py", line 13, in show_fortran_compilers show_fcompilers(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 855, in show_fcompilers c.customize(dist) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 525, in customize self.set_libraries(self.get_libraries()) File "C:\Python26\lib\site-packages\numpy\distutils\fcompiler\gnu.py", line 306, in get_libraries raise NotImplementedError("Only MS compiler supported with gfortran on win64") NotImplementedError: Only MS compiler supported with gfortran on win64
Could someone help me to resolve this?
Thanks, -- jv
I eliminated the above NotImplementedError by replacing this raise exception line with a pass statement. Now, gfortran is being found and used by f2py but subsequently fails as follows: gfortran.exe: error: unrecognized command line option '-mno-cygwin' Why is f2py invoking gfortran with a cygwin option on a Windows XP machine? I supposedly installed the stand-alone version of gfortran and my take on the f2py documentation was that cygwin was not required. Note, gfortran can be used from a Windows commandline to successfully compile the code. Is anyone successfully using f2py and gfortran on a Windows machine without relying on cygwin? I'm not committed to gfortran; I also have the Intel Visual Fortran compiler (ifort) installed, but so far, I have been unable to get f2py to acknowledge that it exists.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
Is anyone successfully using f2py and gfortran on a Windows machine without relying on cygwin?
SpacePy uses mingw32 for both gcc and gfortran; I didn't have any trouble with f2py. I haven't tried a build with 64-bit Python or with EPD; I just build the installer against python.org's python and a bog-standard mingw32 and numpy install. Feel free to take a look at our setup.py (http://spacepy.lanl.gov/). It runs f2py with: --fcompiler=gnu95 --compiler=mingw32 (Note that gfortran normally refers to the new f90/95 chain, called gnu95 by f2py, and g77 is the old, f2c-derived chain, called gnu by f2py.) -- Jonathan Niehof ISR-3 Space Data Systems Los Alamos National Laboratory MS-D466 Los Alamos, NM 87545 Phone: 505-667-9595 email: jniehof@lanl.gov Correspondence / Technical data or Software Publicly Available
On 9/12/2011 11:17 AM, Jonathan T. Niehof wrote:
Is anyone successfully using f2py and gfortran on a Windows machine without relying on cygwin? SpacePy uses mingw32 for both gcc and gfortran; I didn't have any trouble with f2py. I haven't tried a build with 64-bit Python or with EPD; I just build the installer against python.org's python and a bog-standard mingw32 and numpy install. Feel free to take a look at our setup.py (http://spacepy.lanl.gov/). It runs f2py with: --fcompiler=gnu95 --compiler=mingw32
(Note that gfortran normally refers to the new f90/95 chain, called gnu95 by f2py, and g77 is the old, f2c-derived chain, called gnu by f2py.)
Thanks for this information; that site certainly looks interesting. I will look at it more carefully as I'm developing software at the NOAA Space Weather Prediction Center http://www.swpc.noaa.gov/. Christoph Gohlke determined that if I upgraded from numpy 1.3 to 1.4, f2py would successfully find and use the Intel Fortran compiler which was my preferred choice all along.
participants (4)
-
"V. Armando Solé"
-
Christoph Gohlke
-
Jim Vickroy
-
Jonathan T. Niehof