It is actually a very good way to communicate between processes that do not
have much in conmon.

Set up control folder(s) to receive control files.

Start each run with an empty folder.

Sometimes even pass information in the control files.

You do not be very poor to use this method.

It makes for an easy and clean setup.

You can even use this method to control J processes and have one control
others.

You do not have a J process running more than once in a while started by
some batch service.

-
Björn Helgason
gsm:6985532
skype:gosiminn
On 20.4.2014 14:40, "Joe Bogner" <[email protected]> wrote:

> An alternative to wait is to have the R script output a file when done. J
> can poll for the exisitence of the file. Not as clean but is a common poor
> mans synchronization approach
> On Apr 20, 2014 2:18 AM, "Piet de Jong" <[email protected]> wrote:
>
> > I get this: (after a short dela)
> >
> >
> >
> >  2!:3{.([smoutput)2!:2 'sleep 3'
> >
> > 69205 140735294190544 0
> >
> > |interface error
> >
> > | 2!:3{.([smoutput)2!:2'sleep 3'
> >
> >
> > What could be the problem with my system?
> >
> > Thanks for all the help.
> >
> >
> >
> >
> >
> > On Sun, Apr 20, 2014 at 12:01 PM, Raul Miller <[email protected]>
> > wrote:
> >
> > > Oops, you are correct. I apologize, I was working from memory and I
> > > misremembered the meanings of these foreigns.
> > >
> > > Here's something to try:
> > >    2!:3{.([smoutput)2!:2 'sleep 3'
> > >
> > > Here's what I get when I try that:
> > >
> > > 24283 144488800 144489160
> > > 0
> > >
> > > (And there's a delay between the two lines.)
> > >
> > > If you do not get similar behavior, I imagine that that indicates some
> > > problem with your system.
> > >
> > > Thanks,
> > >
> > > --
> > > Raul
> > >
> > > On Sat, Apr 19, 2014 at 8:18 PM, Piet de Jong <[email protected]>
> > wrote:
> > > >   2!:3 '/Library/Frameworks/...    NB.  .... stands for all the rest
> > > >
> > > >
> > > > |domain error
> > > >
> > > >
> > > >
> > > >
> > > > On Sun, Apr 20, 2014 at 9:55 AM, Raul Miller <[email protected]>
> > > wrote:
> > > >
> > > >> Try:
> > > >>
> > > >> 2!:3 '/Library/Frameworks/R.framework/Resources/bin/R
> > > >>
> > > >>
> > >
> >
> CMD/Library/Frameworks/R.framework/Versions/2.12/Resources/library/Rserve/libs/i386/Rserve-bin.so
> > > >> --no-save'
> > > >>
> > > >> Thanks,
> > > >>
> > > >> --
> > > >> Raul
> > > >>
> > > >>
> > > >> On Sat, Apr 19, 2014 at 7:46 PM, Piet de Jong <[email protected]>
> > > wrote:
> > > >> > But isn't pid defined in my first statement?  ie.
> > > >> >
> > > >> > pid=.{. 2!:2 '/Library/....
> > > >> >
> > > >> > Maybe I am misunderstanding.
> > > >> >
> > > >> >
> > > >> > On Sun, Apr 20, 2014 at 9:39 AM, Raul Miller <
> [email protected]
> > >
> > > >> wrote:
> > > >> >
> > > >> >> pid is a result from 2!:2 and I think you want its argument?
> > > >> >>
> > > >> >> Thanks,
> > > >> >>
> > > >> >> --
> > > >> >> Raul
> > > >> >>
> > > >> >>
> > > >> >> On Sat, Apr 19, 2014 at 7:31 PM, Piet de Jong <
> > [email protected]
> > > >
> > > >> >> wrote:
> > > >> >> > I call R  from J  and use the following setup to initiate the R
> > > >> interface
> > > >> >> >
> > > >> >> >  load 'stats/r/rserve'
> > > >> >> >
> > > >> >> > pid=.{. 2!:2 '/Library/Frameworks/R.framework/Resources/bin/R
> > > >> >> >
> > > >> >>
> > > >>
> > >
> >
> CMD/Library/Frameworks/R.framework/Versions/2.12/Resources/library/Rserve/libs/i386/Rserve-bin.so
> > > >> >> > --no-save'
> > > >> >> >
> > > >> >> >
> > > >> >> > Everything works fine.
> > > >> >> >
> > > >> >> >
> > > >> >> > However I want to "wait" for process with pid to finish and
> > > according
> > > >> to
> > > >> >> > the documentation I can  use
> > > >> >> >
> > > >> >> >
> > > >> >> > 2!:3 pid
> > > >> >> >
> > > >> >> >
> > > >> >> > However this results in an interface error.
> > > >> >> >
> > > >> >> >
> > > >> >> > What am I doing wrong?
> > > >> >> >
> > > ----------------------------------------------------------------------
> > > >> >> > For information about J forums see
> > > >> http://www.jsoftware.com/forums.htm
> > > >> >>
> > > ----------------------------------------------------------------------
> > > >> >> For information about J forums see
> > > http://www.jsoftware.com/forums.htm
> > > >> >>
> > > >> >
> > ----------------------------------------------------------------------
> > > >> > For information about J forums see
> > > http://www.jsoftware.com/forums.htm
> > > >>
> ----------------------------------------------------------------------
> > > >> For information about J forums see
> > http://www.jsoftware.com/forums.htm
> > > >>
> > > >
> ----------------------------------------------------------------------
> > > > For information about J forums see
> http://www.jsoftware.com/forums.htm
> > > ----------------------------------------------------------------------
> > > For information about J forums see http://www.jsoftware.com/forums.htm
> > >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to