dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #25424
Re: Splitted SWIG interface
On 1 February 2012 16:23, Johan Hake <johan.hake@xxxxxxxxx> wrote:
> Hello!
>
> I have now splitted the SWIG interface into 6 combined modules.
>
> common, io, mesh, function, fem, la
>
> The largest .cxx file generated now is 2MB (for la with all linear algebra
> backends installed), instead of 6MB. That is still pretty big and take some
> 1GB of memory during compilation. But the interface can now be generated in
> several threads, reducing compile time considerable. The runtime memory print,
> read from a simple top, is not much more than before (some 100MB), which is
> good.
>
Very nice!
Garth
> They new compiled modules all resides under:
>
> dolfin.cpp.foo
>
> All types and functions are now automatically included into:
>
> dolfin.cpp
>
> which means that most modules under site-packages/dolfin still works fine.
> There are now more types included from the compiled interface by default. If
> this is a problem we can change that. But now everything is automated. No
> handpicking done.
>
> The logic in the new SWIG interface is described in:
>
> dolfin/swig/README
>
> One thing to be aware of is that any reference to the compiled interface from
> another combined module have to be preluded with the name of the module.
> Example, in la/post.i we call dolfin_error, which is defined in common. Then
> we do:
>
> common.dolfin_error(...)
>
> instead of previous:
>
> dolfin_error(...)
>
> Have fun and let the bug reports come raining!
>
> Johan
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dolfin
> Post to : dolfin@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dolfin
> More help : https://help.launchpad.net/ListHelp
Follow ups
References