Tag Archives: Cuda

Vs2019: solution nvcc total: cannot find compiler‘ cl.exe ‘ in PATH

vs2019:nvcc fatal : Cannot find compiler ‘ cl.exe ‘ in PATH

Three steps:

    Step 1:
    add the following two positions to the nameless variable path list of system variables
    Step 2:
    create a new variable named Lib, add three locations for it: C: program files (x86), Microsoft Visual Studio, 2019, community, VC, tools, MSVC, 14.27.29110, lib, x64
    C: program files (x86), windows kits, 10, lib, 10.0.18362.0, ucrt, x64
    C: Program files (x86), windows kits, 10, lib, 10.0.18362.0, um, x64 step 3:
    create a new variable named include in the system variable, and add 2 Location: C: program files (x86) – Microsoft Visual Studio (2019) – Community (VC) – tools – MSVC (14.27.29110) – include
    C: program files (x86) – Windows kits (10) – lib (10.0.18362.0) – ucrt

Reference article: http://iliutong.cn/2019/01/20/nvcc-cu-file-in-console-in-windows/

Solutions for undefined reference to ‘xxx’ encountered during linking

The solution of undefined reference to ‘xxx’ encountered when linking.

Note: when adding the library, remember to add the address of the library.

1.undefined reference to `cuInit’

Plus Library

-lcuda

 

2.  undefined reference to symbol ‘_ ZN5boost6system15system_ categoryEv’

Solution: Add Link Library:

-lboost_system

3.undefined reference to ‘cv::String::allocate(unsigned long)’

Solution: Add Link Library:

-lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_videoio -lopencv_imgcodecs

[UNK]

[UNK]

[UNK]

[UNK]

[UNK]

[UNK]

Solutions for permission denied

Get an installation file that ends with. Run and give it executable permission. If the SELinux module is enabled, please disable it first!

For example:

# chmod +x NVIDIA-Linux-x86_ 64-295.59.run

When pasting files to a directory (myresources), such a prompt appears

Permission denied

The permission is not set, just copy and paste a file, how can it be like this?

solutions:

$ sudo chmod -R 777 myResources

Among them,
– R refers to all subdirectories and files cascaded to the directory,
777 means that all users have the highest permissions

When vs2017 compiles CUDA project, “error msb6006:“ cmd.exe ”Exited with code 1 Solutions for

Recently, the system was reinstalled because the computer was too jammed. In order to avoid repeating the same mistake, there is almost no software installed in C disk, including VS. However, when using CMAKE to compile CUDA program, there are problems:
Error MSB6006: “cmd.exe” has exited with code 1.
Google found that it should be because the default VS installation path of CUDA is on C disk, so it could not be found. The solution is to find the CUDA_HOST_COMPILER item in cmake-gui and change it to your own compiled path, such as mine:

This should compile properly.

CONDA 3090 install tenslow GPU report error importerror: libcublas.so .9.0: cannot open shared object file

ImporError: libcublas.so.9.0: Cannot open shared object file: No such file or directory
The complete installation of TensofLow2.x creates the environment to go into the environment and install the TensorFlow test environment

background
Graphics card 3090 GeForce RTX driver version 455.23.04 CUDA version 11.1
why
cudatoolkit/ code>> is not installed in the Conda environment, use the install command

conda install cudatoolkit

A complete installation of tensoflow2.x
Create an environment

conda create -n tensorflow-gpu python=3.8 cudatoolkit

Into the environment

conda activate tensorflow-gpu

Install tensorflow

pip install tensorflow -i https://pypi.tuna.tsinghua.edu.cn/simple

The test environment

import tensorflow as tf
tf.test.is_gpu_available()

CUDA error:out of memory

Today, when I was running the program, I kept reporting this error, saying that I was out of CUDA memory. After a long time of debugging, it turned out to be
 
At first I suspected that the graphics card on the server was being used, but when I got to mvidia-SMi I found that none of the three Gpus were used. That question is obviously impossible. So why is that?
 
Others say the TensorFlow and Pytorch versions conflict. ?????I didn’t get TensorFlow
 
The last reference the post: http://www.cnblogs.com/jisongxie/p/10276742.html
 

Yes, Like the blogger, I’m also using a No. 0 GPU, so I don’t know why my Pytorch process works. I can only see a no. 2 GPU physically, I don’t have a no. 3 GPU. So something went wrong?
 
So I changed the code so that PyTorch could see all the Gpus on the server:

OS. Environ [‘ CUDA_VISIBLE_DEVICES] = ‘0’
 
Then on the physics of no. 0 GPU happily run up ~~~