On-the-fly compilation of routines [message #63334] |
Wed, 05 November 2008 20:16  |
gsever
Messages: 28 Registered: August 2008
|
Junior Member |
|
|
Hello,
I would like to know whether it is possible to compile a routine while
I am already running my main IDL program?
To illustrate more this, I will explain my intention a bit more. We
have a powerful IDL-based data analysis tool in our atmospheric
sciences department to analyze airborne acquired data. I am currently
working on a spectrum plot routine of the this tool-suite to make
small modification and learning purposes. I successfully debug the
routines from within the IDL Workbench, but whenever I make a change
on the program or wanted to set a new breakpoint I have to restart the
program and compile all the routines. My question is again, is there a
way to update my current routine in a way to see the changes are going
to be reflected without restarting and compiling everything?
Another point is, can we compile only the recently changed routines in
the beginning of each compilation process?
I appreciate your comments on these issues.
Thank you again.
|
|
|
|
|
|
|
Re: On-the-fly compilation of routines [message #63405 is a reply to message #63334] |
Thu, 06 November 2008 10:43   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
gsever writes:
> The routines have been structured like Mr. Bauer said in his first
> reply. I would like to hear your comments about how we can improve the
> organization of our program.
>
> One of my confusion has not been resolved yet. For example on a modern
> embedded C compiler, throughout the debugging process if I make a
> change on the source code and save the file, and try to observe the
> same function by executing a command or function, the compiler warns
> me to re-compile the code. While doing this, it only compiles the
> recently changed file (I mean as far as I understand the compiler or
> linker attaches a file stamp or flag them, so next time it doesn't re-
> compile unchanged files. This means a significant compiling speed
> improvement and this is something I haven't observed in IDL.
No, because it is typically not necessary to every recompile
everything, except when you start IDL. You are working in
the Workbench, so when you finish editing a file, and wish
to re-compile just that file, reach up and click the "Compile"
button. (It looks like a set of gears. Don't ask me.) Just
that one file you are working on gets compiled. On my Windows
machine CNTL-F8 does the same thing.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: On-the-fly compilation of routines [message #63408 is a reply to message #63334] |
Thu, 06 November 2008 10:26   |
gsever
Messages: 28 Registered: August 2008
|
Junior Member |
|
|
The routines have been structured like Mr. Bauer said in his first
reply. I would like to hear your comments about how we can improve the
organization of our program.
One of my confusion has not been resolved yet. For example on a modern
embedded C compiler, throughout the debugging process if I make a
change on the source code and save the file, and try to observe the
same function by executing a command or function, the compiler warns
me to re-compile the code. While doing this, it only compiles the
recently changed file (I mean as far as I understand the compiler or
linker attaches a file stamp or flag them, so next time it doesn't re-
compile unchanged files. This means a significant compiling speed
improvement and this is something I haven't observed in IDL.
On Nov 6, 11:34 am, David Fanning <n...@dfanning.com> wrote:
> gsever writes:
>> Once again, in the same IDL session, when I first launch the program
>> 168 routines are compiled, after I make an addition the source code of
>> one file, and re-run the program all 168 routines are re-compiled
>> again. This is controversial to Reimer Bauer's yes answer.
>
> Yes, it suggests a poorly written IDL program, I'm afraid. :-(
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
Re: On-the-fly compilation of routines [message #63412 is a reply to message #63334] |
Thu, 06 November 2008 09:34   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
gsever writes:
> Once again, in the same IDL session, when I first launch the program
> 168 routines are compiled, after I make an addition the source code of
> one file, and re-run the program all 168 routines are re-compiled
> again. This is controversial to Reimer Bauer's yes answer.
Yes, it suggests a poorly written IDL program, I'm afraid. :-(
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|
|
Re: On-the-fly compilation of routines [message #63461 is a reply to message #63334] |
Mon, 10 November 2008 01:08  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Kenneth P. Bowman schrieb:
> In article <Pine.LNX.4.64.0811072016520.27772@lxserv1.kfki.hu>,
> FOLDY Lajos <foldy@rmki.kfki.hu> wrote:
>
>> On Fri, 7 Nov 2008, Kenneth P. Bowman wrote:
>>
>>> In true unix fashion, I always .r my programs to recompile them. Why type
>>> all of those extra characters. ;-) (.com will work, but .c is not unique).
>> .r is not unique either (.run/.reset :-)
>>
>> regards,
>> lajos
>
> But .r expands to .run, while .c expands to .continue. I'm sure there's a
> logical reason. :-)
>
> Ken
no it is a bug. ;)
At least if you see it in comparison to the keyword logic.
cheers
Reimar
|
|
|
|
Re: On-the-fly compilation of routines [message #63487 is a reply to message #63334] |
Fri, 07 November 2008 11:19  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Fri, 7 Nov 2008, Kenneth P. Bowman wrote:
> In true unix fashion, I always .r my programs to recompile them. Why type
> all of those extra characters. ;-) (.com will work, but .c is not unique).
.r is not unique either (.run/.reset :-)
regards,
lajos
|
|
|
Re: On-the-fly compilation of routines [message #63491 is a reply to message #63334] |
Fri, 07 November 2008 06:41  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <MPG.237dd652953c0f9d98a510@news.giganews.com>,
David Fanning <news@dfanning.com> wrote:
> This reminds me of a discussion we had several weeks ago that
> I forgot to follow up on. Someone was trying to compile a large
> program project with a script that did a .COMPILE on his files.
> This worked fine in some earlier version of IDL, but had the
> effect of opening hundreds of edit windows in later versions.
>
> I happened to ask about this when I was around some ITTVIS types
> who were likely to know the answer. It turns out that .COMPILE
> is now the equivalent to the command sequence .RUN/.EDIT. And
> that what the person needed to do was replace all his .COMPILE
> commands with .RUN.
>
> This sort of turns the .COMPILE command back on its head,
> since I originally argued for it on the basis that no one
> outside of RSI could figure out why .RUN only compiled and
> didn't run anything, and that is why we needed a .COMPILE
> command.
>
> Anyway, I suppose when your institutional memory leaves the
> company, it's easy to forget why you did things originally. :-)
>
> Cheers,
>
> David
In true unix fashion, I always .r my programs to recompile them. Why type
all of those extra characters. ;-) (.com will work, but .c is not unique).
Cheers, Ken
|
|
|
Re: On-the-fly compilation of routines [message #63518 is a reply to message #63334] |
Fri, 07 November 2008 05:03  |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
David Fanning schrieb:
> Reimar Bauer writes:
>
>> Andrew Cool schrieb:
>>>> mean is a idl source function. You can open it by .edit mean on the idl input line.
>>> Well I'll be!!
>>>
>>> 17 years programming in IDL and I never knew this.
>>>
>>> What else don't I know? I'll go ask my wife - she'll tell me... ;-)
>>>
>>> Andrew
>>>
>>
>> Hi Andrew!
>>
>> On the other hand I know you know things I don't know, that's why I love
>> since several years this group.
>
> This reminds me of a discussion we had several weeks ago that
> I forgot to follow up on. Someone was trying to compile a large
> program project with a script that did a .COMPILE on his files.
> This worked fine in some earlier version of IDL, but had the
> effect of opening hundreds of edit windows in later versions.
>
> I happened to ask about this when I was around some ITTVIS types
> who were likely to know the answer. It turns out that .COMPILE
> is now the equivalent to the command sequence .RUN/.EDIT. And
> that what the person needed to do was replace all his .COMPILE
> commands with .RUN.
>
> This sort of turns the .COMPILE command back on its head,
> since I originally argued for it on the basis that no one
> outside of RSI could figure out why .RUN only compiled and
> didn't run anything, and that is why we needed a .COMPILE
> command.
>
> Anyway, I suppose when your institutional memory leaves the
> company, it's easy to forget why you did things originally. :-)
>
> Cheers,
>
> David
indeed that is a stupid misbehaviour of idl 7.0 again. luckily it does
not crash the idl shell (because of a missing edit window).
In the past the .run dot command was used to compile and execute main
programs. There was no difference between the shell and the ide.
Now it behaves this way only if you don't use the ide :(
Reimar
|
|
|
Re: On-the-fly compilation of routines [message #63519 is a reply to message #63375] |
Fri, 07 November 2008 03:37  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Reimar Bauer writes:
> Andrew Cool schrieb:
>>> mean is a idl source function. You can open it by .edit mean on the idl input line.
>>
>> Well I'll be!!
>>
>> 17 years programming in IDL and I never knew this.
>>
>> What else don't I know? I'll go ask my wife - she'll tell me... ;-)
>>
>> Andrew
>>
>
>
> Hi Andrew!
>
> On the other hand I know you know things I don't know, that's why I love
> since several years this group.
This reminds me of a discussion we had several weeks ago that
I forgot to follow up on. Someone was trying to compile a large
program project with a script that did a .COMPILE on his files.
This worked fine in some earlier version of IDL, but had the
effect of opening hundreds of edit windows in later versions.
I happened to ask about this when I was around some ITTVIS types
who were likely to know the answer. It turns out that .COMPILE
is now the equivalent to the command sequence .RUN/.EDIT. And
that what the person needed to do was replace all his .COMPILE
commands with .RUN.
This sort of turns the .COMPILE command back on its head,
since I originally argued for it on the basis that no one
outside of RSI could figure out why .RUN only compiled and
didn't run anything, and that is why we needed a .COMPILE
command.
Anyway, I suppose when your institutional memory leaves the
company, it's easy to forget why you did things originally. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|