magland / mountainlab

spike sorting software
25 stars 22 forks source link

std::bad_alloc #196

Closed MaxGagnon11 closed 6 years ago

MaxGagnon11 commented 6 years ago

Hey all,

I have an MDA file that contains about an hour of single channel data at 50,000 Hz. The mda file is ~680MB.

When trying to sort the data on this file I get this error message -

terminate called after throwing an instance of 'std::bad_alloc'

(and)

PROCESS COMPLETED (exit code = 134): mountainsort.mountainsort3 ERROR: Exit code is non-zero: mountainsort.mountainsort3 Peak RAM: 3 MB. Peak CPU: 0%. Avg CPU: 0%. Elapsed time: 4.012 seconds.

It appears that when trying to sort the data from this file, I am running out of memory. I am running Ubuntu on a virtual machine that has 25BG of memory allocated to it and, when monitoring my computer's memory usage while sorting spikes, I seem to be using less that half of my total RAM.

I am able to sort smaller files perfectly. I only run into this issue with MDA files that are larger than about 600MB

I attached a full txt file the errors. Has anyone else ran into this issue? errormsg.txt

magland commented 6 years ago

Hi. How did you create the .mda file?

MaxGagnon11 commented 6 years ago

I used the 'writemda.m' function found here -

https://github.com/magland/mountainlab/tree/2a5c5b3934d3cac87cc22e700815cfec3ac7907e/old/matlab/msutils

magland commented 6 years ago

Could you please send me a direct email and then we can troubleshoot. jmagland at flatironinstitute dot org

magland commented 6 years ago

oops, note: I needed to edit that last message.

MaxGagnon11 commented 6 years ago

Just sent an email! Thanks!