Building on Windows with the Intel Visual Fortran Compiler
Hello all I'm trying to compile SciPy from SVN with MSVC and the Intel Visual Fortran Compiler, version 9.1. In the root of the SciPy source tree I have my site.cfg which contains: [blas_src] src_dirs = C:\home\albert\work2\blas [lapack_src] src_dirs = C:\home\albert\work2\lapack Inside the "Build Environment for Fortran IA-32 applications" command prompt I run the following command: python setup.py config --compiler=msvc --fcompiler=intelv build --compiler=msvc bdist_wininst (the build part doesn't seem to accept a --fcompiler option). This runs for a while and then it prints: Fortran f77 compiler: f77 -g -Wall -fno-second-underscore -mno-cygwin /w /I:C:\Program Files\VNI\CTT6.0\include\IA32 /fpe:3 /nologo -O2 -funroll-loops -fomit-frame-pointer -malign-double Fortran f90 compiler: ifort /w /I:C:\Program Files\VNI\CTT6.0\include\IA32 /fpe:3 /nologo /w /I:C:\Program Files\VNI\CTT6.0\include\IA32 /fpe:3 /nologo -O2 -funroll-loops -fomit-frame-pointer -malign-double Fortran fix compiler: ifort /w /I:C:\Program Files\VNI\CTT6.0\include\IA32 /fpe:3 /nologo /w /I:C:\Program Files\VNI\CTT6.0\include\IA32 /fpe:3 /nologo -O2 -funroll-loops -fomit-frame-pointer -malign-double followed by creating build\temp.win32-2.4 creating build\temp.win32-2.4\Lib creating build\temp.win32-2.4\Lib\fftpack creating build\temp.win32-2.4\Lib\fftpack\dfftpack compile options: '-c' f77:f77: Lib\fftpack\dfftpack\dcosqb.f Could not locate executable f77 Executable f77 does not exist which obviously isn't going to work, since I'm not using the MinGW compiler, nor did I specify it anywhere. The IntelVisualFCompiler class in intel.py in numpy.distutils contains: fc_exe = 'ifl' ... executables = { ... 'compiler_f77' : [fc_exe,"-FI","-w90","-w95"], 'compiler_fix' : [fc_exe,"-FI","-4L72","-w"], 'compiler_f90' : [fc_exe], ... } which looks like it should work, but it doesn't. Any ideas? Regards, Albert
Albert Strasheim wrote:
Hello all
I'm trying to compile SciPy from SVN with MSVC and the Intel Visual Fortran Compiler, version 9.1.
In the root of the SciPy source tree I have my site.cfg which contains:
[blas_src] src_dirs = C:\home\albert\work2\blas [lapack_src] src_dirs = C:\home\albert\work2\lapack
Inside the "Build Environment for Fortran IA-32 applications" command prompt I run the following command:
python setup.py config --compiler=msvc --fcompiler=intelv build --compiler=msvc bdist_wininst
(the build part doesn't seem to accept a --fcompiler option).
It should be on build_clib and build_ext, not build. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Hello all
(the build part doesn't seem to accept a --fcompiler option).
It should be on build_clib and build_ext, not build.
Ah, thanks. I'll update the wiki when I get it building. New error: Traceback (most recent call last): File "setup.py", line 55, in ? setup_package() File "setup.py", line 47, in setup_package configuration=configuration ) File "C:\Python24\Lib\site-packages\numpy\distutils\core.py", line 174, in setup return old_setup(**new_attr) File "C:\Python24\lib\distutils\core.py", line 149, in setup dist.run_commands() File "C:\Python24\lib\distutils\dist.py", line 946, in run_commands self.run_command(cmd) File "C:\Python24\lib\distutils\dist.py", line 966, in run_command cmd_obj.run() File "C:\Python24\Lib\site-packages\numpy\distutils\command\build_clib.py", line 72, in run force=self.force) File "C:\Python24\Lib\site-packages\numpy\distutils\fcompiler\__init__.py", line 654, in new_fcompiler __import__ (module_name) File "C:\Python24\Lib\site-packages\numpy\distutils\fcompiler\intel.py", line 123, in ? class IntelVisualFCompiler(FCompiler): File "C:\Python24\Lib\site-packages\numpy\distutils\fcompiler\intel.py", line 133, in IntelVisualFCompiler ar_exe = MSVCCompiler().lib AttributeError: MSVCCompiler instance has no attribute 'lib' Cheers, Albert
Albert Strasheim wrote:
Hello all
(the build part doesn't seem to accept a --fcompiler option). It should be on build_clib and build_ext, not build.
Ah, thanks. I'll update the wiki when I get it building. New error:
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\numpy\distutils\fcompiler\intel.py", line 133, in IntelVisualFCompiler ar_exe = MSVCCompiler().lib AttributeError: MSVCCompiler instance has no attribute 'lib'
That usually means that that compiler never got configured. Check the messages distutils spits out when it's trying to find a C compiler. You will probably want to set --compiler on build_clib and build_ext rather than build, too. I think the passing of information between distutils commands is a little screwed up; I've never had problems when I explicitly set that information on build_clib and build_ext, though. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Hello all
AttributeError: MSVCCompiler instance has no attribute 'lib'
That usually means that that compiler never got configured. Check the messages distutils spits out when it's trying to find a C compiler. You will probably want to set --compiler on build_clib and build_ext rather than build, too. I think the passing of information between distutils commands is a little screwed up; I've never had problems when I explicitly set that information on build_clib and build_ext, though.
I was doing this already: python setup.py config --compiler=msvc --fcompiler=intelv build_clib --compiler=msvc --fcompiler=intelv build_ext --compiler=msvc --fcompiler=intelv bdist_wininst Pertinent distutils output: ... running config running build_clib No module named msvccompiler in numpy.distutils, trying from distutils.. customize MSVCCompiler customize MSVCCompiler using build_clib 0 1 Could not locate executable ifc Could not locate executable efort Could not locate executable efc Could not locate executable efort Could not locate executable efc Traceback (most recent call last): ... File "C:\Python24\Lib\site-packages\numpy\distutils\fcompiler\intel.py", line 133, in IntelVisualFCompiler ar_exe = MSVCCompiler().lib AttributeError: MSVCCompiler instance has no attribute 'lib' Cheers, Albert
I think intel.py is simply wrong. It does: ar_exe = 'lib.exe' fc_exe = 'ifl' if sys.platform=='win32': from distutils.msvccompiler import MSVCCompiler ar_exe = MSVCCompiler().lib ar_exe is set already, so why go look for a value for it in the MSVCCompiler instance? Cheers, Albert
I was doing this already:
python setup.py config --compiler=msvc --fcompiler=intelv build_clib --compiler=msvc --fcompiler=intelv build_ext --compiler=msvc --fcompiler=intelv bdist_wininst
Hello all
-----Original Message----- From: scipy-user-bounces@scipy.org [mailto:scipy-user-bounces@scipy.org] On Behalf Of Albert Strasheim Sent: 06 August 2006 03:34 To: 'SciPy Users List' Subject: Re: [SciPy-user] Building on Windows with the Intel VisualFortranCompiler
I think intel.py is simply wrong. It does:
ar_exe = 'lib.exe' fc_exe = 'ifl' if sys.platform=='win32': from distutils.msvccompiler import MSVCCompiler ar_exe = MSVCCompiler().lib
ar_exe is set already, so why go look for a value for it in the MSVCCompiler instance?
Removing the code mentioned above seemed to fix the problem. Filed NumPy ticket #234 for this one. http://projects.scipy.org/scipy/numpy/ticket/234 Unfortunately, it seems the special/cephes/const.c code contains some constructs that MSVC doesn't accept. I reported these here some months ago: http://projects.scipy.org/scipy/scipy/ticket/12 Regards, Albert
On Sun, 6 Aug 2006 03:45:54 +0200 "Albert Strasheim" <fullung@gmail.com> wrote:
Hello all
-----Original Message----- From: scipy-user-bounces@scipy.org [mailto:scipy-user-bounces@scipy.org] On Behalf Of Albert Strasheim Sent: 06 August 2006 03:34 To: 'SciPy Users List' Subject: Re: [SciPy-user] Building on Windows with the Intel VisualFortranCompiler
I think intel.py is simply wrong. It does:
ar_exe = 'lib.exe' fc_exe = 'ifl' if sys.platform=='win32': from distutils.msvccompiler import MSVCCompiler ar_exe = MSVCCompiler().lib
ar_exe is set already, so why go look for a value for it in the MSVCCompiler instance?
Removing the code mentioned above seemed to fix the problem. Filed NumPy ticket #234 for this one.
Fixed.
Unfortunately, it seems the special/cephes/const.c code contains some constructs that MSVC doesn't accept. I reported these here some months ago:
Can you try the patch I just attached to that? -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm@physics.mcmaster.ca
Hello all
<snip>
Removing the code mentioned above seemed to fix the problem. Filed NumPy ticket #234 for this one.
Fixed.
Looks good. I think the Compaq Visual Fortran Compiler (the compiler was bought from Compaq by Intel) code has the same error. Maybe you want to fix that.
Unfortunately, it seems the special/cephes/const.c code contains some constructs that MSVC doesn't accept. I reported these here some months ago:
Can you try the patch I just attached to that?
Patch worked. Next issue here: http://projects.scipy.org/scipy/scipy/ticket/242 MSVC doesn't like cephes redefining fabs, which the compiler considers to be an instrinsic function. Next issue after this: building with the following site.cfg fails on Windows. [blas_src] src_dirs = C:\home\albert\work2\blas [lapack_src] src_dirs = C:\home\albert\work2\lapack The reason this fails is that the step where the LAPACK files are linked into a static library generates command line arguments that are about 80000 characters long. The limit seems to be 32k: http://blogs.msdn.com/oldnewthing/archive/2003/12/10/56028.aspx The way to get around this is to use the Windows @ trick. You put the command line arguments in a temporary file (the tempfile module is probably your friend here) and execute the command as: lib.exe @tempfilecontainingcommandlinearguments This is what SCons does when linking large numbers of files on Windows. Regards, Albert
participants (3)
-
Albert Strasheim -
David M. Cooke -
Robert Kern