My apologies if this is a problem that has already been solved. I did not find a posting about it after a search of the forums and bug reports.
I downloaded the tarball from the CVS repository (http://gnudatalanguage.cvs.sourceforge.net/viewvc/gnudatalanguage/gdl/?view=tar) and successfully built using gcc 4.6.1 and
./configure --with-Magick=no --with-wxWidgets=no --with-netcdf=no --with-hdf=no --with-hdf5=no --with-fftw=no --with-python=no --with-pslib=no
because I don't have those modules installed. I then tested using the following input file:
readcol, 'my_file.txt', myCol1
I get the following output:
% Compiled module: READCOL.
% Compiled module: FILE_LINES.
% READCOL: Format keyword not supplied - All columns assumed floating point
% Compiled module: GETTOK.
% Compiled module: SKIP_LUN.
% Compiled module: STRSPLIT.
% Compiled module: UNIQ.
% Compiled module: STRNUMBER.
% READCOL: 2 valid lines read
% Compiled module: SCOPE_VARFETCH.
% ROUTINE_NAMES: Variable is undefined: V1
% Error occurred at: SCOPE_VARFETCH 4 /usr/share/doc/gnudatalanguage/examples/pro/scope_varfetch.pro
% READCOL 356 /usr/share/doc/gnudatalanguage/examples/pro/misc/readcol.pro
% Execution halted at: $MAIN$
where "/usr/share/doc/gnudatalanguage/examples/pro" is contained in $GDL_PATH.
From what I can tell (and I have only been working with GDL/IDL for about a day) is that scope_varfetch thinks that myCol1 contained in $MAIN$ is undefined. I looked into return_names in basic_fun_jmg.cpp, but that was well beyond what I could figure out.
Do I need to do some declaration of myCol1 in $MAIN$ before calling readcol? Is GDL fully dynamically typed?
I just test with success, with three various versions of GDL,
including a very old one (rc4 paquet on Ubuntu) and the current CVS
which OS ?
which version of the Astron Lib ?
I am using Ubuntu 11.10 x86_64 and the latest tarball of the astro lib (date modified is January 20, 2012). I have tried this test with both the latest CVS build of GDL as well as the GDL 0.9.1-1build1 package in the Ubuntu Oneiric repository. Both fail the test in the same manner.
OK, thanks, I found the problem, we have a problem with changes in AstroLib
(in the last lines of new version of READCOL)
> ; Use SCOPE_VARFETCH to place into output variables..
> for i=0,ncol-1 do $
> (SCOPE_VARFETCH(vv_,LEVEL=0)) = reform(*bigarr)
> ptr_free, bigarr
Obviously we will try to solve that.
But as a temporary workaround, you can use older versions of Astron Lib, e.g. 5.6 (I successfully tested)
I just recently encountered this problem too. I am able to use the workaround, an older version. I use Ubuntu 12.04, GDL v0.9.2. The IDLAstro library has been modified as recently as 2014-09-26. Is the problem in GDL?
Log in to post a comment.