comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: fortran feasability
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: fortran feasability [message #54873] Mon, 16 July 2007 07:54 Go to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Conor,
what you want can be done among others with a DLM (RTFM for description). I
strongly suggest to call fortran from idl rather than the other way around.
You cannot share COMMON block between the fortran and idl side. However,
once setup on the fortran side the common block will live between idl calls
until the session is reset (e.g., .f). You will have to write a wrapper to
change fortran common block variables from idl. Last recommendation, get a
good book, e.g., Calling C from IDL by Ronn Kling; lots of examples save
lots of grief.

Haje


"Conor" <cmancone@gmail.com> wrote in message
news:1184589778.527491.114030@q75g2000hsh.googlegroups.com.. .
> For a project I'm working on, I'm trying to implement in one of my
> programs the pikaia minimization algorithm (http://www.hao.ucar.edu/
> Public/models/pikaia/pikaia.html). It has a non-optimized IDL port
> which I've used so far. My problem is that when I run it with any
> reasonable number of generations, the result is REALLY slow. What
> used to take half a day with other algorithims would take roughly 20
> days using pikaia in IDL. Unfortunately, this algorith is simply
> computationaly expensive, and I really don't think that optimizing the
> IDL code is going to facilitate a 40x speed up.
>
> The solution, I think, is to run the original fortran code and call it
> from IDL. However, I've never tried such a thing and so I have a few
> questions. I'll also take other suggestions, if anyone has any. My
> first question is about common blocks. Implementing pikaia requires a
> couple common blocks. Currently I have common blocks in IDL that
> store all the necessary data. Is there a way to share common blocks
> in IDL with fortran code called by IDL? Or would I have to pass all
> the necessary data to fortran and then have it load it's own common
> blocks?
>
> Also, does anyone know any good tips sites or tutorials on running IDL
> from fortran? I found this of course:
> http://www.dfanning.com/tips/fortran_linking.html
> It would be nice to have some background though - I can probably
> follow the steps but it would be ince to know what is going on (and
> what is a DLM?). Also, any ideas if this still works? It's listed
> for IDL version 5.2-5.4.
>
> Thanks,
> Conor
>
[Message index]
 
Read Message
Read Message
Previous Topic: Re: for loops for total newbies
Next Topic: keywords and passing values

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 12:54:43 PDT 2025

Total time taken to generate the page: 0.96088 seconds