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 #28248 is a reply to message #28181] Tue, 27 November 2001 18:38 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
"Mark Rivers" <rivers@cars.uchicago.edu> writes:

> 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.
>
...
> - 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.
...

Oooh, but be careful, because if you allow your IDL variable to be
released, say by reassigning it, then your external C routine will
probably end up overwriting some part of memory you didn't want it to.

I would say that the easy compromise is to declare a system variable,
because I believe those are fixed in memory (ie, can't be
unallocated). System variables can be declared via IDL commands, or
within your DLM.

Also, one always needs to worry that things like malloc() and printf()
may not be threadsafe on one's platform. If your work thread and the
IDL thread clash, then *pow*, that will hurt.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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: Fri Oct 10 19:22:12 PDT 2025

Total time taken to generate the page: 1.43786 seconds