[cfe-users] omp_get_num_devices() returns 0 even though I have GPUs

2020-07-02 Thread mashilamani sambasivam via cfe-users
Hi,
I am trying to offload to my GPUs. I have GTX1060 6GB with compute
capability of 6.1.

I followed the instructions given in
https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs

Then I compiled my helloworld program using the following environment
variables:
CFLAGS="-fopenmp -fopenmp-targets=nvptx64-sm_61 -pthread -I
/usr/lib/gcc/x86_64-linux-gnu/9/include -O2
--libomptarget-nvptx-path=$CLANG_HOME/lib --cuda-gpu-arch=sm_61"

LD_LIBRARY_PATH=$CLANG_HOME/lib:$LD_LIBRARY_PATH

CC=clang

my helloworld program simply printfs omp_get_num_devices() after #including


it compiles fine; but when i run it i get the number of devices as 0.

Does someone have any idea?
Thanks much,
Mani
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


[cfe-users] Fwd: omp_get_num_devices() returns 0 even though I have GPUs

2020-07-02 Thread mashilamani sambasivam via cfe-users
I forgot to mention that I am using the latest clang-llvm-openmp versions
of source code (10.0.0).
-- Forwarded message -
From: mashilamani sambasivam 
Date: Fri, Jul 3, 2020 at 10:56 AM
Subject: omp_get_num_devices() returns 0 even though I have GPUs
To: 


Hi,
I am trying to offload to my GPUs. I have GTX1060 6GB with compute
capability of 6.1.

I followed the instructions given in
https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs

Then I compiled my helloworld program using the following environment
variables:
CFLAGS="-fopenmp -fopenmp-targets=nvptx64-sm_61 -pthread -I
/usr/lib/gcc/x86_64-linux-gnu/9/include -O2
--libomptarget-nvptx-path=$CLANG_HOME/lib --cuda-gpu-arch=sm_61"

LD_LIBRARY_PATH=$CLANG_HOME/lib:$LD_LIBRARY_PATH

CC=clang

my helloworld program simply printfs omp_get_num_devices() after #including


it compiles fine; but when i run it i get the number of devices as 0.

Does someone have any idea?
Thanks much,
Mani
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users


Re: [cfe-users] omp_get_num_devices() returns 0 even though I have GPUs

2020-07-05 Thread mashilamani sambasivam via cfe-users
Hi,
  I figured it out. I hadnt downloaded the proper NVIDIA drivers.
https://linuxhint.com/ubuntu_nvidia_ppa/
proved useful to me.
Now I am able to detect my GPU.

Thanks much,
mashilamani

On Fri, Jul 3, 2020 at 11:11 AM mashilamani sambasivam <
kandanarul1...@gmail.com> wrote:

>
> I forgot to mention that I am using the latest clang-llvm-openmp versions
> of source code (10.0.0).
> -- Forwarded message -
> From: mashilamani sambasivam 
> Date: Fri, Jul 3, 2020 at 10:56 AM
> Subject: omp_get_num_devices() returns 0 even though I have GPUs
> To: 
>
>
> Hi,
> I am trying to offload to my GPUs. I have GTX1060 6GB with compute
> capability of 6.1.
>
> I followed the instructions given in
>
> https://hpc-wiki.info/hpc/Building_LLVM/Clang_with_OpenMP_Offloading_to_NVIDIA_GPUs
>
> Then I compiled my helloworld program using the following environment
> variables:
> CFLAGS="-fopenmp -fopenmp-targets=nvptx64-sm_61 -pthread -I
> /usr/lib/gcc/x86_64-linux-gnu/9/include -O2
> --libomptarget-nvptx-path=$CLANG_HOME/lib --cuda-gpu-arch=sm_61"
>
> LD_LIBRARY_PATH=$CLANG_HOME/lib:$LD_LIBRARY_PATH
>
> CC=clang
>
> my helloworld program simply printfs omp_get_num_devices() after
> #including 
>
> it compiles fine; but when i run it i get the number of devices as 0.
>
> Does someone have any idea?
> Thanks much,
> Mani
>
___
cfe-users mailing list
cfe-users@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users