parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question on optimizing GNU Parallel with multiple lines of search parame


From: Dave Florek
Subject: Question on optimizing GNU Parallel with multiple lines of search parameters
Date: Wed, 17 Aug 2016 15:34:02 -0400

Hi,

I have a program that has 4 individual lines of code that are searching through multiple files. I'd like to speed the program up by running those 4 lines simultaneously with Parallel. How would I structure my bash code to achieve this?

Eg:

<command>| parallel <command> | parallel <command> >> file
<command>| parallel <command> | parallel <command> >> file
<command> | parallel <command> >> file
<command> | parallel <command> >> file

I'm thinking something like this:

<command>| parallel <command> | parallel <command> >> file; parallel <command>| parallel <command> | parallel <command> >> file; parallel <command> | parallel <command> >> parallel file; <command> | parallel <command> >> file


Basically, I'm trying to achieve the effect where instead of waiting for each line of code to complete before the next one runs, have each line of code run at the same time and complete roughly at the same time on multiple cores.

Thanks!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]