nvmex.pl for matlab2008a Vista-64 on AMD64 updated pearl script needed matlab 2008a
[attachment=5958:attachment][attachment=5959:attachment]/wave.gif' class='bbc_emoticon' alt=':wave:' />

Latest update:
Works fine with CUDA 2.0 and driver 7.15.11.7455 (beta), see performance tests with Szeta.cu : results posted in CUDA on Vista
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Hi Members,

This is modified post:
Vista 64 only -> status success -> but this is brut force solution! /devil.gif' class='bbc_emoticon' alt=':devil:' />

[b]key words:
Vista-64
nvmex.pl
Szeta.cu
matlab 2008a
CUDA[/b]

[b][color=red]The objective of this post is to update the nvmex.pl pearl script for matlab 2008a …[/color][/b]

Here is my preliminary input:
In 64 bit environment all of the examples in the first part of the demo in the plug-in do compile and link just fine!
>> mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
>> mex fft2_cuda_sp_dp.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft
>> mex ifft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft

...but the problem is with the pearl nvmex.pl

The Mathworks did change couple of things in their directories and apparently couple libraries used by original nvmex.pl are no longer there. Therfore some people in this forum were reporting problems even with matlab ver. 2007. This also Applies to Win- XP32 OS...Confirmed same thing here... :wacko:

For background information:
The .sln projects from CUDA SDK 1.1 compile, link just fine under Vista-64 environment.

[b]latest news 3/22/2008 2pm EST[/b]
Brute force solution as for today:
assuming default installation of matlab in C: default installation of VC-2005 (pro) sp1 in C: drive VC-2005 must have latest patch for Vista ver. 8.0.50727.867 (vsvista.050727-8600)

matlab cuda plug in installed in toolbox folder
C:\Program Files\MATLAB\R2008a\toolbox\Matlab_CUDA_1.1

from matlab prompt run
>>!nvcc -IC:\cuda\include -c -D_WCHAR_T_DEFINED -Xcompiler "/c /Zp8 /GR /W3 /EHsc- /Zc:wchar_t- /DMATLAB_MEX_FILE /nologo" -IC:\PROGRA~1\MATLAB\R2008a\extern\include -D_WCHAR_T_DEFINED -Xcompiler "/MD /O2 /Oy- /DNDEBUG" -DMX_COMPAT_32 "C:\Program Files\MATLAB\R2008a\toolbox\Matlab_CUDA_1.1\Szeta.cu"

this will generate Szeta.obj in the same directory as Szeta.cu

you will see following printout ...
Szeta.cu
[color=orange]"c:\cuda\include\common_functions.h", line 55: warning: dllexport/dllimport
conflict with "clock" (declared at line 176 of "C:\Program Files
(x86)\Microsoft Visual Studio 8\VC\bin/..\INCLUDE\time.h");
dllimport/dllexport dropped
extern __declspec(__host__) __declspec(__device__) clock_t clock(void) ; [/color] ^

tmpxft_00000ad0_00000000-3.gpu
tmpxft_00000ad0_00000000-7.gpu
tmpxft_00000ad0_00000000-3.c
tmpxft_00000ad0_00000000-12.i

there is a conflict with CUDA common_funtions.h -> nVidia GURU please help /wave.gif' class='bbc_emoticon' alt=':wave:' /> ...but this is not fatal


than run ...
>> nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart

*.bat and nvmex.pl are the new ones attached to this post
for starters: put new nvmex.pl in matlab bin directory!

.....
you will se some debug comments ...
.....
Pearl at line 949
COMPILE FILES:
Target name is: Szeta.obj
Ln: 380 linking ...:
->: Running linker with arguments:

link /out:"Szeta.mexw64" /dll /export:mexFunction /MAP /LIBPATH:"C:\PROGRA~1\MATLAB\R2008a\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib /implib:C:\Users\KEDAR~1.MON\AppData\Local\Temp\mex_MFJ1Ga\templib.x /MACHINE:AMD64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib @C:\Users\KEDAR~1.MON\AppData\Local\Temp\mex_MFJ1Ga\mex_tmp.rsp C:\cuda\lib\cufft.lib C:\cuda\lib\cudart.lib

End info:

the Szeta.mexw64 mex will be in the same folder as Szeta.cu , the Szeta.obj will be erased!


please note that accelerated example
>> tic; FS_2Dturb(128,1,1,1); toc;
will not run correctly -> no CUDA support for Vista64 driver - yet[/COLOR]


The line# 363 in nvmex.pl is commented out ->
#my $messages = RunCmd("$COMPILER $args");

by executing nvcc within the pearl resulted in error
nvcc cannot find a supported cl version

Personally I have no clue why this is happening?
The vsvars32.bat was executed. It is probably some type of required compiler switch or opt flag who knows what ? /ermm.gif' class='bbc_emoticon' alt=':ermm:' />


Regards to all of you
and
happy new astronomical 2008 earth-sun event,
revera


Attachments:
revised bat and pl
[attachment=5958:attachment][attachment=5959:attachment]/wave.gif' class='bbc_emoticon' alt=':wave:' />



Latest update:

Works fine with CUDA 2.0 and driver 7.15.11.7455 (beta), see performance tests with Szeta.cu : results posted in CUDA on Vista

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



Hi Members,



This is modified post:

Vista 64 only -> status success -> but this is brut force solution! /devil.gif' class='bbc_emoticon' alt=':devil:' />



key words:

Vista-64

nvmex.pl

Szeta.cu

matlab 2008a

CUDA




The objective of this post is to update the nvmex.pl pearl script for matlab 2008a …



Here is my preliminary input:

In 64 bit environment all of the examples in the first part of the demo in the plug-in do compile and link just fine!

>> mex fft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft

>> mex fft2_cuda_sp_dp.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft

>> mex ifft2_cuda.c -IC:\CUDA\include -LC:\CUDA\lib -lcudart -lcufft



...but the problem is with the pearl nvmex.pl



The Mathworks did change couple of things in their directories and apparently couple libraries used by original nvmex.pl are no longer there. Therfore some people in this forum were reporting problems even with matlab ver. 2007. This also Applies to Win- XP32 OS...Confirmed same thing here... :wacko:



For background information:

The .sln projects from CUDA SDK 1.1 compile, link just fine under Vista-64 environment.



latest news 3/22/2008 2pm EST

Brute force solution as for today:

assuming default installation of matlab in C: default installation of VC-2005 (pro) sp1 in C: drive VC-2005 must have latest patch for Vista ver. 8.0.50727.867 (vsvista.050727-8600)



matlab cuda plug in installed in toolbox folder

C:\Program Files\MATLAB\R2008a\toolbox\Matlab_CUDA_1.1



from matlab prompt run

>>!nvcc -IC:\cuda\include -c -D_WCHAR_T_DEFINED -Xcompiler "/c /Zp8 /GR /W3 /EHsc- /Zc:wchar_t- /DMATLAB_MEX_FILE /nologo" -IC:\PROGRA~1\MATLAB\R2008a\extern\include -D_WCHAR_T_DEFINED -Xcompiler "/MD /O2 /Oy- /DNDEBUG" -DMX_COMPAT_32 "C:\Program Files\MATLAB\R2008a\toolbox\Matlab_CUDA_1.1\Szeta.cu"



this will generate Szeta.obj in the same directory as Szeta.cu



you will see following printout ...

Szeta.cu

"c:\cuda\include\common_functions.h", line 55: warning: dllexport/dllimport

conflict with "clock" (declared at line 176 of "C:\Program Files

(x86)\Microsoft Visual Studio 8\VC\bin/..\INCLUDE\time.h");

dllimport/dllexport dropped

extern __declspec(__host__) __declspec(__device__) clock_t clock(void) ; ^



tmpxft_00000ad0_00000000-3.gpu

tmpxft_00000ad0_00000000-7.gpu

tmpxft_00000ad0_00000000-3.c

tmpxft_00000ad0_00000000-12.i



there is a conflict with CUDA common_funtions.h -> nVidia GURU please help /wave.gif' class='bbc_emoticon' alt=':wave:' /> ...but this is not fatal





than run ...

>> nvmex -f nvmexopts.bat Szeta.cu -IC:\cuda\include -LC:\cuda\lib -lcufft -lcudart



*.bat and nvmex.pl are the new ones attached to this post

for starters: put new nvmex.pl in matlab bin directory!



.....

you will se some debug comments ...

.....

Pearl at line 949

COMPILE FILES:

Target name is: Szeta.obj

Ln: 380 linking ...:

->: Running linker with arguments:



link /out:"Szeta.mexw64" /dll /export:mexFunction /MAP /LIBPATH:"C:\PROGRA~1\MATLAB\R2008a\extern\lib\win64\microsoft" libmx.lib libmex.lib libmat.lib /implib:C:\Users\KEDAR~1.MON\AppData\Local\Temp\mex_MFJ1Ga\templib.x /MACHINE:AMD64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib @C:\Users\KEDAR~1.MON\AppData\Local\Temp\mex_MFJ1Ga\mex_tmp.rsp C:\cuda\lib\cufft.lib C:\cuda\lib\cudart.lib



End info:



the Szeta.mexw64 mex will be in the same folder as Szeta.cu , the Szeta.obj will be erased!





please note that accelerated example

>> tic; FS_2Dturb(128,1,1,1); toc;

will not run correctly -> no CUDA support for Vista64 driver - yet[/COLOR]





The line# 363 in nvmex.pl is commented out ->

#my $messages = RunCmd("$COMPILER $args");


by executing nvcc within the pearl resulted in error

nvcc cannot find a supported cl version



Personally I have no clue why this is happening?

The vsvars32.bat was executed. It is probably some type of required compiler switch or opt flag who knows what ? /ermm.gif' class='bbc_emoticon' alt=':ermm:' />





Regards to all of you

and

happy new astronomical 2008 earth-sun event,

revera





Attachments:

revised bat and pl

#1
Posted 03/21/2008 01:02 AM   
Scroll To Top