READCOL: v1 undefined in scope_varfetch

Help
Tim
2012-01-24
2014-11-03
  • Tim

    Tim - 2012-01-24

    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:

    my_file.txt
    1.11
    2.22

    readcol, 'my_file.txt', myCol1
    print,col1
    

    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
    %                    $MAIN$         
    % 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?

    Many thanks.

    - Tim

     
  • Alain C.

    Alain C. - 2012-01-26

    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 ?

     
  • Tim

    Tim - 2012-01-26

    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.

    Thanks.

    - Tim

     
  • Alain C.

    Alain C. - 2012-01-27

    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)
    http://idlastro.gsfc.nasa.gov/ftp/old/_

     
  • michael

    michael - 2014-11-03

    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?
    Thanks,
    -Mike

     

Log in to post a comment.