• trouble with snakemake having glpk-utils installed

    From Patrice Duroux@21:1/5 to All on Mon Mar 22 18:50:02 2021
    Hi,

    With a very simple Snakefile test case like this:

    rule test:
    shell:
    'echo "Hello world!"'

    here is the output got with glpk-utils installed (sagemath requires it on
    this system):

    $ snakemake -j1
    Building DAG of jobs...
    Using shell: /bin/bash
    Provided cores: 1 (use --cores to define parallelism)
    Rules claiming more threads will be scaled down.
    Job counts:
    count jobs
    1 test
    1
    GLPSOL--GLPK LP/MIP Solver 5.0
    Parameter(s) specified in the command line:
    --cpxlp /tmp/1245235-pulp.lp -o /tmp/1245235-pulp.sol
    Reading problem data from '/tmp/1245235-pulp.lp'...
    /tmp/1245235-pulp.lp:5: missing constraint sense
    CPLEX LP file processing error
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/snakemake/__init__.py", line 643, in snakemake
    success = workflow.execute(
    File "/usr/lib/python3/dist-packages/snakemake/workflow.py", line 961, in execute
    success = scheduler.schedule()
    File "/usr/lib/python3/dist-packages/snakemake/scheduler.py", line 406,
    in schedule
    else self.job_selector_ilp(needrun)
    File "/usr/lib/python3/dist-packages/snakemake/scheduler.py", line 624,
    in job_selector_ilp
    prob.solve()
    File "/usr/lib/python3/dist-packages/pulp/pulp.py", line 1643, in solve
    status = solver.actualSolve(self, **kwargs)
    File "/usr/lib/python3/dist-packages/pulp/solvers.py", line 380, in actualSolve
    raise PulpSolverError("PuLP: Error while executing "+self.path) pulp.solvers.PulpSolverError: PuLP: Error while executing glpsol

    And here is the output once this package removed:

    $ snakemake -j1
    Building DAG of jobs...
    Using shell: /bin/bash
    Provided cores: 1 (use --cores to define parallelism)
    Rules claiming more threads will be scaled down.
    Job counts:
    count jobs
    1 test
    1

    [Mon Mar 22 18:22:40 2021]
    rule test:
    jobid: 0

    Hello world!
    [Mon Mar 22 18:22:40 2021]
    Finished job 0.
    1 of 1 steps (100%) done
    Complete log: /home/patrice/tmp/toto/.snakemake/log/2021-03-22T182240.369114.snakemake.log

    I do not know if there is a bug behind the scene and which package is
    involved.

    Thanks!

    <div dir="ltr"><br>Hi,<br><br>With a very simple Snakefile test case like this:<br><br><span style="font-family:monospace">rule test:<br>    shell:<br>         &#39;echo &quot;Hello world!&quot;&#39;</span><br><br>here is the output got with glpk-
    utils installed (sagemath requires it on this system):<br><br><span style="font-family:monospace">$ snakemake -j1<br>Building DAG of jobs...<br>Using shell: /bin/bash<br>Provided cores: 1 (use --cores to define parallelism)<br>Rules claiming more threads
    will be scaled down.<br>Job counts:<br>    count    jobs<br>    1    test<br>    1<br>GLPSOL--GLPK LP/MIP Solver 5.0<br>Parameter(s) specified in the command line:<br> --cpxlp /tmp/1245235-pulp.lp -o /tmp/1245235-pulp.sol<br>Reading problem
    data from &#39;/tmp/1245235-pulp.lp&#39;...<br>/tmp/1245235-pulp.lp:5: missing constraint sense<br>CPLEX LP file processing error<br>Traceback (most recent call last):<br>  File &quot;/usr/lib/python3/dist-packages/snakemake/__init__.py&quot;, line 643,
    in snakemake<br>    success = workflow.execute(<br>  File &quot;/usr/lib/python3/dist-packages/snakemake/workflow.py&quot;, line 961, in execute<br>    success = scheduler.schedule()<br>  File &quot;/usr/lib/python3/dist-packages/snakemake/
    scheduler.py&quot;, line 406, in schedule<br>    else self.job_selector_ilp(needrun)<br>  File &quot;/usr/lib/python3/dist-packages/snakemake/scheduler.py&quot;, line 624, in job_selector_ilp<br>    prob.solve()<br>  File &quot;/usr/lib/python3/
    dist-packages/pulp/pulp.py&quot;, line 1643, in solve<br>    status = solver.actualSolve(self, **kwargs)<br>  File &quot;/usr/lib/python3/dist-packages/pulp/solvers.py&quot;, line 380, in actualSolve<br>    raise PulpSolverError(&quot;PuLP: Error
    while executing &quot;+self.path)<br>pulp.solvers.PulpSolverError: PuLP: Error while executing glpsol</span><br><br>And here is the output once this package removed:<br><br><span style="font-family:monospace">$ snakemake -j1</span><br><span style="font-
    family:monospace">Building DAG of jobs...<br>Using shell: /bin/bash<br>Provided cores: 1 (use --cores to define parallelism)<br>Rules claiming more threads will be scaled down.<br>Job counts:<br>    count    jobs<br>    1    test<br>    1<br><
    [Mon Mar 22 18:22:40 2021]<br>rule test:<br>    jobid: 0<br><br>Hello world!<br>[Mon Mar 22 18:22:40 2021]<br>Finished job 0.<br>1 of 1 steps (100%) done<br>Complete log: /home/patrice/tmp/toto/.snakemake/log/2021-03-22T182240.369114.snakemake.log</
    span><br><br><div>I do not know if there is a bug behind the scene and which package is involved.</div><div><br></div><div>Thanks!<br></div><br></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From patrice.duroux@gmail.com@21:1/5 to All on Tue Mar 23 14:10:01 2021
    Hi,

    I found that it is python3-pulp that calls glpsol provided by glpk-
    utils: https://sources.debian.org/src/python-pulp/1.6.0+dfsg1-5/src/pulp/solvers.py/?hl=100#L100

    It's strange that the python3-pulp package didn't at least suggest some
    of these tools because tracking my issue using apt rdepends didn't help
    that much.

    $ apt show python3-pulp
    Package: python3-pulp
    Version: 1.6.0+dfsg1-5
    Priority: optional
    Section: python
    Source: python-pulp
    Maintainer: Debian OpenStack <team+openstack@tracker.debian.org> Installed-Size: 301 kB
    Depends: coinor-cbc, python3-pyparsing, python3:any
    Homepage: https://github.com/coin-or/pulp
    Tag: implemented-in::python

    $ apt rdepends glpk-utils
    glpk-utils
    Reverse Depends:
    Dépend: sagemath

    Should this be an issue on python3-pulp?

    Thanks,
    Patrice

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)