FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GSL

 
Post new topic   Reply to topic     Forum Index -> Bindings
View previous topic :: View next topic  
Author Message
truemped



Joined: 15 Jun 2007
Posts: 6

PostPosted: Fri Jun 15, 2007 12:01 pm    Post subject: GSL Reply with quote

Hi!

I have created bindings for the GNU Scientific Library[1] (quote from the site: " collection of numerical routines for scientific computing") for D and want to include them in the bindings project. Does anyone _not_ want me to do this?

I have to stress out that this is still kind of beta. I haven't tested _all_ functions but I'm working my way through the example programs found in the docs[2] and all I tested so far works great!

Daniel

[1]: http://www.gnu.org/software/gsl/
[2]: http://www.gnu.org/software/gsl/manual/html_node/
Back to top
View user's profile Send private message
schani



Joined: 18 Sep 2007
Posts: 25
Location: Vienna, Austria

PostPosted: Tue Oct 09, 2007 2:15 am    Post subject: Linking more scientific libraries to D Reply with quote

Hi,

I like the idea of making scientific libraries available for D programmers. I just interfaced some CLAPACK functions from a D program without problem. Are you interested in working together to create a better support for some of those libraries? The highest priority for me have CBLAS, CLAPACK and SuperLU.

Maybe a good attempt would be to:
1.) Convert the header files (may be tricky with SuperLU)
2.) Give a convenient interface for the native D arrays thru templates

If anyone was interested in joining such a project I would be glad, as I often need these libraries.

Greetz,
Franz
Back to top
View user's profile Send private message
truemped



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 3:04 am    Post subject: Re: Linking more scientific libraries to D Reply with quote

Hi!

schani wrote:

I like the idea of making scientific libraries available for D programmers.

I think D is somewhat perfect especially for educational purposes. Syntax is very close to Java but the speed difference is awesome!

schani wrote:

I just interfaced some CLAPACK functions from a D program without problem. Are you interested in working together to create a better support for some of those libraries? The highest priority for me have CBLAS, CLAPACK and SuperLU.

The blas library is interfaced from the GSL as well, so if you want to use it, GSL would make sense. Usage in D is very straight forward, you can nearly copy and paste the examples from the documentation.

There is another project: http://www.dsource.org/projects/multiarray. This is more ore less a matrix class with an interface to the fortran versions of blas and lapack. It looks very nice but is poorly documented and I haven't had the time to really look into it. It's extensively using templates so this might be the right project!?

cheers
Back to top
View user's profile Send private message
schani



Joined: 18 Sep 2007
Posts: 25
Location: Vienna, Austria

PostPosted: Tue Oct 09, 2007 7:00 am    Post subject: Re: Linking more scientific libraries to D Reply with quote

truemped wrote:

I think D is somewhat perfect especially for educational purposes. Syntax is very close to Java but the speed difference is awesome!

Well, I would go somewhat further. I think D could be especially interesting for scientists writing simulations. There are attempts of integrating complete simulators into a library for Python (-> fipy) or C++ (only heard of that, nothing released). I think with D's rapid evolution and its metaprogramming facilities it could be what poor PhD or MSc students, always wanted.

truemped wrote:

The blas library is interfaced from the GSL as well, so if you want to use it, GSL would make sense. Usage in D is very straight forward, you can nearly copy and paste the examples from the documentation.

Well that's great, I have seen, that GSL interfaces the BLAS, but I forgot about that.
It looks good, a template wrapper around the cblas calls that enables simple use of D's arrays seems to be no problem.

truemped wrote:

There is another project: http://www.dsource.org/projects/multiarray. This is more ore less a matrix class with an interface to the fortran versions of blas and lapack. It looks very nice but is poorly documented and I haven't had the time to really look into it. It's extensively using templates so this might be the right project!?


You are right. Well, I have already looked at the code some time ago, but the files were stuffed with strange functions and it looked a little abandoned to me. But looking at it now, I think it really is what I need.

I will contact the developer and ask if I can participate right after I finish this message.

