PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

Multiple GPUs error cuLaunchKernel 400
Goto page 1, 2  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
emath



Joined: 02 Jan 2010
Posts: 7

PostPosted: Wed Mar 13, 2013 4:56 am    Post subject: Multiple GPUs error cuLaunchKernel 400 Reply with quote

I am testing the example for multiple GPUs on page 16 from PGI Accel. Compilers OpenACC Getting Started Guide v.13.2. Using 1 OpenMP thread and 1 GPU works fine, but for 2 GPUs with 2 OpenMP threads I get the error message cuLaunchKernel 400: Invalid handle. The machine has 2 M2070 GPUs, the latest nVidia driver for OracleLinux 6.3 and 13.2 PGI CDK.

Last edited by emath on Wed Mar 13, 2013 9:30 pm; edited 1 time in total
Back to top
View user's profile
Neldan



Joined: 12 Feb 2013
Posts: 11

PostPosted: Wed Mar 13, 2013 5:13 am    Post subject: Re: Multiple GPUs error cuLaunchKernel 400 Reply with quote

emath wrote:
In am testing the example for multiple GPUs on page 16 from PGI Accel. Compilers OpenACC Getting Started Guide v.13.2. Using 1 OpenMP thread and 1 GPU works fine, but for 2 GPUs with 2 OpenMP threads I get the error message cuLaunchKernel 400: Invalid handle. The machine has 2 M2070 GPUs, the latest nVidia driver for OracleLinux 6.3 and 13.2 PGI CDK.


i have the same problem :S
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Mar 13, 2013 9:51 am    Post subject: Reply with quote

Sorry about that. This is a known issue that has been fixed in the 13.3 release (just released yesterday March 12th on Linux, Windows to follow here shortly).

Code:
% setenv OMP_NUM_THREADS 2
% pgf90 -acc multi.f90 -mp -lacml -V13.2 ; a.out
 Host Serial    2489.612915315794     
call to cuLaunchKernel returned error 400: Invalid handle
call to cuMemcpyDtoHAsync returned error 4: Deinitialized
%
% pgf90 -acc multi.f90 -mp -lacml -V13.3 ; a.out
 Host Serial    2489.612915315794     
 Multi-Device Parallel    2489.612915315794     


- Mat
Back to top
View user's profile
emath



Joined: 02 Jan 2010
Posts: 7

PostPosted: Thu Mar 14, 2013 4:12 am    Post subject: Reply with quote

Hi Mat, as you told us, this issue is solved in ver 13.3 for our code too.

Thank you,
Manolis
Back to top
View user's profile
miki_zizou



Joined: 28 Mar 2014
Posts: 1

PostPosted: Mon Apr 07, 2014 1:33 am    Post subject: Reply with quote

Hi, I have the same problem using pgi 14.3 on my windows machine. This machine has 4 GeForce GTX780Ti. Using 1 OpenMP thread for 1 GPU works fine, but when i am trying to use 2 OpenMP threads each for one GPU I get this error. Here is the code snippet:
Code:
#pragma omp parallel num_threads(2)
   {
      int i, j, k;
      int id, blocks, start, end;
      id = omp_get_thread_num();
      blocks = n/threads;
      start = id*blocks;
      end = (id+1)*blocks;
      acc_set_device_num(id+2, acc_device_nvidia);

      printf("copying %d\n", id);
      #pragma acc data copyin(aa[start*n:blocks*n])\
                   copyin(bb[0:n*n])\
                   copyout(cc[start*n:blocks*n])
      {
      
      printf("kernel %d\n", id);
         #pragma acc kernels loop collapse(2) private(j,k)
         for(i=start; i<end; i++)
            for(j=0; j<n; j++)
            {
               float c = 0.0f;
               for(k=0; k<n; k++)
                  c += aa[i*n+k] * bb[k*n+j];
               cc[i*n+j] = c;
            }
      }
      
      printf("after kernel %d\n", id);
   }


And the output:
Code:

copying 0
copying 1
kernel 1
kernel 0
call to cuLaunchKernel returned error 400: Invalid handle


My compilation command:
Code:

pgcc -acc -mp -V14.3 -Minfo=accel -fast multi.c


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

 
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