Skip to content

on a machine with just 1 or 2 cores, hyperize throws an exception #3

@timo

Description

@timo

stumbled upon this while doing an rr record of a run of App::Ecosystems.

rr tells the program it's recording that there are two cores (Kernel.cpu-cores is 2, Kernel.cpu-cores-but-one is 1), unless you use the --chaos flag where the number of cores is randomized, or --num-cores to set a custom value.

the hyper method uses cpu-cores-but-one's output as the default hyper parameter unless one is specified, but it can be 1, and then this exception is thrown:

Invalid value '1' for :degree on method hyper
  in method hyper at /var/home/timo/raku/prefix/share/perl6/site/sources/140A8F9931ADE3D89A19D7E16699DF4A691FB614 (ParaSeq) line 2212
  in sub hyperize at /var/home/timo/raku/prefix/share/perl6/site/sources/140A8F9931ADE3D89A19D7E16699DF4A691FB614 (ParaSeq) line 2257
  in sub from-json-hyper at /var/home/timo/raku/prefix/share/perl6/site/sources/6056E01D63014A1270E09DDB66471BB4373103D4 (JSON::Fast::Hyper) line 18
  in method update-meta-from-json at /var/home/timo/raku/prefix/share/perl6/site/sources/8BACFB50B5B46DB329BF38632032BE5BC3AE3A70 (Ecosystem) line 215
  in submethod TWEAK at /var/home/timo/raku/prefix/share/perl6/site/sources/8BACFB50B5B46DB329BF38632032BE5BC3AE3A70 (Ecosystem) line 73
  in method load-ecosystem at /var/home/timo/raku/prefix/share/perl6/site/sources/373FC785D396D0DF9D90D1BFFD789F3748B259AC (App::Ecosystems) line 960
  in method run at /var/home/timo/raku/prefix/share/perl6/site/sources/373FC785D396D0DF9D90D1BFFD789F3748B259AC (App::Ecosystems) line 987
  in sub ecosystems at /var/home/timo/raku/prefix/share/perl6/site/sources/373FC785D396D0DF9D90D1BFFD789F3748B259AC (App::Ecosystems) line 1009
  in block <unit> at bin/ecosystems line 3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions