bugGNU Parallel - build and execute command lines from standard input in parallel - Bugs: bug #51368, % of filed jobs in error code

 
 

bug #51368: % of filed jobs in error code

Submitted by:  None
Submitted on:  Mon 03 Jul 2017 09:07:40 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Wont Fix
Privacy: PublicAssigned to: Ole Tange <tange>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 05 Jul 2017 03:44:21 AM UTC, comment #1:

I want GNU Parallel to be pessimistic.

With your change this will return true even though one of the jobs failed:

command() {
sleep 0.1; echo "$1 DONE!"
if [[ $1 -eq 2 ]]; then
return 1
fi
}
export -f command
seq 1 200 | parallel --tag --halt soon,fail=100% -j 20 command {}; echo $?

Ole Tange <tange>
Project AdministratorIn charge of this item.
Mon 03 Jul 2017 09:07:40 AM UTC, original submission:

command()
{
sleep 0.1; echo "$1 DONE!"
if [[ $1 -ne 2 ]]; then.
return 1
fi
}

export -f command

seq 1 200|parallel --tag --halt soon,fail=100% -j 20 command {}; echo $?

1 job succeeded but the resul 100% failed.

Patch:

24c24
< use POSIX qw(:sys_wait_h setsid ceil :errno_h);
---

> use POSIX qw(:sys_wait_h setsid ceil floor :errno_h);

214c214
< ::ceil($Global::total_failed / $Global::total_started * 100);
---

> ::floor($Global::total_failed / $Global::total_started * 100);


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tange (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 05 Jul 2017 03:44:21 AM UTCtangeStatusNone=>Wont Fix
      Assigned toNone=>tange
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1