comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » IDL & UNIX pipes
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL & UNIX pipes [message #4613] Mon, 03 July 1995 00:00
ph2tjh is currently offline  ph2tjh
Messages: 2
Registered: June 1995
Junior Member
Can anyone suggest any solutions or sources of information for the
following problem I am encountering?

I am developing an IDL graphical interface for a very large suite
of FORTRAN programs. Basically the IDL spawns slightly modified
versions of the FORTRAN programs and then communicates with them
via a bi-directional UNIX pipe which is created using the UNIT keyword
to the SPAWN command. This process works fine on Sun and DEC machines,
but seems to fail on an HP 9000 (the development is for all 3 platforms).
Can anyone suggest a reason/solution for this?

The method I am using therefore has roughly the following form:

IDL: spawn, 'prog1.out', unit=pipe, /noshell, PID=pid

FORTRAN: WRITE(6, *) X, Y
CALL FLUSH(6) (FFLUSH for HP) - this flushes the pipe

IDL: dummy1 = 0.0
dummy2 = 0.0
readf, pipe, dummy1, dummy2
x = dummy1
y = dummy2

Experience has shown that it is necessary to regularly 'flush' the
UNIX pipe from the FORTRAN end and that it is also unwise to read
from the pipe directly into a useful variable. This process works
fine (as I said) on Sun and DEC machines, but on an HP 9000 all I
can get out of the pipe on the IDL end are zeroes or nothing at all.

Quite an esoteric question that, but any suggestions gratefully received.


Tim Hammond.

-----------
hammond@solg2.bnsc.rl.ac.uk
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Wanted: Census II X-11 seasonal adjustment algorithm
Next Topic: spherical points on an IDL surface plot

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 08:45:39 PDT 2025

Total time taken to generate the page: 1.35903 seconds