- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a maximum array size that is allocatable using the intel compiler ?
Link Copied
14 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No - you're limited by what the operating system allows. The compiler does not impose its own limit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How is it possible to evaluate this maximum size : I work on an 64b opteron and installed successfully Intel's fortran compiler 8.* for 64b processors. I have no problem for compiling or linking but I was surprised to observe that the maximum array size didn't change from my 32b installation ... !? Is it normal ??
Thanks for your answer(s), Edouard.
How is it possible to evaluate this maximum size : I work on an 64b opteron and installed successfully Intel's fortran compiler 8.* for 64b processors. I have no problem for compiling or linking but I was surprised to observe that the maximum array size didn't change from my 32b installation ... !? Is it normal ??
Thanks for your answer(s), Edouard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no easy way to determine it. If you are declaring a static array, there are limits of the linker and the image activator. Have you tried an allocatable array? What was the maximum size you managed to see?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the -mcmodel= switch influence the maximum size of static arrays? I don't find documentation readily accessible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hmm - yes, it might. Try -mcmodel=medium and see if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/opt/fc-8.1.023/bin/ifort -mcmodel=medium -c frxx5.f
ifort: Command line warning: ignoring unknown option '-mcmodel=medium'
I have seen this option on other compilers, not yours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try -fpic on your 64b machine, i think thismight help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Actually the limit of size on my computer (the 64b Opteron AND on my 32b PC) is between 1E8 and 1E9 for the maximum size of an allocatable array for a DOUBLE PRECISION. I checked also that the stack size and the data seg size are unlimited.
The /proc/meminfo file gives me :
total: used: free: shared: buffers: cached:
Mem: 4088872960 97042432 3991830528 0 11104256 59793408
Swap: 4293910528 270786560 4023123968
MemTotal: 3993040 kB
MemFree: 3898272 kB
which seems to be sufficient !?
On the other hand, the greatest integer of kind=8 (obtained with the huge command) is the same as on a 32b : 2147483647. Again, I do not know if it is normal.
Thanks for your comments, Edouard.
The /proc/meminfo file gives me :
total: used: free: shared: buffers: cached:
Mem: 4088872960 97042432 3991830528 0 11104256 59793408
Swap: 4293910528 270786560 4023123968
MemTotal: 3993040 kB
MemFree: 3898272 kB
which seems to be sufficient !?
On the other hand, the greatest integer of kind=8 (obtained with the huge command) is the same as on a 32b : 2147483647. Again, I do not know if it is normal.
Thanks for your comments, Edouard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are seeing the same result for HUGE of an INTEGER(8) as an INTEGER(4), there's an error in your program. Perhaps you are also misinterpreting the size numbers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As you suggest, there was a problem in my program : I used a "Integer :: variable=kind(8)" statement instead of the declaration "Integer(8):: variable". I thought it was equivalent !
Yet I still do not understand why it is not possible to allocate a bigger array on my 64b processor than on my 32b PC. Do you have any idea considering the datas in a previous message ?
Thanks a lot for your answers.
Yet I still do not understand why it is not possible to allocate a bigger array on my 64b processor than on my 32b PC. Do you have any idea considering the datas in a previous message ?
Thanks a lot for your answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let's see an example program, the commands you used to build it, and the results of running it. I know this works - I have seen it myself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I used the followig test program :
**********************************************************
PROGRAM test64
IMPLICIT NONE
INTEGER(8) :: dimarray
DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: testalloc
dimarray = 260000000
PRINT*,HUGE(dimarray)
PRINT*,"BEGIN ALLOCATION"
ALLOCATE(testalloc(dimarray))
PRINT*,"ALLOCATION SUCCESFULL",dimarray
DEALLOCATE(testalloc)
END PROGRAM test64
**********************************************************
+ I compiled and executed it on my PC (32b) with the standard
ifort test64.f90 -o test64
./test64
instructions. It is successfull. If ichange the value dimarray to 270000000. Iget the message :
Allocate error 494: Allocation of Array with extent of 270000000 failed
+ On the 64b processor compiled with the instruction :
/opt/intel_fce_80/bin/ifort test64.f90
the limit (computed manually changing the value of dimarray) is close from 1000000000. That is less than 5 times larger than the previous one.
With a greater integer I got the following message :
forrtl: severe (41): insufficient virtual memory
Image PC Routine Line Source
a.out 000000000043A2BE Unknown Unknown Unknown
a.out 0000000000439CE2 Unknown Unknown Unknown
...
Thanks.
**********************************************************
PROGRAM test64
IMPLICIT NONE
INTEGER(8) :: dimarray
DOUBLE PRECISION, DIMENSION(:), ALLOCATABLE :: testalloc
dimarray = 260000000
PRINT*,HUGE(dimarray)
PRINT*,"BEGIN ALLOCATION"
ALLOCATE(testalloc(dimarray))
PRINT*,"ALLOCATION SUCCESFULL",dimarray
DEALLOCATE(testalloc)
END PROGRAM test64
**********************************************************
+ I compiled and executed it on my PC (32b) with the standard
ifort test64.f90 -o test64
./test64
instructions. It is successfull. If ichange the value dimarray to 270000000. Iget the message :
Allocate error 494: Allocation of Array with extent of 270000000 failed
+ On the 64b processor compiled with the instruction :
/opt/intel_fce_80/bin/ifort test64.f90
the limit (computed manually changing the value of dimarray) is close from 1000000000. That is less than 5 times larger than the previous one.
With a greater integer I got the following message :
forrtl: severe (41): insufficient virtual memory
Image PC Routine Line Source
a.out 000000000043A2BE Unknown Unknown Unknown
a.out 0000000000439CE2 Unknown Unknown Unknown
...
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You're hitting an OS limit determined by your configuration. I don't know enough about Linux to advise you on this, except to say that it's not straightforward to configure a system that will allow more than 2GB allocations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am able to compile and run the test program up to the size of the physical memory limit of 32 GB:
c5i5n13 .../development/x86_64 $ ifort test64.f90
c5i5n13 .../development/x86_64 $ a.out
9223372036854775807
BEGIN ALLOCATION
ALLOCATIONSUCCESFULL 4000000000
c5i5n13 .../development/x86_64 $ a.out
9223372036854775807
BEGIN ALLOCATION
ALLOCATIONSUCCESFULL 4000000000
It's a SuSE 9.1 x86_64 with Kernel 2.6.5-7.97-smpand Intel l_fce_pc_8.1.025
Hans

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