You are not logged in.

#1 2023-12-17 07:26:14

vorlket
Member
Registered: 2017-09-30
Posts: 112

[Solved] Cuda installation for Nvidia Tesla K20c

Hi, I have two Nvidia Tesla K20c (Kepler series)s on my system. I installed the Nvidia driver according to the archlinux NVIDIA page. Now if I install the latest cuda and cuda-tools packages,

$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2023 NVIDIA Corporation
Built on Fri_Sep__8_19:17:24_PDT_2023
Cuda compilation tools, release 12.3, V12.3.52
Build cuda_12.3.r12.3/compiler.33281558_0

nvcc compiles but doesn't work (wrong output of the following program, it returns "The answer is 5" instead of "The answer is 14"):

#include <iostream>
#include <cuda.h>

using namespace std;

__global__ void AddIntsCUDA(int *a, int *b)
{
        a[0] += b[0];
}

int main()
{
        int a = 5;
        int b = 9;
        int *d_a, *d_b;

        cudaMalloc(&d_a, sizeof(int));
        cudaMalloc(&d_b, sizeof(int));

        cudaMemcpy(d_a, &a, sizeof(int), cudaMemcpyHostToDevice);
        cudaMemcpy(d_b, &b, sizeof(int), cudaMemcpyHostToDevice);

        AddIntsCUDA<<<1, 1>>>(d_a, d_b);

        cudaMemcpy(&a, d_a, sizeof(int), cudaMemcpyDeviceToHost);

        cout << "The answer is " << a << endl;

        cudaFree(d_a);
        cudaFree(d_b);

        return 0;
}

Now, the question is which cuda version from AUR do I need to install so that the cuda packages are compatible with the installed Nvidia drivers packages. Appreciate if could you please help me here. Thanks.

Last edited by vorlket (2023-12-18 00:13:04)

Offline

#2 2023-12-17 08:06:50

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: [Solved] Cuda installation for Nvidia Tesla K20c

Offline

#3 2023-12-17 08:51:49

vorlket
Member
Registered: 2017-09-30
Posts: 112

Re: [Solved] Cuda installation for Nvidia Tesla K20c

Offline

#4 2023-12-17 19:16:31

sl1pkn07
Member
From: Spanishtán
Registered: 2010-03-30
Posts: 371

Re: [Solved] Cuda installation for Nvidia Tesla K20c

these links also respond you question

keppler early up to 10.2
keppler late up to 11.8

Offline

Board footer

Powered by FluxBB