make check fails due to NA / NaN mismatch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

make check fails due to NA / NaN mismatch

Korpela Mikko (MML)
It seems there is a problem in tests/d-p-q-r-tst-2.R (R-devel r79091): NA / NaN mismatch is not allowed by a test on lines 590--592, but the comment suggests otherwise. A run of "make check" fails there when tested on a Raspberry Pi with Raspberry Pi OS (based on Debian Buster): all 'NaN' is expected, but all 'NA' is returned when testing the function 'rf()' with 'ia == 1'.

Best regards,
Mikko Korpela
Maanmittauslaitos | National Land Survey of Finland
Opastinsilta 12 C, 00520 Helsinki, Finland

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: make check fails due to NA / NaN mismatch

Martin Maechler
>>>>> Korpela Mikko (MML)
>>>>>     on Mon, 31 Aug 2020 06:23:59 +0000 writes:

    > It seems there is a problem in tests/d-p-q-r-tst-2.R (R-devel r79091): NA / NaN mismatch is not allowed by a test on lines 590--592, but the comment suggests otherwise. A run of "make check" fails there when tested on a Raspberry Pi with Raspberry Pi OS (based on Debian Buster): all 'NaN' is expected, but all 'NA' is returned when testing the function 'rf()' with 'ia == 1'.

Thank you, Mikko.

Note that I've recently split off the  tests/d-p-q-r-tst-2.R  file
from from the previously  longer       tests/d-p-q-r-tests.R  file,
mostly in order to drop the 'R CMD Rdiff .. *.Rout.save' testing
from those parts.

However the *test* you mention has been in R's tests (in the
tests//d-p-q-r-tests.R file)  for a very long time,  AFAICS.

So, I am a bit puzzled:  What you write seems to indicate that
this is a new failure, but that is just one "between the lines"
interpretation, so let me ask to clarify:

Is it the first time you're running 'make check' on that
platform and get that error?
or is it a platform you've been running 'make check' on R-devel
for a while and only now you "suddenly" get that error?

Best,
Martin

    > Best regards,
    > Mikko Korpela
    > Maanmittauslaitos | National Land Survey of Finland
    > Opastinsilta 12 C, 00520 Helsinki, Finland

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: make check fails due to NA / NaN mismatch

Korpela Mikko (MML)
In reply to this post by Korpela Mikko (MML)
Thank you for the introduction to these recent changes, Martin.

I think this was the second time I ran "make check" on that platform (Raspberry Pi 32-bit), and the first time (some months ago) it worked fine. So, that makes it kind of "suddenly", although I must say that my use of "make check" is very irregular.

I compared code before and after the split you are referring to. The test in question changed in the process:

This is a snippet of "tests/d-p-q-r-tests.R" (lines 1030--1034) at revision 79079, just before the split:

if(!inherits(R$warning, "simpleWarning")) cat(" .. did *NOT* give a warning! ")
if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
    if(!(dist %in% c("beta","f","t") && all(is.na(R$value))))
        cat(" .. not giving expected NA/NaN's ")
}

The corresponding piece of code in "tests/d-p-q-r-tst-2.R" (lines 588--591) after the split, at revision 79080, is:

if(!inherits(R$warning, "simpleWarning")) stop(" .. did *NOT* give a warning! ")
if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
    stop(" .. not giving expected NA/NaN's ")
}

where the test is less forgiving, both with respect to the conditions and the type of "nag" (cat vs stop).

- Mikko

-----Alkuperäinen viesti-----
Lähettäjä: Martin Maechler <[hidden email]>
Lähetetty: maanantai 31. elokuuta 2020 10.44
Vastaanottaja: Korpela Mikko (MML) <[hidden email]>
Kopio: r-devel <[hidden email]>
Aihe: Re: [Rd] make check fails due to NA / NaN mismatch

>>>>> Korpela Mikko (MML)
>>>>>     on Mon, 31 Aug 2020 06:23:59 +0000 writes:

    > It seems there is a problem in tests/d-p-q-r-tst-2.R (R-devel r79091): NA / NaN mismatch is not allowed by a test on lines 590--592, but the comment suggests otherwise. A run of "make check" fails there when tested on a Raspberry Pi with Raspberry Pi OS (based on Debian Buster): all 'NaN' is expected, but all 'NA' is returned when testing the function 'rf()' with 'ia == 1'.

Thank you, Mikko.

Note that I've recently split off the  tests/d-p-q-r-tst-2.R  file
from from the previously  longer       tests/d-p-q-r-tests.R  file,
mostly in order to drop the 'R CMD Rdiff .. *.Rout.save' testing from those parts.

However the *test* you mention has been in R's tests (in the tests//d-p-q-r-tests.R file)  for a very long time,  AFAICS.

So, I am a bit puzzled:  What you write seems to indicate that this is a new failure, but that is just one "between the lines"
interpretation, so let me ask to clarify:

Is it the first time you're running 'make check' on that platform and get that error?
or is it a platform you've been running 'make check' on R-devel for a while and only now you "suddenly" get that error?

Best,
Martin

    > Best regards,
    > Mikko Korpela
    > Maanmittauslaitos | National Land Survey of Finland
    > Opastinsilta 12 C, 00520 Helsinki, Finland

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Reply | Threaded
Open this post in threaded view
|

Re: make check fails due to NA / NaN mismatch

Martin Maechler
>>>>> Korpela Mikko (MML)
>>>>>     on Mon, 31 Aug 2020 08:46:55 +0000 writes:

    > Thank you for the introduction to these recent changes, Martin.
    > I think this was the second time I ran "make check" on that platform (Raspberry Pi 32-bit), and the first time (some months ago) it worked fine. So, that makes it kind of "suddenly", although I must say that my use of "make check" is very irregular.

    > I compared code before and after the split you are referring to. The test in question changed in the process:

    > This is a snippet of "tests/d-p-q-r-tests.R" (lines 1030--1034) at revision 79079, just before the split:

    > if(!inherits(R$warning, "simpleWarning")) cat(" .. did *NOT* give a warning! ")
    > if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:

> if(!(dist %in% c("beta","f","t") && all(is.na(R$value))))
    > cat(" .. not giving expected NA/NaN's ")
    > }

    > The corresponding piece of code in "tests/d-p-q-r-tst-2.R" (lines 588--591) after the split, at revision 79080, is:

    > if(!inherits(R$warning, "simpleWarning")) stop(" .. did *NOT* give a warning! ")
    > if(!(identical(R$value, expected))) { ## allow NA/NaN mismatch in these cases for now:
    > stop(" .. not giving expected NA/NaN's ")
    > }

    > where the test is less forgiving, both with respect to the conditions and the type of "nag" (cat vs stop).

aahh..   thank you!

The cat() to  stop() change was very much on purpose
{for the old test files, all output differences eventually
 turned to test errors via "make" and 'R CMD Rdiff',  whereas
 now the R code itself should error in those cases }

but "of course" it was a lapsus of mine to have dropped the

    if(! (dist %in% ...  && all(....)) )

line accidentally.....  no re-added in svn c79092.

Martin

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel