<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-reply;
        font-family:"Calibri","serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>WINEDEBUG=+trace doesn't really do anything. using
WINEDEBUG=trace+all (or just +all) will enable *lots* of debug output.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>However, what you want to do is to add something like this to your
cuda wrapper:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>At the beginning of the file, after the includes:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>WINE_DEFAULT_DEBUG_CHANNEL(cuda);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>Then in each function:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>void cudaSomething(int a, const char *b) {<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
TRACE(&quot;(%d, %s)\n&quot;, a, b);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>Then run your app with WINEDEBUG=+cuda<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'>That will give you some information how far the app gets in
talking to your wrapper and the native lib<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
wine-devel-bounces@winehq.org [mailto:wine-devel-bounces@winehq.org] <b>On
Behalf Of </b>Seth Shelnutt<br>
<b>Sent:</b> Monday, July 14, 2008 9:31 PM<br>
<b>To:</b> Michael Karcher; wine-devel@winehq.org<br>
<b>Subject:</b> Re: CUDA wrapper<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>We have tried to get the trace,
many different ways, but to no avail. I've read through everything on running a
trace of it and I've tried it with different files and it works fine but when we
try it with the folding client we don't get any trace. The <a
href="http://cudart.dll.so">cudart.dll.so</a> which is placed in the
/usr/local/lib/wine folder is being recognized by wine as we are not longer
getting the not implemented error but now it is just a matter of determining
what function it isn't liking. I've double check all the functions and they all
seem to be fine minus the 4 direct3d functions and 6 functions which contain
c++ coding. The 6 functions though involve copying memory, symbol size, and
channel format. They don't involve anything that would be needed to start the
folding client, they are all things that would cause a fault after the GPU has
started calculations, or so I am lead to believe.<br>
<br>
As always the latest code is available at <a
href="http://shelnutt.twomurs.com/patches/cuda/">http://shelnutt.twomurs.com/patches/cuda/</a>
and a 7z of it all at <a href="http://shelnutt.twomurs.com/patches/cuda.7z">http://shelnutt.twomurs.com/patches/cuda.7z</a><br>
<br>
zerix01@DeepThought:~/.wine/drive_c/Program
Files/Folding@home/Folding@home-gpu$ WINEDEBUG=+trace winedbg Folding@home.exe<br>
WineDbg starting on pid 0016<br>
start_process () at /media/md0/wine/wine/dlls/kernel32/process.c:904<br>
0x7b877d02 start_process+0xc2 [/media/md0/wine/wine/dlls/kernel32/process.c:904]
in kernel32: movl %esi,0x0(%esp)<br>
Unable to open file ''<br>
Wine-dbg&gt;n<br>
fixme:d3d:IWineD3DImpl_FillGLCaps OpenGL implementation supports 32 vertex
samplers and 32 total samplers<br>
fixme:d3d:IWineD3DImpl_FillGLCaps Expected vertex samplers + MAX_TEXTURES(=8)
&gt; combined_samplers<br>
fixme:win:EnumDisplayDevicesW ((null),0,0x33f40c,0x00000000), stub!<br>
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr
0xf7f80aaf<br>
Invalid address (0x7b877d07 start_process+0xc7) for breakpoint 0, disabling it<br>
Process of pid=0016 has terminated<br>
Wine-dbg&gt;quit<br>
zerix01@DeepThought:~/.wine/drive_c/Program
Files/Folding@home/Folding@home-gpu$ WINEDEBUG=+trace wine Folding@home.exe<br>
fixme:d3d:IWineD3DImpl_FillGLCaps OpenGL implementation supports 32 vertex samplers
and32 total samplers<br>
fixme:d3d:IWineD3DImpl_FillGLCaps Expected vertex samplers + MAX_TEXTURES(=8)
&gt; combined_samplers<br>
fixme:win:EnumDisplayDevicesW ((null),0,0x32f40c,0x00000000), stub!<br>
err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr
0xf7fddaaf<br>
zerix01@DeepThought:~/.wine/drive_c/Program
Files/Folding@home/Folding@home-gpu$<br>
<br>
<br>
Thanks,<br>
<br>
Seth Shelnutt<o:p></o:p></p>

<div>

<p class=MsoNormal>On Sun, Jul 13, 2008 at 5:26 AM, Michael Karcher &lt;<a
href="mailto:wine@mkarcher.dialup.fu-berlin.de">wine@mkarcher.dialup.fu-berlin.de</a>&gt;
wrote:<o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>No, thats boring. Your program
crahsed at address 0xf7fcaaf. IIRC code<br>
0xc0000005 is a general protection fault. After your program has<br>
crashed, the breakpoint wine automatically sets to catch program startup<br>
is not valid anymore (there is no program to break anymore), that causes<br>
the message you quoted.<br>
<br>
Whats strange is that the debugger does not catch the exception. While<br>
the first-chance event can be disabled, you should get a last-chance<br>
exception catch right before the program dies. See<br>
<a href="http://www.winehq.org/site/docs/winedev-guide/dbg-config"
target="_blank">http://www.winehq.org/site/docs/winedev-guide/dbg-config</a>
for more info<br>
about configuring the debugger.<br>
<br>
Have you tried a relay trace yet?<br>
<br>
Regards,<br>
<span style='color:#888888'>&nbsp;Michael Karcher</span><o:p></o:p></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</div>

</body>

</html>