[SciPy-dev] [mailinglist] Re: NNLS

Uwe Schmitt uschmitt@mineway...
Fri Jul 25 04:35:43 CDT 2008


Robert Kern schrieb:
> On Thu, Jul 24, 2008 at 03:35, Uwe Schmitt <uschmitt@mineway.de> wrote:
>   
>> Robert Kern schrieb:
>>     
>>> On Wed, Jul 23, 2008 at 17:47, Alan G Isaac <aisaac@american.edu> wrote:
>>>
>>> Well, I'd prefer an f2py version rather than a ctypes version, but yes, please.
>>>
>>>
>>>       
>> I had some problems because my local python.exe is from Enthought, which
>> was compiled
>> with MS Visual Studio. But I wanted g77 for compiling the Fortran code,
>> which gives some problems when using f2py.
>>     
>
> Can you describe these problems? The g77 we distribute with EPD is
> compatible with the compiler used to build the Python executable, at
> least when used from distutils. 
>   
Hi, if I use "python f2py.py --compiler=mingw32 -c NNLS.f"

I get on stdout:

    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands
    --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands
    --fcompiler options
    running build_src
    building extension "untitled" sources
    f2py options: []
    f2py:>
    c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5\untitledmodule.c
    creating c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy
    creating c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5
    Reading fortran codes...
        Reading file 'NNLS.F' (format:fix,strict)
    Post-processing...
        Block: untitled
                Block: nnls
                Block: diff
                Block: h12
                Block: g1
    Post-processing (stage 2)...
    Building modules...
        Building module "untitled"...
            Constructing wrapper function "nnls"...
    getarrdims:warning: assumed shape array, using 0 instead of '*'
    getarrdims:warning: assumed shape array, using 0 instead of '*'
    getarrdims:warning: assumed shape array, using 0 instead of '*'
    getarrdims:warning: assumed shape array, using 0 instead of '*'
    getarrdims:warning: assumed shape array, using 0 instead of '*'
    getarrdims:warning: assumed shape array, using 0 instead of '*'
              nnls(a,m,n,b,x,rnorm,w,zz,index_bn,mode,[mda])
            Creating wrapper for Fortran function "diff"("diff")...
            Constructing wrapper function "diff"...
              diff = diff(x,y)
            Constructing wrapper function "h12"...
    getarrdims:warning: assumed shape array, using 0 instead of '*'
    getarrdims:warning: assumed shape array, using 0 instead of '*'
              h12(mode,lpivot,l1,m,u,up,c,ice,icv,ncv,[iue])
            Constructing wrapper function "g1"...
              g1(a,b,cterm,sterm,sig)
        Wrote C/API module "untitled" to file
    "c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5/untitledmodule.c"
        Fortran 77 wrappers are saved to
    "c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5\untitled-f2pywrappers.f"
      adding
    'c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5\fortranobject.c'
    to sources.
      adding
    'c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5' to
    include_dirs.
    copying
    c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\f2py\src\fortranobject.c
    -> c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5
    copying
    c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\f2py\src\fortranobject.h
    -> c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5
      adding
    'c:\dokume~1\uschmi~2.000\lokale~1\temp\tmpzs6mqy\src.win32-2.5\untitled-f2pywrappers.f'
    to sources.
    running build_ext

And on stderr:

    rmbadname1: Replacing "index" with "index_bn".
    rmbadname1: Replacing "index" with "index_bn".
    Traceback (most recent call last):
      File "f2py.py", line 26, in <module>
        main()
      File
    "c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\f2py\f2py2e.py",
    line 558, in main
        run_compile()
      File
    "c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\f2py\f2py2e.py",
    line 545, in run_compile
        setup(ext_modules = [ext])
      File
    "c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\distutils\core.py",
    line 176, in setup
        return old_setup(**new_attr)
      File "C:\Python25\lib\distutils\core.py", line 151, in setup
        dist.run_commands()
      File "C:\Python25\lib\distutils\dist.py", line 974, in run_commands
        self.run_command(cmd)
      File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
        cmd_obj.run()
      File "C:\Python25\lib\distutils\command\build.py", line 112, in run
        self.run_command(cmd_name)
      File "C:\Python25\lib\distutils\cmd.py", line 333, in run_command
        self.distribution.run_command(command)
      File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
        cmd_obj.run()
      File
    "c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\distutils\command\build_ext.py",
    line 78, in run
        force=self.force)
      File
    "c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\distutils\ccompiler.py",
    line 366, in new_compiler
        compiler = klass(None, dry_run, force)
      File
    "c:\Python25\lib\site-packages\numpy-1.0.4.0003-py2.5-win32.egg\numpy\distutils\mingw32ccompiler.py",
    line 46, in __init__
        verbose,dry_run, force)
      File "c:\Python25\lib\distutils\cygwinccompiler.py", line 84, in
    __init__
        get_versions()
      File "c:\Python25\lib\distutils\cygwinccompiler.py", line 424, in
    get_versions
        ld_version = StrictVersion(result.group(1))
      File "C:\Python25\lib\distutils\version.py", line 40, in __init__
        self.parse(vstring)
      File "C:\Python25\lib\distutils\version.py", line 107, in parse
        raise ValueError, "invalid version number '%s'" % vstring
    ValueError: invalid version number '2.18.50.20080625'

Greetings, Uwe


-- 
Dr. rer. nat. Uwe Schmitt
F&E Mathematik
 
mineway GmbH
Science Park 2
D-66123 Saarbrücken
 
Telefon: +49 (0)681 8390 5334
Telefax: +49 (0)681 830 4376
 
uschmitt@mineway.de
www.mineway.de
 
Geschäftsführung: Dr.-Ing. Mathias Bauer
Amtsgericht Saarbrücken HRB 12339


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-dev/attachments/20080725/e53e7f01/attachment-0001.html 


More information about the Scipy-dev mailing list