Skip to content
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

problem with concoct binning.sh line 453:61692 segmentation fault #168

Open
cczhao2018 opened this issue Apr 26, 2019 · 22 comments
Open

problem with concoct binning.sh line 453:61692 segmentation fault #168

cczhao2018 opened this issue Apr 26, 2019 · 22 comments

Comments

@cczhao2018
Copy link

cczhao2018 commented Apr 26, 2019

Hi @ursky,
After many attempts, I still can't run concoct successfully like Maxbin and Metabat. I installed metaWRAP version 1.2 in a new environment because the result ran by version 1.1.8 without any bins. The first libgslcblas.so error looks like repaired by metaWRAP automatically. And the following problems may abort the task.
Here is my command:

metawrap binning -o Concoct -t 144 -m 2048 -a /home/liuhaiyan/cczhao/DB/megahit_assembly_fastp_defult/all/all_kmin25_kstep_2_nomercy.megahit_asm/final.contigs.fa  --concoct /home/liuhaiyan/cczhao/DB/metawrap/out.*

Part of log_file:

------------------------------------------------------------------------------------------------------------------------
-----                             cutting up contigs into 10kb fragments for CONCOCT...                            -----
------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------
-----                                    estimating contig fragment coverage...                                    -----
------------------------------------------------------------------------------------------------------------------------


------------------------------------------------------------------------------------------------------------------------
-----           Looks like our environment has a faulty libgslcblas.so link. Will try to manually create           -----
-----                                         symlink in conda environment                                         -----
------------------------------------------------------------------------------------------------------------------------

conda path: /home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4
Creating symlink /home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4/lib/libgslcblas.so.0 from /home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4/lib/libgslcblas.so

------------------------------------------------------------------------------------------------------------------------
-----                                       Starting binning with CONCOCT...                                       -----
------------------------------------------------------------------------------------------------------------------------


************************************************************************************************************************
*****                          Something went wrong with binning with CONCOCT. Exiting...                          *****
************************************************************************************************************************



Part of err_file:
[M::mem_process_seqs] Processed 4808470 reads in 9984.498 CPU sec, 75.673 real sec
[main] Version: 0.7.17-r1188
[main] CMD: bwa mem -t 144 Concoct/work_files/assembly.fa /home/liuhaiyan/cczhao/DB/metawrap/out.DZ_DME23256-V_1.fastq /home/liuhaiyan/cczhao/DB/metawrap/out.DZ_DME23256-V_2.fastq
[main] Real time: 2242.936 sec; CPU: 231813.761 sec
[bam_sort_core] merging from 0 files and 144 in-memory blocks...
/home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4/bin/concoct_coverage_table.py:48: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'.
  df = pd.read_table(fh, header=None)
Traceback (most recent call last):
  File "/home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4/bin/concoct", line 6, in <module>
    import vbgmm
ImportError: libgslcblas.so.0: cannot open shared object file: No such file or directory
Up and running. Check /home/liuhaiyan/cczhao/DB/metawrap/Concoct/work_files/concoct_out/log.txt for progress
/home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4/lib/python2.7/site-packages/concoct/input.py:82: FutureWarning: read_table is deprecated, use read_csv instead, passing sep='\t'.
  cov = p.read_table(cov_file, header=0, index_col=0)
Setting 144 OMP threads
Generate input data
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.
/home/liuhaiyan/cczhao/anaconda3/envs/metawrap1.1.4/bin/metawrap-modules/binning.sh: 行 453: 61692 Segmentation fault    (Core Dump) concoct -l $len -t $threads --coverage_file ${out}/work_files/concoct_depth.txt --composition_file ${out}/work_files/assembly_10K.fa -b ${out}/work_files/concoct_out
@EisenRa
Copy link

EisenRa commented Apr 27, 2019

I too am having this same issue with OpenBLAS (metawrap V1.2).

I tried sym linking the libgslcblas libs as suggested, but no luck.

@cczhao2018
Copy link
Author

I too am having this same issue with OpenBLAS (metawrap V1.2).

I tried sym linking the libgslcblas libs as suggested, but no luck.

When I used concoct of V1.1.8 the result showed this unbinned problem, to resolve this problem I updated metaWRAP to V1.2 and re-run it. Now, I am creating a fresh env to install V1.8 and then continue the task. Hope this trick can help me skip unbinned problem in V1.8 and OpenBLAS problem in V1.2.

Best wish for ursky to solve it.

@liangjinsong
Copy link

