Skip to content

Segmentation fault while creating two different blight indexes using the same process #10

@shokrof

Description

@shokrof

Hi,
I am trying to use blight but I am getting a segmentation fault when I am trying to construct the second index. I am using different temporary folders. I replicated the problem by editing snippet.cpp.
Here is the new code that produces the error. I made sure that wdir and wdir2 exists.

#include "blight.h"
using namespace std;
int main(int argc, char** argv) {
        //SOME VARIABLES TO PLAY WITH
        int kmer_size(31);
        int core_number(31);
        int minimizer_size(10);
        int file_number_exponent(4);

        int subsampling_bits(0);
        string input_fasta_file("My_debruijn_graph.fa");

        //Index Initialization using position subsampling to reduce the memory usage of the index (default is 0)
        kmer_Set_Light blight_index_5(kmer_size, core_number, minimizer_size, file_number_exponent, subsampling_bits);

        //Construct the index from an input FASTA file, temporary files are put in folder wdir that MUST exist (!)
        blight_index_5.construct_index(input_fasta_file, "wdir");
        //Blight handles .gz and .lz4 files but do not handle FASTQ or multiline FASTA

        kmer_Set_Light blight_index_7(kmer_size, core_number, minimizer_size, file_number_exponent, subsampling_bits);

        blight_index_7.construct_index(input_fasta_file, "wdir2");
        //Blight handles .gz and .lz4 files but do not handle FASTQ or multiline FASTA


        cout<<"Everything went fine!"<<endl;

        return 0;
}



Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions