grssnbchr / categorical-spatial-interpolation

Categorical spatial interpolation with R
MIT License
26 stars 11 forks source link

Error in parallel computation - “only 0’s may be mixed with negative subscripts” #1

Open aflorebe opened 4 years ago

aflorebe commented 4 years ago

Hey there.

First of all, I would like to thank you for such wonderful approach.

Everything is running as expected when reproducing the analysis with your data. However, I obtain a recurrent error in the parallelization step when I try with mine.

Error message Error in { : task 1 failed - "only 0’s may be mixed with negative subscripts"

I have tried to run the computeGrid() function without parallelization since my data is smaller, but I obtain the same error:

Error message Error in [.default(cl, C) : only 0’s may be mixed with negative subscripts Called from: NextMethod("[")

I am running the analysis with the proper R 3.4.4 version and the specific checkpoint packages. This is how my session.info() looks like:

R version 3.4.4 (2018-03-15) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.6 LTS

Matrix products: default BLAS: /usr/lib/openblas-base/libblas.so.3 LAPACK: /usr/lib/libopenblasp-r0.2.18.so

locale: [1] LC_CTYPE=es_ES.UTF-8 LC_NUMERIC=C LC_TIME=es_ES.UTF-8 LC_COLLATE=es_ES.UTF-8
[5] LC_MONETARY=es_ES.UTF-8 LC_MESSAGES=es_ES.UTF-8 LC_PAPER=es_ES.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C

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

other attached packages: [1] bindrcpp_0.2 rmarkdown_1.6 kknn_1.3.1 doParallel_1.0.10 iterators_1.0.8 foreach_1.4.3
[7] rnaturalearth_0.1.0 sf_0.5-4 lintr_1.0.1 forcats_0.2.0 magrittr_1.5 dplyr_0.7.2
[13] purrr_0.2.3 readr_1.1.1 tidyr_0.7.0 tibble_1.3.4 ggplot2_2.2.1 tidyverse_1.1.1
[19] checkpoint_0.4.8

loaded via a namespace (and not attached): [1] Rcpp_0.12.12 lubridate_1.6.0 lattice_0.20-40 assertthat_0.2.0 rprojroot_1.2 digest_0.6.12 psych_1.7.5
[8] R6_2.2.2 cellranger_1.1.0 plyr_1.8.4 backports_1.1.0 evaluate_0.10.1 httr_1.3.1 rlang_0.1.2
[15] lazyeval_0.2.0 readxl_1.0.0 rstudioapi_0.11 Matrix_1.2-18 udunits2_0.13 stringr_1.2.0 foreign_0.8-69
[22] igraph_1.2.4.2 munsell_0.4.3 broom_0.4.2 compiler_3.4.4 modelr_0.1.1 xfun_0.12 pkgconfig_2.0.3 [29] mnormt_1.5-5 htmltools_0.3.6 tidyselect_0.2.0 codetools_0.2-15 grid_3.4.4 nlme_3.1-131 jsonlite_1.5
[36] gtable_0.2.0 DBI_0.7 units_0.4-6 scales_0.5.0 stringi_1.1.5 reshape2_1.4.2 rex_1.1.1
[43] sp_1.2-5 xml2_1.1.1 tools_3.4.4 glue_1.1.1 hms_0.3 colorspace_1.3-2 rvest_0.3.2
[50] knitr_1.28 bindr_0.1 haven_1.1.0

Could you please help me to find a solution?

Thanks in advance

grssnbchr commented 4 years ago

Hey, for that I would need an example of your data. I am pretty sure that there's a problem with its format (or the like).