Originally posted by: Jiseok
PROGRAM memory_test
IMPLICIT NONE
Integer, PARAMETER :: n=12000
Complex*16, ALLOCATABLE :: a(:,:)
double precision, parameter :: double_cmplx_size=16 !byte
INTEGER :: i, j, alloc_error, dealloc_error
Double Precision :: memsize
memsize = double_cmplx_size*n*n/(1024*1024) !Mb
ALLOCATE(a(n,n), STAT=alloc_error)
If (alloc_error .ne. 0) Then
print *, 'alloc_error = ',alloc_error
print *, 'ERROR :: Allocate'
print *, 'size of the memory space needed = ', memsize, 'Mb'
!stop
End If
DEALLOCATE(a, stat=dealloc_error)
print *, 'dealloc_error = ',dealloc_error
END PROGRAM memory_test
================================================
Hi.
I have a array allocation test code above.
The size of the array would exceed 2Gb which is larger than the limit in 32-bit mode.
So I boot in 64 bit mode and tried to use -q64 option when compiling but it still shows 'Segmentation Fault'.
Anyone help would be appreciated.
Below shows the hardware info of my box
> prtconf
System Model: IBM,9114-275
Machine Serial Number: 104685C
Processor Type: PowerPC_POWER4
Number Of Processors: 2
Processor Clock Speed: 1452 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 1 NULL
Memory Size: 8192 MB
Good Memory Size: 8192 MB
Platform Firmware level: 3F041029
Firmware Version: IBM,RG041029_d79e00_r
Console Login: enable
Auto Restart: true
Full Core: false