[Eeglablist] Re: importing edf file
Sebastian Moeller
sebastian.moeller at lur.rwth-aachen.de
Fri Jan 27 16:43:49 PST 2006
Dear List,
okay, I am the first to admit that I have no clue what so ever about
eeg specifics, but "out of memory" in Matlab is something I do have
some experience with. Unlike the poster before me I do not think there
are easy solutions for that specific problem, but there are some
guidelines to follow...
Anyone close to operating systems and user addressable memory might
skip this following part or even better correct my unevitable mistakes
(as I am full of it anyway ;))...
OK, the "out of memory" error in Matlab occurs once Matlab is not able
to allocate enough consecutive memory to store some data structure.
Now, that in itself is not to helpful, but let us consider the user
addressable space. With standard 32bit operating systems/cpus only 4GB
of memory are maximally addressable by any proces/program, windows and
standard Linux distributions actually limit this to around 3GB of
memory addressable/usable by Matlab (Linux can give out 4GB if asked
nicely, but I digress, and most of the time this extra 1GB is no real
escape from out of memory anyway...).
Now this user addressable space is used by user processes/programs and
shared libraries (dlls as microsoft likes to call them). So in essence
the operating system insists upon placing some libraries/dlls in the
middle of each user address space thereby limiting the consecutive
usable user memory even further.
Where was I, yes, once Matlab tries to allocate memory to store some
data structure like an array (and be it only for some temporary use) it
needs to get consecutive memory. If the operating system can not supply
this amount of memory the user gets an "out of memory" error. There are
at least two ways around this problem, either limiting the amount of
data to fit inside the small addressable space (like using smaller data
files / less electrodes) or by enlarging the user addressable space.
Now by going to 64 bit operating systems (like Linux or windows xp 64)
the user addressable memory gets obscenely large (IIRC somewhere in the
terabyte range, large enough for today' data) so out of memory errors
should occur only rarely. So the gist is go 64v bit if "out of memory"
is your constant nag.
Basically this means either using Matlab 7.1 on Linux or the 64 bit
beta version of Windows, as eeglab, at least 4-1.515 which I checked
only seems to consist out of m-files (as opposed to dlls or mex files)
going 64bit should save the day.
One caveat though, even 64 bit Matlab only allows 32bit (roughly 4
billion) elements in a single array so there still are limits for the
size of data structures inside the achievable range of multielectrode
eeg (I am guestimating here, remember no presonel eeg experience...),
but that is a problem for another day and well above the 120MB files of
the original poster.
Ahoi & go 64 bit
Sebastian
On 27. Jan 2006, at 21:15 Uhr, Alois Schloegl wrote:
> eeglablist-request at sccn.ucsd.edu wrote:
>
>> Date: Wed, 25 Jan 2006 12:07:50 +0100
>> From: "stefano ferraina" <stefano.ferraina at uniroma1.it>
>> Subject: [Eeglablist] importing edf file
>> To: <eeglablist at sccn.ucsd.edu>
>> Message-ID: <004101c6219f$95f27790$2e286497 at sfnew>
>> Content-Type: text/plain; charset="iso-8859-1"
>>
>> I do have a problem importing big edf files in EEGlab (using the
>> BIOSEMI tool).
>> For example, the last file is 120 Mb and with 105 channels recorded.
>> No problem with a smaller file.
>>
>> It looks like that there is a problem with memory. I used both the
>> clean and the pack from matlab to increase the amount of available
>> memory as well as I increased up to the maximum (4 GB) the virtual
>> memory from the Windows control panel.
>>
> I guess you are using windows, increasing the virtual memory does not
> help; you need real RAM. 120Mb EDF data will result 480 MByte Matlab
> data; besides the operating system needs also memory.
>
>> The error message 'out of memory' is still there:
>>
>> as well as the warning:
>>
>> Warning SOPEN: OVERFLOWDETECTION not supported because of missing
>> THRESHOLD.
>>
>> ??? Reference to a cleared variable EEGTMP.
>>
>> ??? Error while evaluating uimenu Callback.
>>
>
>> Any suggestion?
>>
>
> You can buy more RAM, switch from Windows to Linux (Linux needs less
> memory) or
>
> you can load parts of the data in this way:
>
> CHAN = 1:4; % select channels
> [data,HDR]=sload(filename, CHAN); % select only channels listed
> in CHAN
>
> or
>
> HDR=sopen(filename,'r',CHAN);
> [data,HDR] = sread(HDR,LEN,START); % read data block of length
> "LEN", starting at "START".
> HDR=sclose(HDR);
>
>
>
> Alois
>
>
> _______________________________________________
> eeglablist mailing list eeglablist at sccn.ucsd.edu
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
>
>
--
Sebastian Moeller
Tel.: 04 21 - 2 18 - 78 38 oder 96 91
Fax.: 04 21 - 2 18 - 90 04
GSM: 01 62 - 3 25 45 59
moeller at brain.uni-bremen.de
AG Kreiter / FB 2
Institut fuer Hirnforschung III
Abteilung Theoretische Neurobiologie
Universitaet Bremen
Biogarten
Hochschulring 16a
Postfach 33 04 40
28359 Bremen
More information about the eeglablist
mailing list