failed tests on Ubuntu 10.04

7 views
Skip to first unread message

Julien Rioux

unread,
Jun 22, 2010, 5:15:59 PM6/22/10
to fwrap...@googlegroups.com
Hi,

I would be glad to give fwrap a try but for now I did not succeed to
run the tests. If I did something wrong I will try to correct and
report back.

FYI.
Ubuntu 10.04
python 2.6.5
numpy 1.3.0
cython 0.11.2
gcc 4.4.3

fparser at revision 58

I get failed tests:

$ hg identify
1d217b2fca04 tip
$ python runtests.py -vvv --fcompiler=gnu95 --no-cleanup
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3]

wrapping default_types.f90 ... Not implemented: Defined_Binary_Op
Not implemented: Defined_Binary_Op
Defined_Operator not defined used by Generic_Spec
ok
wrapping int_args.f90 ... ok
wrapping many_args.f90 ... ok
wrapping old_decl.f90 ... ok
wrapping simple_array.f90 ... ERROR
compiling and running all_complex.f90 ... ERROR
compiling and running all_ints.f90 ... Doctest: all_ints_fwrap_doctest ... ok
compiling and running all_logicals.f90 ... ERROR
compiling and running all_reals.f90 ... Doctest: all_reals_fwrap_doctest ... ok
compiling and running default_types.f90 ... Doctest:
default_types_fwrap_doctest ... ok
compiling and running int_args.f90 ... Doctest: int_args_fwrap_doctest ... ok
compiling and running old_decl.f90 ... Doctest: old_decl_fwrap_doctest ... ok

======================================================================
ERROR: wrapping simple_array.f90
----------------------------------------------------------------------
Traceback (most recent call last):
File "runtests.py", line 203, in runTest
self.runCompileTest_distutils()
File "runtests.py", line 236, in runCompileTest_distutils
__import__(self.projname)
ImportError: /home/jrioux/git/fwrap/BUILD/compile/simple_array_fwrap/simple_array_fwrap.so:
undefined symbol: _gfortran_st_write_done

======================================================================
ERROR: compiling and running all_complex.f90
----------------------------------------------------------------------
Traceback (most recent call last):
File "runtests.py", line 260, in run
self.runTest()
File "runtests.py", line 203, in runTest
self.runCompileTest_distutils()
File "runtests.py", line 236, in runCompileTest_distutils
__import__(self.projname)
ImportError: /home/jrioux/git/fwrap/BUILD/run/all_complex_fwrap/all_complex_fwrap.so:
undefined symbol: __Pyx_CREAL

======================================================================
ERROR: compiling and running all_logicals.f90
----------------------------------------------------------------------
Traceback (most recent call last):
File "runtests.py", line 260, in run
self.runTest()
File "runtests.py", line 203, in runTest
self.runCompileTest_distutils()
File "runtests.py", line 234, in runCompileTest_distutils
run_setup(setup_fqpath, script_args=['config', fcomp_arg,
'build_ext', fcomp_arg, '--inplace'])
File "/usr/lib/python2.6/distutils/core.py", line 221, in run_setup
exec open(script_name, 'r').read() in g, l
File "<string>", line 6, in <module>
File "/home/jrioux/git/fwrap/BUILD/compile/default_types_fwrap/fwrap_setup.py",
line 43, in setup
np_setup(*args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/numpy-1.3.0-py2.6-linux-i686.egg/numpy/distutils/core.py",
line 184, in setup
return old_setup(**new_attr)
File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.6/dist-packages/numpy-1.3.0-py2.6-linux-i686.egg/numpy/distutils/command/build_ext.py",
line 57, in run
self.run_command('build_src')
File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
self.distribution.run_command(command)
File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/usr/local/lib/python2.6/dist-packages/numpy-1.3.0-py2.6-linux-i686.egg/numpy/distutils/command/build_src.py",
line 130, in run
self.build_sources()
File "/usr/local/lib/python2.6/dist-packages/numpy-1.3.0-py2.6-linux-i686.egg/numpy/distutils/command/build_src.py",
line 147, in build_sources
self.build_extension_sources(ext)
File "/usr/local/lib/python2.6/dist-packages/numpy-1.3.0-py2.6-linux-i686.egg/numpy/distutils/command/build_src.py",
line 250, in build_extension_sources
sources = self.generate_sources(sources, ext)
File "/usr/local/lib/python2.6/dist-packages/numpy-1.3.0-py2.6-linux-i686.egg/numpy/distutils/command/build_src.py",
line 307, in generate_sources
source = func(extension, build_dir)
File "/home/jrioux/git/fwrap/BUILD/compile/default_types_fwrap/fwrap_setup.py",
line 57, in generate_type_config
return gen_type_map_files(config_cmd)
File "/home/jrioux/git/fwrap/BUILD/compile/default_types_fwrap/fwrap_setup.py",
line 72, in gen_type_map_files
find_types(ctps, config_cmd)
File "/home/jrioux/git/fwrap/BUILD/compile/default_types_fwrap/fwrap_setup.py",
line 88, in find_types
"unable to find C type for type %s" % ctp.odecl)
RuntimeError: unable to find C type for type logical(kind=8)

