Seems like you don't want to invalidate the Import result; if you do you'll re-Import (and re-do everything downstream from there) each time you look to see if the file has changed.   You could have the signal that there's new data come from outside OpenDX.   You ought to look at the watchsocket example (in the set of outboard examples).  watchsocket.c contains source for a module that creates a socket and registers a procedure ("worker") to be called when data arrives on that socket.   When data arrives, the worker procedure reads the data off the socket and calls DXReadyToRun, which  invalidates the module's cache entry and triggers a re-execution.   In the subsequent execution the module outputs the new data.   There's a toy "simulation" accompanying the example  that connects to the socket and asynchronously dumps timestep data to it, causing OpenDX to read the data and execute.

You could use exactly this interface to create an on-line link between the source of the data thats currently going into the file and OpenDX, bypassing the file altogether.   Alternatively, you can create a little UI that fills in for the "simulator", presenting you with a button to hit when you want it to re-import the file.

Greg



Lloyd A Treinish/Watson/[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]

10/13/2003 12:44 PM
Please respond to opendx-users

       
        To:        [email protected]
        cc:        
        Subject:        Re: [opendx-users] How to invalidate DX cache







>From the VPE, you can manually turn cache off on a single or collection
(highlighted) modules (Edit->Output Cacheability).  This sets a flag in the
script that the VPE generates.  You can also start the executive with cache
turned off (-cache off), but you may want to have some modules cached.  The
VPE also had an option to optimize cache, which will turn off caching for
intermediate modules when only a later result is typically used, which is
then cached.  I'll often use that as a starting place prior to manually
tuning the cache for similar reasons as yours as well as others (knowing
the behaviour that I want, lowering memory utilization).  This has been
very effective at getting good performance out of very large networks using
many layers of macros.


Richard Guenther
<[EMAIL PROTECTED]>@opendx.watson.ibm.com on 10/13/2003
11:17:47 AM

Please respond to [email protected]

Sent by:    [EMAIL PROTECTED]


To:    [email protected]
cc:
Subject:    [opendx-users] How to invalidate DX cache



Hi!

I'd like to somehow (via the user interface, or routines from inside a DX
module) invalidate the DX cache. The problem is I want to monitor the same
file (which is changing) by doing re-execution of the network.
Unfortunately DX caches the result of the import module even after
Connection/ResetServer - only termination and restart of the server helps.
This is really annoying - is it even possible to somehow use the
modification time of the current file to trigger reexecution of a module?

Thanks,

Richard.

--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/




Reply via email to