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

Home » Public Forums » archive » Re: Calling IDL from Fortran called by IDL
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: Calling IDL from Fortran called by IDL [message #28181] Tue, 27 November 2001 08:01 Go to previous message
Mark Rivers is currently offline  Mark Rivers
Messages: 49
Registered: February 2000
Member
Kevin A. Park <kpark@prism-cs.com> wrote in message
news:3c02c150$0$35565$272ea4a1@news.execpc.com...
> Hi,
>
> I have an IDL GUI which sits on top of a calculation engine which
> is written in Fortran 90. Currently IDL accesses the calculation engine
> by calling C wrapper functions via CALL_EXTERNAL. These C wrappers then
> call Fortran routines. The system runs both on Solaris and Windows
> platforms. I am currently using IDL 5.4, but will upgrade to IDL 5.5
> soon.
>
> Some of the calculations in the Fortran take a long time, so what I
> would like to do is have IDL create a progress bar which can be updated
> from the Fortran. Having waded through the IDL External Development
> Guide, I have a few questions.

I have done something like this in the past. Here is the general method.

- IDL calls your external C wrapper routines

- The external C routines launch a new thread and pass this thread
the address of an IDL variable into which some progress information
can be written.

- The external C routine returns to IDL immediately, leaving the new
thread running to do the time-intensive work. The new thread
writes progress information to the IDL variable, which the
IDL code is peridically checking and using to update a progress
meter, display new results or whatever.

The last time I did this was on VMS (!) for a real-time scanning x-ray
microscope display. The "real-time" thread was interupt driven
FORTRAN code that communicated with IDL via the addresses of IDL
variables that were passed to it when a new scan was begun.

The same general ideas should still work. You don't need IDL to
be multi-threaded, you just need to be able to launch a new
thread in your external code.

Mark Rivers
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDL 5.4 on Solaris? Please test
Next Topic: Re: New All-Time Records on IDL Newsgroup

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

Current Time: Thu Oct 09 20:53:31 PDT 2025

Total time taken to generate the page: 1.20015 seconds