本文主要是介绍CUDA 问题解决 —— CUDA+MPI出错:mpi.h No such file or directory,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
在CUDA源文件里使用MPI时,编译出错
Makefile文件:
CUDA_INSTALL_PATH = /usr/local/cuda-8.0
MPI_INSTALL_PATH = /opt/intel/compilers_and_libraries_2017.0.098/linux/mpi/intel64
NVCC = $(CUDA_INSTALL_PATH)/bin/nvcc
MPICC = $(MPI_INSTALL_PATH)/bin/mpiccLIBS = -lcudart -lcurand -L$(CUDA_INSTALL_PATH)/lib64 -L$(MPI_INSTALL_PATH)/libCFILES = matadd.c
CUFILES = matadd_cuda.cu
OBJECTS = matadd.o matadd_cuda.o
EXECNAME = mataddall:$(MPICC) -c $(CFILES)$(NVCC) -c $(CUFILES)$(MPICC) -o $(EXECNAME) $(LIBS) $(OBJECTS)clean:rm -f *.o $(EXECNAME)
编译信息
[huangx@dl1 matadd_mpi]$ make
/opt/intel/compilers_and_libraries_2017.0.098/linux/mpi/intel64/bin/mpicc -c matadd.c
/usr/local/cuda-8.0/bin/nvcc -c matadd_cuda.cu
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are de
这篇关于CUDA 问题解决 —— CUDA+MPI出错:mpi.h No such file or directory的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!