Hi all ,
i have recently installed matlab 2010 in an opensuse 11.2 64bit. Now i want to install the cuda plugin. i have already installed the sdk toolkit. Now i am trying to make the plugin but i haven’t managed to .
i changed the makek file as following:
Define installation location for CUDA and compilation flags compatible
with the CUDA include files.
CUDAHOME = /usr/local/cuda
SDK_HOME = /home/$(USER)/NVIDIA_CUDA_SDK
INCLUDEDIR = -I$(CUDAHOME)/include -I$(SDK_HOME)/common/inc
INCLUDELIB = -L$(CUDAHOME)/lib -lcufft -lcudart -Wl,-rpath,$(CUDAHOME)/lib
CFLAGS = -fPIC -D_GNU_SOURCE -pthread -fexceptions
COPTIMFLAGS = -O3 -funroll-loops -msse2
Define installation location for MATLAB.
export MATLAB = /home/dimitris/MATLAB
#export MATLAB = /Applications/MATLAB_R2007b
MEX = $(MATLAB)/bin/mex
MEXEXT = .$(shell $(MATLAB)/bin/mexext)
nvmex is a modified mex script that knows how to handle CUDA .cu files.
NVMEX = ./nvmex
List the mex files to be built. The .mex extension will be replaced with the
appropriate extension for this installation of MATLAB, e.g. .mexglx or
.mexa64.
MEXFILES = fft2_cuda.mex
fft2_cuda_sp_dp.mex
ifft2_cuda.mex
Szeta.mex
all: $(MEXFILES:.mex=$(MEXEXT))
clean:
rm -f $(MEXFILES:.mex=$(MEXEXT))
.SUFFIXES: .cu .cu_o .mexglx .mexa64 .mexmaci
.c.mexglx:
$(MEX) CFLAGS=‘$(CFLAGS)’ COPTIMFLAGS=‘$(COPTIMFLAGS)’ $<
$(INCLUDEDIR) $(INCLUDELIB)
.cu.mexglx:
$(NVMEX) -f nvopts.sh $< $(INCLUDEDIR) $(INCLUDELIB)
.c.mexa64:
$(MEX) CFLAGS=‘$(CFLAGS)’ COPTIMFLAGS=‘$(COPTIMFLAGS)’ $<
$(INCLUDEDIR) $(INCLUDELIB)
.cu.mexa64:
$(NVMEX) -f nvopts.sh $< $(INCLUDEDIR) $(INCLUDELIB)
.c.mexmaci:
$(MEX) CFLAGS=‘$(CFLAGS)’ COPTIMFLAGS=‘$(COPTIMFLAGS)’ $<
$(INCLUDEDIR) $(INCLUDELIB)
.cu.mexmaci:
$(NVMEX) -f nvopts.sh $< $(INCLUDEDIR) $(INCLUDELIB)
And the error i get:
dimitris@soxp37148c:~/Desktop/Matlab_Cuda_1.1> make
./nvmex -f nvopts.sh Szeta.cu -I/usr/local/cuda/include -I/home/dimitris/NVIDIA_CUDA_SDK/common/inc -L/usr/local/cuda/lib64 -lcufft -lcudart -Wl,-rpath,/usr/local/cuda/lib64
./nvmex: line 1412: .: nvopts.sh: file not found
./nvmex: line 1425: .: nvopts.sh: file not found
./nvmex: line 931: -c: command not found
mex: compile of 'Szeta.cu' failed.
make: *** [Szeta.mexa64] Error 1
dimitris@soxp37148c:~/Desktop/Matlab_Cuda_1.1> make
./nvmex -f nvopts.sh Szeta.cu -I/usr/local/cuda/include -I/home/dimitris/NVIDIA_CUDA_SDK/common/inc -L/usr/local/cuda/lib -lcufft -lcudart -Wl,-rpath,/usr/local/cuda/lib
./nvmex: line 1412: .: nvopts.sh: file not found
./nvmex: line 1425: .: nvopts.sh: file not found
./nvmex: line 931: -c: command not found
mex: compile of 'Szeta.cu' failed.
make: *** [Szeta.mexa64] Error 1