GNU parallel not working at all

后端 未结 4 960
攒了一身酷
攒了一身酷 2020-11-27 05:34

I have been trying to use GNU parallel for some time, but I have never been able to get it to function at all!

For example, running (in a non-empty directory!):

相关标签:
4条回答
  • 2020-11-27 05:34

    Had issues running parallel as an external command from FREEMAT (MATLAB lookalike); the argumentFile was not fed to the command properly solved it by:

    • Adding --gnu to options
    • Not using cmdString syntax involving ["]

    Code:

    cmdString = 'parallel --gnu command ::: ';
        while j<=jLength
            cmdString = [cmdString argumentFilePath(j,:) ' '];
            j=j+1;
        end
        system(cmdString)
    

    Thank you for that :) Im on Ubuntu 12.04 as well.

    0 讨论(0)
  • 2020-11-27 05:35

    As I was about to complete writing this question, I ran parallel --version to report the version, only to find:

    WARNING: YOU ARE USING --tollef. IF THINGS ARE ACTING WEIRD USE --gnu.

    It is not clear to me why that flag is set by default. Needless to say, using --gnu worked!

    Thought I would post this to save someone hours of frustration and confusion.

    EDIT: To fix this permanently (in Ubuntu at least), delete the --tollef flag in /etc/parallel/config

    0 讨论(0)
  • 2020-11-27 05:39

    For me it was same issue but different problem. Just running parallel command was exiting silently. Also parallel --version was saying invalid option error. In my Path there was just one parallel executable binary but still it was not detecting.

    I was able to fix it as below:

    1. Run whereis parallel. This gives all the paths where executables named parallel is present. For my case there was just one path /usr/local/bin/parallel. Running using this path works just fine.
    2. You can add an alias for this in ~/.bashrc or ~/.zshrc file like alias parallel='/usr/local/bin/parallel'

    And now parallel works like charm.

    dev-dsk % parallel --version         
    GNU parallel 20190322
    Copyright (C) 2007-2019 Ole Tange and Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    GNU parallel comes with no warranty.
    
    0 讨论(0)
  • 2020-11-27 05:57

    Depending on your operating system, you should check whether you're actually running the GNU version.

    $ parallel --version
    parallel: invalid option -- '-'
    parallel [OPTIONS] command -- arguments
        for each argument, run command with argument, in parallel
    parallel [OPTIONS] -- commands
        run specified commands in parallel
    

    If this is the case, you're not running the GNU version. Ubuntu 12.04 is like this, and you'll need to manually install GNU parallel to get the functionality you expect.

    0 讨论(0)
提交回复
热议问题