Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the MCE CPAN distribution.

Report information
The Basics
Id: 92627
Status: resolved
Priority: 0/
Queue: MCE

People
Owner: MARIOROY [...] cpan.org
Requestors: TAKADONET [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.507
Fixed in: 1.508



Subject: non zero error code when using mce_loop
Getting error code 2304 (status code 9) ( 2304 >> 8 == 9) when a script.pl has a mce_loop. example: script1.pl use MCE::Loop; my $b = mce_loop { 1 } 1..10; print $b; --------- script2.pl print system("script1.pl"); -------- Script2.pl will return error code 2304 instead of 0. Cheers!
Subject: Re: [rt.cpan.org #92627] non zero error code when using mce_loop
Date: Fri, 31 Jan 2014 17:48:48 -0500
To: bug-MCE [...] rt.cpan.org
From: Mario Roy <marioeroy [...] gmail.com>
Hi Paul, Thank you for the report. MCE::Loop does not work like MCE::Map or MCE::Grep where the latter two makes unnecessary to call MCE->gather directly. MCE::Loop falls in between having to create MCE using the core API or using MCE::Map for example. One must call MCE->gather inside the block when ever constructing an assignment variable to the left of mce_loop, mce_flow, or mce_step. However, it should not fail if MCE->gather isn't called though, meaning that $b should have a value of 0. Will look into this. - mario On Fri, Jan 31, 2014 at 3:22 PM, Philip Mabon via RT <bug-MCE@rt.cpan.org>wrote: Show quoted text
> Fri Jan 31 15:22:14 2014: Request 92627 was acted upon. > Transaction: Ticket created by TAKADONET > Queue: MCE > Subject: non zero error code when using mce_loop > Broken in: 1.507 > Severity: Important > Owner: MARIOROY > Requestors: TAKADONET@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=92627 > > > > Getting error code 2304 (status code 9) ( 2304 >> 8 == 9) when a script.plhas a mce_loop. > > example: > > script1.pl > use MCE::Loop; > > my $b = mce_loop { 1 } 1..10; > print $b; > --------- > > script2.pl > > print system("script1.pl"); > -------- > > > Script2.pl will return error code 2304 instead of 0. > > Cheers! >
Subject: Re: [rt.cpan.org #92627] non zero error code when using mce_loop
Date: Sat, 1 Feb 2014 02:54:33 -0500
To: bug-MCE [...] rt.cpan.org
From: Mario Roy <marioeroy [...] gmail.com>
Hi Philip, This has been fixed in SVN revision 479. In the meantime, add MCE::Loop::finish() to the bottom of script1.pl. use MCE::Loop; my $b = mce_loop { 1 } 1..10; print $b, "\n"; MCE::Loop::finish(); Regards, Mario
Subject: Re: [rt.cpan.org #92627] non zero error code when using mce_loop
Date: Sat, 1 Feb 2014 04:30:36 -0500
To: bug-MCE [...] rt.cpan.org
From: Mario Roy <marioeroy [...] gmail.com>
Hi Philip, MCE 1.508 has been released which contains the fix for this bug. https://metacpan.org/pod/release/MARIOROY/MCE-1.508/lib/MCE.pod Thank you once again for reporting this bug. Regards, Mario
Hey Mario, I realize after that the example given was not 100% correct but it still shows the issue at hand. Thanks again for the quick fix! On Fri Jan 31 17:48:57 2014, marioeroy@gmail.com wrote: Show quoted text
> Hi Paul, > > Thank you for the report. > > MCE::Loop does not work like MCE::Map or MCE::Grep where the latter > two > makes unnecessary to call MCE->gather directly. > > MCE::Loop falls in between having to create MCE using the core API or > using > MCE::Map for example. > > One must call MCE->gather inside the block when ever constructing an > assignment variable to the left of mce_loop, mce_flow, or mce_step. > However, it should not fail if MCE->gather isn't called though, > meaning > that $b should have a value of 0. Will look into this. > > - mario > > > On Fri, Jan 31, 2014 at 3:22 PM, Philip Mabon via RT <bug- > MCE@rt.cpan.org>wrote: >
> > Fri Jan 31 15:22:14 2014: Request 92627 was acted upon. > > Transaction: Ticket created by TAKADONET > > Queue: MCE > > Subject: non zero error code when using mce_loop > > Broken in: 1.507 > > Severity: Important > > Owner: MARIOROY > > Requestors: TAKADONET@cpan.org > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=92627 > > > > > > > Getting error code 2304 (status code 9) ( 2304 >> 8 == 9) when a > > script.plhas a mce_loop. > > > > example: > > > > script1.pl > > use MCE::Loop; > > > > my $b = mce_loop { 1 } 1..10; > > print $b; > > --------- > > > > script2.pl > > > > print system("script1.pl"); > > -------- > > > > > > Script2.pl will return error code 2304 instead of 0. > > > > Cheers! > >
Subject: Re: [rt.cpan.org #92627] non zero error code when using mce_loop
Date: Mon, 3 Feb 2014 10:07:13 -0500
To: bug-MCE [...] rt.cpan.org
From: Mario Roy <marioeroy [...] gmail.com>
Hi Philip, Oh no, your example is fine. I miss-calculated on my part when reading your message. Things have finally settled down with all the models. Just chiming in to let you know that MCE 1.509 has been released. It addresses an unreported bug. The models are very solid now under various use cases. MCE::Examples (in 1.509) includes a Monte Carlo simulation. Lots of updates throughout the document, actually. Thank you again for the bug submissions. I had no idea about the last bug. - mario