ncbi / pgap

NCBI Prokaryotic Genome Annotation Pipeline
Other
294 stars 89 forks source link

[FEATURE REQUEST] Quit if no SSE4.2 support is detected #287

Closed MrTomRod closed 5 months ago

MrTomRod commented 5 months ago

Hey NCBI gang! Long time no issue :smile:

I noticed that PGAP does not crash if SSE4.2 support is not available. It just writes a few lines like this to cwltool.log:

Critical: (106.22) Application requires a CPU with SSE 4.2 support

It happened to me when I tried running it on a VM where this was not enabled. Nevertheless, PGAP went on to produce output files!

Describe the solution you'd like pgap.py could catch this early on and deliver a clear error message. Example code:

def check_sse42_support():
    with open('/proc/cpuinfo') as f:
        cpuinfo = f.read()
    assert 'sse4_2' in cpuinfo, "SSE4.2 is not supported on this system."

BTW: Are the output files produced without SSE4.2 still useable?

azat-badretdin commented 5 months ago

Hi, Thomas, always glad to see your Issues!

I tracked this message to our C++ Toolkit /corelib/ and I am almost sure that this message is informational only. I opened internal ticket CXX-13466 where I passed your question to our Toolkit folks

azat-badretdin commented 5 months ago

Here is what our expert said:

Any attempt to run any of the specific portions of code that don't support the user's (old) processor will yield an obvious "Illegal instruction" error; the up-front warning just raises awareness of the possibility.

MrTomRod commented 5 months ago

Not sure what that implies for my output. Does it mean that since the actual command didn't fail, it's okay? Can you then remove the following line in Quick-Start:

The CPU must have SSE 4.2 support (released in 2008).

azat-badretdin commented 5 months ago

Does it mean that since the actual command didn't fail, it's okay?

Probably yes, let me double check on CXX-13466

Can you then remove the following line in Quick-Start:

This lines mean that we do not support systems without SSE 4.2 support because we can't guarantee that some binaries would fail with "illegal instruction" command.

azat-badretdin commented 5 months ago

Does it mean that since the actual command didn't fail, it's okay?

This has been confirmed, Thomas.

I am sorry to inform you that as of original request, the answer on PGAPX-1256 was, alas, negatory. The management reaffirm our stance on SSE 4.2 support presented in Quick Start and resistance to additional /proc related processing in pgap.py

MrTomRod commented 5 months ago

Thanks for the quick resolution of the issue!