Thank you!
Back to top
View user's profile Send private message
truemped



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 8:38 am    Post subject: Re: Linking more scientific libraries to D Reply with quote

schani wrote:

I think with D's rapid evolution and its metaprogramming facilities it could be what poor PhD or MSc students, always wanted.

Sure! Unfortunately my university career is coming to an end in febuary... But I will propably do some scientific programming in my part time, for example for my little textmining library... Smile

schani wrote:

Well that's great, I have seen, that GSL interfaces the BLAS, but I forgot about that. It looks good, a template wrapper around the cblas calls that enables simple use of D's arrays seems to be no problem.

Yes, with GSL you always have to use gsl_matrix* and gsl_vector. For C/C++ it's the same though.

schani wrote:

You are right. Well, I have already looked at the code some time ago, but the files were stuffed with strange functions and it looked a little abandoned to me. But looking at it now, I think it really is what I need.

You could ask him for more documentation because I would really want to use it in my library. But the current documentation status doesn't really allow others to use the library...

Since I am currently writing my diploma thesis I don't really have the time to join this project at this time. Maybe next year though!
Back to top
View user's profile Send private message
WebDrake



Joined: 02 Oct 2007
Posts: 9

PostPosted: Tue Oct 09, 2007 9:39 am    Post subject: Re: GSL Reply with quote

truemped wrote:
I have created bindings for the GNU Scientific Library[1] (quote from the site: " collection of numerical routines for scientific computing") for D and want to include them in the bindings project. Does anyone _not_ want me to do this?

Oh, very nice. I definitely do want you to do this. Smile

Do the GSL people know you've done this ... ? I don't remember seeing anything on the mailing list but it's been a while since I checked in detail.
Back to top
View user's profile Send private message
truemped



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 9:51 am    Post subject: Re: GSL Reply with quote

WebDrake wrote:

Do the GSL people know you've done this ... ? I don't remember seeing anything on the mailing list but it's been a while since I checked in detail.

No, I didn't send a mail to the list. Should I? And to which list? bug-gsl? help-gsl? info-gsl?

Plus: I just noticed that a new version is out and I did not update the stuff yet... On Thursday I will have a look for new functions and will try to update the bindings...

cheers

P.S.: on my system (Ubuntu Feisty) I still have version 1.8.3 of the GSL...
Back to top
View user's profile Send private message
WebDrake



Joined: 02 Oct 2007
Posts: 9

PostPosted: Tue Oct 09, 2007 10:13 am    Post subject: Reply with quote

I think you definitely should. Write to help-gsl as this is the "general discussion" mailing list as well as the support list.

Also---I realise this is a big thing to ask---is there a chance of seeing an autotools-installable version of your code as well as dsss? I recognise that dsss is probably an exciting tool (don't know, haven't tried it yet...) but it seems to me important to support the "generic" tools as well as the D-specific ones.
Back to top
View user's profile Send private message
truemped



Joined: 15 Jun 2007
Posts: 6

PostPosted: Tue Oct 09, 2007 10:43 am    Post subject: Reply with quote

WebDrake wrote:

Also---I realise this is a big thing to ask---is there a chance of seeing an autotools-installable version of your code as well as dsss? I recognise that dsss is probably an exciting tool (don't know, haven't tried it yet...) but it seems to me important to support the "generic" tools as well as the D-specific ones.

Well, unfortunately I am quite unfamiliar with them (from the developer point of view). Until now I have only installed software via Makefiles which are (as I think) the product of the autotools. Maybe you could help me with this? Then I could learn how to use them as well... I think the starting point would be a Makefile with build/install/uninstall???

