flatironinstitute / cufinufft

Nonuniform fast Fourier transforms of types 1 and 2, in 1D, 2D, and 3D, on the GPU
Other
83 stars 18 forks source link

compiling error #148

Closed zengletian1491 closed 1 year ago

zengletian1491 commented 1 year ago

My computer configurations: System: Ubuntu 20.04 Python version: 3.8.10 Nvidia driver version: 525.116.04 CUDA version: 11.3 GPU: Nvidia RTX A4000

When I type in "sudo make" to compile this repository, errors occur as follows:

yyy@yyy-ThinkStation-P520c:/home/Software/cufinufft$ sudo make [sudo] yyy 的密码: nvcc --device-c -c -std=c++14 -ccbin=g++ -O3 -arch=sm_70 -gencode=arch=compute_35,code=sm_35 -gencode=arch=compute_50,code=sm_50 -gencode=arch=compute_52,code=sm_52 -gencode=arch=compute_60,code=sm_60 -gencode=arch=compute_61,code=sm_61 -gencode=arch=compute_70,code=sm_70 -gencode=arch=compute_75,code=sm_75 -gencode=arch=compute_75,code=compute_75 -Wno-deprecated-gpu-targets --default-stream per-thread -Xcompiler "-fPIC -O3 -funroll-loops -march=native -std=c++14" -I/usr/local/cuda/include -Icontrib/cuda_samples -I include src/precision_independent.cu -o src/precision_independent.o /bin/sh: 1: nvcc: not found **make: * [Makefile:114:src/precision_independent.o] 错误 127

The lines 113 and 114 of the Makefile is in the following: %.o: %.cu $(HEADERS) $(NVCC) --device-c -c $(NVCCFLAGS) $(INC) $< -o $@

I do not know how to solve this problem. Could you give me a hand?Thanks very much!

garrettwrong commented 1 year ago

It appears make cannot find your nvcc (the CUDA compiler). This can occur if the CUDA toolkit is not installed or configured in your path correctly.

You can confirm whether this is the case by running which nvcc. If nvcc is not found you will need to install the CUDA toolkit. If it is found, this could be caused by using sudo if the toolkit was not configured for use as root. You should not need to run sudo make to build cufinufft, make should suffice.

zengletian1491 commented 1 year ago

OK. I typed in "make" and solved this problem. Thanks very much!