|
| View previous topic :: View next topic |
| Author |
Message |
Marco ABlanco26924
Joined: 15 Sep 2009 Posts: 9
|
Posted: Mon Jan 11, 2010 1:06 pm Post subject: cuMemcpyDtoH error |
|
|
Hi,
I'm trying to use the accelerator directives on a simple loop, but the compilet gives this error:
call to cuMemcpyDtoH returned error 700: Launch failed
The code that I'm using with the !$acc directive is
!$acc region copyin(r_c(1:resids,1:3,1:2),r_cb(1:resids,1:3,1:2)),&
!$acc copyin(epsij(1:20),dat1(1:resids,1)),&
!$acc copyout(Ener)
do j=1,resids
Vbb=0.0D0
Vhp=0.0D0
mol1=dat1(i,1)
mol2=dat1(j,1)
if (mol1.ne.10) then
dx=(r_cb(i,1,1)-r_c(j,1,2))
dy=(r_cb(i,2,1)-r_c(j,2,2))
dz=(r_cb(i,3,1)-r_c(j,3,2))
r=(dx**2+dy**2+dz**2)**0.50D0
sigma=(s_c+s_cb)/2.0D0
rc=sigma*2.0D0**(1.0D0/6.0D0)
if (r.le.rc) then
rr=(sigma/r)**6
Vbb=4.0D0*epsbb*&
(rr**2-rr+0.250D0)
end if
end if
if ((mol1.ne.10).and.(mol2.ne.10)) then
dx=r_cb(i,1,1)-r_cb(j,1,2)
dy=r_cb(i,2,1)-r_cb(j,2,2)
dz=r_cb(i,3,1)-r_cb(j,3,2)
r=(dx**2+dy**2+dz**2)**0.5000
rr=(s_cb/r)**6
rc=s_cb*2.0**(1.0/6.0)
eij=(epsij(mol1)*epsij(mol2))**0.50D0
if (r.le.rc) then
Vhp=4.0D0*epshp*(rr**2-rr)+&
epshp*(1.0D0-eij)
else
Vhp=4.0D0*epshp*eij*(rr**2-rr)
end if
end if
Ener(j)=Vhp+Vbb
end do
!$acc end region
I don't understand why it gives me that error, since the arrays are small (the variable resids is not bigger than 10), and my GPU has 1.5GB of memory. Could you help me with this problem?
Thanks,
Marco |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Mon Jan 11, 2010 1:39 pm Post subject: |
|
|
Hi Marco,
Would it possible for you to send me an example code which exhibits this behavior? Is so, please send a report to PGI Customer Service (trs@pgroup.com) and ask them to send it to me.
The error "cuMemcpyDtoH" means there was a failure in copying from the device to the host. It could actually be an error in the copy (for example if Ener's size is smaller then resids) but could also mean the kernel itself has an error. Most likely it's a problem with the compiler, but I'll need a full example to tell.
Thanks,
Mat |
|
| Back to top |
|
 |
Marco ABlanco26924
Joined: 15 Sep 2009 Posts: 9
|
Posted: Thu Jan 14, 2010 9:04 am Post subject: |
|
|
Hi Mat,
I've been checking the code, but I haven't found any mistake in terms of vector sizes or undeclared varaibles. I sent the sample code the same day that you asked me, have you checked it? Is it a problem with the compiler?
Thanks,
Marco |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Thu Jan 14, 2010 9:36 am Post subject: |
|
|
Hi Marco,
I went through all of TRS mail back til the 10th, but don't see any messages from you. It's possible that it got stopped by the corporate spam filter or the attachment was too big. I'll send you a email directly.
- Mat |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Thu Jan 14, 2010 11:42 am Post subject: |
|
|
Hi Marco,
Thank you for the code. This does appear to be compiler error where a bad value is being used when initializing the cached copies of a variable. I have submitted this problem to our engineers as TPR#16500.
The error does appear to have been found and fix in our internal development compiler and I have requested that this fix be add to our next release (10.2) due at the beginning of February. The work around to this issue is to use the flag "-ta=nvidia,oldcg".
Best Regards,
Mat |
|
| Back to top |
|
 |
|
|
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 © 2001, 2002 phpBB Group
|