From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Dec 11 2019 - 08:22:01 CST

Hi Stefan,
  The behavior of OptiX actually depends greatly on the particular
version being used. At present VMD has no control over what OptiX does
with its cache directory, VMD doesn't actually know about it.
OptiX purposefully leaves the shader cache directory across runs as a
significant performance optimization. If it is deleted, it defeats
the entire purpose of having the cache directory in the first place.
On some versions of OptiX, the shader recompilation runtime can be
quite high. I've seen it reach as much as a minute for VMD in the past.

Prior versions of OptiX placed this cache in the user's home directory,
which was a better choice in the sort of situation you describe.
The more recent versions behave in roughly the way you describe,
but is complicated by the fact that not all Linux distributions
even have a "/var/tmp" directory, and OptiX will then make some other
choice.

Fortunately, recent revs of OptiX that have relocated the cache directory
also accept an environment variable that you can set that will allow you
to override its default behavior, so that you can force the selection
of a user-specified cache directory path:
  OPTIX_CACHE_PATH

You should be able to set the OPTIX_CACHE_PATH environment variable
prior to running VMD and that will cause OptiX to use the specified
path for its cache. If you choose a directory name that is user-specific,
this should address the conflict your students have encountered.

Best regards,
  John Stone
  vmd_at_ks.uiuc.edu

On Wed, Dec 11, 2019 at 08:59:17AM +0100, Stefan Boresch wrote:
>
> Hi,
>
> first, I tried searching the mailing list archive, but I cannot
> get the sorted indices (by date, thread ..); only the raw messages.
>
> Now the real question/problem:
>
> I am just running a small course in which, among other
> software, we use vmd-1.9.4a38 (Linux 64bit optix etc). When starting
> up, the Optix Diskcache is place in /var/tmp/OptixCache, owned by
> $USER.$GROUP and 750 permissions. This cache file never gets removed,
> so even though user A quits vmd, logs out, a later user B when
> staring up vmd only sees the error message that no Optix context
> could be created.
>
> According to the Optix manual, the default location (under Linux)
> for the cache should be /var/tmp/OptixCache_$USER which would
> already solve the problem (though I'd still prefer if vmd cleaned up
> after itself and not rely on /var/tmp being cleaned upon reboot, which,
> fortunately, is a rare event). The manual also lists an environment
> variable to override this, but upon a quick check this had/has no
> effect on vmd's behavior.
>
> Or am I missing something (as I said I seem not to be able to
> search/skim the mailing list archive at the moment)?
>
> Best,
>
> Stefan

-- 
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/