I also met the problem "OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option." when running binning with CONCOCT in a new environment.

@ursky
Copy link
Collaborator

ursky commented May 7, 2019

In the newest version of metawrap, concoct is installed as is, without specifying any extra dependancies. In other words, it should run since I don't force any fancy libraries on it. But for some reason it doesn't work now. Does @alneberg have any suggestions about what is causing this? I don't know enough about what is under concoct's hood to know what I should change, or what packages could be causing this error. See my later post in BinPro/CONCOCT#232

@ursky
Copy link
Collaborator

ursky commented May 7, 2019

For now, you can run concoct with just 1 thread, it seems.

@alneberg
Copy link

alneberg commented May 7, 2019

Hi, this bug is really annoying and I can't really understand why it keeps showing up. I'm not really able to maintain the c-part of the code, which is where the problems arise. And it arises because we mix openblas (from numpy) and openmp (from the c-part). However, openblas seems to disable openmp (that's the warning we get). If anyone is proficient with building packages I would greatly appreciate some help. Maybe restructuring the conda package to building openblas with this parameter specified?

@liangjinsong
Copy link

liangjinsong commented May 7, 2019 via email

@ursky
Copy link
Collaborator

ursky commented May 7, 2019

Something very strange is going on with CONCOCT. Previously, I was able to get it to work in a stand-alone conda environement, but now I get the Openblas issue every time no matter what I try. See environment below. This is after clearing the downloaded packages in miniconda2/pkgs, so this is truly a "fresh" install - nothing to do with metawrap.

I am beginning suspect this might have something to do with a specific build version of some package (rather than then software version), but I can no longer produce a functional concoct environment to compare. If someone can produce a working stand-alone concoct conda environment, can you post the results of conda list here? Maybe we can stop some differences in the build versions.

# packages in environment at /home/guritsk1/miniconda2/envs/concoct-env-re:
#
# Name                    Version                   Build  Channel
biopython                 1.68                     py27_0    bioconda
bzip2                     1.0.6             h14c3975_1002    conda-forge
ca-certificates           2019.3.9             hecc5488_0    conda-forge
certifi                   2019.3.9                 py27_0    conda-forge
concoct                   1.0.0            py27h7724fef_4    bioconda
curl                      7.64.1               hf8cf82a_0    conda-forge
cython                    0.29.7           py27he1b5a44_0    conda-forge
freetype                  2.10.0               he983fc9_0    conda-forge
gsl                       2.4               h294904e_1006    conda-forge
jpeg                      9c                h14c3975_1001    conda-forge
krb5                      1.16.3            h05b26f9_1001    conda-forge
libblas                   3.8.0                7_openblas    conda-forge
libcblas                  3.8.0                7_openblas    conda-forge
libcurl                   7.64.1               hda55be3_0    conda-forge
libdeflate                1.0                  h14c3975_1    bioconda
libedit                   3.1.20170329      hf8c457e_1001    conda-forge
libffi                    3.2.1             he1b5a44_1006    conda-forge
libgcc-ng                 8.2.0                hdf63c60_1
libgfortran-ng            7.3.0                hdf63c60_0
liblapack                 3.8.0                7_openblas    conda-forge
libpng                    1.6.37               hed695b0_0    conda-forge
libssh2                   1.8.2                h22169c7_2    conda-forge
libstdcxx-ng              8.2.0                hdf63c60_1
libtiff                   4.0.10            h648cc4a_1001    conda-forge
llvm-openmp               8.0.0                hc9558a2_0    conda-forge
mmtf-python               1.0.2                    py27_0    bioconda
msgpack-python            0.6.1            py27h6bb024c_0    conda-forge
ncurses                   6.1               hf484d3e_1002    conda-forge
nose                      1.3.7                 py27_1002    conda-forge
numpy                     1.16.3           py27he5ce36f_0    conda-forge
olefile                   0.46                       py_0    conda-forge
openblas                  0.3.5             h9ac9557_1001    conda-forge
openmp                    8.0.0                         0    conda-forge
openssl                   1.1.1b               h14c3975_1    conda-forge
pandas                    0.24.2           py27hf484d3e_0    conda-forge
pillow                    6.0.0            py27he7afcd5_0    conda-forge
pip                       19.1                     py27_0    conda-forge
python                    2.7.15            h721da81_1008    conda-forge
python-dateutil           2.8.0                      py_0    conda-forge
pytz                      2019.1                     py_0    conda-forge
readline                  7.0               hf8c457e_1001    conda-forge
reportlab                 3.5.21           py27h7d98c4e_0    conda-forge
samtools                  1.9                 h8571acd_11    bioconda
scikit-learn              0.20.3           py27ha8026db_1    conda-forge
scipy                     1.2.1            py27h09a28d5_1    conda-forge
setuptools                41.0.1                   py27_0    conda-forge
six                       1.12.0                py27_1000    conda-forge
sqlite                    3.26.0            h67949de_1001    conda-forge
tk                        8.6.9             h84994c4_1001    conda-forge
wheel                     0.33.1                   py27_0    conda-forge
xz                        5.2.4             h14c3975_1001    conda-forge
zlib                      1.2.11            h14c3975_1004    conda-forge

@ursky
Copy link
Collaborator

ursky commented May 8, 2019

I was finally able to identify the issue. The problem does not come from any software version, but rather its build. In particular, the blas software NEEDS to have the mkl build version, (which also updates the appropriate mkl-supported libraries).

To fix this, just install a mkl build of blas. As far as I can tell, any version of blas is supported. In metawrap=1.2 working environment, this fix works without interfering with other packages. To fix the OPEN blas warning messages, run:

conda install blas=2.5=mkl

I will be enforcing this in future versions of metawrap, but for now, you guys have a fix. Let me know how it works for you.

@cczhao2018
Copy link
Author

When I try conda install blas=2.5=mkl, It seems removed some files automatically like metawrap-modules and metawrap-scripts folders.

please see complete bin folder of metawrap_env_V1.2 after conda install.
files_in_metawrapV1.2.txt

@ursky
Copy link
Collaborator

ursky commented May 8, 2019

Looks like metawrap was uninstalled because it conflicted with the new package. I do not see this behavior in v1.2 because it also calls for blas=2.5. Are you sure you had metawrap=1.2? If it still does not work, try re-installing metawrap after you install blas=2.5=mkl.

@cczhao2018
Copy link
Author

I am so sorry for this missing report. I retested blas=2.5 and found that this auto removing problem caused by, downgrading salmon to v.0.9.*, command.

Because some data are in the metawrap process, do you have any good suggestion on downgrading salmon without removing metawrap?

Thank you so much for your patience :)

