Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- I am trying to compile a cuda code that I have received from Github (https://github.com/exafmm/exafmm-alpha).
- The Makefile.include contains:
- .SUFFIXES: .cxx .cu .f90 .o
- .PHONY: docs
- CUDA_INSTALL_PATH = /usr/local/cuda
- #DEVICE = cpu
- DEVICE = gpu
- CXX = mpicxx -g -O3 -lstdc++ -fPIC -fopenmp -ffast-math -funroll-loops -rdynamic -Wfatal-errors -I../include
- NVCC = nvcc -Xcompiler "-fopenmp -O3" -lstdc++ -use_fast_math -I../include
- FC = mpif90 -g -O3 -fPIC -fopenmp -funroll-loops -rdynamic -I../include
- FCC = mpif90 -c -O3 -fPIC -fopenmp -funroll-loops -rdynamic -I../include
- LFLAGS = -D$(DEVICE) -lstdc++ -ldl -lm
- LFLAGS += -lmpi_cxx
- LFLAGS += -lpthread
- ifeq ($(DEVICE),gpu)
- LFLAGS += -lcudart
- endif
- OBJECT = ../kernel/$(DEVICE)Laplace.o ../kernel/$(DEVICE)BiotSavart.o\
- ../kernel/$(DEVICE)Stretching.o ../kernel/$(DEVICE)Gaussian.o\
- ../kernel/$(DEVICE)CoulombVdW.o
- .cxx.o:
- $(CXX) -c $? -o $@ $(LFLAGS)
- .cu.o:
- $(NVCC) -c $? -o $@ $(LFLAGS)
- .f90.o:
- $(FC) -c $? -o $@
- And the Makefile is:
- include ../Makefile.include
- lib_parallel_ij: parallel_wrapper_ij.o $(OBJECT)
- ar -cr libfmm.a parallel_wrapper_ij.o $(OBJECT)
- ranlib libfmm.a
- test_parallel_ij: test_parallel_ij.o
- make lib_parallel_ij
- $(FC) $? -L. -lfmm $(LFLAGS)
- mpirun -np 2 ./a.out
- When I tried to compile the code, I get the following errors.
- mpif90 -g -O3 -fPIC -fopenmp -funroll-loops -rdynamic -I../include -c test_parallel_ij.f90 -o test_parallel_ij.o
- make lib_parallel_ij
- make[1]: Entering directory '/home/bidesh/panelCode/UVLM/NVLM_FMM/solver_single_rotor_try/exafmm-alpha-vortex/wrapper'
- mpicxx -g -O3 -lstdc++ -fPIC -fopenmp -ffast-math -funroll-loops -rdynamic -Wfatal-errors -I../include -c parallel_wrapper_ij.cxx -o parallel_wrapper_ij.o -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- nvcc -Xcompiler "-fopenmp -O3" -lstdc++ -use_fast_math -I../include -c ../kernel/gpuLaplace.cu -o ../kernel/gpuLaplace.o -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- nvcc -Xcompiler "-fopenmp -O3" -lstdc++ -use_fast_math -I../include -c ../kernel/gpuBiotSavart.cu -o ../kernel/gpuBiotSavart.o -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- ../kernel/gpuBiotSavart.cu(542): warning #177-D: variable "SQRT4PI" was declared but never referenced
- ../kernel/gpuBiotSavart.cu(548): warning #550-D: variable "r" was set but never used
- nvcc -Xcompiler "-fopenmp -O3" -lstdc++ -use_fast_math -I../include -c ../kernel/gpuStretching.cu -o ../kernel/gpuStretching.o -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- nvcc -Xcompiler "-fopenmp -O3" -lstdc++ -use_fast_math -I../include -c ../kernel/gpuGaussian.cu -o ../kernel/gpuGaussian.o -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- nvcc -Xcompiler "-fopenmp -O3" -lstdc++ -use_fast_math -I../include -c ../kernel/gpuCoulombVdW.cu -o ../kernel/gpuCoulombVdW.o -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- ar -cr libfmm.a parallel_wrapper_ij.o ../kernel/gpuLaplace.o ../kernel/gpuBiotSavart.o ../kernel/gpuStretching.o ../kernel/gpuGaussian.o ../kernel/gpuCoulombVdW.o
- ranlib libfmm.a
- make[1]: Leaving directory '/home/bidesh/panelCode/UVLM/NVLM_FMM/solver_single_rotor_try/exafmm-alpha-vortex/wrapper'
- mpif90 -g -O3 -fPIC -fopenmp -funroll-loops -rdynamic -I../include test_parallel_ij.o -L. -lfmm -Dgpu -lstdc++ -ldl -lm -lmpi_cxx -lpthread -lcudart
- ./libfmm.a(gpuLaplace.o): In function `LaplaceL2P_GPU(int*, int*, double*, double*)':
- tmpxft_0000397c_00000000-6_gpuLaplace.cudafe1.cpp:(.text+0xc2): undefined reference to `__cudaPopCallConfiguration'
- ....
- ./libfmm.a(gpuLaplace.o): In function `Kernel::LaplaceL2P()':
- tmpxft_0000397c_00000000-6_gpuLaplace.cudafe1.cpp:(.text+0x3e06): undefined reference to `__cudaPushCallConfiguration'
- ....
- ./libfmm.a(gpuCoulombVdW.o): In function `__sti____cudaRegisterAll()':
- tmpxft_00003a87_00000000-6_gpuCoulombVdW.cudafe1.cpp:(.text.startup+0x189): undefined reference to `__cudaRegisterFatBinaryEnd'
- ....
- I tried to find the installation of cuda:
- whereis cuda
- cuda: /usr/lib/cuda /usr/include/cuda.h /usr/local/cuda
- I could not fix the error, can anyone give any hint to fix it? Thank you.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement