isovic / racon

Ultrafast consensus module for raw de novo genome assembly of long uncorrected reads. http://genome.cshlp.org/content/early/2017/01/18/gr.214270.116 Note: This was the original repository which will no longer be officially maintained. Please use the new official repository here:
https://github.com/lbcb-sci/racon
MIT License
271 stars 49 forks source link

Illegal instruction (core dumped) racon #73

Closed mictadlo closed 6 years ago

mictadlo commented 6 years ago

Hi, I got the below error when I tried to assemble genomic R genes

/var/spool/PBS/mom_priv/jobs/3178843.pbs.SC: line 39: 146216 Illegal instruction     (core dumped) racon -t 8 input.fasta output.gfa1.sam output.gfa.fasta > output.racon1.fasta
source activate sra-tools
fastq-dump ERR2168704
bioawk -c fastx '{print ">"$name; print $seq}' ERR2168704.fastq > input.fasta

source activate minimap2
minimap2 -t 8 -x ava-pb \
    input.fasta \
    input.fasta | gzip -1 > output.paf.gz

source activate miniasm
miniasm -Rc2 -f \
    input.fasta \
    output.paf.gz > output.gfa

awk '/^S/{print ">"$2"\n"$3}' output.gfa | fold >  output.gfa.fasta

# Correction 1
source activate minimap2
minimap2 -t 8 -ax map-pb \
    output.gfa.fasta \
    input.fasta > output.gfa1.sam

source activate racon
racon -t 8 \
    input.fasta \
    output.gfa1.sam \
    output.gfa.fasta > output.racon1.fasta

# Correction 2
source activate minimap2
minimap2 -t 8 -ax map-pb \
    output.racon1.fasta \
    input.fasta > output.gfa2.sam

source activate racon
racon -t 8 \
    input.fasta \
    output.gfa2.sam \
    output.racon1.fasta > output.racon2.fasta
