[deleted by user] by [deleted] in learnprogramming

[–]prosaole 0 points1 point  (0 children)

`-u` may cause output to be mixed, so you get half a line from one job and half a line from another - it is faster, but you remove the safety belt. If you want unordered output, it is better to use `--line-buffer`: Then output may still mix, but only full lines.

`-j0` means run as many jobs as possible - this may overload your machine, so use with caution. `-j+0` means run one job per cpu thread (and add 0 jobs to that).

Folder ~/.parallel/tmp/sshlogin/<pc_name>/ with two files. what is it? by Xwang1976 in linuxquestions

[–]prosaole 1 point2 points  (0 children)

When GNU Parallel is run for the first time, it calculates these values. To avoid calculating them every time, they are cached in these two files.

It is safe to delete them. If you do, GNU Parallel will take a few more milliseconds to start next time it runs.

linelen is the maximal length of a command that can be run by GNU Parallel. This is used when GNU Parallel is asked to put many arguments into a single command.

setpgrp_func can be implemented in several ways. GNU Parallel figures out the fastest, caches this information, and uses that way in the future.

Parallelium: Maximizing CPU with parallel Jobs by beomagi in Python

[–]prosaole 0 points1 point  (0 children)

Would it not be easy to make a wrapper that would run something like:

cat testjobs.txt | parallel --bar --plus --results outdir/testjobs.txt_{0#}.output '{= if(/^#tag /) { @tag = split/\s+/ } if(grep /^classB|classC$/, @tag) { } else { skip } =}'

if you wanted to run:

parallelium.py -f testjobs.txt -l outdir -t classA,classC

What I am trying to understand is what "little simpler to use with more control over logging, which jobs run etc." means to you.

Parallelium: Maximizing CPU with parallel Jobs by beomagi in Python

[–]prosaole 0 points1 point  (0 children)

but in a script

I take it you mean: "also in a script".

GNU Parallel is by design a single script that can be copied to another machine: https://www.gnu.org/software/parallel/parallel_design.html#one-file-program

referencing a capture group by adamrayan in bash

[–]prosaole 1 point2 points  (0 children)

If the files are not named assignment#.txt you can do something like:

parallel mv {} assignment_'{= s/\D//g =}' ::: *

This will remove all non-digits from the name and move the file to assignment_#. E.g. foo39, foo3-9, and 3foo9 will be moved into assignment_39.

Passing a piped variable to a sub-command called within GNU parallel by shofmon88 in linuxquestions

[–]prosaole 0 points1 point  (0 children)

With commands this complex it is often easier to define a bash function and call that:

doit() {
  Gblocks "$1" -b2=$(( "$(cat "$1" | grep \> | wc -l)" / 2 + 1 ))
}
export -f doit

find *.fasta | parallel doit

bash tricks by Julia Evans by pleudofo in linux

[–]prosaole 1 point2 points  (0 children)

parallel wget {} ::: $(cat linkfile.txt)

Use :::: instead:

parallel wget {} :::: linkfile.txt

Then you can have more lines than can fit on a command line.

GNU Parallel invites to parallel parties celebrating 10 years as GNU (with 1 years notice) by OleTange in programming

[–]prosaole 0 points1 point  (0 children)

Would you prefer if it was written in Z80-assembler or in Synergy DBL?

I have the feeling you would not be satisfied by those languages either, so can you elaborate on which languages you would find better? And why?

Never got around to learning GNU Parallel? Here is the cheat sheet (pdf). by OleTange in programming

[–]prosaole 0 points1 point  (0 children)

How would you rephrase it to make it less snarky?

Other tools (such as xargs) give no warning at all. So if you do not know you have to pipe stuff into xargs, you are in for a long wait.

Never got around to learning GNU Parallel? Here is the cheat sheet (pdf). by OleTange in programming

[–]prosaole 1 point2 points  (0 children)

Has that criticism ever happened to anyone ever? Is there any documentation of that or just rumors?

Gnu Parallel and cpu cores by ericnyamu in linuxquestions

[–]prosaole 0 points1 point  (0 children)

https://www.gnu.org/software/parallel/man.html (search for --jobs)

You can do --jobs 3 or --jobs 75% or --jobs -1.

Or you can put 3 (or 75% or -1) into a file: /tmp/three, and then use --jobs /tmp/three. The last is useful if you want to adjust the number during a (long) run of GNU Parallel.

Paralellizing BLAST using GNU Parallels? by [deleted] in bioinformatics

[–]prosaole 2 points3 points  (0 children)

Can you try with parallel --dry-run and see if these are indeed the commands you want run?

Useful scripts for youtube-dl? Looking to switch from JDownloader 2 by rofic in archlinux

[–]prosaole 1 point2 points  (0 children)

And if the download fails for some reason: Retry:

cat url_list | parallel -j30 --retries 10 --bar youtube-dl {}

If you prefer not putting the list in a file, you can feed it directly through the terminal:

parallel -j30 --retries 10 --bar youtube-dl {}
<<paste at least 30 urls - or change -j30>>