$echo blabla > testfile.txt
readf, gfile, line
;; GDL returns 0, while IDL returns the correct value, 1.
I've tried the code on the current CVS version on Linux and OSX, and in both cases the result was consistent with IDL:
GDL> $echo blabla > testfile.txt
GDL> readf, gfile, line
GDL> PRINT, EOF(gfile)
If possible, please provide some more details concerning your platform and GDL version.
I've just installed the CVS version (previously, I was using the 0.9rc3 version): same problem.
'uname -a' yields:
Linux head 2.4.20-46.7.legacysmp #1 SMP Sat Mar 4 14:58:59 EST 2006 i686 unknown
Thanks for looking into this. It is rather a showstopper...
I cannot reproduce the problem either. Please check the latest CVS. I committed yesterday a big patch to the file IO system. Although the logic for EOF is practically unchanged and an old version works fine as well for me.
Linux host 2.6.24-25-generic #1 SMP Tue Oct 20 07:31:10 UTC 2009 i686 GNU/Linux
Is your c++ stream library up to date?
I was using gcc 3.2.3. It's the newest version of g++ that the current OS will support, and I don't think any of the libraries (stream or otherwise) have been recently updated (the machine's the head node of an old Beowulf cluster, and I don't have root access). EOF indeed works fine on another machine, with newer OS and g++ v3.4.6.
In this case it looks that it is the compiler/library.
GDL does on the stream
then returns eof()
I believe this is correct
Can you provoke EOF() returning 1 at all?
I have not managed to make EOF() return anything but a 0 (on that particular machine).
What if you create the file without newline?
echo -n blabla > testfile.txt
No more luck...
$echo -n blabla > testfile.txt
OPENR, gfile, 'testfile.txt',/GET_LUN
FYI, I am using the CVS version as of ~two weeks ago. I've had problems installing the newest one.
It seems that, now, the install script absolutely wants to look for the libgsl.so in /usr/lib, even though I tell 'configure' to look elsewhere (via "--with-gsldir=..."). This is an issue I've never had so far with previous CVS and rc3 versions.
Ok. Finally managed to install latest CVS version, but needed 2 hacks to do so:
1) setenv LDFLAGS -L/path/to/my/gsl/lib
before running 'configure'. I think that this very recent issue must be in one of the configuration scripts, and should be easily corrected by you.
2) Despite the above hack, during 'make', I get an error message concerning the basic_op.cpp file. To bypass that issue (temporarily at least), I replaced it with a previous version (CVS from 2009/11/13), and finally managed to compile GDL.
...but same problem with EOF()... I'm beginning to think there is little hope for GDL running properly on that Beowulf cluster, unless major OS and software upgrades are done beforehand.
Concerning the compilation issues with the current CVS version, please try --with-openmp=no
Sadly, that did not help...
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.