Hi,

Did anyone of your used parallel search with Mozart 1.4.0? It appears there is a problem terminating processes forked by the parallel search. To make matters more complicated, this problem seems to happen only sometimes.

I am starting a parallel search from within the OPI. When I "halt" the OPI (C-. h) then sometimes forked processes keep running -- and potentially go on consuming all computational resources of the machine. Also the Search.parallel method close() does not reliably terminate forked processes.

See below for a small example. As I said, the problem only occurs sometimes, unfortunately. Sometimes both forked processes are terminated (so everything is fine), sometimes one, and sometimes both keep running. With version 1.3.2 I never had this problem (I ran the example many times with version 1.3.2, still I cannot prove that the did not exist in that version...).

Also, with version 1.3.2 the forked processes are showed almost exclusively as user CPU consumption. With 1.4.0, however, a considerable amount (> 50%) is shown as system CPU consumption, but this happens only if the processes cannot be terminated. In these cases, this system CPU consumption already occurs before any attempt to terminate the search.

So, it looks like parallel search is broken in Mozart 1.4.0. Any idea how to address this?

Thank you!

Best
Torsten

PS: I did all the tests on MacOS 10.4.11.

--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
Office: +44-1752-586219
Private: +44-1752-558917
http://strasheela.sourceforge.net
http://www.torsten-anders.de

%%%%%%%%%%%%%%%%%%%%%%%%%%


%% Parallel search problem, complex enough to keep running for a while :)
%% Forks two processes on localhost
declare
%% All-interval series length: larger L result in more complex CSPs
L = 36
functor ScriptFunctor
import FD
export Script
define
   proc {Script Sol}
      Xs Dxs
   in
      Sol =  Xs
      {AllIntervalSeries L Dxs Xs}
   end
   %% CSP
   proc {AllIntervalSeries L ?Dxs ?Xs}
      Xs = {FD.list L 0#L-1}
      Dxs = {FD.list L-1 1#L-1}
      for I in 1..L-1
      do
         X1 = {Nth Xs I}
         X2 = {Nth Xs I+1}
         Dx = {Nth Dxs I}
      in
         {InversionalEquivalentInterval X1 X2 L Dx}
      end
      {FD.distinctD Xs} 
      {FD.distinctD Dxs}
      %%
      {FD.distribute ff Xs}
   end
   %% Aux
   proc {InversionalEquivalentInterval Pitch1 Pitch2 L Interval}
      Aux = {FD.decl}
   in
      Aux =: Pitch2-Pitch1+L
      {FD.modI Aux L Interval}
   end
end
SearchEngine = {New Search.parallel init(localhost:2)}
{Browse {SearchEngine one(ScriptFunctor $)}}

{SearchEngine close}




_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to