"Source: Text/System/Par.text";
"Line: 2775";
"Date: Thu Jul 13 10:19:10 2023";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/System/Par.text, line: 2775
// Example: H5E32 ()
print "Example: H5E32";
ei := GetEchoInput();
SetEchoInput(true);
// no-test
group_tasks_hundred := function(n)
    return < 0, 0 >, [ 100*n - 99 ];
end function;
update_group_maxval := function(item, task, tresult, gresult)
    n, niters, maxval := Explode(tresult);
    assert task eq n;
    if gresult[1] lt maxval then
        gresult := < maxval, n >;
    end if;
    done := IsDivisibleBy(n, 100);
    tasks := done select [] else [ task + 1 ];
    return gresult, tasks, done;
end function;
socket := Socket(: LocalHost := "circle", LocalPort := 10000);
DistributedManager(socket, [1..10] :
    group_tasks := group_tasks_hundred,
    update_group := update_group_maxval
);
SetEchoInput(ei);
