-Mcuda gives error

Hi,

I am working in a program with PVF 14.9 in two computers with different Graphic Cards (GeForce GTX 770 and GeForce GTX TITAN Black) in order to compare my acceleration results.

I have problems in one of them when I activate the Cuda Fortran directives (I have the OpenACC directives also activated and I need both in my real program). Here is the code of a very simple program named “First” with just one trivial loop which I have created to illustrate the error that I get:

   real*4  aaa(1000)
   n=100	

!$acc parallel loop
	do j=1,n
	    aaa(j)=5
	enddo
!$acc end parallel loop

	write(*,*)'END OK'
	read(*,*)
end

In both computers the compilation and linking gives no error as I show you below,
without the -Mcuda flag:

------ Build started: Project: First, Configuration: Debug x64 ------
Compiling Project  ...
..\first.f
MAIN:
      6, Accelerator kernel generated
          7, !$acc loop gang, vector(256) ! blockidx%x threadidx%x
      6, Generating present_or_copyout(aaa(:100))
         Generating Tesla code
Linking...
First build succeeded.

with the -Mcuda flag

------ Build started: Project: First, Configuration: Debug x64 ------
Compiling Project  ...
..\first.f
MAIN:
      6, Accelerator kernel generated
          7, !$acc loop gang, vector(256) ! blockidx%x threadidx%x
      6, Generating present_or_copyout(aaa(:100))
Linking...
First build succeeded.

(Notice the difference in the “Generating Tesla code” line)

But when I run it, the computer with the GeForce GTX TITAN Black card shows the next error, while the other runs without problems:

line 6: cudaConfigureCall returned status 3: initialization error
Presione una tecla para continuar . . .

For this reason I have dismissed the possibility of an error in my code or in the simultaneous activation of the OpenACC and Cuda Fortran directives and I have focused on my computer and its graphic card. I have checked that my graphic card have the appropiate drivers and information details in the NVIDIA Control Panel of my computer and seems to be all correct.

Could you please give me some advice about how can I fix this problem?

Thank you very much for your help,

Martí

Hi Marti,

If I’m understanding things correctly, you’re saying that compiling with OpenACC by itself is fine but when you add the “-Mcuda” flag in addition to “-acc” is when you get this configuration error on the Titan Black?

What happens if you compile without “-g”? Note that you’ll need to print out a value of “aaa”, otherwise dead-code elimination optimization will remove the “aaa”.

What is the output from “pgaccel” info on the Titan Black?

As for the error itself, “cudaConfigureCall returned status 3”, it means that the CUDA driver has not been initialized with or that initialization has failed. No idea why this would occur.

  • Mat

Hi Mat,

Thank you very much for your quick reply and your help.

It was just a problem with the drivers version of my Titan Black card. I have updated them and now it runs properly.

Martí