Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GNU Scientific Library with Fortran on Windows

Status
Not open for further replies.

NickFort

Technical User
Jun 10, 2010
113
I'd like to use the GNU Scientific Library (GSL) with Fortran 90 and later -- it has almost anything I'd need. Pity it's all in C.

Now, I know it can be done: I've found two sites which deal with this: (note that this doesn't exist any more; it's a cache of Google's, and I don't know how much longer it'll be available -- I do have it saved in case it goes down) and
The first gives a simple example, but is very basic, and doesn't explain the reasoning (although I can understand it, I think). It also points to a non-existent link about writing Fortran wrappers for the GSL (
FGSL, at the second link, looks hellishly complicated to me, and geared towards people who are (a) on Unix, and (b) very competent when it comes to the compiling side of things. I am neither of these (I do use Linux, but not for programming purposes, and I can't use it for this project, anyway).

Can anyone help me out here? What I would ultimately like to do is compile the various GSL subroutines into DLLs, and call them from Fortran -- if that plan is even vaguely feasible. How would I go about achieving these two goals?

I think possibly my biggest hurdle would be, for example, using an algorithm from the GSL on a dynamically-associated function available as a Fortran DLL.

So, let's say I have a DLL containing two Fortran functions, myfoo1 and myfoo2. I would like to be able to use a GSL minimisation routine to find the minimum of either of the functions, as specified by an argument to the GSL minimisation DLL.

I hope that makes sense -- any help would be greatly appreciated! I really haven't got a clue where to start here.

Regards,
NF

--------------------------------------
Background: Chemical engineer, familiar mostly with MATLAB, but now branching out into real programming.
 
Thanks, mikrom. I did find that thread when I first joined the forum, and I used it to make DLLs to use from Fortran; the rest -- at the time -- wasn't relevant to me. It is now! Thanks for reminding me. :)

--------------------------------------
Background: Chemical engineer, familiar mostly with MATLAB, but now branching out into real programming.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top