axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Nag libraries


From: Waldek Hebisch
Subject: Re: [Axiom-developer] Nag libraries
Date: Mon, 11 Dec 2006 21:29:06 +0100 (CET)

> I have spent some thoughts in how Axiom can interface external (shared) 
> libraries. I have tried this one for a few functions of the Gnu Scientific 
> Library (GSL) - the work is unfiniished, due to that there are numerous 
> functions.
> However, this approach is easily adoptably for any external C library.
> Furthermore, some of the NAG related domains will be still requried, 
> especially that one, converting Axiom functions to Fortran (actually a 
> conversion to C are necessary). 
> 
> What do you think which approach is more powerful, reliable, ...? 

Linking functons directly into Lisp image has many advantages.  But
I feel that with current GCL FFI it is unworkable as a general method.
>From my point of view killer issue is memory management.  As Camm
Maguire wrote external routines can not use 'malloc' or one has to
allocate all arguments as 'unmovable'.  Not using 'malloc' can not
work as a general method.  To efficiently allocatate 'unmovable' arguments
require a lot of effort.  A simple (but inefficient) way is just copy
arguments to freshly allocated memory.

So in short term I feel that socket interface may be competitive:  for
larger arguments performance should be comparable with copying interface,
and we avoid most memory management problems.

The old Axiom scheme consisting of AXIOMsys comunicating with naglink
which in turn comunicates with Nag demon is probably too complicated.
One possiblility that I consider is linking external routines into
naglink.

However, in short time ressurecting Nag demon may be usefull.  Algebra
and interpreter contains together about 40 000 lines of code to support
Nag link.  Much of this code is really above the link level and should
be usable for any chosen way of comunicating with Fortran routines.
And yes -- we certainly want support comunication with other langages
like C.

-- 
                              Waldek Hebisch
address@hidden 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]