-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to build in Windows10 with IntelLLVM #5020
Comments
Hmm, I've read in other contexts that the 2025 version is not yet correctly handled by CMake. I'm fairly certain that icx used to be able to process cpuid.S - which contains only conditionally-compiled i386 assembly for ancient Macs anyway. I think you could try just removing the BTW which version of OpenBLAS are you trying to build - is it 0.3.28 (or develop) ? |
Thanks for the prompt response. Commenting out the line you mention helped to complete the configuring process. I cloned the develop branch. |
I'm not sure - where does it complain ? LAPACK_COMPLEX_STRUCTURE should already get defined by system.cmake line 670 when the operating system is identified as Windows, so something seems to be odd here. |
The line 71 in lapacke_config.h has $if defined(_MSC_VER) and it defines _CRT_USE_C_COMPLEX_H and uses MSVC complex definition. |
Does icx define _MSC_VER ? I'd normally assume this to be set by the Microsoft compiler, maybe the ifdef needs to be expanded to include "but not Intel". Not sure why you'd get a bunch of link errors now, unless building the caxpy kernel (or its interface code) failed earlier. |
I forgot which CMake file I saw this, but I remember that the compiler-frontend-variant and compiler-simulate-id are MSVC for IntelLLVM. Do you think these might be related? |
Could be related, yes. But then this does not appear to have caused problems in the past (unless it is a very recent change in the Intel compiler package, and as said there are some concerns about its interfacing with current CMake). Might also want to check if the "missing symbol" problem only affects complex functions, or if you get the same for sblat1/saxpy. |
Seems unlikely to me but I can't rule it out. The CMake build has a few compiler specifics hardcoded (or relying on CMake's own checks) that the gmake build calls the c_check and f_check scripts for. But so far these settings worked... I'll see if I can set up a quick test tomorrow (getting a bit late here already) |
Thank you so much for your help today! |
Haven't quite succeeded yet, unfortunately. So far, I got the build to use consistent (no) trailing underlines on symbol names, but I cannot get CMake to include build instructions for the assembly (.S) kernels in the Ninja build file. (CMake appears to identify the compiler/assembler correctly as IntelLLVM though, and invoking icx manually on any .S file generates an object without complaint as well.) |
Thanks for the update. I was not able to get much progress either on linking. I am trying to see if there were any problems during the compilation of the library. Missing symbol problem also appears for sblat1/saxpy and for dblat1/daxpy. Please let me know if you have any suggestion for me to try. |
It looks like ifx uses Uppercase without trailing underscore for name mangling for Fortran. But symbols in openblas.lib after compilation are stored following gfortran name mangling convention which is lowercase with trailing underscore. What would you suggest in editing CMake file(s) so that .f.obj files and openblas.lib have same name mangling style? |
I also encountered this problem. As a temporary solution - you can compile the library with dynamic linking using MinGW and use it in a project with the MSVC compiler. As far as I remember, the library compiled this way does not pass testing, but this seems to be a bug in the tests themselves. Nevertheless, this option is definitely suitable if you plan to use the library as a dependency for the Eigen library in a CMake project on Windows. |
When you compile with dynamic linking on Windows, the tests currently require the freshly created dll to be in the path (or in the same place as the respective test executable), which will not be the case... |
This comment was marked as off-topic.
This comment was marked as off-topic.
@parteimeister it won't find output files for checking if the tests weren't run - the BLAS2/3 tests write their output to file which the helper script then checks for occurrence of the word "FAILED". But anyway that is a wholly different topic |
@parteimeister Thank you for your suggestion on the temporary solution using dynamic linking with MinGW. @martin-frbg I am still interested in solving this issue but I don't want to bother you too much on this, especially close to holiday season. If you think there is no simple solution, I can try with MinGW as @parteimeister suggested. Do you think this issue may be considered to be fixed by next release? |
I wrote a .asm that maps ifx's default naming to gfortran naming convention just to build 'dblat1.exe', and added this during the linking process. |
This is what I wrote yesterday - the erroneous underscores added to the symbols can be worked around, actually they are the result of a bad assumption in the cmake files that "every" compiler will produce/want them anyway. (In contrast, the gmake build runs a shell script that parses compiler output to find out). The main issue however is that while the CMake environment creates all the correct build wrappers for the .S files, it apparently does not write the corresponding build |
I see ... Thanks for the explanation on the main issue. |
Major progress - the assembler problem can be solved by additionally specifying |
Hello,
I am trying to build OpenBLAS in Windows with Intel's C and Fortran compilers. I am also using VS2022 preview for build environment.
Intel made their IntelLLVM compilers icx for C language and ifx for Fortran as default, and it seems to cause some conflict with prebuild setup.
In the x64 Native Tools, I activate the Intel's environment. Then, I try to configure by executing the line: cmake .. -G "Ninja" -DCMAKE_CXX_COMPILER=icx -DCMAKE_C_COMPILER=icx -DCMAKE_Fortran_COMPILER=ifx -DCMAKE_MT=mt -DBUILD_WITHOUT_LAPACK=no -DNOFORTRAN=0 -DDYNAMIC_ARCH=OFF -DCMAKE_BUILD_TYPE=Release
It tries to compile the cpuid.S, which seems to be ARM related and gives other error messages.
Full error messages are copied in configure_errors.txt files.
configure_errors.txt
In the prebuild.cmake, should I edit the line so that it configures with -DFORCE_GENERIC like MSVC?
Thank you in advance,
Sean
The text was updated successfully, but these errors were encountered: