Hello,
Can you kindly identify what is wrong in the following code?
! set ACC_DEVICE_TYPE=nvidia
! use pgfortran -fast -o ACCHECK.exe ACCHECK.for -ta=tesla:cc35
Program ACCHECK
use Openacc
IMPLICIT NONE
INTEGER :: ngpus
integer, value :: devicenum
integer(acc_device_kind), value :: devicetype
integer(acc_device_property):: property
character*(1000) :: string
ngpus = acc_get_num_devices(devicetype)
Write(*,*) 'Number of ACC devices are: ', ngpus
property=acc_property_driver
call acc_get_property_string(devicenum,devicetype,property,string)
Write(*,*) string
End Program
I have two NVIDIA GPUs: TITAN X and TESLA K40. I believe that the they are compute capability cc50 and cc35 respectively. When I execute the above code, I get 1 GPU and the “string” variable is empty.
Is there something wrong with my coding?
I am actually trying to check that the TESLA K40 is the one running my code. Any tips?
Thank you for your time.
Ahmed