Is this project still alive?

335 views
Skip to first unread message

Dominique

unread,
Jan 13, 2012, 3:04:03 PM1/13/12
to Fwrap Users
Hi,

I'm wondering if Fwrap is still an ongoing project or not? The git
repository hasn't been updated since Jan 2011 and I can't even manage
to run the integration tests. Other similar messages on this newsgroup
seem to have been left hanging for many months.

For information, I'm under OSX 10.6.8, Cython 0.16, Python 2.7, Numpy
1.6.1 and latest Fwrap from Github (master branch from Dec 2010). I
set the F90 and LDFLAGS environment variables as instructed. I have
gfortran 4.2.1. I tried g95 0.93 without any more success. Following
the documentation:

$ python runtests.py -vv --fcompiler=gnu95 --no-cleanup
Usage: runtests.py [options]

runtests.py: error: no such option: --fcompiler

$ python runtests.py -vv --no-cleanup
# Lots of errors
Ran 28 tests in 0.664s

FAILED (errors=28)

I pulled the source code for waf under fwrap/ but I don't know what
I'm supposed to do with it. Most errors have the form:

======================================================================
ERROR: runTest (__main__.FwrapRunTestCase)
compiling and running old_decl.f90
----------------------------------------------------------------------
Traceback (most recent call last):
File "runtests.py", line 140, in run
self.runTest()
File "runtests.py", line 121, in runTest
fwrapc(argv=argv)
File "/Users/dpo/.virtualenvs/fwrap/fwrap/fwrap/fwrapc.py", line
134, in fwrapc
return call_waf(opts, args, argv)
File "/Users/dpo/.virtualenvs/fwrap/fwrap/fwrap/fwrapc.py", line 71,
in call_waf
configure_cb(opts, args, orig_args)
File "/Users/dpo/.virtualenvs/fwrap/fwrap/fwrap/fwrapc.py", line 55,
in configure_cb
setup_dirs(proj_dir(opts.outdir))
File "/Users/dpo/.virtualenvs/fwrap/fwrap/fwrap/fwrapc.py", line 44,
in setup_dirs
dirname)
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/
Versions/2.7/lib/python2.7/shutil.py", line 116, in copy
copyfile(src, dst)
File "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/
Versions/2.7/lib/python2.7/shutil.py", line 81, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 21] Is a directory: '/Users/dpo/.virtualenvs/fwrap/
fwrap/fwrap/waf'

----------------------------------------------------------------------

The nose tests appear to pass.

In the examples directory:

$ make
../fwrapc.py arrays/source.f90 --build --fcompiler=gnu95 \
--name=arrays_ext --out_dir=arrays --override
Usage: fwrapc.py [options]

fwrapc.py: error: no such option: --build
make: *** [arrays_ext] Error 2

So ... no joy at all.

In case Fwrap is being abandoned, is there a good (alive) alternative
out there?

Thanks!

Kyle Mandli

unread,
Jan 13, 2012, 3:28:08 PM1/13/12
to Fwrap Users
I am interested in finding out this as well. Last I heard fwrap was
incorporated into scipy by Dag Sverre (see http://fortrancython.wordpress.com/
for some links and discussion) but that was quite a while ago now.

As for alternatives, f2py is still my fortran wrapper of choice.

Kyle

Dominique

unread,
Jan 13, 2012, 3:40:14 PM1/13/12
to Fwrap Users
On Jan 13, 3:28 pm, Kyle Mandli <kyle.man...@gmail.com> wrote:
> I am interested in finding out this as well.  Last I heard fwrap was
> incorporated into scipy by Dag Sverre (seehttp://fortrancython.wordpress.com/
> for some links and discussion) but that was quite a while ago now.
>
> As for alternatives, f2py is still my fortran wrapper of choice.

Thanks. I know f2py but it just chokes as soon as the Fortran 90/95
becomes moderately elaborate. It's ok for f77 but not realistic for
f90.

Kyle Mandli

unread,
Jan 13, 2012, 3:51:47 PM1/13/12
to fwrap...@googlegroups.com
I agree with you on both fronts, a newer parser (I think called fparser) by Pearu Peterson inside of fwrap was intended to address this but I am not sure if that's been touched in quite a while as well. I have resorted to writing fortran wrapper code to overcome this in the past, not the greatest solution, especially for derived data types.

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.


