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/