I observe this very strange issue to me.
This is the simple code
PROGRAM matmul_test
use accel_lib
IMPLICIT NONE
INTEGER :: N, M, L
DOUBLE PRECISION :: diff, denom, error
PRINT *, "start"
CALL testdouble_2 ()
END PROGRAM matmul_test
SUBROUTINE testdouble_2 ()
USE accel_lib
IMPLICIT NONE
INTEGER, PARAMETER :: N = 10
DOUBLE PRECISION, DIMENSION(N) :: bigC, chiC,chiO
INTEGER, DIMENSION(N, maxnklm+maxnklp-1) :: indexPdt, tmpPdt
INTEGER :: i, j
INTEGER, PARAMETER :: maxnklm =3, maxnklp = 3
INTEGER, DIMENSION(N) :: isfu
indexPdt = 0
DO i = 1,N
isfu(i) = i
ENDDO
END SUBROUTINE testdouble_2
I compile with
/opt/pgi/linux86-64/10.5/bin/pgf95 main.f90 -ta=nvidia,cc13 -L /opt/pgi/linux86-64/10.5/lib64 -lacml -o aout
[/quote]
When I run it, multiple times, and run the next command right after the first one complete. Sometimes, I get the segmentation fault error or not enough memory. This is so inconsistent. So could any one please give me a solution.
mt@nfat:~/Projects/test_accelerator/test_copy_10.5$ ./aout
start
mt@nfat:~/Projects/test_accelerator/test_copy_10.5$ ./aout
start
Segmentation fault
mt@nfat:~/Projects/test_accelerator/test_copy_10.5$ ./aout
start
Segmentation fault
mt@nfat:~/Projects/test_accelerator/test_copy_10.5$ ./aout
start
/test_copy_10.5$ ./aout
start
0: ALLOCATE: 18446744073676923096 bytes requested; not enough memory
Thanks,
Tuan