Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: fork() on win10 - MCE

by BernieC (Pilgrim)
on Jan 03, 2023 at 19:41 UTC ( #11149342=note: print w/replies, xml ) Need Help??

in reply to Re: fork() on win10 - MCE
in thread fork() on win10

Wow -- that module must've been a *bitch* to code up. But with Strawberry Perl on win10 I get:
t/05_mce_child.t (Wstat: 768 Tests: 28 Failed: 3) Failed tests: 4-5, 8 Non-zero exit status: 3 Files=39, Tests=617, 9 wallclock secs ( 0.16 usr + 0.03 sys = 0.19 +CPU) Result: FAIL Failed 1/39 test programs. 3/617 subtests failed. gmake: *** [Makefile:816: test_dynamic] Error 255 Lockfile removed. MARIOROY/MCE-1.882.tar.gz C:\strawberry\c\bin\gmake.exe test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports MARIOROY/MCE-1.882.tar.gz Stopping: 'install' failed for 'MCE'. Failed during this command: MARIOROY/MCE-1.882.tar.gz : make_test NO
I'm not sure what to do next

Replies are listed 'Best First'.
Re^3: fork() on win10 - MCE
by GrandFather (Saint) on Jan 03, 2023 at 22:06 UTC

    Using Strawberry Perl v5.32.1 and cpanm I installed MCE on a Windows 11 machine and run the first sample from the synopsis for MCE without issue.

    C:\...>cpanm MCE --> Working on MCE Fetching + ... OK Configuring MCE-1.882 ... OK Building and testing MCE-1.882 ... OK Successfully installed MCE-1.882 1 distribution installed C:\...>perl -v This is perl 5, version 32, subversion 1 (v5.32.1) built for MSWin32-x +64-multi-thread

    Note that this is a 64 bit build of Perl (the x64 bit). What version of Perl are you using?

    Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond
Re^3: fork() on win10 - MCE (released 1.883 update)
by marioroy (Prior) on Jan 04, 2023 at 00:02 UTC

    I wonder if sleep is broken or if the box is busy or delays coming from Windows anti-malware? Looking at tests 4, 5, and 8.

    perl -Ilib t/05_mce_child.t ... ok 2 - spawning asynchronously ok 3 - check for unique pids ok 4 - check list_running ok 5 - check list_joinable ok 6 - check list ok 7 - check pending ok 8 - check is_running child1 ok 9 - check is_joinable child1 ok 10 - check is_running child2 ok 11 - check is_joinable child2 ok 12 - check is_running child3 ok 13 - check is_joinable child3 ...

    Is there an alternative to sleep on the Windows platform, ensuring delay before the workers exit?

    { my ( $cnt, @list, %pids, %ret ); local $_; my ( $come_then_i_pray ) = ( "さあ、私&#123 +99;祈る" . "Ǣ" ); ok( 1, "spawning asynchronously" ); # test 2 MCE::Child->create( sub { sleep 1; sleep 1; "$come_then_i_pray $_" +} ) for ( 1..3 ); %pids = map { $_ => undef } MCE::Child->list_pids; is ( scalar( keys %pids ), 3, 'check for unique pids' ); # test 3 @list = MCE::Child->list_running; is ( scalar @list, 3, 'check list_running' ); # test 4 @list = MCE::Child->list_joinable; is ( scalar @list, 0, 'check list_joinable' ); # test 5 @list = MCE::Child->list; is ( scalar @list, 3, 'check list' ); # test 6 is ( MCE::Child->pending, 3, 'check pending' ); # test 7 $cnt = 0; for ( @list ) { ++$cnt; is ( $_->is_running, 1, 'check is_running child'.$cnt ); # te +sts 8, 10, 12 is ( $_->is_joinable, '', 'check is_joinable child'.$cnt ); # te +sts 9, 11, 13 } $cnt = 0; for ( @list ) { ++$cnt; $ret{ $_->join } = 1; is ( $_->error, undef, 'check error child'.$cnt ); } is ( scalar keys %ret, 3, 'check for unique values' ); for ( sort keys %ret ) { my $id = chop; s/ $//; is ( $_, $come_then_i_pray, "check for utf8 string $id" ); }; }

    Update 1: I have an idea to not use sleep. Instead, I will have workers read a channel. The manager process will notify workers to exit after completing tests list_running, list_joinable, list, pending, is_running, and is_joinable.

    Update 2: Released MCE 1.883 on meta::cpan

      G'day Mario,

      I saw this being discussed in the CB, but the data is a bit too big for there. I attempted installation of MCE and MCE::Shared on Cygwin and MSWin. Cygwin was completely successful. MSWin didn't pick up the latest (1.883) version of MCE, nor the latest (1.880) version of MCE::Shared. Details follow.


      Cygwin (on Win10) with Perl v5.36.0 (Perlbrew):

      cpan[1]> install MCE ... MARIOROY/MCE-1.883.tar.gz /usr/bin/make -- OK ... MARIOROY/MCE-1.883.tar.gz /usr/bin/make test -- OK ... MARIOROY/MCE-1.883.tar.gz /usr/bin/make install -- OK cpan[2]> install MCE::Shared ... MARIOROY/MCE-Shared-1.880.tar.gz /usr/bin/make -- OK ... MARIOROY/MCE-Shared-1.880.tar.gz /usr/bin/make test -- OK ... MARIOROY/MCE-Shared-1.880.tar.gz /usr/bin/make install -- OK

      I'm set up as a CPAN Tester on this platform; green swatches in the post, i.e. awaiting matrix update. :-)


      Windows 10 with Strawberry Perl v5.26.3:

      Microsoft Windows [Version 10.0.19045.2364] (c) Microsoft Corporation. All rights reserved. ... cpan> install MCE Database was generated on Tue, 03 Jan 2023 22:15:36 GMT MCE is up to date (1.882). cpan> install MCE::Shared ... MARIOROY/MCE-Shared-1.879.tar.gz C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\c\bin\gmake +.exe -- OK ... MARIOROY/MCE-Shared-1.879.tar.gz C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\c\bin\gmake +.exe test -- OK ... MARIOROY/MCE-Shared-1.879.tar.gz C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\c\bin\gmake +.exe install UNINST=1 -- OK

      So, MCE v1.883 wasn't found/identified/whatever and v1.882 was up to date; and, MCE::Shared v1.880 wasn't found/identified/whatever and v1.879 was installed successfully.

      I'll be happy to test further; let me know.

      — Ken

Re^3: fork() on win10 - MCE
by pryrt (Abbot) on Jan 03, 2023 at 22:16 UTC
    Wild guess: Did you somehow get a version of strawberry that doesn't have multi-thread enabled?

    c:> perl -V:archname -V:myuname -V:osvers archname='MSWin32-x64-multi-thread'; myuname='Win32 strawberry-perl #1 Sun Jan 24 15:00:15 2021 x6 +4'; osvers='10.0.19042.746';

    or just the full perl -V to give the full information about your specific strawberry, in case perl -v and the three specific config variables above aren't sufficient to tell the other monks about your setup. (generally, if you ever think that there might be version or OS issues involved, sharing your full perl -V is best practice).

    and in your other post, you said, I don't exactly know what system "win32" is. Mine is a Win10/64bit.. that must make a difference.:

    Yes, win10/64bit could make a difference compared to 32bit or compared to win8/win7/.... But many of those passing results were win10/64bit: you can see that by clicking on the Win32 column header from the cpantesters report, which gives you a table of just those results, with more information. And each individual report will give perl -V or similar information, along with as much other meta-info as they can muster, which might help you determine the difference between your setup and theirs.

      Did you somehow get a version of strawberry that doesn't have multi-thread enabled?

      A fair enough question, and worth asking.
      However, AFAICT, Strawberry have never provided such a build of perl.

Re^3: fork() on win10 - MCE
by BernieC (Pilgrim) on Jan 03, 2023 at 20:56 UTC
    I looked the reports and there were zillions, mostly all on Unix-based systems. there were a few PASSes on Win32 and no FAILs, I don't exactly know what system "win32" is. Mine is a Win10/64bit.. that must make a difference.

      G'day BernieC,

      I assume the output you've shown is from the cpan utility. I had a look at "reports MARIOROY/MCE-1.882.tar.gz": you're correct in that its huge and not particularly useful. Even the link from the last line, "See for details", wasn't helpful: it redirected then timed out.

      A much better way to look at these reports is as follows. I've shown this for MCE; the procedure's the same for most, if not all, modules.

      • Find the module on CPAN:
      • Follow the "Testers" link:
      • That shows the latest version, 1.882. If you're using a different version, there's a list of links in the "Other versions" column beneath the matrix (table).
      • For an MSWin O/S, use the "mswin32" column. Then pick the row that indicates your Perl version. If the cell matching that column & row has a coloured "swatch", that O/S & Perl version combination has been tested. Click on the "swatch" for more details of individual tests.
      • You'll sometimes find FAIL or UNKNOWN results which match your own; a comparison can be helpful. In this instance, there were no problems reported for "t/05_mce_child.t": not helpful for your current issue.

      As I said above, I've assumed you're using the cpan utility (could be wrong). I don't know how you've set that up or how you ran the installation. I don't know what Perl version you're using. Overall, there's insufficient information to suggest a fix.

      If you can provide more verbose output, that would be great. If not, maybe look at the prove utility for detailed feedback. I wrote some notes about prove a day or two ago: possibly useful if you haven't previously used it.

      I have Strawberry Perl v5.26.3 on Win10. Purely as a test, I successfully installed MCE.

      cpan> install MCE ... All tests successful. Files=39, Tests=617, 9 wallclock secs ( 0.12 usr + 0.01 sys = 0.14 +CPU) Result: PASS MARIOROY/MCE-1.882.tar.gz C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\c\bin\gmake +.exe test -- OK Running make install ... MARIOROY/MCE-1.882.tar.gz C:\Users\ken\local\opt\strawberry_perl\5_026_003\install\c\bin\gmake +.exe install UNINST=1 -- OK

      — Ken

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149342]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2023-06-06 12:06 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (26 votes). Check out past polls.