This is an automated email from the git hooks/post-receive script.
logari81 pushed a commit to branch master
in repository getfem.
The following commit(s) were added to refs/heads/master by this push:
new e413cf24 Workaround stochastic python module load behavior in CI
windows build
e413cf24 is described below
commit e413cf2449d1ead9160c2ddf57c371d4ad9d1ba9
Author: Konstantinos Poulios <[email protected]>
AuthorDate: Sat Feb 7 22:02:02 2026 +0100
Workaround stochastic python module load behavior in CI windows build
- "import getfem" fails like 90% of the times
- presumably due to libmmd.dll not loading or taking too long to load
- issue occurs only for post-2024 Intel OneAPI toolchain
- replacing libmmd.dll with a pre-2025 version resolves the issue
- alternatively preloading this dll with ctypes resolves the issue
as well
- this commit applies the latter workaround
---
.github/workflows/windows-build.yml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/windows-build.yml
b/.github/workflows/windows-build.yml
index 0786ffc1..76f15db1 100644
--- a/.github/workflows/windows-build.yml
+++ b/.github/workflows/windows-build.yml
@@ -41,7 +41,6 @@ jobs:
echo store CMPLR_ROOT=%CMPLR_ROOT%
echo MKLROOT=%MKLROOT%>> "%GITHUB_ENV%"
echo CMPLR_ROOT=%CMPLR_ROOT%>> "%GITHUB_ENV%"
- REM Build MUMPS with Intel Fortran
echo Building MUMPS...
git clone https://github.com/scivision/mumps.git
cd mumps
@@ -124,6 +123,11 @@ jobs:
copy "%CMPLR_ROOT%\bin\libifcoremd.dll"
C:\opt\lib\site-packages\getfem\
copy "%CMPLR_ROOT%\bin\libmmd.dll"
C:\opt\lib\site-packages\getfem\
copy "%CMPLR_ROOT%\bin\svml_dispmd.dll"
C:\opt\lib\site-packages\getfem\
+ REM apply a brilliant hack to workaround some not so brilliant
+ REM *stochastic* dll load fails in post-2024 releases of libmmd.dll
+ set tt=C:\opt\lib\site-packages\getfem\__init__.py
+ set
qq=__import__(\"ctypes\").CDLL(__import__(\"os\").path.join(__import__(\"os\").path.dirname(__import__(\"os\").path.abspath(__file__)),\"libmmd.dll\"))\n
+ python -c "lines=open(r'%tt%').readlines(); lines.insert(-1, '%qq%');
open(r'%tt%', 'w').writelines(lines)"
- name: Upload built libraries as artifact
uses: actions/upload-artifact@v4