@ursky
Copy link
Collaborator

ursky commented May 8, 2019

Like I mentioned in your other post - install metawrap manually so you have direct control over the conda environment without incidentally uninstalling metawrap any time you change something.

@EisenRa
Copy link

EisenRa commented May 9, 2019

Can confirm that fix works! Thanks @ursky !

@liangjinsong
Copy link

liangjinsong commented May 10, 2019 via email

@ursky
Copy link
Collaborator

ursky commented May 10, 2019

I don't quite follow... High CPU usage is a good thing - the program is working hard. Is it using more cores than you specified with the -t parameter?

@liangjinsong
Copy link

liangjinsong commented May 11, 2019 via email

@cczhao2018
Copy link
Author

Thank you so much for your effort, Concoct works again!
Maybe I used megahit that not belong to the metaWRAP pipeline, the result showed only one unbinned.fa. Now, I am going to try rerun Concoct using FIXED_ASSEMBLY.fasta provided by fix_megahit_contig_naming.py.

@apredeus
Copy link

apredeus commented Aug 30, 2021

Hello @ursky,

I've installed the latest metawrap (v1.3.2) and it generated about 330 Gb of logs mostly consisting of the same warning:

OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.

I think the problem with concoct is back somehow?

@YeGuoZJU
Copy link

Hello @ursky,

I've installed the latest metawrap (v1.3.2) and it generated about 330 Gb of logs mostly consisting of the same warning:

OpenBLAS Warning : Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option.

I think the problem with concoct is back somehow?

I get the same error, how do you solve it finally?

@Kangda384
Copy link

@YeGuoZJU @ursky I got the same problem when running metawrap (v1.3.2), the concoct cannot work with OpenBLAS Warning, only the metabat2 and maxbin2 can produce bins, anyway to solve it? or I can just use the metabat2 and maxbin2 to do bining.

@ZhangMYioz
Copy link

Hello, I encountered the same error message ‘OpenBLAS Warning: Detect OpenMP Loop and this application may hang. Please rebuild the library with USE_OPENMP=1 option’ while using Metawrap binning (v 1.3.2). I’ve tried blas=2.5=mkl and USE_OPENMP=1 but it didn’t work. Can anyone share how they eventually resolved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants