SAVEFILE_CLEANUP error

46 views
Skip to first unread message

Bernat

unread,
Jul 9, 2024, 9:02:30 PM7/9/24
to idl-pvwave
Hi folks,

I have an ORDEREDHASH saved in SAV file with IDL 8.7. When I try to restore  the file using IDL 9.0 I get the following error:
% Wrong number of tags defined for structure: ORDEREDHASH.
% RESTORE: Structure not restored due to conflict with existing definition: ORDEREDHASH.
[...]
% Wrong number of tags defined for structure: ORDEREDHASH.
% RESTORE: Structure not restored due to conflict with existing definition: ORDEREDHASH.
% Wrong number of tags defined for structure: ORDEREDHASH.
% RESTORE: Structure not restored due to conflict with existing definition: ORDEREDHASH.
% Execution halted at: $MAIN$

After reading the documentation, I realized that this error occurs because some routines have been ported from PRO to C/C++ code, and ORDEREDHASH is one of these.

it seems that I have to use the routine SAVEFILE_CLEANUP. However, this throws an error:
SAVEFILE_CLEANUP,  '20240622.sav'  
% Loaded DLM: IDL_IDLBRIDGE.
% Compiled module: SAVEFILE_CLEANUP.
% SAVEFILE_CLEANUP: File is a data save file: 20240622.sav.
% Execution halted at: SAVEFILE_CLEANUP  127 /usr/local/nv5/idl90/lib/utilities/savefile_cleanup.pro

I guess that this is a bug?
Bernat

Chris Torrence

unread,
Jul 10, 2024, 2:38:16 PM7/10/24
to idl-pvwave
Hi Bernat,

SAVEFILE_CLEANUP is only supposed to be used for "routine" save files, that contain function and procedure routines. For example, if you had a routine save file that contained the ordered hash code, it would strip that code out of the file so it didn't cause problems.

However, since you have a data save file (containing actual ordered hash objects), then you probably need to use the RELAXED_STRUCTURE_ASSIGNMENT keyword to RESTORE:
RESTORE, '20240622.sav', /RELAXED

I hope this helps.
Cheers,
Chris
NV5 Geospatial

Bernat

unread,
Jul 10, 2024, 2:54:44 PM7/10/24
to idl-pvwave
It worked! Thank you,
Bernat
Reply all
Reply to author
Forward
0 new messages