ComputationalRadiationPhysics / cuda_memtest

Fork of CUDA GPU memtest :eyeglasses:
http://sourceforge.net/projects/cudagpumemtest
110 stars 31 forks source link

CUDA error: no kernel image is available for execution on the device #33

Closed Donatzsky closed 2 years ago

Donatzsky commented 2 years ago

I get the following error, whenever I try to run it:

11/21/2021 13:15:17][nis-arch][0]:Running cuda memtest, version 1.2.3
[11/21/2021 13:15:17][nis-arch][0]:NVRM version: NVIDIA UNIX x86_64 Kernel Module  470.86  Tue Oct 26 21:55:45 UTC 2021
[11/21/2021 13:15:17][nis-arch][0]:num_gpus=1
[11/21/2021 13:15:17][nis-arch][0]:Device name=NVIDIA GeForce GT 720, global memory size=2097283072, serial=unknown (NVML runtime error)
[11/21/2021 13:15:17][nis-arch][0]:major=3, minor=5
[11/21/2021 13:15:17][nis-arch][0]:Attached to device 0 successfully.
[11/21/2021 13:15:17][nis-arch][0]:Allocated 1495 MB
[11/21/2021 13:15:17][nis-arch][0]:Test0 [Walking 1 bit]
[11/21/2021 13:15:17][nis-arch][0]:ERROR: CUDA error: no kernel image is available for execution on the device, line 590, file /home/nis/Downloads/cuda_memtest-dev/tests.cu
[11/21/2021 13:15:17][nis-arch][0]:ERROR: CUDA error: no kernel image is available for execution on the device, line 590, file /home/nis/Downloads/cuda_memtest-dev/tests.cu
Donatzsky commented 2 years ago

The deviceQuery output:

Detected 1 CUDA Capable device(s)

Device 0: "NVIDIA GeForce GT 720"
  CUDA Driver Version / Runtime Version          11.4 / 11.5
  CUDA Capability Major/Minor version number:    3.5
  Total amount of global memory:                 2000 MBytes (2097283072 bytes)
  (001) Multiprocessors, (192) CUDA Cores/MP:    192 CUDA Cores
  GPU Max Clock rate:                            797 MHz (0.80 GHz)
  Memory Clock rate:                             800 Mhz
  Memory Bus Width:                              64-bit
  L2 Cache Size:                                 524288 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
  Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total shared memory per multiprocessor:        49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  2048
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
  Run time limit on kernels:                     Yes
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Managed Memory:                Yes
  Device supports Compute Preemption:            No
  Supports Cooperative Kernel Launch:            No
  Supports MultiDevice Co-op Kernel Launch:      No
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.4, CUDA Runtime Version = 11.5, NumDevs = 1
Result = PASS
psychocoderHPC commented 2 years ago

Thanks for opening the issue.

Could you please post the CMake command you used to compile cuda_memtest. It looks like you compiled the application for the wrong architecture. The architecture of your device is sm_35

To set the architecture use cmake -DCMAKE_CUDA_ARCHITECTURES=35 <path_to_cuda_memtest_dir>

Donatzsky commented 2 years ago

That fixed it. Thanks.

I simply used the instructions from the readme:

mkdir build
cd build
cmake ..
make

There should probably be some instructions on how to find and set the architecture. For a CUDA noob like me, that's not exactly obvious.

psychocoderHPC commented 2 years ago

@Donatzsky I extended the documentation with the required CMake flag and added a link to the list of architectures for NVIDIA gpus in #34

psychocoderHPC commented 2 years ago

I will close this issue because it is solved with https://github.com/ComputationalRadiationPhysics/cuda_memtest/issues/33#issuecomment-975282802