Dear all,
I've been using GNU parallel for a while and it works quite well. However, I recently needed to run some very long commands and parallel complained that the command line was too long:
parallel: Error: Command line too long (223235 >= 131049) at input 0: cat /tmp/10110507/adadev34gv_213...
It is a bit weird since my shell seems supports commands longer than 131049:
$ getconf ARG_MAX
2621440
and had no trouble running a very long command:
$ perl -e 'print("true "."x"x10000000);' | bash
$ echo $?
0
Does anyone know why it is so low and/or how to change it? thanks,
Is this bioinformatics related?
Well, it might not seem at first sight, but I am actually trying to concatenate several FASTA files and align them with MAFFT. :)
That's sufficient to be bioinformatics related, but since we are a "focussed" forum it would be best if you mention that application in your initial question to remove all doubt.
Can print the output of
parallel --max-line-length-allowed
Sure, it matches with the error message:
Can you build your command (or parts of it) programmatically, and
echo
that as a string toawk '{ print length($0) }'
orwc -c
etc.? This may help track down which command (or which parts) are too long forparallel
.As I said on another post, I actually have a script with all the commands that I pipe to parallel, and it is actually the first line that has 223188 characters. Also noticed that there are other lines that won't work either:
Strangely, I extracted the first command, turned it into an
echo
and piped it tobash
, and it worked fine.... :/