"Source: Text/System/Par.text";
"Line: 2872";
"Date: Mon May 29 16:04:52 2023";
"Main: Thu May 25 10:02:38 2023";
// original file: Text/System/Par.text, line: 2872
// Example: H5E33 ()
print "Example: H5E33";
ei := GetEchoInput();
SetEchoInput(true);
// no-test
group_tasks_hundred := function(n)
    return < 0, 0 >, [ 100*n - 99 .. 100*n ];
end function;
update_group_maxval := function(item, task, tresult, gresult)
    n, niters, maxval := Explode(tresult);
    if maxval ge 6000*item then
        return < maxval, n >, [], true;
    else
        return gresult, [], false;
    end if;
end function;
incomplete_group_maxval := function(item, gresult)
    return false;
end function;
socket := Socket(: LocalHost := "circle", LocalPort := 10000);
DistributedManager(socket, [1..10] :
    initial_results := [* *],
    group_tasks := group_tasks_hundred,
    update_group := update_group_maxval,
    incomplete_group := incomplete_group_maxval
);
delete socket;        // ensure that workers terminate
SetEchoInput(ei);
