与GNU并联并行运行的葡萄酒 - 需要{%}插槽替换工作 [英] Run wine in parallel with gnu-parallel - needs {%} slot substitution to work
问题描述
我一直在运行的酒/ DOS在与GNU并行Ubuntu的并行命令。我可以和曾与简单的命令成功做到了这一点没有问题。
然而,可能会导致酒内的组件之间干扰的一些更复杂的问题。
因此,要解决这个问题,我想使用{%}在一次特定的名为酒preFIX实例限制一个作业作为<一个查询href=\"http://stackoverflow.com/questions/28328597/gnu-parallel-how-do-determine-job-slot-youre-using\">this问题。麻烦的是:在{%} substition似乎没有正常工作
我最终希望能够运行类似下面的
平行-j4'WINE preFIX = $ HOME /插槽{%}酒CMD / C @echo {%} 2 - ;的/ dev / null的'::: A B C D
不幸的是一个单一的新酒preFIX插槽{%}创建和使用,而不是现存的SLOT1,SLOT2,时隙3和时隙4 preFIX目录。
继我试过手动:
平行-j 2回声{%} ::: A B C
而不是返回是这样的:
1
2
1
返回的是:
{%}一个
{%}乙
{%} C
所以,我不认为这个问题是酒,但别的东西:是否需要以某种方式使{%}替换吗?也许是在我的版本中不可用?也许我错误地复制的例子使用情况如何?我能找到这个问题的任何地方,没有其他的例子,但它每次都发生在我身上。
作为一个弱的解决方法我已经应用的bash模运算符的{#}就业替代,但这不是完美的,因为我仍然可以偶尔插槽插槽碰撞和subsiquent崩溃。
FYI1: lsb_release -a
返回
经销商ID:Ubuntu的
说明:Ubuntu的LTS 14.04.3
稿:14.04
codeNAME:可信赖
并行--version
返回
GNU平行20130922
您版本平行
显得太老了。
你看 {%}
与您的版本,或只是网上附带的文档?
的发行说明 GNU并行20140522
注明:
- {%}介绍了作为职业插槽替换字符串。它已知的bug。
块引用>和
发行说明GNU并行20140622
注明:
- {%}可以作为工作槽。
块引用>I have been running wine/dos commands in parallel in ubuntu with gnu-parallel. I can and have done this successfully with simple commands without problem.
However, some more complex problems can result in interference between components within wine.
Thus, to solve this I'd like to restrict one job at a time to specific named "wine prefix" instance using the {%} as queried in this question. The trouble is: the {%} substition doesnt seem to work.
I'd eventually like to be able to run something like the following
parallel -j4 'WINEPREFIX=$HOME/slot{%} wine cmd /c @echo {%} 2>/dev/null' ::: A B C D
Unfortunately a single new wine prefix slot{%} is created and used rather than the extant slot1, slot2, slot3, and slot4 prefix directories.
Following the manual I tried:
parallel -j 2 echo {%} ::: A B C
but instead of returning something like:
1 2 1
it returns:
{%} A {%} B {%} C
So I dont think the problem is wine, but something else: Does the {%} substitution need to be enabled somehow? Perhaps it not available in my version? Maybe I copied the example usage incorrectly? I can find no other example of this problem anywhere but it happens every time to me.
As a weak workaround I've been applying the bash modulo operator to the {#} jobs substitution but this is not perfect because I still get occasional slot-slot collisions and subsiquent crashes.
FYI1:
lsb_release -a
returnsDistributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS Release: 14.04 Codename: trusty
parallel --version
returnsGNU parallel 20130922
解决方案Your version of
parallel
appears to be too old.Do you see
{%}
in the documentation that shipped with your version or just online?The release notes for
GNU Parallel 20140522
indicate:
- {%} introduced as job slot replacement string. It has known bugs.
and the release notes for
GNU Parallel 20140622
indicate:
- {%} works as job slot.
这篇关于与GNU并联并行运行的葡萄酒 - 需要{%}插槽替换工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!