stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
150 stars 27 forks source link

problems with arm64 build #98

Open ep142 opened 11 months ago

ep142 commented 11 months ago

Dear Stephanie I am observing crashes of the R session with selected netConstruct methods. I am using R 4.3.1 arm64 build on a MacBook M1 pro with Ventura 13.6

The code I am using to test the issue is library(parallel) library(NetCoMi) ncores <- parallel::detectCores(logical = F) # to detect physical cores in MacOS data("amgut2.filt.phy")

this does not crash

net_pears <- netConstruct(amgut2.filt.phy,
measure = "pearson", normMethod = "clr", zeroMethod = "multRepl", sparsMethod = "threshold", thresh = 0.3, verbose = 3)

method_parameters <- list(sparMethod = "t-test", alpha = 0.001, measureParList = list(iter = 100, inner_it = 20, th = 0.05), normmethodPar = "none", zeromethodPar = "none", dissFuncPar = "signed", verbosePar = 1)

this does not crash

net_sparcc <- netConstruct(amgut2.filt.phy, measure = "sparcc", normMethod = method_parameters$normmethodPar, zeroMethod = method_parameters$zeromethodPar, sparsMethod = method_parameters$sparMethod, measurePar = method_parameters$measureParList, alpha = method_parameters$alpha, dissFunc = method_parameters$dissFuncPar, verbose = method_parameters$verbosePar, cores = ncores, seed = 123456 )

this crashes

net_spieceasi <- netConstruct(amgut2.filt.phy, measure = "spieceasi", measurePar = list(method = "mb", pulsar.params = list(rep.num = 10), symBetaMode = "ave"), filtTax = "highestVar", filtTaxPar = list(highestVar = 50), filtSamp = "totalReads", filtSampPar = list(totalReads = 1000), sparsMethod = "none", normMethod = "none", verbose = 3) method_parameters <- list( sparMethod = "t-test", alpha = 0.001, measureParList = list( method = 'mb', lambda.min.ratio = 1e-2, nlambda = 20, pulsar.params = list(rep.num = 50) ), normmethodPar = "none", zeromethodPar = "none", dissFuncPar = "signed", verbosePar = 1 )

this crashes

net_spieceasi_2 <- netConstruct(amgut2.filt.phy, measure = "spieceasi", normMethod = method_parameters$normmethodPar, zeroMethod = method_parameters$zeromethodPar, measurePar = method_parameters$measureParList, alpha = method_parameters$alpha, dissFunc = method_parameters$dissFuncPar, verbose = method_parameters$verbosePar, cores = ncores, seed = 123456)

this crashes

net_season_spring <- netConstruct(data = amgut_season_no, filtTax = "highestVar", filtTaxPar = list(highestVar = 50), filtSamp = "highestFreq", filtSampPar = list(highestFreq = n_yes), measure = "spring", measurePar = list(nlambda=10, rep.num=10), normMethod = "none", zeroMethod = "none", sparsMethod = "none", dissFunc = "signed", verbose = 2, seed = 123456)

ep142 commented 11 months ago

and, yep, it is definitely the arm64 build. I have performed a clean removal of that version, reinstalled the x64 build and it works; perhaps you should post a warning, would save people like me much pain and frustration

stefpeschel commented 11 months ago

Dear Eugenio, Thanks for bringing this up. It would be good to have the error message because crashes can generally have several reasons. It seems to have been a problem with the comination of the arm64 build and github packages because the two packages that caused problems (SpiecEasi and SPRING) are available on github only. Good that we now know how to solve the issue!

ep142 commented 11 months ago

Hi Stephanie, no error message just "Your error session has crashed" from RStudio

sternp commented 8 months ago

I getting this same crashing issue on x64.

version
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 3.2
year 2023
month 10
day 31
svn rev 85441
language R
version.string R version 4.3.2 (2023-10-31) nickname Eye Holes