[Rd] R-devel (r81196) hanging at dchisq(large) (PR#13309)

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Tue Nov 16 09:43:43 CET 2021


>>>>> Avraham Adler 
>>>>>     on Tue, 16 Nov 2021 02:35:56 +0000 writes:

    > I am building r-devel on Windows 10 64bit using Jeroen's mingw system,
    > and I am finding that my make check-devel hangs on the above issue.
    > Everything is vanila except that I am using OpenBLAS 0.3.18. I have
    > been using OpenBLAS for over a decade and have not had this issue
    > before. Is there anything I can do to dig deeper into this issue from
    > my end? Could there be anything that changed in R-devel that may have
    > triggered this? The bugzilla report doesn't have any code attached to
    > it.

    > Thank you,
    > Avi

Hmm.. it would've be nice to tell a bit more, instead of having all
your readers to search links, etc.

In the bugzilla bug report PR#13309
https://bugs.r-project.org/show_bug.cgi?id=13309 ,the example was

 dchisq(x=Inf, df=10, ncp=1)

I had fixed the bug 13 years ago, in svn rev 47005
with regression test in <Rsrc>/tests/d-p-q-r-tests.R :


## Non-central Chi^2 density for large x
stopifnot(0 == dchisq(c(Inf, 1e80, 1e50, 1e40), df=10, ncp=1))
## did hang in 2.8.0 and earlier (PR#13309).


and you are seeing your version of R hanging at exactly this
location?


I'd bet quite a bit that the underlying code in these
non-central chi square computations *never* calls BLAS and hence
I cannot imagine how openBLAS could play a role.

However, there must be something peculiar in your compiler setup,
compilation options, ....
as of course the above regression test has been run 100s of
1000s of times also under Windows in the last 13 years ..

Last but not least (but really only vaguely related):
   There is still a FIXME in the source code (but not about
hanging, but rather of loosing some accuracy in border cases),
see e.g. https://svn.r-project.org/R/trunk/src/nmath/dnchisq.c
and for that reason I had written an R version of that C code
even back in 2008 which I've made available in  CRAN package
DPQ  a few years ago (together with many other D/P/Q
distribution computations/approximations).
	     -> https://cran.r-project.org/package=DPQ

Best,
Martin


    > sessionInfo:
    > R Under development (unstable) (2021-11-15 r81196)
    > Platform: x86_64-w64-mingw32/x64 (64-bit)
    > Running under: Windows 10 x64 (build 19043)

    > Matrix products: default

    > locale:
    > [1] LC_COLLATE=English_United States.1252
    > [2] LC_CTYPE=English_United States.1252
    > [3] LC_MONETARY=English_United States.1252
    > [4] LC_NUMERIC=C
    > [5] LC_TIME=English_United States.1252

    > attached base packages:
    > [1] stats     graphics  grDevices utils     datasets  methods   base

    > loaded via a namespace (and not attached):
    > [1] compiler_4.2.0 tools_4.2.0



More information about the R-devel mailing list