Skip to content

Conversation

Akash9824
Copy link
Contributor

@Akash9824 Akash9824 commented Oct 11, 2025

No description provided.

@rgommers
Copy link
Collaborator

Thanks for the PR @Akash9824. It would be useful to explain what issue you are having without this change, and why the choices you are introducing here are the correct ones (e.g., why 24 threads, is that the same as on x86-64 or not).

@mattip
Copy link
Collaborator

mattip commented Oct 11, 2025

Fixes #213

@Akash9824
Copy link
Contributor Author

Thanks for the PR @Akash9824. It would be useful to explain what issue you are having without this change, and why the choices you are introducing here are the correct ones (e.g., why 24 threads, is that the same as on x86-64 or not).

Apologies for not describing the issue earlier. I used 24 threads, as the same configuration is being used in x86-64.

@mattip
Copy link
Collaborator

mattip commented Oct 11, 2025

macOS failures not related. Any idea why arm build is failing? It seems something changed with the compiler since the last successful build in July.

@mattip
Copy link
Collaborator

mattip commented Oct 11, 2025

In #216 the flang build fails on windows-arm64 with

error: Semantic errors in CMakeFiles\LAPACK_OVERRIDES.dir\lapack-netlib\SRC\sgedmd.f90-pp.f90
C:\\a\\openblas-libs\\openblas-libs\\OpenBLAS\\lapack-netlib\\SRC\\sgedmd.f90:543:29: \
   error: Cannot read module file for module 'iso_fortran_env': \
      Source file 'iso_fortran_env.mod' was not found
        USE                   iso_fortran_env

I am trying the scipy recipe with llvm 20

@Akash9824
Copy link
Contributor Author

Akash9824 commented Oct 12, 2025

In #216 the flang build fails on windows-arm64 with

error: Semantic errors in CMakeFiles\LAPACK_OVERRIDES.dir\lapack-netlib\SRC\sgedmd.f90-pp.f90
C:\\a\\openblas-libs\\openblas-libs\\OpenBLAS\\lapack-netlib\\SRC\\sgedmd.f90:543:29: \
   error: Cannot read module file for module 'iso_fortran_env': \
      Source file 'iso_fortran_env.mod' was not found
        USE                   iso_fortran_env

I am trying the scipy recipe with llvm 20

I observed the same error with VS 2022 Flang. I don't think it's due to the flags, I'm able to build successfully using LLVM 20+

@mattip
Copy link
Collaborator

mattip commented Oct 12, 2025

What fortran compiler are you using?

@Akash9824
Copy link
Contributor Author

What fortran compiler are you using?

image

@Akash9824
Copy link
Contributor Author

Akash9824 commented Oct 12, 2025

In #216 the flang build fails on windows-arm64 with

error: Semantic errors in CMakeFiles\LAPACK_OVERRIDES.dir\lapack-netlib\SRC\sgedmd.f90-pp.f90
C:\\a\\openblas-libs\\openblas-libs\\OpenBLAS\\lapack-netlib\\SRC\\sgedmd.f90:543:29: \
   error: Cannot read module file for module 'iso_fortran_env': \
      Source file 'iso_fortran_env.mod' was not found
        USE                   iso_fortran_env

I am trying the scipy recipe with llvm 20

I observed the same error with VS 2022 Flang. I don't think it's due to the flags, I'm able to build successfully using LLVM 20+

minor typo.. not clang its flang.

@mattip
Copy link
Collaborator

mattip commented Oct 12, 2025

ahh, maybe the image now has flang from visual studio and is is being found before the llvm one?

@mattip
Copy link
Collaborator

mattip commented Oct 12, 2025

@Akash9824 you are using main instead of a branch. It is better to create a branch to prevent confusion. This is my typical workflow:

# Update to latest main
$ git checkout main
$ git pull
# mess around with the code: make sure the issue reproduces and 
# maybe even find a fix. But before committing the changes
$ git checkout -b fix-problem.  # use a better branch name
# Only now do a commit and push
$ git add ...
$ git commit ...
$ git push Akash9824 

@mattip
Copy link
Collaborator

mattip commented Oct 12, 2025

Preferring LLVM flang seems to have fixed the problem. @Akash9824 could you download the appropriate 64-bit artifact and check that indeed it uses all the threads on your machine? Copy the DLL from the zip file over the one in your current numpy.libs directory, it should be renamed to scipy_openblas-3ad62eafc8e0b61ac25b6f3df4bebfff.dll

@Akash9824
Copy link
Contributor Author

Akash9824 commented Oct 12, 2025

Preferring LLVM flang seems to have fixed the problem. @Akash9824 could you download the appropriate 64-bit artifact and check that indeed it uses all the threads on your machine? Copy the DLL from the zip file over the one in your current numpy.libs directory, it should be renamed to scipy_openblas-3ad62eafc8e0b61ac25b6f3df4bebfff.dll

Yep, it seems to be working, I can see all cores being utilized(seeing num of working threads equals to num of cores). I'm doing dot matrix multiplication.
Thanks a lot, @mattip , for quickly looking into the matter!

image

@mattip mattip merged commit 8c01500 into MacPython:main Oct 12, 2025
15 of 19 checks passed
@mattip
Copy link
Collaborator

mattip commented Oct 12, 2025

I will try to get #216 to pass, and in any case upload updated wheels to PyPI with this fix soon. Then I can submit PRs to numpy (and scipy?) to use it.

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.

3 participants