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
returns
Distributor ID: Ubuntu
Description: Ubuntu 14.04.3 LTS
Release: 14.04
Codename: trusty
parallel --version
returns
GNU 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:and the release notes for
GNU Parallel 20140622
indicate: