From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Feb 07 2017 - 14:22:59 CST

Hi,
  Anything is possible, but the discussion would be be more informative
if you could be specific about what data you plan to put into the
shared memory arena? In general shared memory between processes is
non-portable among operating systems, so the code would have to be rewritten
several times to make it work on Windows, Linux, etc. Even on Linux systems
there are multiple variants one might use (e.g. SysV vs. BSD mmap() etc).

Aside from shared memory, there is always the possibility of simply using
network sockets, and they are cross-platform portable. You haven't said
anything about the size of the data you want to share nor what kind of
data it is, so it's hard to judge what strategies would make sense.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Feb 07, 2017 at 02:13:06PM -0600, Karl Decker wrote:
> Is it possible to share memory between two processes, one of which is VMD?
> I'm aware this is generally messy and dangerous, but it's one way to avoid
> writing large files to disk and slowing down the execution of the plugin
> we're designing. It would obviously take some effort to write the code for
> sharing the memory between two processes, but first I want to know: can
> VMD even be made to share its memory with another process?
>
> Alternatively, we are considering implementing a python plugin to VMD. Can
> VMD be made to share memory with a plugin?Â
>
> The memory we want to share is from VolMap, specifically a distance map
> generated in VolMap. The idea is to sidestep writing the map to disk
> because it takes too long.Â
>
> Thanks,
> Karl

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