- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I work on a PIII with 1GB memory + 1Gb SWAP. I am puzzled about my memory usage.
My ulimit -a reads
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
My maximum array is (according to the compiler)about 2.1 GB, which makes sense given the physical limitations of my
memory. However when I compile
real(kind=4),allocatable,dimension(:,:):: t1
allocate(t1(5000,38233))
then the (5000,38233) is about the maximum size I can get (corresponding to around 765Mb), the machine cries at run-
time that it has not enough virtual memory if make this array any larger. If I do the same but written as
real(kind=4),dimension(5000,107000):: t1
then this is the maximum size I can get without problems. Here I do get the physical limit (~2.1 Gb).
How can I use dynamic allocatation and still use all my physical resources? Why the difference?
Thanks!
My ulimit -a reads
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
My maximum array is (according to the compiler)about 2.1 GB, which makes sense given the physical limitations of my
memory. However when I compile
real(kind=4),allocatable,dimension(:,:):: t1
allocate(t1(5000,38233))
then the (5000,38233) is about the maximum size I can get (corresponding to around 765Mb), the machine cries at run-
time that it has not enough virtual memory if make this array any larger. If I do the same but written as
real(kind=4),dimension(5000,107000):: t1
then this is the maximum size I can get without problems. Here I do get the physical limit (~2.1 Gb).
How can I use dynamic allocatation and still use all my physical resources? Why the difference?
Thanks!
Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page