In the previous article, the errors on 'ON_IOERROR' are modified.
Next, sswdb_upgrade.pro stoped in make_mirror.pro.
make_mirror.pro
In sswdb_upgrade.pro, file transfer via FTP is executed by PERL (MIRROR).
A setting file for PERL is made in make_mirror.pro.
The following is an error message in this procedure.
% STRING: Format parser: NoViableAlt
% Execution halted at: MAKE_MIRROR 197 /???/ssw/gen/idl/system/make_mirror.pro
197th line is 'file_append' procedure.
> form='(' + strtrim(npacks,2) + '(1h#,/,a,/,'+ strtrim(ntags-1,2) + '(3x,a,/)))'
> file_append,mirror_file,string(allpacks,format=form) ;, /new
'file_append' is a writing procedure, 'mirror_file' is the setting file, information on instruments are included in 'allpacks' (a structure array)
'npacks' is the number of the instruments, and 'ntags' is the number of information on a instrument.
Contents of 'allpacks' is described via 'form'
The error occurs here.
If I typed, 'GDL> print, string(allpacks,format=form)', an error occurs.
But, I can print data on ONE instrument.
For example, for seven instruments, 'form' is the following.
IDL> form=(7(1h#,/,a,/,15(3x,a,/)))
'1h#,/,a,/,15(3x,a,/)' is the format for an instrument.
GDL> print, string(allpacks[0],format="(1h#,/,a,/,15(3x,a,/))")
So, I modified lines to add lines for each instrument.
< form='(1H#,/,a,/,'+ strtrim(ntags-1,2) + '(3x,a,/))'
<for i0=0,npacks-1 do begin
< s1=string(allpacks[i0],format=form)
< file_append,mirror_file,s1 ;, /new
< if i0 eq npacks-1 then goto,L100
<endfor
<L100:
Because 'for-loop' did not stop at 'npacks-1', it is forced to escape via 'goto'.
After this modification, sswdb_upgrade.pro can get files.
Additional notes
Later, in trying to install SSWDB, GDL itself stopped with the following messages.
gdl: /build/gnudatalanguage-yJFcE3/gnudatalanguage-0.9.6v2/src/gdlarray.hpp:210: T& GDLArray<T, IsPOD>::operator[](SizeT) [with T = std::__cxx11::basic_string<char>; bool IsPOD = false; SizeT = long long unsigned int]: Assertion `ix < sz' failed.
Magick: abort due to signal 6 (SIGABRT) "Abort"...
Abort (core dumped)
GDL may be insteady.
0 件のコメント:
コメントを投稿