Re: Running IDL .pro script from another app, using the IDL API [message #55901 is a reply to message #55898] |
Fri, 14 September 2007 08:20   |
Maarten[1]
Messages: 176 Registered: November 2005
|
Senior Member |
|
|
On Sep 14, 11:23 am, Mike <Michael.Mill...@gmail.com> wrote:
> I don't think that the problem is with windows itself. I'm sure there
> is a way to spawn or otherwise start something from within their
> desktop application (details depending on how it was written). The
> problem is that there is not a command-line idl on windows, so the
> "idl foo.pro" idiom is not available. To start IDL, they have to
> start the IDL IDE. On windows, the "I" really does mean interactive!
> That's one reason (among others) why we run all of our "batch" IDL
> codes on *nix boxen.
I don't use Windows myself, but a tool I wrote to analyse OMI level 2
data runs on both Linux and Windows (and presumably Mac OS X) from the
command-line, in batch mode. My coworker wrote part of the manual of
this tool with instructions on how to run this tool in batch mode:
(quote from manual)
For processing jobs involving many different operations on an OMI data
set one can write an IDL program to instruct IDL to call the CAMA
routine a number of times with each time a different "description
file". However, to avoid running into the before mentioned caveat, IDL
should be reset in between these calls and unfortunately this can only
be performed manually in IDL on Windows. Advantageously, IDL on
Windows allows for calling the IDLDE.EXE program directly from a DOS
prompt and from a DOS batch file. For example, the file "mass_run.bat"
contains lines of the following form:
"C:\RSIIDL\IDL61\bin\bin.x86\idlde.exe" @E:\Calculations\IDL\CAMA
\WholeGlobe\WG_mass_run_verigen_12.pro
where "C:\RSIIDL\IDL61\bin\bin.x86\idlde.exe" specifies the location
of the local installation of the idlde.exe program and the text
directly following the "@" sign specifies the location of a .pro file.
In this .pro file regular CAMA calling routines can be written such a
specified above. To achieve resetting IDLDE between parts of the
processing job, the last line of code of the .pro file should read
"EXIT" forcing IDL to exit. Subsequently, the next line of command in
the batch file restarts IDLDE with the default setting and all
counters reset to zero. In this way a large number of processing jobs
can be programmed to conveniently run outside office hours. Please do
make absolutely sure that the option "Confirm Exit" in section
"General" of "Preferences" is turned off, otherwise IDL on Windows
requires a manual confirmation from the user to exit.
(end quote)
To me this means that batch processing is possible, but the commands
need to be specified in a batch file (no multi-line commands, just
like IDL on *nix). To fully run without user interaction some setting
must be changed ("Confirm exit"). The issue here is that processing
more than 600 hdf files sequentially causes some unresolved buffer
overruns (not present on Linux), hence the exit in between different
batches.
HTH,
Maarten
|
|
|