Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenMS is not working #7333

Open
clin888 opened this issue Feb 5, 2024 · 14 comments
Open

OpenMS is not working #7333

clin888 opened this issue Feb 5, 2024 · 14 comments

Comments

@clin888
Copy link

clin888 commented Feb 5, 2024

Hi,

The following message was found when generated a spectrum library using DDA data. Please help
Thanks

Traceback (most recent call last):
File "C:\ProgramData\Python_3.9\Scripts\easypqp-script.py", line 33, in
sys.exit(load_entry_point('easypqp==0.1.42', 'console_scripts', 'easypqp')())
File "C:\ProgramData\Python_3.9\Scripts\easypqp-script.py", line 25, in importlib_load_entry_point
return next(matches).load()
File "C:\ProgramData\Python_3.9\lib\importlib\metadata.py", line 86, in load
module = import_module(match.group('module'))
File "C:\ProgramData\Python_3.9\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "C:\ProgramData\Python_3.9\lib\site-packages\easypqp\main.py", line 9, in
from .convert import conversion, basename_spectralfile
File "C:\ProgramData\Python_3.9\lib\site-packages\easypqp\convert.py", line 18, in
import pyopenms as po
File "C:\ProgramData\Python_3.9\lib\site-packages\pyopenms_init.py", line 107, in
raise e
File "C:\ProgramData\Python_3.9\lib\site-packages\pyopenms_init.py", line 65, in
from ._all_modules import * # pylint: disable=wildcard-import; lgtm(py/polluting-import)
File "C:\ProgramData\Python_3.9\lib\site-packages\pyopenms_all_modules.py", line 1, in
from ._pyopenms_1 import * # pylint: disable=wildcard-import; lgtm(py/polluting-import)
ImportError: DLL load failed while importing _pyopenms_1: A dynamic link library (DLL) initialization routine failed.

======================================================================
Error when loading pyOpenMS libraries!
Libraries could not be found / could not be loaded.

To debug this error, please run ldd (on linux), otool -L (on macOS) or dependency walker (on windows) on

C:\ProgramData\Python_3.9\lib\site-packages\pyopenms\pyopenms*.so

======================================================================
Traceback (most recent call last):
File "C:\Fragpipe\FragPipe-jre-21.1\fragpipe\tools\speclib\gen_con_spec_lib.py", line 724, in
main_easypqp()
File "C:\Fragpipe\FragPipe-jre-21.1\fragpipe\tools\speclib\gen_con_spec_lib.py", line 566, in main_easypqp
subprocess.run([os.fspath(easypqp), '--version'], check=True)
File "C:\ProgramData\Python_3.9\lib\subprocess.py", line 528, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\ProgramData\Python_3.9\Scripts\easypqp.exe', '--version']' returned non-zero exit status 1.
Process 'SpecLibGen' finished, exit code: 1
Process returned non-zero exit code, stopping

log_2024-02-04_16-55-51.txt

@jpfeuffer
Copy link
Contributor

Hi!

I think you might be getting this error because of one of the following reasons:

  • You are running 32-bit Python or a 32-bit Windows
  • You have not installed the Microsoft Visual C++ Redistributable package
  • Your CPU does not support certain SIMD (AVX?) instructions

Let us know if you need help checking any of those facts.

Tagging @cbielow as a windows and SIMD expert.

@clin888
Copy link
Author

clin888 commented Feb 5, 2024

Hi,

Thank you for your help,

You are running 32-bit Python or a 32-bit Windows
--I run 64-bit Python with 64-bit window 10 enterprise
You have not installed the Microsoft Visual C++ Redistributable package
--I have Microsoft Visual C++ Redistributable package installed
Your CPU does not support certain SIMD (AVX?) instructions
--The CPU is intel Xeon ES 530 and it should support AVX

Thanks

@jpfeuffer
Copy link
Contributor

jpfeuffer commented Feb 5, 2024

Hm ok.
Can you list the DLLs or pyds in C:\ProgramData\Python_3.9\lib\site-packages\pyopenms?
And potentially even run DependencyWalker on any of the _pyopenms.dlls or .pyds and post a screenshot? https://lucasg.github.io/Dependencies/

@clin888
Copy link
Author

clin888 commented Feb 5, 2024

Hi,

Thank you for your efforts. Enclosed is a screenshot for Dependency and Pyopenms

pyopenms_file_list.docx
.

@jpfeuffer
Copy link
Contributor

Thank you very much for your quick and helpful debugging.
Unfortunately, your screenshots actually look very much correct. I think "Dependencies" should show some dependent DLLs as red, in case they are missing or incompatible.
Maybe run dependencies on _pyopenms_1.cp39-win_amd64 and quickly scroll through the dependency list to check that there is nothing marked in the color red.

@jkennedy-hutch
Copy link

Good afternoon,

I'd like to take over where clin888 left off - he's currently out of the lab for a while. Attached is a screenshot of the dependencies for _pyopenms_1.cp39-win_amd64. It looks like there's one in red and a couple libraries with bad checksums. Are these our culprits?

Thanks,
-Jake
dependencies

@jpfeuffer
Copy link
Contributor

jpfeuffer commented Apr 20, 2024

Hi!

Maybe the missing ordinals are a problem, but they are from a system library, not anything that we ship.
The incorrect checksums are less likely to be a problem, I don't think they are checked by default during loading (I think a checksum of 0 just means we don't encode any into the DLL).

Can you try in whatever python (environment) this code is called by fragpipe to run:

import dlltracer
import sys
with dlltracer.Trace(out=sys.stdout):
    import pyopenms
    print(pyopenms.__version__)

To potentially debug at which library it really crashes.
(I found this somewhere, never tried myself)

@jkennedy-hutch
Copy link

jkennedy-hutch commented Apr 22, 2024 via email

@jpfeuffer
Copy link
Contributor

Oh yes, you need to pip install dlltracer into that env first. I forgot.

@jkennedy-hutch
Copy link

jkennedy-hutch commented Apr 22, 2024 via email

@jpfeuffer
Copy link
Contributor

Hmmm can you try running it from an elevated/admin command line or python Run as Administrator?
Do you have those permissions? I think they are unfortunately necessary for this kind of debugging.

@jkennedy-hutch
Copy link

jkennedy-hutch commented Apr 22, 2024 via email

@jpfeuffer
Copy link
Contributor

In theory it should not affect the execution but I cannot guarantee. Maybe it's also the way that fragpipe calls easypqp that calls pyopenms.. (and the permissions involved in spawning those subprocesses or accessing files/dlls)

Can you try just importing pyopenms in the python env? This should "work" without admin permissions (or at least fail with the initial error).

Other options are trying a fresh Windows virtual machine or so, to see if it's reproducible.

Unfortunately I do not have Windows, therefore we depend on GitHub's public runners, on which pyopenms works on a fresh "installation"

@jkennedy-hutch
Copy link

jkennedy-hutch commented Apr 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants