From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jun 10 2020 - 11:16:17 CDT

Bart,
  Great. I'm going to go out on a limb and predict that the cause of
the memory consumption is a misbehavior of the OptiX RTX API for on-the-fly
geometry buffer release during acceleration structure building:
   rtGeometryTrianglesSetBuildFlags(geom_hwtri, RT_GEOMETRY_BUILD_FLAG_RELEASE_BUFFERS)

As per my other email, I've added an alternative code path for VMD that
avoids using that feature, and instead lets VMD manage the RTX triangle
geometry buffers itself. Having done so, my performance anomaly problem
went away, and I'm wondering if your memory leak issue will go away too...

I will do more testing here and if it continues to look promising, I will
make updated VMD test builds that have this modification and post them
later this week. In the mean time, keep testing with the
VMDOPTIXDESTROYCONTEXT flag set.

Best,
  John

On Wed, Jun 10, 2020 at 06:07:58PM +0200, Bart Bruininks wrote:
> The suggested solution did indeed solve the issue. Thanks!
> bash:
> export VMDOPTIXDESTROYCONTEXT=1
> Op wo 10 jun. 2020 om 17:58 schreef Bart Bruininks
> <[1]b.m.h.bruininks_at_rug.nl>:
>
> This occurs with OPTIX on and two graphics cards over a NIVE DCV
> service. If you would like, I could ask which exact version we are
> running for NICE. I added a short video which hopefully illustrates the
> issue clearly. I will see if the suggested helps and report the results
> when I have them.
>
> Op wo 10 jun. 2020 om 17:06 schreef John Stone <[2]johns_at_ks.uiuc.edu>:
>
> Bart,
> I haven't had the GPU run out of memory, but I've been observing an
> unexplained performance loss anomaly with a simple movie rendering
> test that just renders a virus scene in a tight loop a few hundred
> times. I haven't seen GPU memory use climb noticably in my test, but
> I will keep an eye out for this.
>
> If I understood your symptoms, you encounter the problem when RTX is
> enabled, but NOT if RTX is disabled?
>
> What happens if you set this environment variable before you run VMD:
> bash:
> export VMDOPTIXDESTROYCONTEXT=1
> csh:
> setenv VMDOPTIXDESTROYCONTEXT 1
>
> Best,
> John
>
> On Wed, Jun 10, 2020 at 03:05:10PM +0200, Bart Bruininks wrote:
> > Dear VMDers,
> > I am using the 1.9.4a42 build to render videos of trajectories
> on a
> > server. There used to be the issues that after a while frames
> would not be
> > written anymore. However, atm it seems all frames are written,
> but the
> > internal rendering data structures are not cleaned rendering
> between
> > frames. This causes my VRAM to get filled during successive
> renders and
> > eventually my GPUs kill themselves crashing VMD and sometimes
> taking some
> > other stuff with them (window manager etc.). I can understand
> that having
> > no free VRAM could result in such issues, but I guess it
> shouldn't build
> > up like that in the first place.
> > VMD:
> > 1.9.4a42
> > Nvidia Drivers:
> > NVIDIA-SMI 440.82 * Driver Version: 440.82 * * * CUDA
> Version: 10.2
> > GPU's:
> > OptiXRenderer) Creating OptiX window: 672 x 805..
> > OptiXRenderer) VMD TachyonL-OptiX Interactive Ray Tracer help:
> > OptiXRenderer) ===============================================
> > OptiXRenderer) Using 2 devices:
> > OptiXRenderer) [0] Quadro RTX 8000 * * * CUDA[0], 47.5GB
> RAM, KTO
> > OptiXRenderer) [1] Quadro RTX 8000 * * * CUDA[1], 47.5GB
> RAM
> > Cheers,
> > Bart
>
> --
> NIH Center for Macromolecular Modeling and Bioinformatics
> Beckman Institute for Advanced Science and Technology
> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> [3]http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> [4]http://www.ks.uiuc.edu/Research/vmd/
>
> References
>
> Visible links
> 1. mailto:b.m.h.bruininks_at_rug.nl
> 2. mailto:johns_at_ks.uiuc.edu
> 3. http://www.ks.uiuc.edu/~johns/
> 4. 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/