PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

error for a simple OPENACC program
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
alechand



Joined: 14 May 2012
Posts: 21

PostPosted: Thu May 09, 2013 2:04 pm    Post subject: Reply with quote

Hello,
i really appreciate your attention.

About the WRITE statement in the Mol_Dyn.f90 code, i tried to use it just one time. It worked one time. In the second time, the memory errors begin to appear on all codes, even if i remove the WRITE statement, and also in this simple program picalc.f90. What i thought is that this statement caused, for example, problems in the graphic card.

About the picalc.f90, i did not change nothing. I just installed a new system (kubuntu 11.04) and a new PGI compiler.

Here i show the complete output as you asked (i use exactly the same code as you, i've copied it) :

##########################################################

alechand@pcsantos2:~/test_openacc$ more picalc.f90
program picalc
implicit none
integer, parameter :: n=1000000
integer :: i
real(kind=8) :: t, pi
pi = 0.0
!$acc parallel loop
do i=0, n-1
t = (i+0.5)/n
pi = pi + 4.0/(1.0 + t*t)
end do
!$acc end parallel loop
print *, 'pi=', pi/n
end program picalc
alechand@pcsantos2:~/test_openacc$ pgfortran -fast -Minfo=all -o MOL_DYN picalc.f90 -ta=nvidia,4.2 -V12.10
picalc:
7, Accelerator kernel generated
7, CC 1.3 : 24 registers; 32 shared, 36 constant, 0 local memory bytes
CC 2.0 : 23 registers; 0 shared, 52 constant, 0 local memory bytes
8, !$acc loop gang, vector(256) ! blockidx%x threadidx%x
10, Sum reduction generated for pi
7, Generating compute capability 1.3 binary
Generating compute capability 2.0 binary
alechand@pcsantos2:~/test_openacc$ PGI_ACC_DEBUG=1
alechand@pcsantos2:~/test_openacc$ ./MOL_DYN
call to cuMemcpyDtoH returned error 700: Launch failed
CUDA driver version: 5050

##########################################################

I dont know if i did something wrong, but the command PGI_ACC_DEBUG=1 seems to dont work.

thanks
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6213
Location: The Portland Group Inc.

PostPosted: Thu May 09, 2013 2:09 pm    Post subject: Reply with quote

Quote:
alechand@pcsantos2:~/test_openacc$ PGI_ACC_DEBUG=1
This is an environment variable which needs to be set. If you are using csh, the command is "setenv PGI_ACC_DEBUG 1". If you are using bash the command is "export PGI_ACC_DEBUG=1".

- Mat
Back to top
View user's profile
alechand



Joined: 14 May 2012
Posts: 21

PostPosted: Thu May 09, 2013 2:13 pm    Post subject: Reply with quote

Here is the output again :

######################################

alechand@pcsantos2:~/test_openacc$ more picalc.f90
program picalc
implicit none
integer, parameter :: n=1000000
integer :: i
real(kind=8) :: t, pi
pi = 0.0
!$acc parallel loop
do i=0, n-1
t = (i+0.5)/n
pi = pi + 4.0/(1.0 + t*t)
end do
!$acc end parallel loop
print *, 'pi=', pi/n
end program picalc
alechand@pcsantos2:~/test_openacc$ pgfortran -fast -Minfo=all -o MOL_DYN picalc.f90 -ta=nvidia,4.2 -V12.10
picalc:
7, Accelerator kernel generated
7, CC 1.3 : 24 registers; 32 shared, 36 constant, 0 local memory bytes
CC 2.0 : 23 registers; 0 shared, 52 constant, 0 local memory bytes
8, !$acc loop gang, vector(256) ! blockidx%x threadidx%x
10, Sum reduction generated for pi
7, Generating compute capability 1.3 binary
Generating compute capability 2.0 binary
alechand@pcsantos2:~/test_openacc$ export PGI_ACC_DEBUG=1
alechand@pcsantos2:~/test_openacc$ ./MOL_DYN
__pgi_cu_init() found 1 devices
__pgi_cu_init( file=/home/alechand/test_openacc/picalc.f90, function=picalc, line=7, startline=1, endline=14 )
__pgi_cu_init() will use device 0 (V3.0)
__pgi_cu_init() compute context created
__pgi_cu_module3( lineno=7 )
__pgi_cu_module3 module loaded at 0x928ba28
__pgi_cu_module_function( name=0x8098c4a=picalc_7_gpu, lineno=7, argname=(nil)=, argsize=8, varname=0x8098c57=b1, varsize=8, SWcachesize=0 )
Function handle is 0x93752a0
__pgi_cu_module_function( name=0x8098c38=picalc_10_gpu_red, lineno=7, argname=(nil)=, argsize=0, varname=(nil)=, varsize=0, SWcachesize=0 )
Function handle is 0x9372bf0
__pgi_cu_alloc(size=31256,lineno=7,name=)
__pgi_cu_alloc(31256) returns 0x206c0000
__pgi_cu_uploadc( "b1", size=8, offset=0, lineno=7 )
constant data b1 at address 0x205c0000 devsize=8, size=8, offset=0
First arguments are:
0 0

0x00000000 0x00000000
__pgi_cu_launch_a(func=0x93752a0, grid=3907x1x1, block=256x1x1, lineno=7)
__pgi_cu_launch_a(func=0x93752a0, params=0xbf98c97c, bytes=4, sharedbytes=2048)
First arguments are:
543948800

0x206c0000
__pgi_cu_launch_a(func=0x9372bf0, grid=1x1x1, block=256x1x1, lineno=10)
__pgi_cu_launch_a(func=0x9372bf0, params=0xbf98c97c, bytes=8, sharedbytes=2048)
First arguments are:
543948800 3907

0x206c0000 0x00000f43
__pgi_cu_downloadc( "b1", size=8, offset=0, lineno=7 )
call to cuMemcpyDtoH returned error 700: Launch failed
CUDA driver version: 5050

############################

Are you seeing something strange ?

thanks a lot
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6213
Location: The Portland Group Inc.

PostPosted: Thu May 09, 2013 5:50 pm    Post subject: Reply with quote

Given the debug output, it looks like you're compiling to 32-bits? Can you try compiling in 64-bits? (i.e. add "-m64" to you compile options).

The program still works fine for me in 32-bits, but I'm just wondering.

- Mat
Back to top
View user's profile
alechand



Joined: 14 May 2012
Posts: 21

PostPosted: Thu May 09, 2013 5:58 pm    Post subject: Reply with quote

But, my system is 32bits, and i installed the 32bits version of the compiler. Do you want to i install the 64 bits version of the compiler to test ?
Can i install it in a 32 bits ubuntu version ?

thanks
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group