Setup doesn't pickup Intel Fortran compiler

Hi, I have trouble getting Scipy (and numpy) using the correct Fortran compiler : Found executable /appli/intel/10.1.018/intel64/cce/bin/icc customize GnuFCompiler Found executable /appli/intel/10.1.018/intel64/fce/bin/ifort gnu: no Fortran 90 compiler found Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found customize IntelFCompiler customize LaheyFCompiler Could not locate executable lf95 lahey: no Fortran 90 compiler found lahey: no Fortran 90 compiler found customize PGroupFCompiler Could not locate executable pgf90 pg: no Fortran 90 compiler found pg: no Fortran 90 compiler found customize AbsoftFCompiler Could not locate executable f90 absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found customize NAGFCompiler Found executable /usr/bin/f95 customize VastFCompiler customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize CompaqFCompiler Could not locate executable fort compaq: no Fortran 90 compiler found compaq: no Fortran 90 compiler found customize IntelItaniumFCompiler customize IntelEM64TFCompiler customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler customize UnixCCompiler customize UnixCCompiler using scons Found executable /appli/intel/10.1.018/intel64/cce/bin/icpc Why is it trying to search for another Fortran compiler when it actually found the Intel one? I used python setup.py install or python setup.py install --fcompiler=intelem, but the output was the same :| Matthieu -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher

Matthieu Brucher wrote:
Hi,
I have trouble getting Scipy (and numpy) using the correct Fortran compiler :
Found executable /appli/intel/10.1.018/intel64/cce/bin/icc customize GnuFCompiler Found executable /appli/intel/10.1.018/intel64/fce/bin/ifort gnu: no Fortran 90 compiler found Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found customize IntelFCompiler customize LaheyFCompiler Could not locate executable lf95 lahey: no Fortran 90 compiler found lahey: no Fortran 90 compiler found customize PGroupFCompiler Could not locate executable pgf90 pg: no Fortran 90 compiler found pg: no Fortran 90 compiler found customize AbsoftFCompiler Could not locate executable f90 absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found absoft: no Fortran 90 compiler found customize NAGFCompiler Found executable /usr/bin/f95 customize VastFCompiler customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize CompaqFCompiler Could not locate executable fort compaq: no Fortran 90 compiler found compaq: no Fortran 90 compiler found customize IntelItaniumFCompiler customize IntelEM64TFCompiler customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler customize UnixCCompiler customize UnixCCompiler using scons Found executable /appli/intel/10.1.018/intel64/cce/bin/icpc
Why is it trying to search for another Fortran compiler when it actually found the Intel one?
Maybe nobody knows :)
I used python setup.py install or python setup.py install --fcompiler=intelem, but the output was the same :|
Yes, intelem is for ia architectures IIRC I have just tried compiling numpy with both icc/ifort (11.0), it works without trouble with numscons: CFLAGS="-debug" FFLAGS="-debug" CC=icc F77=ifort python setupscons.py scons I used the -debug flag to avoid waiting forever - the whole numpy test suite passes. cheers, David

David Cournapeau wrote:
Yes, intelem is for ia architectures IIRC
I have just tried compiling numpy with both icc/ifort (11.0), it works without trouble with numscons:
CFLAGS="-debug" FFLAGS="-debug" CC=icc F77=ifort python setupscons.py scons
I used the -debug flag to avoid waiting forever - the whole numpy test suite passes.
Just after sending the email, I saw your bug-report :) You may want to try the last numscons code: http://github.com/cournape/numscons/tree/master cheers, David

2009/5/29 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
David Cournapeau wrote:
Yes, intelem is for ia architectures IIRC
I have just tried compiling numpy with both icc/ifort (11.0), it works without trouble with numscons:
CFLAGS="-debug" FFLAGS="-debug" CC=icc F77=ifort python setupscons.py scons
I used the -debug flag to avoid waiting forever - the whole numpy test suite passes.
Just after sending the email, I saw your bug-report :)
You may want to try the last numscons code:
http://github.com/cournape/numscons/tree/master
cheers,
Thanks, I'll try this at once ;) I didn't remember you switched to github :| Matthieu -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher

