[R] make check failed on linux-amd64 using PGI compilers
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Nov 11 08:58:39 CET 2005
On Thu, 10 Nov 2005, Liaw, Andy wrote:
>> From: pd at pubhealth.ku.dk
>>
>> "Liaw, Andy" <andy_liaw at merck.com> writes:
>>
>>> Dear R-help,
>>>
>>> I am trying to build R-2.2.0-patched (2005-11-07 r36217) on
>> the head node of
>>> a Scyld cluster (dual Opteron 250s) using PGI compilers
>> (v6.0). I used the
>>> flags suggested by Jennifer Lai on R-devel (taken from
>> R-admin, except that
>>> I had to add -L/usr/X11R6/lib64 to LDFLAGS). The build
>> went fine, but make
>>> check-all failed when running tests/Examples/graphics-Ex.R, at:
>>>
>>>> plot(1:2, xaxs = "i") # 'inner-axis' w/o extra space
>>>> stopifnot(par("xaxp")[1:2] == 1:2 &&
>>> + par("usr")[1:2] == 1:2)
>>> Error: par("xaxp")]1:2] == 1:2 && par("usr")[1:2] == 1:2 is not TRUE
>>>
>>> The above looks a bit strange to me, as running the R built
>> as above,
>>> par("xaxp")[1:2] - 1:2 gives
>>>
>>> [1] -1.110223e-16 -2.220446e-16
>>>
>>> Is my R build faulty? I'd very much appreciate any advise.
>>
>> Relative errors of 1 ULP would not ruin my sleep. It's not obvious to
>> me which is the floating point operation responsible for the effect,
>> though, and it is a bit suspicious given that it should just be the
>> x-range of the data.
>
> It's the par() output that has storage mode "double", as that stores the
> coordinates. 1:2 has storage mode "integer".
>
> Those comparisons looked a bit suspicious to me. Isn't it recommended time
> and again on this list not to test for exact equality of numerics?
> all.equal() of the above does return TRUE.
Yes. It is also not the intention to have examples be regression tests,
something we have moved away from in general.
But I think Peter's point was that par("usr") should be exactly the range
of the data (it is), and par("xaxp") should be par("usr") with xaxs="i"
when the end points are round numbers. Now setting par("xaxp") is a
tangled tale and involves a call to GPretty, and the latter is what will
be doing floating-point computations. It is a little strange that they
are not exact, but although all.equal with the default tolerance would be
too loose, a tolerance of say 100 ulp would suffice.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list