<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Brecht, <div><br></div><div>Thanks for looking into this. This is actually an error introduced by myself. I was trying to get familiar with cycles code by playing with it and I added these three lines to void Session::update_status_time(bool show_pause, bool show_done) function:</div><div>tonemap();<br>progress.set_status("Writing Image", params.output_path);<br>display->write(device, params.output_path);<br>which now I understand are not supposed to be there. </div><div><br></div><div>I have one question though. I would like to be able to save the rendered image from cycles_standalone without invoking the GUI. However, the only function I can find for doing that is display->write(). I think display is a null object if cycles_standalone is run in background mode. So how do we save an image in background mode?</div><div><br></div><div>Thanks a lot,</div><div>Feng</div><div><br></div><div><br></div><div><br><div>> From: brechtvanlommel@pandora.be<br>> Date: Fri, 21 Feb 2014 15:42:04 +0100<br>> To: bf-cycles@blender.org<br>> Subject: Re: [Bf-cycles] CUDA error with Cycles_standalone<br>> <br>> Hi,<br>> <br>> I couldn't reproduce this problem on Mac OS X, I'm not sure what is<br>> going on. Perhaps your graphics card doesn't support an OpenGL feature<br>> that we use, but even then it's not clear to me why it would give this<br>> error.<br>> <br>> Which graphics card(s) do you have?<br>> <br>> Brecht.<br>> <br>> On Wed, Feb 19, 2014 at 12:05 AM, Zhanpeng Feng <jumpjump88@hotmail.com> wrote:<br>> > Hi,<br>> ><br>> > I was trying to use the cycles_standalone and and got the following error. I<br>> > am wondering if anyone has seen similar issues?<br>> > Error message:<br>> > D:\blenderSVN_2\cmake-build\bin\Debug>cycles --device cuda --samples 10<br>> > monkeyte<br>> > st.xml --output this.bmp<br>> > CUDA error: Invalid context in cuGraphicsMapResources(1,<br>> > &pmem.cuPBOresource, 0)<br>> ><br>> ><br>> > Refer to the Cycles GPU rendering documentation for possible solutions:<br>> > http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/GPU_Rendering<br>> ><br>> > CUDA error: Not mapped in cuGraphicsResourceGetMappedPointer(&buffer,<br>> > &bytes, pm<br>> > em.cuPBOresource)<br>> > CUDA error: Not mapped in cuGraphicsUnmapResources(1, &pmem.cuPBOresource,<br>> > 0)<br>> > CUDA error: Launch failed in cuCtxSynchronize()<br>> ><br>> > In the cycles standalone GUI I am able to see the rendering progresses and<br>> > the scene is actually being rendered fine. No error occurs until tonemap()<br>> > is called in the<br>> > void Session::update_status_time(bool show_pause, bool show_done) function<br>> > of session.cpp<br>> > else if(show_done) {<br>> > status = "Done";<br>> > tonemap();<br>> > progress.set_status("Writing Image", params.output_path);<br>> > display->write(device, params.output_path);<br>> > }<br>> > If I run it using --device cpu everything works fine.<br>> > Any help is appreciated.<br>> ><br>> > Thanks a lot,<br>> > Feng<br>> ><br>> > _______________________________________________<br>> > Bf-cycles mailing list<br>> > Bf-cycles@blender.org<br>> > http://lists.blender.org/mailman/listinfo/bf-cycles<br>> ><br>> _______________________________________________<br>> Bf-cycles mailing list<br>> Bf-cycles@blender.org<br>> http://lists.blender.org/mailman/listinfo/bf-cycles<br></div></div>                                            </div></body>
</html>