[Numpy-discussion] f2py : NotImplementedError: Only MS compiler supported with gfortran on win64

Jim Vickroy Jim.Vickroy at noaa.gov
Fri Sep 9 14:43:34 EDT 2011


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 at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion




More information about the NumPy-Discussion mailing list