fortran 90 compiler problem
Hello, I'm using the last svn version of numpy (. I tried the solution found on the mail list: python setup.py config_fc --fcompiler=gnu95 build the two interesting part (at least for me) in the building process are: customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler using config and later: customize G95FCompiler Found executable /usr/local/bin/g95 but I still have the same answer when I'm trying to do: f2py -c -m hello hello.f90 customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found and so: error: f90 not supported by GnuFCompiler needed for hello.f90 I can't compile my fortran module because of this. I'll attach the file obtain with python setup.py -v config_fc --fcompiler=gnu95 build And I have the same result for g95. thank you for numpy and f2py. N.
--- humufr@yahoo.fr wrote:
Hello,
I'm using the last svn version of numpy (.
I tried the solution found on the mail list:
python setup.py config_fc --fcompiler=gnu95 build
the two interesting part (at least for me) in the building process are:
customize GnuFCompiler Found executable /usr/bin/g77
gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found
[cut] I had a similar problem (not sure if it's yours). I was told to install the gfortran compiler for scipy and numpy. I did and that enabled the install. Here are my notes. I hope they are understandable and they help. I think Robert Kern straightened me out on this, so he gets the credit. If I'm wrong, of course, that's not Robert's fault. * Installing gfortran (needed for SciPy & NumPy): Get gfortran from http://r.research.att.com/tools/ (.dmg file) Run the install package on the .dmg. (note it gives you an uninstall, too) Add the paths /usr/local and /usr/local/bin to the $PATH variable in the .profile startup file so other apps can access the compiler and related stuff Let me know if it works. I like to keep on top of this since these things seem to change at times and little things like this can trip you up. -- Lou Pecora, my views are my own. ____________________________________________________________________________________ Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545469
humufr@yahoo.fr wrote:
Hello,
I'm using the last svn version of numpy (.
I tried the solution found on the mail list:
python setup.py config_fc --fcompiler=gnu95 build
the two interesting part (at least for me) in the building process are:
customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler using config
and later: customize G95FCompiler Found executable /usr/local/bin/g95
but I still have the same answer when I'm trying to do: f2py -c -m hello hello.f90
customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found
This is a correct message and does not imply that no Fortran 90 compiler exists. The GnuFCompiler ("gnu") only looks at g77, which is not a Fortran 90 compiler. That message only applies to the "gnu" compiler, not any other.
and so:
error: f90 not supported by GnuFCompiler needed for hello.f90
I can't compile my fortran module because of this. I'll attach the file obtain with
python setup.py -v config_fc --fcompiler=gnu95 build
And I have the same result for g95.
thank you for numpy and f2py.
Please give us the build log that actually failed and the command that you used to obtain it. The one you show, for numpy, succeeded. -- 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
This is the log I have when I'm trying to use f2py with a fortran 90 file. The last line seems to tell me that f2py cannot see gfortran and g95 even if it detected them when I installed f2py. thanks, N. gfortran and g95 are installed and I can use them:
gfortran gfortran: no input files
gfortran -c hello.f90 ls hello* hello.f90 hello.o
g95 g95: no input files
g95 -c hello.f90 ls hello* hello.f90 hello.o
and now
f2py -c -m hello hello.f90 running build running config_cc unifing config_cc, config, build_clib, build_ext, build commands --compiler opti ons running config_fc unifing config_fc, config, build_clib, build_ext, build commands --fcompiler opt ions running build_src building extension "hello" sources f2py options: [] f2py:> /tmp/tmpg5exdv/src.linux-i686-2.5/hellomodule.c creating /tmp/tmpg5exdv creating /tmp/tmpg5exdv/src.linux-i686-2.5 Reading fortran codes... Reading file 'hello.f90' (format:free) Post-processing... Block: hello Block: foo Post-processing (stage 2)... Building modules... Building module "hello"... Constructing wrapper function "foo"... foo(a) Wrote C/API module "hello" to file "/tmp/tmpg5exdv/src.linux-i686-2.5/he llomodule.c" adding '/tmp/tmpg5exdv/src.linux-i686-2.5/fortranobject.c' to sources. adding '/tmp/tmpg5exdv/src.linux-i686-2.5' to include_dirs. copying /home/gruel/usr/lib/python2.5/site-packages/numpy/f2py/src/fortranobject .c -> /tmp/tmpg5exdv/src.linux-i686-2.5 copying /home/gruel/usr/lib/python2.5/site-packages/numpy/f2py/src/fortranobject .h -> /tmp/tmpg5exdv/src.linux-i686-2.5 running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler using build_ext building 'hello' extension compiling C sources C compiler: gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-pro totypes -fPIC
creating /tmp/tmpg5exdv/tmp creating /tmp/tmpg5exdv/tmp/tmpg5exdv creating /tmp/tmpg5exdv/tmp/tmpg5exdv/src.linux-i686-2.5 compile options: '-I/tmp/tmpg5exdv/src.linux-i686-2.5 -I/home/gruel/usr/lib/pyth on2.5/site-packages/numpy/core/include -I/usr/include/python2.5 -c' gcc: /tmp/tmpg5exdv/src.linux-i686-2.5/hellomodule.c gcc: /tmp/tmpg5exdv/src.linux-i686-2.5/fortranobject.c compiling Fortran sources Fortran f77 compiler: /usr/bin/g77 -g -Wall -fno-second-underscore -fPIC -O3 -fu nroll-loops -march=pentium-m -mmmx -msse2 -msse -fomit-frame-pointer compile options: '-I/tmp/tmpg5exdv/src.linux-i686-2.5 -I/home/gruel/usr/lib/pyth on2.5/site-packages/numpy/core/include -I/usr/include/python2.5 -c' error: f90 not supported by GnuFCompiler needed for hello.f90 On Wednesday 10 October 2007 16:15:32 Robert Kern wrote:
humufr@yahoo.fr wrote:
Hello,
I'm using the last svn version of numpy (.
I tried the solution found on the mail list:
python setup.py config_fc --fcompiler=gnu95 build
the two interesting part (at least for me) in the building process are:
customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler using config
and later: customize G95FCompiler Found executable /usr/local/bin/g95
but I still have the same answer when I'm trying to do: f2py -c -m hello hello.f90
customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found
This is a correct message and does not imply that no Fortran 90 compiler exists. The GnuFCompiler ("gnu") only looks at g77, which is not a Fortran 90 compiler. That message only applies to the "gnu" compiler, not any other.
and so:
error: f90 not supported by GnuFCompiler needed for hello.f90
I can't compile my fortran module because of this. I'll attach the file obtain with
python setup.py -v config_fc --fcompiler=gnu95 build
And I have the same result for g95.
thank you for numpy and f2py.
Please give us the build log that actually failed and the command that you used to obtain it. The one you show, for numpy, succeeded.
I had the same problem building on Linux. I found this on a wiki somewhere (can only find it in google cache now): """(Note: Make sure that if you build with *gfortran* that *g77* is not installed on your system (or at least is not in your *PATH* when *numpy* is being built) as you need to link with the same compiler that you built lapack with when *numpy* builds. It will try and find *g77* first which will lead to linking errors if you have built lapack with *gfortran*).""" The trick for me was that step of removing g77 (or taking it out of the path) - then distutils seems to pick up gfortran fine, but otherwise it doesn't seem to work (even with --fcompiler=gnu95 etc) Cheers Robin
humufr@yahoo.fr wrote:
This is the log I have when I'm trying to use f2py with a fortran 90 file. The last line seems to tell me that f2py cannot see gfortran and g95 even if it detected them when I installed f2py.
thanks,
N.
gfortran and g95 are installed and I can use them:
gfortran gfortran: no input files
gfortran -c hello.f90 ls hello* hello.f90 hello.o
g95 g95: no input files
g95 -c hello.f90 ls hello* hello.f90 hello.o
and now
f2py -c -m hello hello.f90
Tell f2py that you want it to use gfortran instead of the default. f2py --fcompiler=gnu95 -c -m hello hello.f90 -- 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
It's working fine thank you. I'm a little bit surprised because I was thinking that the --fcompiler when building numpy was the way to change the default compiler but anyway, that's work now. N.
Tell f2py that you want it to use gfortran instead of the default.
f2py --fcompiler=gnu95 -c -m hello hello.f90
On 10/10/07, Robert Kern <robert.kern@gmail.com> wrote:
humufr@yahoo.fr wrote:
Hello,
I'm using the last svn version of numpy (.
I tried the solution found on the mail list:
python setup.py config_fc --fcompiler=gnu95 build
the two interesting part (at least for me) in the building process are:
customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler using config
and later: customize G95FCompiler Found executable /usr/local/bin/g95
but I still have the same answer when I'm trying to do: f2py -c -m hello hello.f90
customize GnuFCompiler Found executable /usr/bin/g77 gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found customize GnuFCompiler gnu: no Fortran 90 compiler found gnu: no Fortran 90 compiler found
This is a correct message and does not imply that no Fortran 90 compiler exists. The GnuFCompiler ("gnu") only looks at g77, which is not a Fortran 90 compiler. That message only applies to the "gnu" compiler, not any other.
I have always found these messages confusing. Perhaps they could be better worded to reflect the process, or, even better, silenced. All that really matters is success or failure and the reason, not every little dead end explored on the way. If they are needed for debugging, write the whole mess to a file in the build directory instead of the console. Chuck
Charles R Harris wrote:
On 10/10/07, *Robert Kern* <robert.kern@gmail.com <mailto:robert.kern@gmail.com>> wrote:
humufr@yahoo.fr <mailto:humufr@yahoo.fr> wrote: > Hello, > > I'm using the last svn version of numpy (. > > I tried the solution found on the mail list: > > python setup.py config_fc --fcompiler=gnu95 build > > the two interesting part (at least for me) in the building process are: > > customize GnuFCompiler Found executable /usr/bin/g77 > gnu: no Fortran 90 compiler found > gnu: no Fortran 90 compiler found > customize GnuFCompiler > gnu: no Fortran 90 compiler found > gnu: no Fortran 90 compiler found > customize GnuFCompiler using config > > and later: > customize G95FCompiler Found executable /usr/local/bin/g95 > > but I still have the same answer when I'm trying to do: f2py -c -m hello > hello.f90 > > customize GnuFCompiler Found executable /usr/bin/g77 > gnu: no Fortran 90 compiler found gnu: no Fortran 90 > compiler found customize GnuFCompiler > gnu: no Fortran 90 compiler found > gnu: no Fortran 90 compiler found
This is a correct message and does not imply that no Fortran 90 compiler exists. The GnuFCompiler ("gnu") only looks at g77, which is not a Fortran 90 compiler. That message only applies to the "gnu" compiler, not any other.
I have always found these messages confusing. Perhaps they could be better worded to reflect the process, or, even better, silenced. All that really matters is success or failure and the reason, not every little dead end explored on the way. If they are needed for debugging, write the whole mess to a file in the build directory instead of the console.
Go for it. -- 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
participants (5)
-
Charles R Harris
-
humufr@yahoo.fr
-
Lou Pecora
-
Robert Kern
-
Robin