Out of memory error while using eye function.

Dear Sir/Madam, I am getting Out of memory error while allocating an array(214748 x 314748 x 4) of size 270366014016 bytes or 270G
>> C=eye(214748,314748);
Error using eye
Out of memory. Type HELP MEMORY for your options
i have approx 500G memory on my 64 bit machine and i had >400G free when i was trying to allocate.
free -g
total used free shared buffers cached
Mem: 504 58 445 0 0 46
-/+ buffers/cache: 11 493
Swap: 7 0 7
Out of memory. Type HELP MEMORY for your options
ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 4133744
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 1024
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Why this allocation failed?
Are there some default upper limits?
can i override them?

3 件のコメント

Adam
Adam 2016 年 7 月 28 日
編集済み: Adam 2016 年 7 月 28 日
You have 500 GB of RAM on your machine??
Stephen23
Stephen23 2016 年 7 月 28 日
編集済み: Stephen23 2016 年 7 月 28 日
@Adam: it seems a lot of people don't know the difference between memory (RAM) and drive size (hard-drive, SSD, tape, etc). But luckily the difference is easy to learn.
John D'Errico
John D'Errico 2016 年 7 月 28 日
But the use of eye for that large of a problem is not an issue of understanding the difference between disk space and RAM. It is understanding why one would ever want to do that, blindly applying a formula to a problem, with no recourse to common sense, with no recourse to the available tools, here sparse matrix tools.

サインインしてコメントする。

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 7 月 28 日

0 投票

To get all information you need type
memory

2 件のコメント

puneet singh
puneet singh 2016 年 7 月 28 日
this command does not work on my matlab (linux machine issues?)
Stephen23
Stephen23 2016 年 7 月 28 日
memory doc says: "The memory function is available only on Microsoft® Windows® systems".

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeVisualize and Interpret Parallel Link Project Analysis Results についてさらに検索

タグ

質問済み:

2016 年 7 月 28 日

回答済み:

2016 年 7 月 28 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by