[M::mm_idx_gen::35.606*1.65] collected minimizers
[M::mm_idx_gen::39.729*2.26] sorted minimizers
[M::main::39.729*2.26] loaded/built the index for 469719 target sequence(s)
[M::mm_mapopt_update::41.369*2.21] mid_occ = 597
[M::mm_idx_stat] kmer size: 19; skip: 5; is_hpc: 1; #seq: 469719
[M::mm_idx_stat::42.310*2.18] distinct minimizers: 101023797 (61.53% are singletons); average occurrences: 3.340; average spacing: 4.347
[M::worker_pipeline::368.045*7.04] mapped 161023 sequences
[M::worker_pipeline::621.020*6.72] mapped 159527 sequences
[M::worker_pipeline::672.753*6.24] mapped 149169 sequences
[M::main] Version: 2.10-r761
[M::main] CMD: minimap2 -t 8 -x ava-pb input.fasta input.fasta
[M::main] Real time: 673.074 sec; CPU: 4200.740 sec
[M::main] ===> Step 0: removing contained reads <===
[M::ma_hit_no_cont::278.347*1.00] dropped 855 contained reads
[M::main] ===> Step 1: reading read mappings <===
[M::ma_hit_read::576.014*1.00] read 176421820 hits; stored 90012178 hits and 375806 sequences (1248134545 bp)
[M::main] ===> Step 2: 1-pass (crude) read selection <===
[M::ma_hit_sub::591.438*1.00] 371908 query sequences remain after sub
[M::ma_hit_cut::592.852*1.00] 89672449 hits remain after cut
[M::ma_hit_flt::594.513*1.00] 89657415 hits remain after filtering; crude coverage after filtering: 83.95
[M::main] ===> Step 3: 2-pass (fine) read selection <===
[M::ma_hit_sub::599.960*1.00] 371268 query sequences remain after sub
[M::ma_hit_cut::601.356*1.00] 89535413 hits remain after cut
[M::ma_hit_contained::603.293*1.00] 18886 sequences and 177452 hits remain after containment removal
[M::main] ===> Step 4: graph cleaning <===
[M::ma_sg_gen] read 144250 arcs
[M::main] ===> Step 4.1: transitive reduction <===
[M::asg_arc_del_trans] transitively reduced 102012 arcs
[M::asg_arc_del_multi] removed 17 multi-arcs
[M::asg_arc_del_asymm] removed 5037 asymmetric arcs
[M::main] ===> Step 4.2: initial tip cutting and bubble popping <===
[M::asg_cut_tip] cut 4981 tips
[M::asg_pop_bubble] popped 327 bubbles and trimmed 160 tips
[M::main] ===> Step 4.3: cutting short overlaps (3 rounds in total) <===
[M::asg_arc_del_multi] removed 0 multi-arcs
[M::asg_arc_del_asymm] removed 6 asymmetric arcs
[M::asg_arc_del_short] removed 6 short overlaps
[M::asg_cut_tip] cut 462 tips
[M::asg_pop_bubble] popped 59 bubbles and trimmed 33 tips
[M::asg_arc_del_multi] removed 0 multi-arcs
[M::asg_arc_del_asymm] removed 39 asymmetric arcs
[M::asg_arc_del_short] removed 45 short overlaps
[M::asg_cut_tip] cut 172 tips
[M::asg_pop_bubble] popped 54 bubbles and trimmed 14 tips
[M::asg_arc_del_multi] removed 0 multi-arcs
[M::asg_arc_del_asymm] removed 73 asymmetric arcs
[M::asg_arc_del_short] removed 95 short overlaps
[M::asg_cut_tip] cut 95 tips
[M::asg_pop_bubble] popped 51 bubbles and trimmed 10 tips
[M::main] ===> Step 4.4: removing short internal sequences and bi-loops <===
[M::asg_cut_internal] cut 250 internal sequences
[M::asg_cut_biloop] cut 389 small bi-loops
[M::asg_cut_tip] cut 71 tips
[M::asg_pop_bubble] popped 33 bubbles and trimmed 21 tips
[M::main] ===> Step 4.5: aggressively cutting short overlaps <===
[M::asg_arc_del_multi] removed 0 multi-arcs
[M::asg_arc_del_asymm] removed 113 asymmetric arcs
[M::asg_arc_del_short] removed 185 short overlaps
[M::asg_cut_tip] cut 78 tips
[M::asg_pop_bubble] popped 32 bubbles and trimmed 21 tips
[M::main] ===> Step 5: generating unitigs <===
[M::main] Version: 0.2-r168-dirty
[M::main] CMD: miniasm -Rc2 -f input.fasta output.paf.gz
[M::main] Real time: 604.810 sec; CPU: 604.708 sec
[M::mm_idx_gen::0.182*0.99] collected minimizers
[M::mm_idx_gen::0.229*1.08] sorted minimizers
[M::main::0.230*1.08] loaded/built the index for 990 target sequence(s)
[M::mm_mapopt_update::0.241*1.07] mid_occ = 44
[M::mm_idx_stat] kmer size: 19; skip: 10; is_hpc: 1; #seq: 990
[M::mm_idx_stat::0.248*1.07] distinct minimizers: 541012 (92.58% are singletons); average occurrences: 1.194; average spacing: 8.030
[M::worker_pipeline::108.097*7.78] mapped 161023 sequences
[M::worker_pipeline::210.412*7.88] mapped 159527 sequences
[M::worker_pipeline::302.381*7.85] mapped 149169 sequences
[M::main] Version: 2.10-r761
[M::main] CMD: minimap2 -t 8 -ax map-pb output.gfa.fasta input.fasta
[M::main] Real time: 302.401 sec; CPU: 2373.175 sec
/var/spool/PBS/mom_priv/jobs/3178843.pbs.SC: line 39: 146216 Illegal instruction     (core dumped) racon -t 8 input.fasta output.gfa1.sam output.gfa.fasta > output.racon1.fasta
[M::mm_idx_gen::0.002*1.57] collected minimizers
[M::mm_idx_gen::0.003*1.37] sorted minimizers
[M::main::0.003*1.18] loaded/built the index for 0 target sequence(s)
[M::mm_mapopt_update::0.003*1.18] mid_occ = 0
[M::mm_idx_stat] kmer size: 19; skip: 10; is_hpc: 1; #seq: 0
[M::mm_idx_stat::0.003*1.18] distinct minimizers: 0 (-nan% are singletons); average occurrences: -nan; average spacing: -nan
[M::worker_pipeline::4.009*5.12] mapped 161023 sequences
[M::worker_pipeline::5.909*6.04] mapped 159527 sequences
[M::worker_pipeline::7.427*5.91] mapped 149169 sequences
[M::main] Version: 2.10-r761
[M::main] CMD: minimap2 -t 8 -ax map-pb output.racon1.fasta input.fasta
[M::main] Real time: 7.431 sec; CPU: 43.919 sec
/var/spool/PBS/mom_priv/jobs/3178843.pbs.SC: line 51: 146264 Illegal instruction     (core dumped) racon -t 8 input.fasta output.gfa2.sam output.racon1.fasta > output.racon2.fasta

