for f in *.rod; do echo $f; cut -f5 $f | sort -k1.3n | uniq | wc -l; done
---------- Post updated at 02:36 PM ---------- Previous update was at 02:17 PM ----------
Hi Tange,
I find the GNU Parallel interesting. I'm not exactly a computing person, can you clarify the following for me:
what is the difference between GNU parallel and multi-threaded process? For example, if my program allows multi-threading and I run 4 threads in my quart-core computer, am I right to assume that the GNU parallel is not going to make any difference?
If I already running some other process and still specify -j+0, what is going to happen?
It will also run the jobs in parallel. If you jobs are multithreaded and you see 100% utilization of your cores all the time then you will not see a speed up using GNU Parallel.
If, however, your jobs have I/O and therefore sometimes wait for data, then it might be faster to have more processes running, that can utilize the CPU when other processes are waiting.
GNU Parallel can be made to look at the load average and not start more jobs if the load average is above a certain limit. Default (-j+0) is to start 1 job per CPU core regardless of load average.
If you want multiple instances of GNU Parallel to communicate, and not have more than N jobs in total - no matter how many times you start parallel, you should look at 'sem': http://www.gnu.org/software/parallel/sem.html