2009/5/29 Matthieu Brucher <matthieu.brucher@gmail.com>:
2009/5/29 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
David Cournapeau wrote:
Yes, intelem is for ia architectures IIRC
I have just tried compiling numpy with both icc/ifort (11.0), it works without trouble with numscons:
CFLAGS="-debug" FFLAGS="-debug" CC=icc F77=ifort python setupscons.py scons
I used the -debug flag to avoid waiting forever - the whole numpy test suite passes.
Just after sending the email, I saw your bug-report :)
You may want to try the last numscons code:
http://github.com/cournape/numscons/tree/master
cheers,
Thanks, I'll try this at once ;) I didn't remember you switched to github :|
Matthieu
Now, I don't have an error, but the folders are still empty: Executing scons command (pkg is numpy.core): /users/brucher/pau112/local/x86_64_RH5/bin/python "/users/brucher/pau112/local/x86_64_RH5/lib/python2.5/site-packages/numscons/scons-local/scons.py" -f numpy/core/SConstruct -I. scons_tool_path="" src_dir="numpy/core" pkg_name="numpy.core" log_level=50 distutils_libdir="../../../../build/lib.linux-x86_64-2.5" cc_opt=icc cc_opt_path="/appli/intel/10.1.018/intel64/cce/bin" cxx_opt=icpc cxx_opt_path="/appli/intel/10.1.018/intel64/cce/bin" include_bootstrap=../../../../numpy/core/include silent=0 bootstrapping=1 scons: Reading SConscript files ... scons: warning: Ignoring missing SConscript 'build/scons/numpy/core/SConscript' File "/users/brucher/pau112/local/x86_64_RH5/lib/python2.5/site-packages/numscons/core/numpyenv.py", line 108, in DistutilsSConscript scons: done reading SConscript files. scons: Building targets ... scons: `.' is up to date. scons: done building targets. gfortran is still detected in the wrong folder: f77_opt=gfortran f77_opt_path="/appli/intel/10.1.018/intel64/fce/bin" I deleted the numpy folder completely and started again from scratch, but I keep getting the same errors :| I deleted the environment variables, and the fortran compilers seem OK. If I export F77=ifort, it gives me something even stranger: f77_opt=fortran f77_opt_path="/appli/intel/10.1.018/intel64/fce/bin" The strangest thing for me is that the scons subfolders are almost empty (just have the .dblite file). Matthieu -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher

Matthieu Brucher wrote:
2009/5/29 Matthieu Brucher <matthieu.brucher@gmail.com>:
2009/5/29 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
David Cournapeau wrote:
Yes, intelem is for ia architectures IIRC
I have just tried compiling numpy with both icc/ifort (11.0), it works without trouble with numscons:
CFLAGS="-debug" FFLAGS="-debug" CC=icc F77=ifort python setupscons.py scons
I used the -debug flag to avoid waiting forever - the whole numpy test suite passes.
Just after sending the email, I saw your bug-report :)
You may want to try the last numscons code:
http://github.com/cournape/numscons/tree/master
cheers,
Thanks, I'll try this at once ;) I didn't remember you switched to github :|
Matthieu
Now, I don't have an error, but the folders are still empty:
Which version of numpy are you using ? Are you building from a svn version or a source tarball ? The missing SConscript warning is strange (it should not be a warning - missing scons files is pretty fatal :) ).
gfortran is still detected in the wrong folder: f77_opt=gfortran f77_opt_path="/appli/intel/10.1.018/intel64/fce/bin" I deleted the numpy folder completely and started again from scratch, but I keep getting the same errors :| I deleted the environment variables, and the fortran compilers seem OK. If I export F77=ifort, it gives me something even stranger: f77_opt=fortran f77_opt_path="/appli/intel/10.1.018/intel64/fce/bin"
Hm, the problem is that the scons command in numpy.distutils was designed to make sure the same compiler was used as distutils. But here, we would like to bypass distutils completely... I could add an option to the scons command to tell numscons to ignore compilers given by distutils - or maybe just bypassing it altogether. When I started numscons, I tried to be as compatible as possible with distutils, but that's a lost battle. Just using a default compiler, and customization from CC would be better and easier to set up... The code to detect fortran compiler in distutils is in numpy/distutils/fcompiler/__init__.py (line 688 in last revision). As a temporary workaround, you could remove every compiler of the list except intel. The problem is that some compilers depend on other compilers, and I have never really taken the time to understand how this was supposed to work. cheers, David

