Could not open libnvvm

Hi,

The driver version in the compute nodes are 304.54, which is suitable for CUDA 5.0. Note that I don’t have permission to upgrade the driver version.

When I compile a CUDA Fortran code using PGI 12.10, it works and runs right. When I compile the same code using PGI 15.7, compilation is passed but it runs corrupted with info:
0: ALLOCATE: 4096 bytes requested; status = 35(CUDA driver version is insufficient for CUDA runtime version)
I know the reason: the executable use shared libs which version is CUDA 6.5 by default.

I notice that there is no version less than 5.5 in my directory ~/software/pgi-2015-157/linux86-64/2015/cuda. So does driver version 304.54 support PGI 15.7 compiler? How can I use PGI 15.7 under driver version 304.54?

I try adding -rc=rcfile to explicitly specify CUDA 5.0, but the compilation is aborted with infor:
Could not open libnvvm.
PGF90-F-0155-Compiler failed to translate accelerator region (see -Minfo messages):
Device compiler exited with error status code (vectorAdd.cuf: 1)

The test code file vectorAdd.cuf:

module add_mod
	use cudafor
	integer, parameter :: N = 1024
end module add_mod

program vectorAdd
	use add_mod
	implicit none

	integer :: i
	real :: mysum
	real, allocatable :: A(:), B(:), C(:)
	real, allocatable, device :: d_A(:), d_B(:), d_C(:)
	allocate(A(N), B(N), C(N))
	allocate(d_A(N), d_B(N), d_C(N))
	A = 1.0
	B = 2.0
	
	d_A = A(1:N)
	d_B = B(1:N)

        !$cuf kernel do(1) <<<*,*>>>
	do i = 1, N
		d_C(i) = d_A(i) + d_B(i)
	enddo
	
	C = d_C(1:N)
        
	do i = 1, N
	   mysum = A(i) + B(i);
           if (abs(C(i) - mysum) > 1e-5)then
              exit
	   endif
        enddo
        if (i==N+1)then
           write(*,*) "PASSED"
        else
           write(*,*) "FAILED"
	endif
	if (all(C==A+B))then
	   write(*,*) "PASSED"
	endif
	deallocate( d_A, d_B, d_C )
	deallocate( A, B, C )
end program vectorAdd

The compilation command in build.sh:

#!/bin/bash
OPT='-Mcuda -Minfo -rc=rcFile'
pgf90 $OPT vectorAdd.cuf

The rcFile:

set CUDAROOT=/vol-th/software/cuda/cuda-5.0;
set CUDAVERSION=5.0;

Thanks in advance!

Hi Yang Zhao,

CUDA 5.0 is quite old and no longer supported.

You might try copying the “$PGI/2012/cuda/5.0” directory over to “$PGI/2015/cuda/5.0” and then add the “-ta=tesla:cuda5.0” flag to your compilation. I’m thinking this will work but it’s not something we test so I can’t guarantee it will.

Hope this helps,
Mat