From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri Feb 13 2015 - 08:54:37 CST

Norman,
  Please try this experiment for me:
Set the environment variable VMDOPTIXBUILDER to "MedianBvh"
and try rendering the same scenes you have been rendering that
caused trouble. I'm suspicious that you have found some kind
of bug in the "Trbvh" builder in OptiX 3.6.x, because there were
a string of buglets that got fixed in "Trbvh" and I wonder if
there were still a few more hanging out there. Switching to
"MedianBvh" changes nothing that VMD does, but it changes which
acceleration structure builder OptiX uses internally, and the
"MedianBvh", while not as fast as "Trbvh" has been reliable for
me in VMD for a long time now, and has performed correctly in all
of the cases where "Trbvh" has broken.

Make sure you get the capitalization of the builder string correct
or OptiX will ignore it.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Fri, Feb 13, 2015 at 08:42:15AM +0100, Norman Geist wrote:
> John,
>
> the GPU has 2GB of VRAM. Nothing else, except KDE4 is running.
> Before starting VMD, nvidia-smi shows 158MB out of 2047MB used.
> After starting VMD, nvidia-smi shows 282MB out of 2047MB used.
>
> So rendering only the ruler then breaks the renderer. My 1st guess was that
> the "empty" ruler molecule
> having only drawn objects, doesn't have the expected molecule memory
> structure set up which TachyonOptix tries to
> transfer to the GPU. Therefore I tried the following, which will lead to the
> same error:
>
> 1. open fresh vmd
> 2. disable axis
> 3. mol new
> 4. graphics 0 sphere {1 1 1}
> 5. render using tachyonoptix
>
> Let me know if I can help to dig it down further.
>
> Norman Geist.
>
> > -----Original Message-----
> > From: John Stone [mailto:johns_at_ks.uiuc.edu]
> > Sent: Thursday, February 12, 2015 4:16 PM
> > To: Norman Geist
> > Cc: VMD Mailing List
> > Subject: Re: vmd-l: Handful of rendering issues
> >
> > Norman,
> > How much video memory does your GPU have?
> > What else are you running on the machine at the time that this
> > error occurs? (for example, is Google Chrome running? Other
> > instances of VMD? Anything else that uses the GPU at all?)
> >
> > Cheers,
> > John
> >
> > On Thu, Feb 12, 2015 at 09:44:34AM +0100, Norman Geist wrote:
> > > Hey John,
> > >
> > > the exact error message is:
> > >
> > > ERROR) OptiXRenderer) ERROR: Unknown error (Details: Function
> > "RTresult
> > > _rtContextLaunch2D(RTcontext, unsigned int, RTsize, RTsize)" caught
> > > exception: (bvhtools error)An unexpected memory allocation error
> > occurred in
> > > TrivialThrustAllocator, [21823538], [15270173]) (OptiXRenderer.C:1188
> > >
> > > GPU is a Geforce GTX660 (propritary NVidia driver version: 343.22)
> > >
> > > This error occurs for me doing the following steps:
> > >
> > > 1. open a fresh vmd
> > > 2. disable axis
> > > 3. enable ruler in scale mode
> > > 4. render using TachyonOptix (interactive or not)
> > >
> > > Norman Geist.
> > >
> > > > -----Original Message-----
> > > > From: John Stone [mailto:johns_at_ks.uiuc.edu]
> > > > Sent: Wednesday, February 11, 2015 5:21 PM
> > > > To: Norman Geist
> > > > Cc: 'Tristan Croll'; VMD Mailing List
> > > > Subject: Re: vmd-l: Handful of rendering issues
> > > >
> > > > Norman,
> > > >
> > > > On Wed, Feb 11, 2015 at 04:32:35PM +0100, Norman Geist wrote:
> > > > > 1. Using the "ruler" in "scale" mode, when nothing else
> > > > (including
> > > > > axis) is visible, TachyonOptix will crash.
> > > >
> > > > I don't get a crash when I do this on my system here, but I will
> > > > say that the rendering of the scale bar is pretty wacky due to
> > > > weaknesses in the scheme I used for setting cylinder radii for
> > OptiX
> > > > when drawing lines in VMD 1.9.2, something that still needs more
> > work.
> > > > Can you post the error message that VMD prints?
> > > > Without the error it's hard to say what's going on there for you.
> > > >
> > > > > 2. The general fact TachyonOptix will no more work
> > without
> > > > > restarting VMD, if it has crashed once.
> > > >
> > > > It depends. If the OptiX runtime runs out of GPU memory or other
> > > > scenarios that it can't bail out of, it will terminate rendering
> > and
> > > > usually destroy the OptiX context on its way down. In some of
> > these
> > > > cases,
> > > > the state of the CUDA context also gets destroyed, and VMD is not
> > able
> > > > to
> > > > recover it. There are also a lot of cases where VMD does recover
> > from
> > > > less serious issues, but unfortunately, I'd say that running the
> > GPU
> > > > out
> > > > of memory is one of the more common problems, particularly on a
> > machine
> > > > where other graphical apps are competing for resources (e.g. Google
> > > > Chrome,
> > > > a surprisingly resource hungry application, in terms of GPU
> > memory...)
> > > >
> > > > Cheers,
> > > > John
> > > >
> > > >
> > > > > Norman Geist.
> > > > >
> > > > >
> > > > >
> > > > > From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu]
> > On
> > > > Behalf
> > > > > Of Tristan Croll
> > > > > Sent: Wednesday, February 11, 2015 12:15 PM
> > > > > To: vmd-l_at_ks.uiuc.edu
> > > > > Subject: vmd-l: Handful of rendering issues
> > > > >
> > > > >
> > > > >
> > > > > Hi there,
> > > > >
> > > > >
> > > > >
> > > > > I have a few minor rendering-related issues/suggestions in VMD
> > > > 1.9.2:
> > > > >
> > > > >
> > > > >
> > > > > - If I have an isosurface visualised in the default point
> > > > representation
> > > > > and switch to GLSL rendermode, every point becomes a VERY
> > large
> > > > sphere and
> > > > > the system slows to a crawl.
> > > > >
> > > > >
> > > > >
> > > > > - When a wireframe is rendered in Tachyon the lines are of
> > course
> > > > replaced
> > > > > by thin cylinders. This works out nicely in the CPU-only
> > Tachyon
> > > > > (particularly if I use a transparent material, yielding a
> > nicely
> > > > > unobtrusive mesh), but the cylinder diameter is much larger in
> > > > > Tachyon-OptiX. Is it possible to shrink this, or is this one
> > of
> > > > the
> > > > > trade-offs that allows the renderer to be so blazingly fast?
> > > > >
> > > > >
> > > > >
> > > > > - When using the interactive renderer, closing the rendering
> > > > window with
> > > > > the mouse rather than pressing Esc or q crashes VMD.
> > > > >
> > > > >
> > > > >
> > > > > - I think it would be awesome if the interactive renderer had
> > an
> > > > option to
> > > > > render the scene at some multiple of the screen resolution,
> > for
> > > > when
> > > > > poster-quality images are needed.
> > > > >
> > > > >
> > > > >
> > > > > Cheers,
> > > > >
> > > > >
> > > > >
> > > > > Tristan
> > > > >
> > > > >
> > > >
> > > > --
> > > > NIH Center for Macromolecular Modeling and Bioinformatics
> > > > Beckman Institute for Advanced Science and Technology
> > > > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > > > http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> > > > http://www.ks.uiuc.edu/Research/vmd/
> >
> > --
> > NIH Center for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> > http://www.ks.uiuc.edu/Research/vmd/

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/