Now, I don't have an error, but the folders are still empty:
Which version of numpy are you using ? Are you building from a svn version or a source tarball ? The missing SConscript warning is strange (it should not be a warning - missing scons files is pretty fatal :) ).
The numpy 1.3.0 tarball from the sf webpage. Missing SConscript is something I use regularly, it isn't a problem. The really strange thing is that the folders are empty :|
gfortran is still detected in the wrong folder: f77_opt=gfortran f77_opt_path="/appli/intel/10.1.018/intel64/fce/bin" I deleted the numpy folder completely and started again from scratch, but I keep getting the same errors :| I deleted the environment variables, and the fortran compilers seem OK. If I export F77=ifort, it gives me something even stranger: f77_opt=fortran f77_opt_path="/appli/intel/10.1.018/intel64/fce/bin"
Hm, the problem is that the scons command in numpy.distutils was designed to make sure the same compiler was used as distutils. But here, we would like to bypass distutils completely... I could add an option to the scons command to tell numscons to ignore compilers given by distutils - or maybe just bypassing it altogether. When I started numscons, I tried to be as compatible as possible with distutils, but that's a lost battle. Just using a default compiler, and customization from CC would be better and easier to set up...
The code to detect fortran compiler in distutils is in numpy/distutils/fcompiler/__init__.py (line 688 in last revision). As a temporary workaround, you could remove every compiler of the list except intel. The problem is that some compilers depend on other compilers, and I have never really taken the time to understand how this was supposed to work.
It seems indeed that the Fortran detection is tricky ;) I've deleted some compilers in 'linux', and I had to add intel in 'posix'. I had to use intelem for 'linux' as I use a 64bits processor, which is thus the EM64T compiler. For 'posix', it works as long as I do not export LD_PRELOAD with something ld doesn't like. So know, it works, safe for the fact that f77_opt is fortran and not ifort. Matthieu, one step closer to using the correct Fortran compiler... -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher

It seems indeed that the Fortran detection is tricky ;)
I've deleted some compilers in 'linux', and I had to add intel in 'posix'. I had to use intelem for 'linux' as I use a 64bits processor, which is thus the EM64T compiler. For 'posix', it works as long as I do not export LD_PRELOAD with something ld doesn't like. So know, it works, safe for the fact that f77_opt is fortran and not ifort.
Matthieu, one step closer to using the correct Fortran compiler...
OK, I found what's missing. In distutils/scons.py, you only test for intel, not intele or intelem, which means the name is then fortran instead of ifort. (line 109). Matthieu -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher

Matthieu Brucher wrote:
The numpy 1.3.0 tarball from the sf webpage. Missing SConscript is something I use regularly, it isn't a problem.
Ok, the SConscript files were not added to the tarballs - I fixed MANIFEST.in so that won't happen again. I never use tarballs, and only test them with distutils, which is why I have never caught this problem.
It seems indeed that the Fortran detection is tricky ;)
Yes - and to make it even more 'interesting', tool detection is not great with scons either. The current scheme in numscons is very crude. cheers, David

2009/5/30 David Cournapeau <david@ar.media.kyoto-u.ac.jp>:
Matthieu Brucher wrote:
The numpy 1.3.0 tarball from the sf webpage. Missing SConscript is something I use regularly, it isn't a problem.
Ok, the SConscript files were not added to the tarballs - I fixed MANIFEST.in so that won't happen again. I never use tarballs, and only test them with distutils, which is why I have never caught this problem.
Straneg, I have a line in the Manifest.in file, and I have the SConstruct files in the different folders :|
It seems indeed that the Fortran detection is tricky ;)
Yes - and to make it even more 'interesting', tool detection is not great with scons either. The current scheme in numscons is very crude.
cheers,
But at least it works ;) Thanks for this ! Matthieu -- Information System Engineer, Ph.D. Website: http://matthieu-brucher.developpez.com/ Blogs: http://matt.eifelle.com and http://blog.developpez.com/?blog=92 LinkedIn: http://www.linkedin.com/in/matthieubrucher
participants (2)
-
David Cournapeau
-
Matthieu Brucher