help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An engine for octave


From: Min Xu
Subject: Re: An engine for octave
Date: Thu, 22 Apr 1999 00:01:00 -0400

Hi, Bennett:

> The only problem I had with this approach is that there is not a good way
> in Octave to "load" a file from stdin (needed by engPutFull).  IIRC, the
> load will not terminate without an EOF, and the EOF character causes
> Octave to close stdin (or something like that, I never got around to
> investigating the problem in detail).  In any case, only the first load
> succeeds with this method.  

I took a similar approach and also had problems with put an array into octave.
The data is transfered using load -mat-binary from stdin of octave and the 
program just hangs there.

> The workaround I used was to create a fifo,
> and then pass the data through it. This is not a portable approach, since
> some UNIX systems will not allow ordinary users to create fifos.  A
> temporary file could also be used, but this is messy as well.  

But then the octave can only be at the same host as the caller, isn't it? I 
also tried fifo, I encountered strange error messages when I transfer data in 
mat-binary format and the program totally hangs whenever a huge matrix is 
being transfered.


> It would be
> nice if someone created a patch for Octave that allows `load -ascii "-"'
> to work (at least for a single matrix). 
> 

Sure. But load -mat-binary - is more desired, which preserves accuracy.


> What I have works, but it is basically a hack that sorely needs improving. 
> There is very little error checking, and if the calling C program exits or
> dies without closing the engine it has to be killed manually.
> 
> Since it seems others are interested in this, I will try to get it
> organized this weekend and post the code on the sources list.
> 

I am very interested. And others too. 

I have finally coded an ugly working version of engine which is used by an 
python module which interfaces to octave and data is exchanged between python 
and octave in mat-binary format. The array datatype used is PyArrayObject.




-- 
Min Xu                          
City College of NY, CUNY                
Email:  address@hidden
        address@hidden   
Tel:    (O) (212) 650-6865
        (O) (212) 650-5046
        (H) (212) 690-2119              




reply via email to

[Prev in Thread] Current Thread [Next in Thread]