[SciPy-user] new problem with f2py --fcompiler=intelem no longer works.

George Nurser gnurser at googlemail.com
Thu Jun 7 18:07:11 EDT 2007


After updating to the latest version of numpy in SVN, rev 3841, f2py
--fcompiler=intelem seems to have stopped working for me [however it
stil works for the deafulat compiler,i.e. leaving out
--fcompiler=intelem ] e.g.

f2py --fcompiler=intelem -c -m J Jackett_et_al.f90
Traceback (most recent call last):
  File "/noc/users/agn/bin/f2py", line 26, in <module>
    main()
  File "/noc/users/agn/ext/AMD64/lib/python2.5/site-packages/numpy/f2py/f2py2e.py",
line 552, in main
    run_compile()
  File "/noc/users/agn/ext/AMD64/lib/python2.5/site-packages/numpy/f2py/f2py2e.py",
line 440, in run_compile
    allowed_keys = fcompiler.fcompiler_class.keys()
AttributeError: 'NoneType' object has no attribute 'keys'

The first problem seems to be that
numpy.distutils.fcompiler.load_all_fcompiler_classes()
hasn't been called yet, so fcompiler.fcompiler_class is empty.

If I run it in ipython, first calling
numpy.distutils.fcompiler.load_all_fcompiler_classes()

then doing
%pdb on
%run -i ~/bin/f2py --fcompiler=intelem -c -m J Jackett_et_al.f90

the program dies in ccompiler.py:
....
    180                 ctype = fcompiler.compiler_type
--> 181             if fcompiler and fcompiler.get_version():
    182                 fcompiler.customize(self.distribution)
    183                 fcompiler.customize_cmd(self)

/noc/users/agn/ext/AMD64/lib/python2.5/site-packages/numpy/distutils/ccompiler.py
in CCompiler_get_version(self, force, ok_status)
    263     if not version_cmd or not version_cmd[0]:
    264         return None
--> 265     cmd = ' '.join(version_cmd)
    266     try:
    267         matcher = self.version_match

<type 'exceptions.TypeError'>: sequence item 1: expected string, NoneType found
> /noc/users/agn/ext/AMD64/lib/python2.5/site-packages/numpy/distutils/ccompiler.py(265)CCompiler_get_version()
    264         return None
--> 265     cmd = ' '.join(version_cmd)

ipdb> print version_cmd
['/data/ncs/packages4/linux/intel_compilers/v9.1/em64t/fc/9.1.036/bin/ifort',
None]

--George Nurser.



More information about the SciPy-User mailing list