What did I miss?

Thank you in advance,

Michal

rvaser commented 6 years ago

Hello Michal, the error illegal instruction means that racon was run on a machine which does not support the same SIMD instruction set as the machine it was compiled on. Are you running it with a job scheduler on a cluster of dissimilar machines?

Best regards, Robert

mictadlo commented 6 years ago

Hi Robert, Yes, I am using racon from bioconda

> source activate racon
(racon) > which racon
/work/waterhouse_team/miniconda2/envs/racon/bin/racon
(racon) > racon --version
v1.2.1

Do you think the package has a mistake?

Thank you in advance,

Michal

rvaser commented 6 years ago

The package should be alright. Are you using a cluster?

mictadlo commented 6 years ago

Yes, I am. PBSpro and SuSe 12.

rvaser commented 6 years ago

Is it possible that your cluster is not homogeneous, i.e. machines have different CPUs/compilers? Racon uses SIMD instructions and you sometimes can't compile it on one machine and run it on another. The illegal instruction error indicates that this might be happening.

mictadlo commented 6 years ago

yes, the cluster is not homogeneous. How can I find out which CPU time is supported by racon?

rvaser commented 6 years ago

All should be compatible, try compiling racon on each machine individually.

mictadlo commented 6 years ago

Has been solved with #PBS -l cpuarch=avx2

bioteksampath commented 6 years ago

Hi @rvaser, I'm getting the same error while recon installed with anaconda. (base) [pls@carinata R3]$ racon -t 12 R3.fastq draft_assembly.paf miniasm1.fa > draft_assembly.racon.fasta Illegal instruction

however i try racon installed locally, I am getting different error. racon -t 12 R3.fastq draft_assembly.paf miniasm1.fa > draft_assembly.racon.fasta ERROR: Not all required arguments specified. Parameter 'reads' missing a value. Exiting.

@mictadlo could u pls give more explanation about this #PBS -l cpuarch=avx2.

could you plz help me to fix this issue. Thanks sam

rvaser commented 6 years ago

Hi @bioteksampath, which version of racon are you using?

Best regards, Robert

bioteksampath commented 6 years ago

Hi Thanks for your prompt response. Appreciated! Im using 1.2.1 for both cases.

Sam

rvaser commented 6 years ago

The error message that is printed (ERROR: Not all required arguments specified. Parameter 'reads' missing a value. Exiting.) is present before version 1.0.0. (all above have a different argument parser and all error messages start with [racon::). Please check whether you have an older racon version installed on your computer (somewhere in PATH) which is called before the new one.

Best regards, Robert

bioteksampath commented 6 years ago

yes.. Im sorry it was an old verion. I uninstalled older versions and installed racon 1.3.0 through conda. [pls@carinata R3]$ racon -t 12 R3.fastq draft_assembly.paf miniasm1.fa > draft_assembly.racon.fasta Illegal instruction

but i'm still getting Error.

Regards sam

rvaser commented 6 years ago

Did you by any chance compile racon on one machine and run it on another? If not, could you please provide your OS version and compiler version? Illegal instruction means that the generated SIMD instructions are not compatible.

Best regards, Robert

bioteksampath commented 6 years ago

Hi,

Is that information you are looking for?

gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

Linux xxx.agr.gc.ca 2.6.32-642.4.2.el6.x86_64 #1 SMP Tue Aug 23 19:58:13 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Thanks & regards sampath

rvaser commented 6 years ago

Racon requires gcc 4.8+ (c++11 standard) but it is weird that gcc 4.4.7, which has experimental support (c++0x), compiled. Can you try with a newer compiler? Although, I am not sure that this is the main reason for the illegal instruction error.

Best regards, Robert

bioteksampath commented 6 years ago

yes .. i had reinstalled the older version and installed racon with conda (new environment) and it worked! Thanks for you help @rvaser

Have a great day!