Re: axis() produces junk on DEC alpha (PR#274)

About this list Date view Thread view Subject view Author view Other groups

Subject: Re: axis() produces junk on DEC alpha (PR#274)
From: Albrecht Gebhardt (albrecht.gebhardt@uni-klu.ac.at)
Date: Wed 15 Sep 1999 - 02:02:10 EST


Message-ID: <Pine.OSF.4.10.9909141736540.2679-100000@zidsrv.sci.uni-klu.ac.at>

On Mon, 13 Sep 1999 ripley@stats.ox.ac.uk wrote:

>
> > Date: Mon, 13 Sep 1999 10:57:23 +0200 (MET DST)
> > From: Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at>
> >
> > On Mon, 13 Sep 1999, Prof Brian D Ripley wrote:
>
> [...]
> ....
> [...]
>
> OK, so I think you are at the line
>
> # define R_FINITE(x) ((x) != R_NaReal)
>
> in Arith.h, and that is clearly inadequate (although it should have
> caught the NA, I think). Can you please try replacing that line by
>
> static int R_FINITE(double x) {
> return !isnan(x) & (x != R_PosInf) & (x != R_NegInf);
> }
>
> and try those tests again.
ok, this works. Now I get even further with "make test". This stopped
somewhere with a "GPretty[Inf, ...]" error, which was obvoiusly also
caused be R_FINITE.

The patch is now:
--- ./src/include/Arith.h.finite-patch Tue Sep 14 16:31:16 1999
+++ ./src/include/Arith.h Tue Sep 14 16:32:12 1999
@@ -81,7 +81,13 @@
         return FINITE(x); /* NOTE: macro does not work. */
     }
 # else
-# define R_FINITE(x) ((x) != R_NaReal)
+# ifdef __osf__
+ static int R_FINITE(double x) {
+ return !isnan(x) & (x != R_PosInf) & (x != R_NegInf);
+ }
+# else
+# define R_FINITE(x) ((x) != R_NaReal)
+# endif
 # endif
 # endif

Albrecht

PS:
"make test" still fails, the last lines of tests/Examples/base-Ex.Rout
are
#### snip ################
> chisq.test(InsectSprays$count > 7, InsectSprays$spray)$obs
       y
x A B C D E F
  FALSE 1 1 12 11 12 0
  TRUE 11 11 0 1 0 12
> # Counts expected under the null
>
> ## Effect of simulating p-values
> x <- matrix(c(12, 5, 7, 7), nc = 2)
> chisq.test(x)$p.value # 0.4233
[1] 0.4233054
###################### snip
I can't see an error here. Or could the error be hidden somewhere before
this point? base-Ex.Rout is quite large, 4154 lines.
.... stop, now I got it, its a memory problem:
Running all help() examples ...
../../bin/R --vanilla < base-Ex.R > base-Ex.Rout
/bin/sh: 303 Memory fault
make[3]: *** [base-Ex.Rout] Error 139
make[3]: Leaving directory
`/usr/local/src/redhat/BUILD/R-0.65.0/tests/Examples'
make[2]: *** [test-Examples] Error 2
make[2]: Leaving directory `/usr/local/src/redhat/BUILD/R-0.65.0/tests'
make[1]: *** [test-All] Error 2
make[1]: Leaving directory `/usr/local/src/redhat/BUILD/R-0.65.0/tests'
make: *** [test-All] Error 2
I have to go to another machine, my alpha at home as only 256MB, and swap
space is also very small.
Or should I run the tests with memory specifications from command line?

Wouldn't it be a good idea to have "make test" running each example in a
several R process? I think I could avoid this memory fault this way. I
guess the reasons for the memory fault is a bad kernel configuration
(wrong ulimit values) and/or wrong swap space configuration and not within
R.
But on the other hand the error is reproduceable with R stopping at
exactly the same line.

-------------------------------------------------------------------------------
Albrecht Gebhardt email : albrecht.gebhardt@uni-klu.ac.at
Institut fuer Mathematik Tel. : (++43 463) 2700/837
Universitaet Klagenfurt Fax : (++43 463) 2700/834
Villacher Str. 161
A-9020 Klagenfurt, Austria
-------------------------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:08 EST