Skip to content

fix(prfanalyze-base): pin scipy<1.9 for MCR libstdc++ ABI compat#103

Open
Gilles86 wants to merge 1 commit into
vistalab:masterfrom
Gilles86:fix-scipy-pin-mcr-compat
Open

fix(prfanalyze-base): pin scipy<1.9 for MCR libstdc++ ABI compat#103
Gilles86 wants to merge 1 commit into
vistalab:masterfrom
Gilles86:fix-scipy-pin-mcr-compat

Conversation

@Gilles86

Copy link
Copy Markdown

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.

…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.
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

Successfully merging this pull request may close these issues.

1 participant