pachterlab / kallisto

Near-optimal RNA-Seq quantification
https://pachterlab.github.io/kallisto
BSD 2-Clause "Simplified" License
648 stars 170 forks source link

related to: Illegal instruction error when running kallisto index #454

Open molly-hetheringtonrauth opened 1 month ago

molly-hetheringtonrauth commented 1 month ago

Hi,

This seems to be related to issue #399 which had been closed, but I'm unsure what the solution was as I continue to get errors.

I installed kallisto from conda which installed kallisto version 0.51.0. I'm getting the "Illegal instruction (core dumped)" error. I've uninstalled kallisto from conda and then tried to install from source; however I'm running into an error. When I run the cmake .. command I get the following error:

CMake Error: The source directory "/home/molly_hetheringtonrauth/kallisto" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.

I've tried multiple source files - 0.46.0, 050.0, and the latest version by cloning the repo directory from github and each time get the same error. I'm using Ubuntu 18.04.

I'm not sure how to get kallisto installed so that it works.

Yenaled commented 1 month ago

See https://github.com/pachterlab/kallisto/blob/master/INSTALL.md

(You need to have a build directory)

molly-hetheringtonrauth commented 1 month ago

I followed those instructions exactly; I'm not sure what happened. I ended up building a docker image for Kallisto and was able to run the program from the container.

skudashev commented 1 month ago

Hello, thank you for the new lr option. I tried installing kallisto on our HPC using a singularity def file

BootStrap: yum
OSVersion: 9
MirrorURL: http://yum-repos.hpccluster/AlmaLinux/9/os/$basearch/
Include: yum

%labels
    Name kallisto
    Version 0.51.0
    Description Kallisto is a program for quantifying abundances of transcripts from RNA-Seq data, or more generally of target sequences using high-throughput sequencing reads.
%post
    # Create necessary directory
    mkdir -p /opt/software

    # Install dependencies
    yum -y install wget tar gzip git cmake gcc gcc-c++ make zlib-devel bzip2-devel

    # Clone the Kallisto repository
    cd /opt/software
    git clone https://github.com/pachterlab/kallisto

    # Build and install Kallisto
    cd kallisto
    mkdir build
    cd build
    cmake .. -DMAX_KMER_SIZE=64
    make
    make install

%environment
    # Set the PATH to include the installed Kallisto binary
    export PATH=/opt/software/kallisto/build/src:$PATH

%runscript
    # Default command to run when container starts
    kallisto --version

But I get the same error:

[build] loading fasta file filtered.fasta
[build] k-mer length: 63
[build] warning: clipped off poly-A tail (longer than 10)
        from 1172 target sequences
[build] warning: replaced 1 non-ACGUT characters in the input sequence
        with pseudorandom nucleotides
/var/spool/slurmd/job2851502/slurm_script: line 17: 855738 Illegal instruction     (core dumped) singularity exec $kallisto kallisto index

Could you please help me understand how I could set the build directory correctly in this case? Sofia

skudashev commented 1 month ago

Adding a constraint #SBATCH --constraint=avx512 helped it run further down and start creating the index file but it still errored out:

[build] loading fasta file filtered.fasta
[build] k-mer length: 63
[build] warning: clipped off poly-A tail (longer than 10)
        from 1172 target sequences
[build] warning: replaced 1 non-ACGUT characters in the input sequence
        with pseudorandom nucleotides
[build] building MPHF
/var/spool/slurmd/job2851704/slurm_script: line 18: 1141443 Illegal instruction     (core dumped) singularity exec $kallisto kallisto index -k 63 -t 20 -i $workdir/kallisto_index $fasta
skudashev commented 2 weeks ago

I have since managed to install a working image with -DENABLE_AVX2=OFF -DCOMPILATION_ARCH=OFF.