linux - 在 linux 和 mac 机器上通过 ssh 登录运行 GNU Parallel

标签 linux bash parallel-processing

我可以在我的机器上运行并行。我查找了在远程机器上运行 Parallel 的情况,我发现了这个语法:

parallel –S 16/node1,16/node2,16/node3,16/node4 –-workdir . ./ B1_rosettaCM_singletarget.sh {}
::: {1..48}

但是,他们说这是无密码登录,我没有设置。我想知道如何更改此语法以在我的远程计算机(我有 Linux 登录名/密码)上运行 bash 脚本。工作目录是什么?

这也适用于 Mac 吗?我是否需要在 Linux 机器上以相同的路径安装我正在运行的软件,或者 Parallel 会负责吗? mac 怎么样?

最佳答案

I can run Parallel on my machine fine. I looked up running Parallel on a remote machine, I found this syntax:

parallel –S 16/node1,16/node2,16/node3,16/node4 –-workdir . ./ B1_rosettaCM_singletarget.sh {}
::: {1..48}

此语法错误 - 可能是由于字处理器“修复”了格式。应该是:

 parallel –S 16/node1,16/node2,16/node3,16/node4 --workdir . ./B1_rosettaCM_singletarget.sh {} ::: {1..48}

However, they state it's for passwordless log in, which I don't have set up.

您可以通过多种方式进行设置:

What is the workdir?

来自 man parallel:

       The special mydir value . uses the current
       working dir.  If the current working dir is
       beneath your home dir, the value . is treated
       as the relative path to your home dir. This
       means that if your home dir is different on
       remote computers (e.g. if your login is
       different) the relative path will still be
       relative to your home dir.

Will this work on a mac as well?

是的。

Do I need to install the software I'm running in identical path on the Linux machine, or does Parallel take care of that?

如果远程系统上安装了 GNU Parallel,它会自动计算核心数(因此不需要 16/)。它不需要在相同的路径中,而只是在您的路径中的某个位置。 GNU Parallel 不会处理这个问题。

How about the mac?

同样适用于mac。

GNU Parallel 并未在 mac 上进行密集测试,因此如果您发现某些东西可以在 GNU/Linux 上运行,但在 mac 上不起作用,您应该随时提交错误报告。

关于linux - 在 linux 和 mac 机器上通过 ssh 登录运行 GNU Parallel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49261520/

相关文章:

linux - 使用awk查找字母并打印结果

Linux:使用另一个环境变量的一部分设置环境变量

bash - 使用大括号参数列表多次执行命令

linux - shell 脚本 : how to group rows according to the first field/element in each row

r - 如何并行化 bash 中调用 R 脚本的嵌套 for 循环

linux - 多节点连接管理

linux - 如何从 .cer 文件获取 CA 根证书和中间证书

linux - Bash:比较两个字符串问题

r - 从函数中使用 jags.parallel(R 语言错误在 get(name, envir = envir) : object 'y' not found)

c++ - 独立并行写入 C++ 和 MPI 中的文件