<p>Hi</p>

<p>I need to design primers for around 40,000 sequences. After doing this task with Primer3, I found that it took a very long time.</p>

<p>I I tried to accelerate primer3 operation with GNU parallel, but I cannot managed to successfully use GNU parallel to split input file and do multi-thread operation. Somehow primer3 still ran on 1 core only.</p>

<p>My command is as the following:</p>

<pre>
cat fasta.p3in | parallel --round-robin -j 12 --pipe --recend &quot;=&quot; /Tools/primer3/primer3-2.3.6/src/primer3_core &gt; fasta.p3out</pre>

<p>Could anyone tell the correct way to use GNU Parallel along with Primer3? Thanks a lot!</p>

Your biggest mistake was probably that your records contain `=` on every line, but only `\n=\n` is a record separator. Using the command `wc` or `--files cat` is great for debugging that kind of problems.

Your second mistake is that `--block-size` defaults to 1M: So the first instance may simply gobble up everything.

This ought to work (untested, as I have neither access to `fasta.p3in` nor to `primer3`):

    cat fasta.p3in | parallel -N1 --round-robin --pipe --recend "\n=\n" --cat /Tools/primer3/primer3-2.3.6/src/primer3_core > fasta.p3out

You can possibly leave out `--cat` if primer3 reads from STDIN. If GNU Parallel takes up significant time, increase `-N1`: With 40000 records it is probably OK to split on bigger chunks than 1 record.