Closed apcamargo closed 5 years ago
I was about to respond that we had tried that and couldn't make it stick, but looking at my notes, we were actually trying CPPFLAGS
(CPPFLAGS="$($R CMD config CPPFLAGS) -flifetime-dse=1"
). Oops >_<
That said, there may be other flags/configuration happening, so the missing gcc
during the make setup phase has me a little nervous anyway.
Worth noting that if you can get RcppParallel to build correctly, DADA2 works perfectly fine. So I don't think there's any code or build changes needed for DADA2. (Unless we are completely off track here, which is possible.)
That's great! I guess I was wrong looking into code in dada2 then. Means we need to check into everything linking TBB though. If lifetime optimizations in GCC7 break TBB, all dependencies need to make sure to use the right settings.
You guys rock. Thank you so much for your perseverance on this! Have a great weekend.
Ah, hadn't seen that RcppParallel comes with a copy of TBB. Wonder whether that's necessary or even good. Wish there was some clearer info on whether the header library part of TBB is affected at all, or whether it's only important while building that DSO.
@ebolyen This needs to be fixed at https://github.com/conda-forge/r-rcppparallel-feedstock. With three Bioconda/core members on the package maintainer list merging the PR quickly shouldn't be an issue. The usual "how do we avoid old pakages" problem will remain though, might need conda-forge/core to help there.
This is really exciting progress and it looks like I should stop my unsuccessful hacking around with the multi-threaded code on my local copy of dada2.
@ebolyen and I will pick this up again on Tuesday and see if we can get the TBB makefiles to play nicely with our conda-supplied gcc
. Stay tuned!
Good news! We have a working solution, PR up on conda-forge. We suspect there is a cleaner, more idiomatic way to accomplish the same result, but, this does appear to fix the problem (at least to the best of our knowledge). Stay tuned!
Good news, the build for r-rcppparallel was updated on conda-forge, and seems to be working as expect. Installing DADA2 using:
conda create -n dada2-check -c conda-forge -c bioconda -c defaults --override-channels bioconductor-dada2
This picked up:
r-rcppparallel conda-forge/linux-64::r-rcppparallel-4.4.1-r351h0357c0b_1001
in particular, build 1001 is the build with the fixes in it.
@apcamargo, @valscherz, @mworkentine, @brendanf , @pdcountway, and @kguay, if you update your envs to use this latest build of r-rcppparallel, do things work as expected? Our testing on this end looks okay... Thanks!
Working for me! Thanks everyone for the all the hard work!
Confirmed that this now runs w/o segfault for me, on the same machine and running same R code that segfaulted with the previous conda install.
Just confirming that I've made it past the second learnErrors step without segfaulting, with multithread=16. Thanks for all of your help!
I think that is enough concurrence to declare victory on this one!
Thanks again to @epruesse @ebolyen @thermokarst for tracking the cause of this down and solving it, and to @apcamargo @pdcountway @mworkentine @kguay @valscherz and others for the detailed reports that allowed that to happen.
Hi,
Sorry to say that I have faced again the same error with dada2 1.10.0 bioconda build (r351hf484d3e_0). The installed r-rcppparallel was the r35h0357c0b_0 build which apparently just came out yesterday on conda-forge.
I will force the r-rcppparallel build which was proven to work (r-rcppparallel-4.4.1-r351h0357c0b_1001) to see if it helps and let you know.
EDIT: Indeed, adding "- r-rcppparallel==4.4.1[build=*_1001]" to my environnement definition solved the error
Oh gosh, thanks for the report! I'll put this on my todo list to try and confirm the new build isn't doing something silly again.
Looks like our original hack was removed in this PR. It also looks like there might be some new build machinery, or perhaps upstream has updated their Makefiles, but in any case I'm not too surprised we need to tinker with this again. cc @dbast thoughts on how you'd like to proceed?
Looks like the TBB build hasn't changed in this respect in RcppParallel, so the probing is still based on a $(shell gcc)
call:
https://github.com/RcppCore/RcppParallel/blob/master/src/tbb/build/linux.gcc.inc#L65
oh. sry, seems like this was overlooked in my semi-automatic recipe update procedure. Looks like this has to be brought back.
Ah no worries, at least it's easy to put back in that case! I was slightly worried our syntax was breaking the (new?) windows build somehow :)
@valscherz, would you be able to test the latest build and confirm it's working again? @dbast should have corrected the issue in the latest PR.
Hi @ebolyen. I can confirm it worked fine using the r-rcppparallel-4.4.3-r35h0357c0b_1.tar.bz2 build.
Thanks again. Take care
Valentin
Hey guys, reading this log here was extremely helpful. Thanks for this great documentation and for all your hard work figuring out what was going wrong!
Hi all it seems that this problem reappears in DADA2 v1.12.1, could that be possible?
I just installed a new environment using the code above:
conda create -n dada2-check -c conda-forge -c bioconda -c defaults --override-channels bioconductor-dada2
which results in the following r-rcppparallel version, that throws the segmentation fault.
r-rcppparallel 4.4.4 r36h0357c0b_0 conda-forge
Or did I overlook something?
I hope not. There was a brief reversion at some point but it got fixed pretty quickly if I remember correctly. However, I didn't even realize that dada2 1.12.1 was on bioconda, so it might be being built incorrectly again.
I'm bumping into segmentation faults when trying to use
learnErrors
. This happened with version 1.8.0 and 1.10.0. I don't have this problem in version 1.6.0.Here's the traceback when I was using version 1.10.0.