|
From: | Marcus G. Daniels |
Subject: | Re: [Swarm-Support] coupling swarm with matlab |
Date: | Mon, 03 Dec 2007 14:26:55 -0700 |
User-agent: | Thunderbird 2.0.0.9 (Windows/20071031) |
Gu, Zhaotao wrote:
If it is gigabytes of I/O a minute, then you probably should find a way to create a C function to call to get the boundary conditions. One idea would be to use this product (http://www.mathworks.com/products/compiler/) to compile your Matlab into object modules such that Swarm could call them from some `step' method.Thus the boundary conditions have to be regenerated throughout the whole simulation many times, and exchange input/outputwith MAS frequently.
Or, you might try the new xml-rpc module written this summer by Gennady Telegin. Here the idea would be have Matlab act as a client or server to a Swarm simulation acting as a server or a client.
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_external/f6010.html&http://www.google.com/search?hl=en&q=matlab+web+services&btnG=SearchAnother idea would be to represent the data in HDF5 and have one write to the HDF5 file and another read from it. HDF5 is designed for this sort of thing. And Matlab has what appears to be a primitive HDF5 interface
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/ref/hdf5.html&http://www.google.com/search?hl=en&q=matlab+hdf5&btnG=Google+SearchThe main issue here would be understanding what Swarm writes and expects for object serialization and duplicating that using the primitive HDF5 calls it has.
On the other hand, if it is megabytes a minute or less, then you might just read and write to ad-hoc text files.
Marcus
[Prev in Thread] | Current Thread | [Next in Thread] |