----------------------------------------------------------------------
Ran 17 tests in 42.482s

FAILED (errors=3)

Kyle Mandli

unread,
Jun 22, 2010, 5:34:58 PM6/22/10
to fwrap...@googlegroups.com
It's interesting that you are getting different results than I am (in terms of the errors and their tracebacks).  Some of the errors that you have look like gfortran linking errors.

Kyle


--
You received this message because you are subscribed to the Google Groups "Fwrap Users" group.
To post to this group, send email to fwrap...@googlegroups.com.
To unsubscribe from this group, send email to fwrap-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fwrap-users?hl=en.


Kurt Smith

unread,
Jun 22, 2010, 5:35:44 PM6/22/10
to fwrap...@googlegroups.com
Hi,

On Tue, Jun 22, 2010 at 4:15 PM, Julien Rioux <julien...@gmail.com> wrote:
> Hi,
>
> I would be glad to give fwrap a try but for now I did not succeed to
> run the tests. If I did something wrong I will try to correct and
> report back.

Thank you very much for trying things out. You ran the tests
correctly, except for a commandline option that needs to be set so
that the gfortran libraries can be linked in.

>
> FYI.
> Ubuntu 10.04
> python 2.6.5
> numpy 1.3.0
> cython 0.11.2
> gcc 4.4.3
>
> fparser at revision 58
>
> I get failed tests:
>
> $ hg identify
> 1d217b2fca04 tip
> $ python runtests.py -vvv --fcompiler=gnu95 --no-cleanup

Try this commandline instead:

LDFLAGS="-L$LIBGFORTDIR -lgfortran" python runtests.py -vv
--fcompiler=gnu95 --no-cleanup

where LIBGFORTDIR evaluates to the path that contains the
libgfortran.so (or is it libgfortran.a?) file.

The issue is that fwrap invokes gcc to do the final linking stage, and
so the fortran runtime library needs to be supplied through the
LDFLAGS env variable. I hope to make this automatic sometime soon,
but there are many fortran compilers and their runtime libs are in
nonstandard locations, to say the least.

I'll put up some documentation explaining this in short order.

There are a couple of other errors that I'll look into -- thanks.

Kurt

Julien Rioux

unread,
Jun 22, 2010, 6:08:13 PM6/22/10
to fwrap...@googlegroups.com
On Tue, Jun 22, 2010 at 5:35 PM, Kurt Smith <kwms...@gmail.com> wrote:
> Hi,

>
> Try this commandline instead:
>
> LDFLAGS="-L$LIBGFORTDIR -lgfortran" python runtests.py -vv
> --fcompiler=gnu95 --no-cleanup
>
> where LIBGFORTDIR evaluates to the path that contains the
> libgfortran.so (or is it libgfortran.a?) file.
>
> The issue is that fwrap invokes gcc to do the final linking stage, and
> so the fortran runtime library needs to be supplied through the
> LDFLAGS env variable.  I hope to make this automatic sometime soon,
> but there are many fortran compilers and their runtime libs are in
> nonstandard locations, to say the least.
>
> I'll put up some documentation explaining this in short order.
>
> There are a couple of other errors that I'll look into -- thanks.
>
> Kurt
>

Thanks, that fixed the simple_array.f90 wrapping error. Glad that you
are looking into this!

Cheers,
Julien

Kurt Smith

unread,
Jun 22, 2010, 6:13:29 PM6/22/10
to fwrap...@googlegroups.com

For the record, what was the full commandline you used? I'll put it
in the documentation (eventually).

>
> Cheers,
> Julien

Julien Rioux

unread,
Jun 22, 2010, 6:19:51 PM6/22/10
to fwrap...@googlegroups.com
On Tue, Jun 22, 2010 at 6:13 PM, Kurt Smith <kwms...@gmail.com> wrote:
> For the record, what was the full commandline you used?  I'll put it
> in the documentation (eventually).

Hi,

libgfortran.so.3 is in /usr/lib, which is the default location
(correct?), so it was sufficient to do:

LDFLAGS="-lgfortran" python runtests.py -vv --fcompiler=gnu95 --no-cleanup

cheers,
Julien

Kurt Smith

unread,
Jun 22, 2010, 6:25:44 PM6/22/10
to fwrap...@googlegroups.com

Great, thanks.

>
> cheers,

Kurt Smith

unread,
Jun 23, 2010, 4:52:49 PM6/23/10
to fwrap...@googlegroups.com, Julien Rioux
Hi Julien,

If you wouldn't mind trying the latest from bitbucket; that should fix
the "all_complex" test. The "all_logicals" test is an issue specific
to gfortran; I'm looking into it in more detail.

Thanks for the help,

Kurt

Reply all
Reply to author
Forward
0 new messages