But I did read though that D has not been integrated into the autotools (don't remember the details)
Back to top
View user's profile Send private message
WebDrake



Joined: 02 Oct 2007
Posts: 9

PostPosted: Wed Oct 10, 2007 3:22 am    Post subject: Reply with quote

truemped wrote:
Well, unfortunately I am quite unfamiliar with them (from the developer point of view). Until now I have only installed software via Makefiles which are (as I think) the product of the autotools. Maybe you could help me with this? Then I could learn how to use them as well... I think the starting point would be a Makefile with build/install/uninstall???

But I did read though that D has not been integrated into the autotools (don't remember the details)

I confess I'm not as familiar with them as I'd like to be, though I've used them for a couple of small things.

Anyway, you recall the basic process used for installing: first you run a ./configure script which checks you have all the required dependencies and sets everything up for the build, then you run make (to build) and make install (to place it in the appropriate system location). The autotools consist of several parts used to construct these elements:

autoconf -- generates the ./configure script used to help set up makefiles etc.
automake -- setup for generating the makefiles
libtool -- assists with generating libraries
pkg-config -- used for checking installed libraries
gnulib -- helps with porting to different platforms

See: http://en.wikipedia.org/wiki/GNU_build_system

The base of what has to be created is usually a configure.ac script (which tells autoconf how to build the ./configure script) and a Makefile.am script (which tells automake how to build the makefile).

As for D not being properly integrated into the autotools, it may be but I think there are some cheaty ways round it such as aliasing the "C compiler" to gdc.

I'll ask around and see what we can do (but can't promise anything as I'm very busy right now with other projects). If you can write your introductory email to help-gsl you might also get some assistance there---they're nice people and after all they have an interest in making GSL as usable as possible.
Back to top
View user's profile Send private message
WebDrake



Joined: 02 Oct 2007
Posts: 9

PostPosted: Wed Oct 10, 2007 6:08 am    Post subject: Reply with quote

One further thing. I notice you've used Tango rather than the D standard library to interface the C standard library. Is this a good idea? (It may be necessary, I don't know.) Wouldn't it be wiser to use the D standard library (which already contains that of C)?
Back to top
View user's profile Send private message
truemped



Joined: 15 Jun 2007
Posts: 6

PostPosted: Wed Oct 10, 2007 7:53 am    Post subject: Reply with quote

Concerning the autotools stuff: I have just found a D skeleton using these tools: http://wiki.sukimashita.com/Dskel! I will have a look at it during the weekend. Maybe I could just use it!

WebDrake wrote:

One further thing. I notice you've used Tango rather than the D standard library to interface the C standard library. Is this a good idea? (It may be necessary, I don't know.) Wouldn't it be wiser to use the D standard library (which already contains that of C)?

Well, it's kind of a personal flavour. Personally I like Tango and have been using it all the time. But it was not a rational decision by me not using Phobos. I have no experience with Phobos and can't tell the better or worst part in Tango...

However, I did notice that this is not the perfect. solution. But I recall that the GSL needs some C headers that have not been in Phobos but in Tango (at the time I converted the headers).

Are you familiar with Phobos? I think it would be as easy as including version statements for the imports if the headers are all present in Phobos now! Very Happy
Back to top
View user's profile Send private message
WebDrake



Joined: 02 Oct 2007
Posts: 9

PostPosted: Thu Oct 11, 2007 6:29 am    Post subject: Reply with quote

truemped wrote:
Concerning the autotools stuff: I have just found a D skeleton using these tools: http://wiki.sukimashita.com/Dskel! I will have a look at it during the weekend. Maybe I could just use it!

Yes, that was an example I was thinking of. Smile

truemped wrote:
I recall that the GSL needs some C headers that have not been in Phobos but in Tango (at the time I converted the headers).

Are you familiar with Phobos? I think it would be as easy as including version statements for the imports if the headers are all present in Phobos now! Very Happy

At the moment I'm just playing with D to the extent of "what comes with my distro?" (i.e. gdc 0.24) so I'm not really familiar with the contents of the libraries other than to the extent that Tango sounds like a much more comprehensive attempt at a standard library. I would guess that at some point in the future they'll merge or one will replace the other....

I just had the impression that the C standard library was already contained in Phobos and therefore it's unnecessary to call it in its Tango form. Can we confirm whether it's part of the C standard library or the BLAS library that is the missing part in Phobos?

I had a brief exchange with people on the autoconf mailing list and you are right in saying there is no direct D support. Their comments were that implementing it was "not a trivial project but ... shouldn't be that hard either." So I'll see what I can do.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Bindings All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group