-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One test fails on ppc32: Error: cannot allocate vector of size 305.2 Mb #90
Comments
Thank you for reporting. Could you please try the following code (modified from the test suite and removing the testthat-related stuff) and post the output along with the output of suppressPackageStartupMessages(library(Matrix))
suppressPackageStartupMessages(library(DelayedArray))
# Small normal matrix
m1 <- DelayedArray(as.matrix(iris[, 1:4]))
all.equal(rowsum(as.matrix(m1), iris$Species), rowsum(m1, iris$Species))
#> [1] TRUE
# Large sparse matrix
x <- Matrix::rsparsematrix(800000, ncol = 50, density = 0.1)
# Large normal matrix
m2 <- DelayedArray(as.matrix(x))
S <- sample(1:1000, nrow(m2), replace = TRUE)
all.equal(rowsum(as.matrix(m2), S), rowsum(m2, S))
#> [1] TRUE
# dgCMatrix
m4 <- DelayedArray(x)
S <- sample(1:1000, nrow(m4), replace = TRUE)
all.equal(rowsum(as.matrix(m4), S), rowsum(m4, S))
#> [1] TRUE
# RleMatrix
# NOTE: This test fails on 32-bit Windows because it can't allocate a ~150 Mb
# vector.
m3 <- as(m2, "RleMatrix")
S <- sample(1:1000, nrow(m3), replace = TRUE)
# Suspect this line will cause error on ppc32.
m4 <- as.matrix(m3)
a <- rowsum(m4, S)
b <- rowsum(m3, S)
all.equal(a, b)
#> [1] TRUE Created on 2023-03-30 with reprex v2.0.2 Session infosessioninfo::session_info()
#> ─ Session info ───────────────────────────────────────────────────────────────
#> setting value
#> version R Under development (unstable) (2023-02-13 r83829)
#> os macOS Ventura 13.2.1
#> system aarch64, darwin20
#> ui X11
#> language (EN)
#> collate en_US.UTF-8
#> ctype en_US.UTF-8
#> tz Australia/Melbourne
#> date 2023-03-30
#> pandoc 2.19.2 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown)
#>
#> ─ Packages ───────────────────────────────────────────────────────────────────
#> package * version date (UTC) lib source
#> BiocGenerics * 0.45.2 2023-03-15 [1] Bioconductor
#> cli 3.6.1 2023-03-23 [1] CRAN (R 4.3.0)
#> DelayedArray * 0.25.0 2022-12-20 [1] Bioconductor
#> digest 0.6.31 2022-12-11 [1] CRAN (R 4.3.0)
#> evaluate 0.20 2023-01-17 [1] CRAN (R 4.3.0)
#> fastmap 1.1.1 2023-02-24 [1] CRAN (R 4.3.0)
#> fs 1.6.1 2023-02-06 [1] CRAN (R 4.3.0)
#> glue 1.6.2 2022-02-24 [1] CRAN (R 4.3.0)
#> htmltools 0.5.5 2023-03-23 [1] CRAN (R 4.3.0)
#> IRanges * 2.33.0 2022-12-20 [1] Bioconductor
#> knitr 1.42 2023-01-25 [1] CRAN (R 4.3.0)
#> lattice 0.20-45 2021-09-22 [1] CRAN (R 4.3.0)
#> lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.3.0)
#> Matrix * 1.5-3 2022-11-11 [1] CRAN (R 4.3.0)
#> MatrixGenerics * 1.11.0 2022-12-20 [1] Bioconductor
#> matrixStats * 0.63.0 2022-11-18 [1] CRAN (R 4.3.0)
#> reprex 2.0.2 2022-08-17 [1] CRAN (R 4.3.0)
#> rlang 1.1.0 2023-03-14 [1] CRAN (R 4.3.0)
#> rmarkdown 2.21 2023-03-26 [1] CRAN (R 4.3.0)
#> rstudioapi 0.14 2022-08-22 [1] CRAN (R 4.3.0)
#> S4Vectors * 0.37.4 2023-02-26 [1] Bioconductor
#> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.3.0)
#> withr 2.5.0 2022-03-03 [1] CRAN (R 4.3.0)
#> xfun 0.38 2023-03-24 [1] CRAN (R 4.3.0)
#> yaml 2.3.7 2023-01-23 [1] CRAN (R 4.3.0)
#>
#> [1] /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
#>
#> ────────────────────────────────────────────────────────────────────────────── |
@PeteHaitch Indeed, it fails at that spot:
|
Thanks for confirming.
I'm about to go on leave until the end of April and don't have resources to investigate this further until I'm back. |
@PeteHaitch Thank you. P. S. Just for a perspective: as a matter of fact, pretty much everything builds and passes tests on macOS ppc32: out of about 1400 |
Could this be caused by endianness? I believe ppc32 is big endian while x86 is little endian. |
@kasperdanielhansen Yes, ppc32 is always Big-endian (ppc64 can be either). P. S. Is this is endianness-related rather than bitness-, perhaps a stronger case to have this fixed. |
Based on the Also, for what's it's worth, the example in #90 (comment) doesn't actually involve DelayedMatrixStats (but does involve DelayedArray) but the initial report is because DelayedMatrixStats is tickling the error in its unit tests. |
@PeteHaitch I agree, this looks rather like 32-bit-related error. |
The text was updated successfully, but these errors were encountered: