在 GNU parallel 中向并行 运行 进程添加更多内核

Add more cores to the parallel running processes in GNU parallel

我正在并行使用 GNU 运行 多个作业。

我想知道 GNU parallel 是否包含一个命令,该命令允许向已经 运行 并行的进程添加 n 个内核。

你有什么建议吗?

如果您使用 -j file,您可以更改 file 的内容。来自 man parallel:

--jobs procfile

-j procfile

--max-procs procfile

-P procfile

Read parameter from file. Use the content of procfile as parameter for -j. E.g. procfile could contain the string 100% or +2 or 10. If procfile is changed when a job completes, procfile is read again and the new number of jobs is computed. If the number is lower than before, running jobs will be allowed to finish but new jobs will not be started until the wanted number of jobs has been reached. This makes it possible to change the number of simultaneous running jobs while GNU parallel is running.