Page 3 of 3 FirstFirst 123
Results 21 to 29 of 29

Thread: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

  1. #21
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Next step in the ongoing saga ... I installed from the 12.1 runfile of CUDA. I made sure the MD5s matched and the install seemed to go smoothly. I wanted to verify the install and followed the instructions in the Nvidia guide. I used git to clone the samples at https://github.com/nvidia/cuda-samples. While some of the samples might be newer and closer to 12.3 compatibility, I thought at least some of the simpler samples (device_query, at least) should demonstrate that the CUDA install is in an operable state.

    I ran the make and at the bottom of a long output stream was the error pasted at the bottom. I don't recall mentioning but gcc is at 12.3.0. I think it should be recent enough, no? The original and eventual intent is to get a python usage of CUDA with Anaconda so I might consider bypassing gcc use but I'd be hesitant. If I can't get Python linked to CUDA, is it because the CUDA install didn't really work, or is it because the Python link or install is bad? Besides, it would be a confidence builder to verify that CUDA is not just installed but working. This has been quite an adventure - like a hurdle race. Every step requires jumping a hurdle before proceeding to the next. Any thoughts? Thanks, again, I appreciate it.

    -Rocky714

    /usr/local/cuda/bin/nvcc -ccbin g++ -I../../../Common -m64 --std=c++11 --threads 0 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_80,code=sm_80 -gencode arch=compute_86,code=sm_86 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_90,code=sm_90 -gencode arch=compute_90,code=compute_90 -o simpleAWBarrier.o -c simpleAWBarrier.cu
    /usr/local/cuda/bin/../targets/x86_64-linux/include/cuda/std/barrier(144): error: function "operator new" cannot be called with the given argument list
    argument types are: (unsigned long, cuda::std::__4::__barrier_base<cuda::std::__4::__e mpty_completion, 2> *)
    new (&__b->__barrier) __barrier_base(__expected);
    ^

    1 error detected in the compilation of "simpleAWBarrier.cu".
    make[1]: *** [Makefile:368: simpleAWBarrier.o] Error 255
    make[1]: Leaving directory '/home/michael/Downloads/CUDA/cuda-samples/Samples/0_Introduction/simpleAWBarrier'
    make: *** [Makefile:45: Samples/0_Introduction/simpleAWBarrier/Makefile.ph_build] Error 2

  2. #22
    Join Date
    Mar 2011
    Beans
    1,994

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Ubuntu 22.04 uses gcc 11.3 for building the system libraries. gcc-12 may be needed to build modules for kernel 6.5, which used the gcc-12, but not for CUDA samples, which will pick up the system libraries. Don't change the /bin/gcc link! Did you set PATH and LD_LIBRARY_PATH so the ...cuda/bin and ...cuda/lib are before the system areas?

  3. #23
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    I did set the PATH and LD_LIBRARY_PATH and had it set properly at the time I tried the MAKE:

    $ echo $LD_LIBRARY_PATH
    /usr/local/cuda-12.1/lib64

    and the path

    $ echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/cuda-12.1/bin:/snap/bin

    My gcc is at 12.3 as we updated earlier (you instructed in post #16 and others did elsewhere and I acknowledged and performed on post #17). The question becomes 'What do I do now?" If I backlevel gcc so I can compile the CUDA samples, I imagine I have some serious incompatibility risks. If I keep, I can't compile the CUDA samples? Seems like an intractable problem. Are there CUDA binaries for the combination of x86_64/CUDA/Nvidia_535/XXX ?

    I'm not sure what else might work.

    -Rocky714

  4. #24
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Just a follow up question but because I've been having so much trouble with this install (on my preferred platform), I initiated another attempt with a Windows box. I have an identically configured laptop on which I'm trying to install CUDA/Python of the same vintage and it gave me this idea. I'm having similar trouble there. I don't know diddly about Visual Studio but I want to verify the install there which I finally got through. I cloned the Nvidia samples git repository to the machine and tried to build the apps there according to Nvidia's instructions for CUDA 12.1.1. From what I could tell, the instructions direct you to build the entire the entire library of apps. That failed with an unrecognizable error. I then tried to build just the device-query app and the error said some things from CUDA 12.3 was missing. That suggests that I'm not going to succeed building from the current repository which is 12.3 focused if version 12.1.1 is my target.

    Can't I get the repository as it existed at the time of 12.1/12.1.1? That is what these repositories are designed for, isn't it? Incremental updates and versioning? I'm not that familiar with git to register that I want to clone the locked version of 12.1/12.1.1. How can I do that? That should solve the problem of both the Linux and Windows installations for at least the samples/verification step. Thanks in advance ... again.

    -Rocky714

  5. #25
    Join Date
    Mar 2011
    Beans
    1,994

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    The Nvidia instructions say to put the .../cuda/bin at the beginning of the PATH, not the end. At the beginning, you could easily select to override gcc with a link to whatever you wanted, but that should not be necessary in this case. I have the CUDA 12.3 + samples installed and compiled with gcc-11 (/bin/gcc), the default for Ubuntu 22.04. I don't bother with CUDA incremental updates, I periodically just install the latest version, but I really am not doing much with CUDA. The top level make for the samples may bump into a few samples that need a special library, or may require a lot of memory I don't have. The individual sample makefiles run just fine.

  6. #26
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    OK, I buy that I don't need to get the 12.1 version of the samples and that the current 12.3 samples should work. And I'll move the .../cuda/bin directory at the beginning of the path. But now that I've updated gcc to 12.3 which I needed to install the Nvidia drivers, how do I compile it with gcc-11? Do I backlevel to 11.x since I only needed 12 for the unitary purpose of the video drivers? Or is there a way to temporarily utilize gcc-11 on the samples and otherwise keeping gcc-12 on the expectation that it will be needed going forward?

    Sorry, but this is kind of uncharted territory for me. Thanks for the help.

    -Rocky714

  7. #27
    Join Date
    Mar 2011
    Beans
    1,994

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    Do not change your gcc (and g++) system defaults. For Ubuntu 22.04, /bin/gcc (and /bin/g++) should be links to the 11 version(s). The Nvidia module will use the correct version needed as long as the 12 versions are install (NOT as defaults). For a couple of weeks after the 6.5 kernel was released to the hwe packages, the dkms package for 22.04 didn't have a dependency on the gcc-12, so did not bring it in when needed. Without the 12 version, the module build would fail, but if the 12 version just happened to have been installed, the Nvidia module build would have worked. I can't speak for any other modules that might be needed since I don't use any. Simply reset the links, /bin/gcc and /bin/g++ to the 11 veresions. Then for CUDA do a make clean, to remove the 12 pollution, and then make should build working CUDA samples, using the default 11 versions. gcc-12 will be needed from this point forward to rebuild the Nvidia module for every kernel update (or video driver update). The 6.8 kernel will need gcc-13, so I hope by the time 6.8 hits the hwe packages, these little kinks will be ironed out.

  8. #28
    Join Date
    Jan 2024
    Beans
    14

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    I think I have a measure of success here. I fixed my path statement, adjusted the pointer of the compiler back to 11.4 (instead of having the default be 12.3 to build the Nvidia drivers). I compiled the "deviceQuery" function in the CUDA samples distribution and got the following when running it:

    CUDA Device Query (Runtime API) version (CUDART static linking)

    Detected 1 CUDA Capable device(s)

    Device 0: "Quadro P2000"
    CUDA Driver Version / Runtime Version 12.2 / 12.1
    CUDA Capability Major/Minor version number: 6.1
    Total amount of global memory: 4005 MBytes (4199677952 bytes)
    (006) Multiprocessors, (128) CUDA Cores/MP: 768 CUDA Cores
    GPU Max Clock rate: 1607 MHz (1.61 GHz)
    Memory Clock rate: 3004 Mhz
    Memory Bus Width: 128-bit
    L2 Cache Size: 1048576 bytes
    Maximum Texture Dimension Size (x,y,z) 1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
    Maximum Layered 1D Texture Size, (num) layers 1D=(32768), 2048 layers
    Maximum Layered 2D Texture Size, (num) layers 2D=(32768, 32768), 2048 layers
    Total amount of constant memory: 65536 bytes
    Total amount of shared memory per block: 49152 bytes
    Total shared memory per multiprocessor: 98304 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 2 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: Yes
    Supports Cooperative Kernel Launch: Yes
    Supports MultiDevice Co-op Kernel Launch: Yes
    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 = 12.2, CUDA Runtime Version = 12.1, NumDevs = 1
    Result = PASS


    I think CUDA and the Nvidia video driver are installed and compiled properly (mild HOORAHs are inside my brain after quite the struggle). Thanks all. The next step for me (other than follow any other recommendations suggested) is to try and get Anaconda and the required linkages needed to make sure Python can access CUDA. Any suggestions there are welcome as well.

    Thanks to all for all the help I was given. It was a battle for me (not a native programmer or Linuxer) but thanks for hanging in there with me.

    -Rocky714

  9. #29
    Join Date
    Mar 2011
    Beans
    1,994

    Re: CUDA 12.1.1 Nvidia 530 Ubu 22.04 LTS Package dependency problem on install

    You can use the thread tools at the top of the page to mark this as SOLVED. Good to see you got this working.

Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •