>>>>> Giuseppe Cal?
>>>>> on Thu, 22 Jun 2023 14:52:00 +0200 writes:
> Hello Martin, this is output
> R version 4.3.1 (2023-06-16) -- "Beagle Scouts"
> Copyright (C) 2023 The R Foundation for Statistical Computing
> Platform: x86_64-pc-linux-gnu (64-bit)
[.............]
>> ## qbinom() tests:
>> M <- .Machine$integer.max
>> k <- 0:32
>> pqBinom <- function(epsF = 0, details=FALSE, pr =
c(e_8=1e-8,e_9=1e-9, e10=1e-10)) {
> + lapply(c(M.2 = (M+1)/2, M=M, `2M`=2*M, `10M`=10*M), # 'n'
> + function(n)
> + lapply(pr, function(pr) {
> + nDup <- !duplicated( pb <- pbinom(k, n, pr) )
> + qb <- qbinom(pb[nDup], n, pr)
> + pn1 <- pb[nDup] < 1 - epsF *
.Machine$double.eps
> + ok <- k[nDup][pn1] == qb[pn1]
> + if(details)
> + list(pb=pb, qb=qb, nDup=nDup, ok=ok, epsF=epsF)
> + else ok
> + })
> + )
> + }
>>
>> Dpqb0 <- pqBinom(details=TRUE)
>> Dpqb.3e <- pqBinom(3, details=TRUE)
>>
>> saveRDS(list(M=M, k=k, Dpqb0=Dpqb0, Dpqb.3e=Dpqb.3e),
> + file = "pqBinom_res.rds")
>> pqb0 <- pqBinom()
>> pqb.3e <- pqBinom(3)
>> table(unlist(pqb0))
> FALSE TRUE
> 2 292
>> table(unlist(pqb.3e))
> TRUE
> 288
>> sessionInfo()
> R version 4.3.1 (2023-06-16)
> Platform: x86_64-pc-linux-gnu (64-bit)
> Running under: Red Hat Enterprise Linux 8.4 (Ootpa)
> Matrix products: default
> BLAS/LAPACK:
/juno/opt/intel/oneapi_2022.2.0/mkl/2022.1.0/lib/intel64/libmkl_intel_lp64.so.2;
LAPACK version 3.9.0
> locale:
> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
> [9] LC_ADDRESS=C LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> time zone: Europe/Rome
> tzcode source: system (glibc)
> attached base packages:
> [1] stats graphics grDevices utils datasets methods base
> loaded via a namespace (and not attached):
> [1] compiler_4.3.1
>> quit()
> File attached
> Thanks,
> Giuseppe.
Thank you, Giuseppe,
so indeed using the same restriction has we had on 32-bit
platforms seems sufficient here.
Your .Machine() is 100% the same as mine (Linux Fedora 36; using
GCC, R's BLAS and OS-provided Lapack), so that cannot help to
detect that your R is set up differently than mainline versions
of R.
My guess would be that this difference is not because of the use
if icc, but only because of the libmath-part (not the
BLAS/Lapack part) of MKL ... but of course that's only a guess.
Would anyone know how to reliably detect from within R that R is
linked against an MKL math library?
.. if not generally, may be in the subset of cases where
.Platform$OS.type == "unix" &&
Sys.info()[["sysname"]] == "Linux"
??
Of course, we could fudge our checks and look for 'mkl' in
extSoftVersion()["BLAS"]
and/or
La_library()
but I said above that it's much more probable that the
"libmath"-part of MKL is at stake here, not the BLAS or Lapack
one.
>
-------------------------------------------------------------------------
> Giuseppe Cal?
> Fondazione CMCC
> Centro Euro-Mediterraneo sui Cambiamenti Climatici presso Complesso
Ecotekne
> Universit? del Salento - Strada Prov.le Lecce - Monteroni 73100 Lecce
IT
> http://www.cmcc.it
> https://goo.gl/maps/wtahPDbNVen
> mobile: (+39) 3208190020
> email: giuseppe.calo at cmcc.it
> [.........................]
> [.........................]
> [.........................]
> x[DELETED ATTACHMENT external: pqBinom_res_GuisepC.rds, Untyped binary
data]