我想使用 GNU Parallel
并行运行具有不同输入参数的以下脚本:
Rscript svmRScript_v2.copy.r 0.1 1 #(1) 0.1 and 1 are the input arguments
Rscript svmRScript_v2.copy.r 0.1 2 #(2)
Rscript svmRScript_v2.copy.r 0.1 5 #(3)
Rscript svmRScript_v2.copy.r 0.1 10 #(4)
所以我想做的就是使用 GNU parallel 并行运行“命令”(1)、(2)、(3)、(4)。
我最好的猜测是类似
parallel Rscript < svmRScript_v2.copy.r ::: 0.1 1 ::: 0.1 2 ::: 0.1 5 ::: 0.1 10
我知道这是完全错误的,我收到以下错误:
fatal error :无法打开文件“:::”:没有这样的文件或目录
。
有什么建议我需要更改吗?
提前致谢。
最佳答案
显而易见的是:
parallel Rscript svmRScript_v2.copy.r 0.1 ::: 1 2 5 10
但我觉得您可能希望稍后再使用 0.1
和 0.2
:
parallel Rscript svmRScript_v2.copy.r ::: 0.1 0.2 ::: 1 2 5 10
如果参数顺序错误:
parallel Rscript svmRScript_v2.copy.r {2} {1} ::: 0.1 0.2 ::: 1 2 5 10
你有没有机会观看the intro videos和 walk through the tutorial ?
关于linux - 如何在 gnu 中并行运行多个组合命令(带有多个参数)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32100033/