IDL 8.8 and -rt= runtime option

372 views
Skip to first unread message

Edward Hyer

unread,
Feb 2, 2021, 4:32:42 PM2/2/21
to idl-pvwave
For batch/non-interactive use, I routinely package IDL routines into .sav files using SAVE and run them from the command line like
%idl -rt=MyRoutine.sav
This appears to have stopped working in IDL 8.8, it now returns

% Attempt to call undefined procedure: 'IDLRTMAIN'.

% Execution halted at: $MAIN$          

I see nothing in the product notes that explains this: What's New in IDL 8.8 (l3harrisgeospatial.com)

has anyone tried IDL 8.8 with a saved routine yet?

Thanks,

--Edward H.

Wayne Landsman

unread,
Feb 2, 2021, 6:32:55 PM2/2/21
to idl-pvwave
I am able to use the -rt option with IDL 8.8 under linux.    For example, a program to print "hello world"

%idl -rt=test1.sav

IDL 8.8.0 (linux x86_64 m64).

(c) 2020, Harris Geospatial Solutions, Inc.

hello world

IDL> !version

    "ARCH": "x86_64",

    "OS": "linux",

    "OS_FAMILY": "unix"

    "RELEASE": "8.8.0",

Your error message about IDLRTMAIN being undefined suggests that your IDL installation is not set up correctly.       In the lib/hook subdirectory of your IDL installation there should be a idlrtmain.sav file  

% ls /usr/local/exelis/idl/lib/hook

demo.sav  idlrtmain.sav  license_wizard.sav


--Wayne

Brian G

unread,
Feb 2, 2021, 9:08:55 PM2/2/21
to idl-pvwave
It sounds like your IDL_PATH or IDL_DIR preferences are not correct.  As Wayne pointed out, idl -rt will always use the idlrtmain.sav file in lib/hook to inspect and execute the save file.  It first verifies that the save file is not a data save file, and then looks for a procedure either with the same name as the save file or named "main" and executes that.
If your IDL_PATH is missing <IDL_DEFAULT> then the lib/hook folder won't be in !PATH.
If IDL_DIR is not set, or set to something else, then the processing of <IDL_DEFAULT> is IDL_PATH will probably be wrong.
On Linux, you have to make sure you call the idl shell script in the bin folder, not the idl application in the bin/bin.linux.x86_64 folder.  The shell script sets up a number of environment variables like IDL_DIR, to make sure things function correctly.  A "which idl" will tell you which file is being executed, so long as you aren't currently in the bin.linux.x86_64 folder.  If you source the idl/bin/idl_setup script, it will make sure idl/bin is in your PATH, so you can find the shell script.

Edward Hyer

unread,
Feb 4, 2021, 4:38:44 PM2/4/21
to idl-pvwave
Thanks! That led to me to the fix (ancient .rc file was clobbering IDL_PATH).
Reply all
Reply to author
Forward
0 new messages