[GAP Forum] Run GAP command for x seconds

Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher) C.Nyberg-Brodda at uea.ac.uk
Thu Jan 28 13:44:16 GMT 2021


Dear Frank, Christopher, Forum,

Thank you both for your extensive help. All is working now as I need it!

Best,
Carl-Fredrik
________________________________
From: Frank Lübeck <frank.luebeck at math.rwth-aachen.de>
Sent: Thursday, January 28, 2021 1:26 PM
To: Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher) <C.Nyberg-Brodda at uea.ac.uk>
Cc: forum at gap-system.org <forum at gap-system.org>
Subject: Re: [GAP Forum] Run GAP command for x seconds

Warning: This email is from outside the UEA system. Do not click on links or attachments unless you expect them from the sender and know the content is safe.

On Thu, Jan 28, 2021 at 10:31:28AM +0000, Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher) wrote:
> Chris: I cannot seem to load the function IO_CallWithTimeout, or indeed
> IO_CallWithTimeoutList -- there seems to be no function with this name. I
> have IO 4.5.2 loaded.

Dear Carl-Frederik, dear Forum,

The functions IO_CallWithTimeout and IO_CallWithTimeoutList are pretty new
and mainly for convenience with respect to specifying the time, they just
call ParDoByFork.

> Frank: Your code runs fine, but when I run e.g the following code
> > ParTakeFirstResultByFork([function(x) local F; F := FreeGroup(x); return
> F; end], [[1]],rec(TimeOut :=rec(tv_sec :=2, tv_usec := 0 )));
>
> this makes my GAP go haywire and totally breaks it,
> [...]

There is a limitation in the kind of return values of the called functions.
GAP must be able to encode (serialize) any return value with IO_Pickle
and decode it with IO_Unpickle (this is how the forked child process
transfers its result to the parent process).

Unfortunately, a free group which is returned by your simple function
is not among the supported objects. See
  ?IO_Pickle
for more details.

Best regards again,
   Frank

--
///  Dr. Frank Lübeck, Lehrstuhl für Algebra und Zahlentheorie,
\\\  Pontdriesch 14/16, 52062 Aachen, Germany
///  E-mail: Frank.Luebeck at Math.RWTH-Aachen.De
\\\  WWW:    https://eur01.safelinks.protection.outlook.com/?url=http:%2F%2Fwww.math.rwth-aachen.de%2F~Frank.Luebeck%2F&amp;data=04%7C01%7CC.Nyberg-Brodda%40uea.ac.uk%7Cf0851e1591544314cd4508d8c3905eb0%7Cc65f8795ba3d43518a070865e5d8f090%7C0%7C0%7C637474372127168254%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2B5FNVeKaXt5XlpMfyIFx0U34gWZ2lecYcthSZ%2Fzmxmc%3D&amp;reserved=0


More information about the Forum mailing list