FRED-2 / OptiType

Precision HLA typing from next-generation sequencing data
BSD 3-Clause "New" or "Revised" License
180 stars 74 forks source link

The SolverFactory was unable to create the solver "glpk" #128

Closed iskysinger closed 2 months ago

iskysinger commented 2 years ago

Hi, Thank you for developing the great tool! I have been using Optitype v1.3.1. There was an issue when I used the tool, it's not happened very often, just for few samples, but I was wondering how this error happened and if there is a way to prevent this. The error message is here:

The SolverFactory was unable to create the solver "glpk"
and returned an UnknownSolver object.  This error is raised at the point
where the UnknownSolver object was used as if it were valid (by calling
method "solve").

The original solver was created with the following parameters:
        type: glpk
        _args: ()
        options: {}
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bioqa_cmi/miniconda3/envs/WES_HLA/bin/OptiTypePipeline.py", line 419, in <module>
    result = op.solve(args.enumerate)
  File "/home/bioqa_cmi/miniconda3/envs/WES_HLA/bin/model.py", line 154, in solve
    res = self.__solver.solve(self.__instance, options={}, tee=self.__verbosity)
  File "/home/jzhang/anaconda3/lib/python3.7/site-packages/pyomo/opt/base/solvers.py", line 105, in solve
    self._solver_error('solve')
  File "/home/jzhang/anaconda3/lib/python3.7/site-packages/pyomo/opt/base/solvers.py", line 133, in _solver_error
    + "\n\toptions: %s" % ( self.options, ) )
RuntimeError: Attempting to use an unavailable solver.

Thanks a lot.

b-schubert commented 2 months ago

was this run on a cluster? Probably GLPK was not installed on the node?