John McFarland

unread,
Jan 13, 2012, 4:03:30 PM1/13/12
to Fwrap Users
FortWrap (http://fortwrap.sourceforge.net/) might be worth looking at
if you are using F90/95 constructs heavily. It generates C++ wrapper
code that is compiler-specific for either gfortran or g95 (i.e.
BIND(C) not used). It is mainly aimed at generating "wrapper classes"
for Fortran derived types. The C++ headers generated by FortWrap can
be re-wrapped with Swig if a Python interface is your end goal. It
may not meet everyone's needs, but there are some interesting
capabilities.

John

On Jan 13, 2:51 pm, Kyle Mandli <kyle.man...@gmail.com> wrote:
> I agree with you on both fronts, a newer parser (I think called fparser) by
> Pearu Peterson inside of fwrap was intended to address this but I am not
> sure if that's been touched in quite a while as well. I have resorted to
> writing fortran wrapper code to overcome this in the past, not the greatest
> solution, especially for derived data types.
>
> Kyle
>

Kurt Smith

unread,
Jan 13, 2012, 4:32:35 PM1/13/12
to fwrap...@googlegroups.com
Hi Dominique,

On Fri, Jan 13, 2012 at 2:04 PM, Dominique <dominiq...@gmail.com> wrote:
> Hi,
>
> I'm wondering if Fwrap is still an ongoing project or not? The git
> repository hasn't been updated since Jan 2011 and I can't even manage
> to run the integration tests. Other similar messages on this newsgroup
> seem to have been left hanging for many months.
>

Thanks for your inquiry.

Fwrap has stalled for the past year or so: finishing my PhD, new job,
cross-country move, new baby -- all have obliterated any time I have
to devote to fwrap. I'm doing what I can to get funding for fwrap so
I can devote work hours to it, but that is still only a potential.

For 2012, things have started settling down enough to devote a small
but useful amount of time every week to working on it (and other
projects).

First on my list is to give the usual indications that fwrap is still
alive (or is being revived, depending on how you view it). This email
is part of that process, so thanks for providing the impetus.

Second on my list is to get the testsuite up & running without so much fiddling.

Third on my list is to start on getting F90/95 derived type support working.

Sorry for the delays, and thanks for the interest. Stay tuned.

Dominique

unread,
Jan 13, 2012, 4:35:29 PM1/13/12
to Fwrap Users
Thanks. Incidentally I have tried FortWrap in the meantime but the
documentation says that it won't work with code that contains
allocatable or pointer arrays. The code I need to wrap makes extensive
use of those.

I was also unsuccessful when I tried running the "arrays" test:

---
$ ../../fortwrap.py -g -d wrap -c gfortran
$ make
g++ -I wrap -c -o prog.o prog.cpp
gfortran -I wrap -o arrays.o -c arrays.f90
g++ -I wrap -c -o wrap/FortFuncs.o wrap/FortFuncs.cpp
gfortran -o prog prog.o arrays.o wrap/FortFuncs.o -lstdc++
Undefined symbols:
"___arrays_MOD_array_out", referenced from:
FortFuncs::array_out(std::vector<int, std::allocator<int> >*,
std::vector<int, std::allocator<int> >*)in FortFuncs.o
"___arrays_MOD_inner_prod_2", referenced from:
FortFuncs::inner_prod_2(int, std::vector<int,
std::allocator<int> > const*, std::vector<int, std::allocator<int> >
const*)in FortFuncs.o
"___arrays_MOD_array_in", referenced from:
FortFuncs::array_in(std::vector<int, std::allocator<int> >
const*)in FortFuncs.o
"___arrays_MOD_inner_prod", referenced from:
FortFuncs::inner_prod(std::vector<int, std::allocator<int> >
const*, std::vector<int, std::allocator<int> > const*)in FortFuncs.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [prog] Error 1
---

Python is indeed my end goal.

Dag Sverre Seljebotn

unread,
Jan 13, 2012, 4:38:38 PM1/13/12
to fwrap...@googlegroups.com
On 01/13/2012 10:32 PM, Kurt Smith wrote:
> Hi Dominique,
>
> On Fri, Jan 13, 2012 at 2:04 PM, Dominique<dominiq...@gmail.com> wrote:
>> Hi,
>>
>> I'm wondering if Fwrap is still an ongoing project or not? The git
>> repository hasn't been updated since Jan 2011 and I can't even manage
>> to run the integration tests. Other similar messages on this newsgroup
>> seem to have been left hanging for many months.
>>
>
> Thanks for your inquiry.
>
> Fwrap has stalled for the past year or so: finishing my PhD, new job,
> cross-country move, new baby -- all have obliterated any time I have
> to devote to fwrap. I'm doing what I can to get funding for fwrap so
> I can devote work hours to it, but that is still only a potential.
>
> For 2012, things have started settling down enough to devote a small
> but useful amount of time every week to working on it (and other
> projects).
>
> First on my list is to give the usual indications that fwrap is still
> alive (or is being revived, depending on how you view it). This email
> is part of that process, so thanks for providing the impetus.
>
> Second on my list is to get the testsuite up& running without so much fiddling.

>
> Third on my list is to start on getting F90/95 derived type support working.
>
> Sorry for the delays, and thanks for the interest. Stay tuned.

Note that there's a 'devel' branch from April containing my changes.
Please drop me a mail if you wonder about anything in that one.

Dag

Dominique

unread,
Jan 13, 2012, 4:41:12 PM1/13/12
to Fwrap Users
Hi Kurt,

Thanks for the heads up! Let us know if you need letters of support,
petitions, beer, pizza, or whatever. Wrapping Fortran 90/95/2003 is a
NEED! I'm looking to provide Python bindings for a large F2003 project
and Fwrap is my best hope.

We're staying tuned.

On Jan 13, 4:32 pm, Kurt Smith <kwmsm...@gmail.com> wrote:
> Hi Dominique,
>

Kurt Smith

unread,
Jan 13, 2012, 4:46:32 PM1/13/12
to fwrap...@googlegroups.com
On Fri, Jan 13, 2012 at 2:28 PM, Kyle Mandli <kyle....@gmail.com> wrote:
> I am interested in finding out this as well.  Last I heard fwrap was
> incorporated into scipy by Dag Sverre (see http://fortrancython.wordpress.com/
> for some links and discussion) but that was quite a while ago now.

Hi Kyle,

Dag did make some huge improvements to get fwrap working for scipy for
.NET, primarily to get fwrap to the point that it can handle an
existing f2py project, which is how several of the packages in scipy
are structured (including .pyf files). Those improvements took fwrap
in the F77 direction; I'm interested in adding more support for F90/95
features, and making sure the codebase isn't schizophrenic in the
process. So lots of refactoring implied there.

Thanks for your help in the past -- hopefully I'll see you at the next
SciPy conference.

Dominique

unread,
Jan 13, 2012, 4:50:13 PM1/13/12
to Fwrap Users
On Jan 13, 4:38 pm, Dag Sverre Seljebotn <d.s.seljeb...@astro.uio.no>
wrote:

> Note that there's a 'devel' branch from April containing my changes.
> Please drop me a mail if you wonder about anything in that one.

I don't see a 'devel' branch. Your git page has 15 branches though.
Which one should I try?

Dag Sverre Seljebotn

unread,
Jan 13, 2012, 4:51:43 PM1/13/12
to fwrap...@googlegroups.com

The 'devel' in the fwrap branch.

In addition to f77, I created a new command line tool ("fwrap" rather
than "fwrapc") which works kind of differently, etc.

Dag Sverre

Kurt Smith

unread,
Jan 13, 2012, 4:52:56 PM1/13/12
to fwrap...@googlegroups.com
On Fri, Jan 13, 2012 at 3:41 PM, Dominique <dominiq...@gmail.com> wrote:
> Hi Kurt,
>
> Thanks for the heads up! Let us know if you need letters of support,
> petitions, beer, pizza, or whatever. Wrapping Fortran 90/95/2003 is a
> NEED! I'm looking to provide Python bindings for a large F2003 project
> and Fwrap is my best hope.

Is the F03 project accessible? I'd love to see what constructs you're
using and what sorts of support you require.

Note that full F03 support in fwrap is a long way off (F90/95 support
is only partially there ATM).

Reply all
Reply to author
Forward
0 new messages