fix(prfanalyze-base): pin scipy<1.9 for MCR libstdc++ ABI compat#103
Open
Gilles86 wants to merge 1 commit into
Open
fix(prfanalyze-base): pin scipy<1.9 for MCR libstdc++ ABI compat#103Gilles86 wants to merge 1 commit into
Gilles86 wants to merge 1 commit into
Conversation
…tisfy it
The 'scientific' conda env unpinned numpy/scipy/nilearn/pandas, so
mamba resolves to the latest at image-build time (2023+: scipy 1.10+,
numpy 1.24+). scipy >= 1.9 needs GLIBCXX_3.4.26 (libstdc++ >= 6.0.30).
But MCR R2020b ships libstdc++ 6.0.25 in /opt/mcr/v99/sys/os/glnxa64,
and the base image prepends that path to LD_LIBRARY_PATH. So on modern
hosts (kernel 6.x / glibc 2.39 / apptainer 1.4), as soon as
/scripts/run.py imports scipy:
ImportError: /opt/mcr/v99/sys/os/glnxa64/libstdc++.so.6:
version 'GLIBCXX_3.4.26' not found
(required by .../scipy/linalg/_matfuncs_sqrtm_triu.cpython-39-...so)
The BIDS app surfaces this as 'Failed to exec /solve.sh' and exits
in ~7 s with no estimates.json.
Fix: pin numpy=1.21.6, scipy=1.7.3, nilearn=0.9.2, pandas=1.4.4 — the
last self-consistent line whose C extensions link against
libstdc++ <= 6.0.25 and that supports Python 3.9.
Verified end-to-end on UZH sciencecluster (apptainer 1.4.1, Ubuntu
24.04 host class) by rebuilding prfanalyze-aprf-fixed.sif from
this base.
Companion issue vistalab#102 covers a *separate* MCR libjvm.so vs kernel 6.x
crash that this PR does not address.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 'scientific' conda env unpinned numpy/scipy/nilearn/pandas, so mamba resolves to the latest at image-build time (2023+: scipy 1.10+, numpy 1.24+). scipy >= 1.9 needs GLIBCXX_3.4.26 (libstdc++ >= 6.0.30).
But MCR R2020b ships libstdc++ 6.0.25 in /opt/mcr/v99/sys/os/glnxa64, and the base image prepends that path to LD_LIBRARY_PATH. So on modern hosts (kernel 6.x / glibc 2.39 / apptainer 1.4), as soon as /scripts/run.py imports scipy:
ImportError: /opt/mcr/v99/sys/os/glnxa64/libstdc++.so.6:
version 'GLIBCXX_3.4.26' not found
(required by .../scipy/linalg/_matfuncs_sqrtm_triu.cpython-39-...so)
The BIDS app surfaces this as 'Failed to exec /solve.sh' and exits in ~7 s with no estimates.json.
Fix: pin numpy=1.21.6, scipy=1.7.3, nilearn=0.9.2, pandas=1.4.4 — the last self-consistent line whose C extensions link against libstdc++ <= 6.0.25 and that supports Python 3.9.
Verified end-to-end on UZH sciencecluster (apptainer 1.4.1, Ubuntu 24.04 host class) by rebuilding prfanalyze-aprf-fixed.sif from this base.
Companion issue #102 covers a separate MCR libjvm.so vs kernel 6.x crash that this PR does not address.