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.lueb...@math.rwth-aachen.de>
Sent: Thursday, January 28, 2021 1:26 PM
To: Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher) 
<c.nyberg-bro...@uea.ac.uk>
Cc: forum@gap-system.org <forum@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.lueb...@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
_______________________________________________
Forum mailing list
Forum@gap-system.org
https://mail.gap-system.org/mailman/listinfo/forum
  • [GAP Forum] Run... Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher)
    • Re: [GAP F... Frank Lübeck
      • Re: [G... Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher)
        • Re... Frank Lübeck
          • ... Christopher Jefferson
            • ... Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher)
              • ... Frank Lübeck
                • ... Carl-Fredrik Nyberg Brodda (MTH - Postgraduate Researcher)
              • ... Christopher Jefferson

Reply via email to