From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Oct 19 2021 - 20:51:07 CDT

JC,
  Running out of memory in any of the GPU ray tracing cases is
fatal at present, particularly if the error code returned to
VMD by the API isn't clear about the exact cause. At the present
time, the only way to recover is to restart VMD, but I can probably
make that behave better with some work on the existing RT engine.

I've got a new ray tracing engine in development that is a complete rewrite,
and I expect it will be much better when it comes to issues like handling of
out-of-memory conditions. The new one is better in that regard
because it uses low-level CUDA for all memory management, and as a
result VMD will have a lot more control over how the GPU memory is
managed overall.

Best,
  John

On Wed, Oct 20, 2021 at 12:58:12AM +0000, Gumbart, JC wrote:
> This is great John! I'm already enjoying using it.
>
> It seems that once it runs out of GPU memory, there's no way to recover in RTRT mode (just get this message "An error occurred validating the context. Rendering is aborted."), although dropping back to GLSL works. I'm not sure if there's a better way to handle this other than needing to restart VMD?
>
> Thanks!
> JC
>
> > On Oct 19, 2021, at 2:27 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> >
> > Hi,
> > There are lots of things coming in new VMD builds.
> >
> > One of the new features that I know many people are
> > interested in is a new VMD full-time ray tracing display mode
> > that currently runs on NVIDIA GPUs, and allows you to
> > use interactive ray tracing in the main VMD graphical
> > interface full-time. Something that the new display mode
> > enables for the first time is the ability to animate
> > a trajectory while also using ray tracing features like
> > shadows, ambient occlusion lighting, etc.
> >
> > The new display mode is primarily designed to target
> > molecular scenes from structures of up to about one million
> > atoms or thereabouts. The RTRT rendering performance
> > depends greatly on whether there are reflective or
> > transmissive (transparent) objects in the scene, as they
> > have a mauch stronger impact on performance than atom
> > count does.
> >
> > Unlike OpenGL, the new RTRT display mode requires that the
> > entire VMD molecular scene as well as associated ray tracing
> > acceleration structure (bounding volume hierarchy) can fit
> > in the on-board GPU memory. This means that older GPUs that
> > have less than 6GB of memory are not well suited to RTRT mode.
> > For the best results, I recommend using recent NVIDIA GPUs
> > such as the original "Turing" RTX GPUs, or the most recent
> > "Ampere" GPU generation, although the new code will currently work
> > on any GPU generation all the way back to "Maxwell" (9xx series).
> >
> > For the time being, I'm calling this display mode
> > "Tachyon RTX RTRT" (RTX real-time ray tracing), because
> > it is currently specific to NVIDIA GPU hardware.
> > In VMD builds where it is available, it is listed in the
> > Display -> Rendermode menu, as "Tachyon RTX RTRT", and
> > is the menu entry immediately following "GLSL".
> >
> > In the current VMD RTRT test build, not every display primitive
> > is implemented in the interactive ray tracing code path, so
> > if/when you encounter those cases, you can just switch back
> > to "Normal" or "GLSL" when needed. This is primarily an issue
> > when rendering things like lines and points, that don't have
> > a directly analogous implementation in a ray tracing engine.
> > I'm expecting the RTRT implementation to continue to progress
> > rapidly in the next several weeks, and that user feedback about
> > bugs and existing limitations will be helpful.
> >
> > At present I have made the first RTRT-enabled VMD builds
> > for 64-bit Linux, although I expect that I will also be able to
> > make a 64-bit Windows build available at a later time.
> >
> > The first RTRT test build is posted here, at the top of the
> > alpha build page you'll see when you login:
> > https://www.ks.uiuc.edu/Development/Download/download.cgi?UserID=&AccessCode=&ArchiveID=1649
> >
> > Best regards,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> > --
> > 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/