From: Oliver Woodford on 19 Nov 2009 04:50 "Thomas " wrote: > Any comments, thoughts or suggestions how to fix this mess? I use nvcc to compile each .cu to a .cpp file as follows: nvcc -I"MATLABROOT/extern/include" --cuda file.cu --output-file temp_a34b7.cpp (Replace MATLABROOT, file.cu and temp_a34b7.cpp with the correct thing for you.) I then use mex to compile the .cpp files, making sure to include the relevant libraries (and their paths). It works for me (with cuda 2.3 on both linux and Windows), but I haven't tried it extensively. HTH, Oliver
From: dsss on 19 Nov 2009 15:01 On Nov 12, 5:01 pm, "Thomas " <tgutz...(a)ee.uwa.edu.au> wrote: > Hi, > same problem for me. > I've got Windows7 64 bit, Matlab2008b, Cuda2.3 and I'm getting the same 6 unresolved externals. > ??? Error using ==> nvmex at 206 > Unable to complete successfully. > > Which is where I gave up. > > Any comments, thoughts or suggestions how to fix this mess? > Tom I'm running into the same issues -- did you happen to try naming the ARCH as AMD64 anywhere?
From: dsss on 19 Nov 2009 15:28 On Nov 12, 5:01 pm, "Thomas " <tgutz...(a)ee.uwa.edu.au> wrote: > Hi, > same problem for me. > I've got Windows7 64 bit, Matlab2008b, Cuda2.3 and I'm getting the same 6 unresolved externals. > > "Oliver Woodford" <o.j.woodford...(a)cantab.net> wrote in message <h9sm4g$ih...(a)fred.mathworks.com>... > > "mklcst Costola" wrote: > > > > I get this error: > > > > Note that only Visual Studio compilers are supported. > > > Creating cudamexopts.bat based on mexopts.bat... > > > Creating cuda_mex.pl based on mex.pl... > > > ??? Error using ==> fprintf > > > Invalid file identifier. Use fopen to generate a valid file identifier. > > > > Error in ==> setup_cuda_mex at 73 > > > fprintf(fid_cuda_mex, '%s', line); > > This is because you're not allowed to write to $matlabroot/bin/ > I got the same error, so I created the file somewhere else and moved it there as administrator. > Unfortunately, I couldn't compile the example:>> cuda_mex example.cu > > WARNING: $ARCH (UNKNOWN) not set correctly [win64] > > C:\PROGRA~1\MATLAB\R2008B\BIN\CUDA_MEX.PL: > Error: Using options file: > C:\Users\tom\AppData\Roaming\MathWorks\MATLAB\R2008b\cudamexopts.bat > You cannot use this file with the UNKNOWN architecture because it enables > a compiler for a different architecture. > Running mex -setup may resolve this problem. > > ??? Error using ==> cuda_mex at 213 > Unable to complete successfully. > > It doesn't seem to like the -win64 option passed to cuda_mex.pl > > I then tried compiling the example with the nvmex.m / nvmex.pl combination that came with the MATLAB_CUDA_1.1 package but that wouldn't work either: > nvmex -f nvmexopts.bat example.cu -I"C:\Program Files\CUDA\include" -L"C:\Program Files\CUDA\lib" -lcufft -lcudart > Undefined subroutine &main::uuidgen called at C:\Program Files\MATLAB\R2008b\bin\nvmex.pl line 728. > ??? Error using ==> nvmex at 206 > Unable to complete successfully. > > So I installedhttp://search.cpan.org/~caugustin/UUID-Tiny-1.02/lib/UUID/Tiny.pmto C:\Program Files\MATLAB\R2008b\sys\perl\win32\lib\UUID\, included a 'use UUID::Tiny;' at the top of nvmex.pl, added the following line above line 728: > my $uuid = create_UUID_as_string(UUID_V1); > and replaced uuidgen() with $uuid > This got me to the next error:>> nvmex -f nvmexopts.bat example.cu -I"C:\Program Files\CUDA\include" -L"C:\Program Files\CUDA\lib" -lcufft -lcudart > > uuid: 2e701816-d000-11de-82de-cbe830d9e0fc > WARNING: $ARCH (UNKNOWN) not set correctly [win64] > > C:\PROGRA~1\MATLAB\R2008B\BIN\NVMEX.PL: > Error: Using options file: > nvmexopts.bat > You cannot use this file with the UNKNOWN architecture because it enables > a compiler for a different architecture. > Choose a file that is compatible with the UNKNOWN architecture. > > ??? Error using ==> nvmex at 206 > Unable to complete successfully. > > Which is where I gave up. > > Any comments, thoughts or suggestions how to fix this mess? > Tom I'm putzing through this, so I'll document a bit: need to change line 156 to: ($main::matlabroot = $main::cmd_name) =~ s%\\bin\\nvmex.pl$%%; Now, my error is: nvcc fatal : Cannot find compiler 'cl.exe' in PATH
First
|
Prev
|
Pages: 1 2 3 Prev: Saving a matrix to mySQL using mYm Next: Merge matrix with strings in text file |