You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there is a bug in the way f2py detects fortran compilers, where the executable name never gets entered. (I've tried posting this to the mailing list, but my post wont show up.)
Everything discussed here was performed on: Linux cluster1 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:59:20 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
Trying to get f2py to recognize ifort, I started to output comments in some of the code to help trace down the mistake.
I started in "numpy/distutils/fcompiler/init.py", which appears to check for the existence of a compiler based on whether or not it can find a version number in "numpy/distutils/fcompiler/init.py".
I've included my output, but I'll also add short summary:
f2py successfully locates all compatible compilers with the platform (init.py)
f2py begins trying to get versions for each possible compiler (init.py)
f2py INCORRECTLY creates a version command, to test if the compiler exists (ccompiler.py)
Where the version command sticks with the wrong executables ('/opt/pgi/linux86-64/6.2/bin/pgf77' and '/opt/pgi/linux86-64/6.2/bin/pgf90').
For example, to detect if ifort is installed, the following command is (wrongly) run:
This command is garbage, because it is trying pgf77 rather than ifort. Running this command is silly but I'll go ahead and include it:
---------------------------------------
pgf77-Warning-Unknown switch: -FI
pgf77 6.2-5 64-bit target on x86-64 Linux
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
PGFTN/x86-64 Linux/x86-64 6.2-5
Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
Copyright 2000-2006, STMicroelectronics, Inc. All Rights Reserved.
----------------------------------------
Since ifort is in the path:
$ which ifort
/home/user10/intel/fce/9.1.041/bin/ifort
The following works well:
$ /home/user10/intel/fce/9.1.041/bin/ifort -FI -V -c /tmp/tmplG4_3d/ESXFqO.f -o /tmp/tmplG4_3d/ESXFqO.o
Intel(R) Fortran Compiler for Intel(R) EM64T-based applications, Version 9.1 Build 20070109 Package ID: l_fc_c_9.1.041
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
Intel Fortran 9.1-6565
I tried a quick hack to get the ifort executable in the version command, but this didn't cause ifort to be successfully detected.
My Test Output:
$ python setup.py install --prefix=${HOME}/numpy_dir | grep "NDR"
Running from numpy source directory.
/home/nreveles/numpy-1.3.0/numpy/distutils/command/config.py:361: DeprecationWarning:
+++++++++++++++++++++++++++++++++++++++++++++++++
Usage of get_output is deprecated: please do not
use it anymore, and avoid configuration checks
involving running executable on the target machine.
+++++++++++++++++++++++++++++++++++++++++++++++++
DeprecationWarning)
NDR: self= <numpy.distutils.fcompiler.gnu.GnuFCompiler instance at 0x2aaaaee5d950>
NDR: version_cmd = ['/opt/pgi/linux86-64/6.2/bin/pgf77', '--version']
NDR: compiler = <numpy.distutils.fcompiler.gnu.GnuFCompiler instance at 0x2aaaaee5d950>
NDR: comp. version = None
NDR: self= <numpy.distutils.fcompiler.intel.IntelFCompiler instance at 0x2aaaaee62200>
NDR: version_cmd = ['/opt/pgi/linux86-64/6.2/bin/pgf77', '-FI', '-V', '-c', '/tmp/tmplG4_3d/ESXFqO.f', '-o', '/tmp/tmplG4_3d/ESXFqO.o']
NDR: compiler = <numpy.distutils.fcompiler.intel.IntelFCompiler instance at 0x2aaaaee62200>
NDR: comp. version = None
NDR: compiler = <numpy.distutils.fcompiler.lahey.LaheyFCompiler instance at 0x2aaaaee62680>
NDR: self= <numpy.distutils.fcompiler.lahey.LaheyFCompiler instance at 0x2aaaaee62680>
NDR: version_cmd = ['/opt/pgi/linux86-64/6.2/bin/pgf90', '--version']
NDR: comp. version = None
NDR: compiler = <numpy.distutils.fcompiler.pg.PGroupFCompiler instance at 0x2aaaaee633b0>
NDR: self= <numpy.distutils.fcompiler.pg.PGroupFCompiler instance at 0x2aaaaee633b0>
NDR: version_cmd = ['/opt/pgi/linux86-64/6.2/bin/pgf77', '-V 2>/dev/null']
NDR: comp. version = 6.2-5
The text was updated successfully, but these errors were encountered:
What command did you run to start the build? It seems you do have the pgf77 compiler installed, so distutils correctly finds a working compiler. I suspect you did not specify which compiler you want, like so:
The Intel Fortran version detection was also updated in ce9fea2c20. So this should be fixed. Please reopen and answer my question above if this is still an issue for you.
Original ticket http://projects.scipy.org/numpy/ticket/1170 on 2009-07-14 by trac user selevercin, assigned to @dmcooke.
I believe there is a bug in the way f2py detects fortran compilers, where the executable name never gets entered. (I've tried posting this to the mailing list, but my post wont show up.)
Everything discussed here was performed on: Linux cluster1 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:59:20 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
Trying to get f2py to recognize ifort, I started to output comments in some of the code to help trace down the mistake.
I started in "numpy/distutils/fcompiler/init.py", which appears to check for the existence of a compiler based on whether or not it can find a version number in "numpy/distutils/fcompiler/init.py".
I've included my output, but I'll also add short summary:
Where the version command sticks with the wrong executables ('/opt/pgi/linux86-64/6.2/bin/pgf77' and '/opt/pgi/linux86-64/6.2/bin/pgf90').
For example, to detect if ifort is installed, the following command is (wrongly) run:
This command is garbage, because it is trying pgf77 rather than ifort. Running this command is silly but I'll go ahead and include it:
Since ifort is in the path:
The following works well:
I tried a quick hack to get the ifort executable in the version command, but this didn't cause ifort to be successfully detected.
My Test Output:
The text was updated successfully, but these errors were encountered: