haasad / PyPardiso

Python interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations
BSD 3-Clause "New" or "Revised" License
133 stars 20 forks source link

Possible bug on Windows #26

Closed ma-sadeghi closed 2 years ago

ma-sadeghi commented 2 years ago

Hi @haasad, as you might know, we're using pypardiso as our default solver in OpenPNM. We recently hit this error in our continuous integration workflows on GitHub Actions Windows machines. Any idea what might be causing it?

     import pypardiso
c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\_pytest\assertion\rewrite.py:170: in exec_module
    exec(co, module.__dict__)
c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\pypardiso\__init__.py:3: in <module>
    from .pardiso_wrapper import PyPardisoSolver
c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\_pytest\assertion\rewrite.py:170: in exec_module
    exec(co, module.__dict__)
c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\pypardiso\pardiso_wrapper.py:9: in <module>
    import mkl
c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\_pytest\assertion\rewrite.py:170: in exec_module
    exec(co, module.__dict__)
c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages\mkl\__init__.py:49: in <module>
    from . import _mklinit
E   ImportError: DLL load failed while importing _mklinit: The specified module could not be found.
haasad commented 2 years ago

Hi @ma-sadeghi, could you please provide a bit more context? A link to the failing workflow would already be helpful. Is this a workflow with pip or conda?

ma-sadeghi commented 2 years ago

Thanks for getting back to me @haasad. Here's the link to the failing workflow: https://github.com/PMEAL/OpenPNM/runs/3985079957?check_suite_focus=true

To pin down the issue, in the workflow, I just do

pip install pypardiso
python -c "import pypardiso"
haasad commented 2 years ago

mkl-service is now dropped as a dependency in v0.4.0, please let me know if this fixed your issues

ma-sadeghi commented 2 years ago

Hi @haasad Thanks once again. I confirm that the issue is now fixed.