I am running the following command to index my genome:
STAR --runThreadN 8 --runMode genomeGenerate --genomeDir output/index/star --genomeFastaFiles ref.fa --sjdbGTFfile ref.gff3 --sjdbGTFtagExonParentTranscript Parent --sjdbOverhang 100
and I get the following output:
Feb 27 10:27:37 ..... started STAR run
Feb 27 10:27:37 ... starting to generate Genome files
Feb 27 10:27:40 ... starting to sort Suffix Array. This may take a long time...
Feb 27 10:27:42 ... sorting Suffix Array chunks and saving them to disk...
Feb 27 10:28:26 ... loading chunks from disk, packing SA...
Feb 27 10:28:30 ... finished generating suffix array
Feb 27 10:28:30 ... generating Suffix Array index
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Searches for the GNU/Linux error lead to some pages about C++ that I don't understand.
Submitting it as a batch job works fine but I would like to know why it does not work on a node. It is quite practical for me to test small code like this without submitting a batch job.
The command above works fine on my laptop running Mac OSX.
The STAR version is STAR_2.5.3a on both computers: STAR_2.5.3a
The memory usage of the node is the following:
total used free shared buffers cached
251 251 0 0 0 232
so, is there 0 memory for me to use on this node?
Why is my indexing aborting?
free -h
(or justfree
) to see available memory. That said, you usually don't want to be running things directly from the nodes. Most such systems will have a queuing tool that will distribute jobs across nodes and that will help you avoid this type of problem, and ignoring the queue means i) you may well have the kind of problem you are encountering and ii) you are being rude to the other users of the system; you are effectively cutting the queue. $\endgroup$