From: Michael K. <ki...@cs...> - 2002-07-20 17:54:32
|
No, I am compiling with the default. My compilers are versions 2.96 and 3.04. As I said earlier, it seems like a gcc bug possibly on PIII machines. This is because when I compile with the opt level O1 then everything works. --michael > Hi Michael, > > I tried it on a newly created tree (from CVS as of today) with the > following versions of gcc, and got the same (good) result. Are you > compiling with some options different than the default? > > lfmobile:~$ gcc -v > Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs > gcc version 2.95.4 20011002 (Debian prerelease) > lfmobile:~$ gcc-3.0 -v > Reading specs from /usr/lib/gcc-lib/i386-linux/3.0.4/specs > Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gn > u-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=b > oehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux > Thread model: posix > gcc version 3.0.4 > lfmobile:~$ gcc-3.1 -v > Reading specs from /usr/lib/gcc-lib/i386-linux/3.1.1/specs > Configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=/usr/share/man - > -infodir=/usr/share/info --with-gxx-include-dir=/usr/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included > -gettext --enable-clocale=gnu --enable-__cxa_atexit --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux > Thread model: posix > gcc version 3.1.1 20020703 (Debian prerelease) > > -Luis > > ki...@cs... (Michael Kifer) writes: > > > I don't know what is going on. I wiped out everything (make distclean), > > configured with gcc-3.04, compiled, then tried > > > > [user] > > ?- X=23.234567, number_codes(X,L),atom_codes(Y,L),writeln([X,L,Y]). > > EOF > > > > Then I wiped out everything again and configured with gcc-2.96, recompiled, > > then did the same as above. In both cases it gave a wrong result. > > > > Then I wiped out all the xwam files in syslib, cmplib, and elsewhere, > > updated from cvs, and ran the test again. Same result. > > > > Aha! > > I then recompiled with --optimization-level=O1, and it works! I dunno > > what the calprit is. It is not the compiler, since I tried 2.96 as well. > > > > Maybe libc? Mine is 2.2.4. > > Or could be wrong optimization that gcc does for P3 somewhere. > > > > > > --michael > > > > > > > Michael wrote: > > > > > > > And to back it up, I recompiled XSB with gcc-2.96, did superdevel, > > > wiped out all the xwam files in the testsuite, and then ran it again. > > > The testsuite has failed. > > > > > > I suspect that you were using old, good .xwam files in the testsuite, which > > > is why it didn't fail for you. > > > > > > ------------------ > > > > > > Ok, > > > > > > > > > -- I updated my system pretty completely, (there are a few diffs from > > > the common system, but I looked at them all, and took out any of my > > > changes that had a conceivable chance of accounting for the error) > > > > > > -- I remade xsb with superdevel > > > > > > -- I removed all .xwam files from the testsuite. The testsuite passed > > > when I ran it. > > > > > > -- Just to make sure there weren't any timing problems in the make > > > process, I repeated the make and testsuite. It ran again. > > > > > > Also, > > > > > > > > > | ?- [user]. > > > [Compiling user] > > > ?- X=23.234567,number_codes(X,L),writeln(L). > > > [user compiled, cpu time used: 0.0900 seconds] > > > [user loaded] > > > [50,46,51,50,51,52,53,54,101,43,48,49] > > > > > > yes > > > | ?- X=23.234567,number_codes(X,L),writeln(L). > > > [50,46,51,50,51,52,53,54,101,43,48,49] > > > > > > X = 23.2346 > > > L = [50,46,51,50,51,52,53,54,101,43,48,49] > > > > > > > > > yes > > > > > > This seems contradictory to Michael's description. I'm guessing that > > > somewhere Michael has a library file that is different than one I use, > > > and this is accounting for the different results (?) > > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Gadgets, caffeine, t-shirts, fun stuff. > > http://thinkgeek.com/sf > > _______________________________________________ > > Xsb-development mailing list > > Xsb...@li... > > https://lists.sourceforge.net/lists/listinfo/xsb-development > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Xsb-development mailing list > Xsb...@li... > https://lists.sourceforge.net/lists/listinfo/xsb-development > |