Skip to content
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

openblas: improve cross compilation support #21485

Closed
wants to merge 13 commits into from

Conversation

amrox
Copy link
Contributor

@amrox amrox commented Nov 30, 2023

Specify library name and version: openblas/0.3.12 - openblas/0.3.17

Cross-compilation in the recipe was explictly disabled. However, the source repository does seem to support cross-compilation in general.

An issue with the architecture detection prevented cross-compilation from x86_64 to arm64 from working correctly. This issue was fix in OpenMathLib/OpenBLAS#4142. This ports the same fix to older versions of OpenBlas.


amrox and others added 4 commits November 29, 2023 22:32
- allow for cross-compilation in general
- fix cross-compilation for x86_64 -> armv8
to main and test recipes
@conan-center-bot

This comment has been minimized.

@ghost ghost mentioned this pull request Jan 7, 2024
@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot

This comment has been minimized.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 9 (dbcb782b1ed8b065f1c4204b40f372ec2688d9c9):

  • openblas/0.3.26:
    All packages built successfully! (All logs)

  • openblas/0.3.25:
    All packages built successfully! (All logs)

  • openblas/0.3.20:
    All packages built successfully! (All logs)

  • openblas/0.3.24:
    All packages built successfully! (All logs)

  • openblas/0.3.12:
    All packages built successfully! (All logs)

  • openblas/0.3.17:
    All packages built successfully! (All logs)

  • openblas/0.3.15:
    All packages built successfully! (All logs)

  • openblas/0.3.13:
    All packages built successfully! (All logs)

  • openblas/0.3.10:
    All packages built successfully! (All logs)


Conan v2 pipeline ❌

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

See details:

Failure in build 9 (dbcb782b1ed8b065f1c4204b40f372ec2688d9c9):

  • openblas/0.3.12:
    Didn't run or was cancelled before finishing

  • openblas/0.3.15:
    Didn't run or was cancelled before finishing

  • openblas/0.3.25:
    Didn't run or was cancelled before finishing

  • openblas/0.3.26:
    Didn't run or was cancelled before finishing

  • openblas/0.3.17:
    Didn't run or was cancelled before finishing

  • openblas/0.3.24:
    Didn't run or was cancelled before finishing

  • openblas/0.3.13:
    Didn't run or was cancelled before finishing

  • openblas/0.3.10:
    CI failed to create some packages (All logs)

    Logs for packageID 92ba54a483177b5f859f3019f70056303b054902:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=apple-clang
    compiler.cppstd=17
    compiler.libcxx=libc++
    compiler.version=13
    os=Macos
    [options]
    */*:shared=False
    
    [...]
    openblas/0.3.10: CMakeToolchain generated: ../../../src/CMakeUserPresets.json
    openblas/0.3.10: Generating aggregated env files
    openblas/0.3.10: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
    openblas/0.3.10: Calling build()
    openblas/0.3.10: apply_conandata_patches(): No patches defined in conandata
    openblas/0.3.10: Running CMake.configure()
    openblas/0.3.10: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="/Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/b/build/Release/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/p" -DNOFORTRAN="ON" -DBUILD_WITHOUT_LAPACK="ON" -DDYNAMIC_ARCH="OFF" -DUSE_THREAD="ON" -DUSE_LOCKING="OFF" -DMSVC_STATIC_CRT="OFF" -DANDROID="OFF" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/b/src"
    CMake Deprecation Warning at CMakeLists.txt:5 (cmake_minimum_required):
      Compatibility with CMake < 2.8.12 will be removed from a future version of
      CMake.
    
      Update the VERSION argument <min> value or use a ...<max> suffix to tell
      CMake that the project does not need compatibility with older versions.
    
    
    -- Using Conan toolchain: /Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/b/build/Release/generators/conan_toolchain.cmake
    -- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
    -- Conan toolchain: C++ Standard 17 with extensions OFF
    -- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
    -- The C compiler identification is AppleClang 13.0.0.13000029
    -- The ASM compiler identification is Clang
    -- Found assembler: /Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working C compiler: /Applications/conan/xcode/13.0/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
    -- Detecting C compile features
    -- Detecting C compile features - done
    CMake Warning at CMakeLists.txt:66 (message):
      CMake support is experimental.  It does not yet support all build options
      and may not produce the same Makefiles that OpenBLAS ships with.
    
    
    CMake Error at cmake/system.cmake:17 (message):
      When cross compiling, a TARGET is required.
    Call Stack (most recent call first):
      CMakeLists.txt:69 (include)
    
    
    -- Configuring incomplete, errors occurred!
    See also "/Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/b/build/Release/CMakeFiles/CMakeOutput.log".
    See also "/Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/b/build/Release/CMakeFiles/CMakeError.log".
    
    openblas/0.3.10: ERROR: 
    Package '92ba54a483177b5f859f3019f70056303b054902' build failed
    openblas/0.3.10: WARN: Build folder /Users/jenkins/w/prod-v2/bsr/91300/ccadb/p/b/openb9fdb933347dbd/b/build/Release
    ERROR: openblas/0.3.10: Error in build() method, line 160
    	cmake = self._configure_cmake()
    while calling '_configure_cmake', line 92
    	cmake.configure()
    	ConanException: Error 1 while executing
    
  • openblas/0.3.20:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

@EstebanDugueperoux2
Copy link
Contributor

EstebanDugueperoux2 commented Mar 7, 2024

Hello @amrox,

I'm interested by your PR, using debian:bullseye docker image I get error on build 0.3.10 release while it works with 0.3.26 release:

`CMake Error at cmake/prebuild.cmake:529 (MESSAGE):
Compiling getarch_2nd failed Change Dir:
/root/.conan2/p/b/openb46fc3a72077e9/b/build/Release/getarch2_build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_d3ad4/fast && /usr/bin/gmake -f
CMakeFiles/cmTC_d3ad4.dir/build.make CMakeFiles/cmTC_d3ad4.dir/build

gmake[1]: Entering directory
'/root/.conan2/p/b/openb46fc3a72077e9/b/build/Release/getarch2_build/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_d3ad4.dir/getarch_2nd.c.o

/usr/bin/cc -m64 -fPIE -march=native -DGEMM_MULTITHREAD_THRESHOLD=4
-DNO_PARALLEL_MAKE=0
-I"/root/.conan2/p/b/openb46fc3a72077e9/b/build/Release/getarch2_build"
-I"/root/.conan2/p/b/openb46fc3a72077e9/b/src"
-I"/root/.conan2/p/b/openb46fc3a72077e9/b/build/Release" -o
CMakeFiles/cmTC_d3ad4.dir/getarch_2nd.c.o -c
/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c: In function
‘main’:

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:14:35: error:
‘SGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
you mean ‘SHGEMM_DEFAULT_UNROLL_M’?

 14 |     printf("SGEMM_UNROLL_M=%d\n", SGEMM_DEFAULT_UNROLL_M);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   SHGEMM_DEFAULT_UNROLL_M

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:14:35: note: each
undeclared identifier is reported only once for each function it appears in

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:15:35: error:
‘SGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
you mean ‘QGEMM_DEFAULT_UNROLL_N’?

 15 |     printf("SGEMM_UNROLL_N=%d\n", SGEMM_DEFAULT_UNROLL_N);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   QGEMM_DEFAULT_UNROLL_N

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:16:35: error:
‘DGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
you mean ‘XGEMM_DEFAULT_UNROLL_M’?

 16 |     printf("DGEMM_UNROLL_M=%d\n", DGEMM_DEFAULT_UNROLL_M);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   XGEMM_DEFAULT_UNROLL_M

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:17:35: error:
‘DGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
you mean ‘QGEMM_DEFAULT_UNROLL_N’?

 17 |     printf("DGEMM_UNROLL_N=%d\n", DGEMM_DEFAULT_UNROLL_N);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   QGEMM_DEFAULT_UNROLL_N

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:21:35: error:
‘CGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
you mean ‘XGEMM_DEFAULT_UNROLL_M’?

 21 |     printf("CGEMM_UNROLL_M=%d\n", CGEMM_DEFAULT_UNROLL_M);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   XGEMM_DEFAULT_UNROLL_M

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:22:35: error:
‘CGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
you mean ‘QGEMM_DEFAULT_UNROLL_N’?

 22 |     printf("CGEMM_UNROLL_N=%d\n", CGEMM_DEFAULT_UNROLL_N);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   QGEMM_DEFAULT_UNROLL_N

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:23:35: error:
‘ZGEMM_DEFAULT_UNROLL_M’ undeclared (first use in this function); did
you mean ‘XGEMM_DEFAULT_UNROLL_M’?

 23 |     printf("ZGEMM_UNROLL_M=%d\n", ZGEMM_DEFAULT_UNROLL_M);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   XGEMM_DEFAULT_UNROLL_M

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:24:35: error:
‘ZGEMM_DEFAULT_UNROLL_N’ undeclared (first use in this function); did
you mean ‘QGEMM_DEFAULT_UNROLL_N’?

 24 |     printf("ZGEMM_UNROLL_N=%d\n", ZGEMM_DEFAULT_UNROLL_N);
    |                                   ^~~~~~~~~~~~~~~~~~~~~~
    |                                   QGEMM_DEFAULT_UNROLL_N

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:71:50: error:
‘SGEMM_DEFAULT_Q’ undeclared (first use in this function); did you mean
‘SHGEMM_DEFAULT_Q’?

 71 |     printf("#define SLOCAL_BUFFER_SIZE\t%ld\n", (SGEMM_DEFAULT_Q * SGEMM_DEFAULT_UNROLL_N * 4 * 1 *  sizeof(float)));
    |                                                  ^~~~~~~~~~~~~~~
    |                                                  SHGEMM_DEFAULT_Q

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:72:50: error:
‘DGEMM_DEFAULT_Q’ undeclared (first use in this function); did you mean
‘SHGEMM_DEFAULT_Q’?

 72 |     printf("#define DLOCAL_BUFFER_SIZE\t%ld\n", (DGEMM_DEFAULT_Q * DGEMM_DEFAULT_UNROLL_N * 2 * 1 *  sizeof(double)));
    |                                                  ^~~~~~~~~~~~~~~
    |                                                  SHGEMM_DEFAULT_Q

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:73:50: error:
‘CGEMM_DEFAULT_Q’ undeclared (first use in this function); did you mean
‘SHGEMM_DEFAULT_Q’?

 73 |     printf("#define CLOCAL_BUFFER_SIZE\t%ld\n", (CGEMM_DEFAULT_Q * CGEMM_DEFAULT_UNROLL_N * 4 * 2 *  sizeof(float)));
    |                                                  ^~~~~~~~~~~~~~~
    |                                                  SHGEMM_DEFAULT_Q

/root/.conan2/p/b/openb46fc3a72077e9/b/src/getarch_2nd.c:74:50: error:
‘ZGEMM_DEFAULT_Q’ undeclared (first use in this function); did you mean
‘SHGEMM_DEFAULT_Q’?

 74 |     printf("#define ZLOCAL_BUFFER_SIZE\t%ld\n", (ZGEMM_DEFAULT_Q * ZGEMM_DEFAULT_UNROLL_N * 2 * 2 *  sizeof(double)));
    |                                                  ^~~~~~~~~~~~~~~
    |                                                  SHGEMM_DEFAULT_Q

gmake[1]: *** [CMakeFiles/cmTC_d3ad4.dir/build.make:85:
CMakeFiles/cmTC_d3ad4.dir/getarch_2nd.c.o] Error 1

gmake[1]: Leaving directory
'/root/.conan2/p/b/openb46fc3a72077e9/b/build/Release/getarch2_build/CMakeFiles/CMakeTmp'

gmake: *** [Makefile:140: cmTC_d3ad4/fast] Error 2

Call Stack (most recent call first):
cmake/system.cmake:157 (include)
CMakeLists.txt:69 (include)

-- Configuring incomplete, errors occurred!
See also "/root/.conan2/p/b/openb46fc3a72077e9/b/build/Release/CMakeFiles/CMakeOutput.log".

openblas/0.3.10: ERROR:
Package '2b7b4d8cb3a6f178c69b39cee6dde5a1d81a0aa6' build failed
openblas/0.3.10: WARN: Build folder /root/.conan2/p/b/openb46fc3a72077e9/b/build/Release
ERROR: openblas/0.3.10: Error in build() method, line 160
cmake = self._configure_cmake()
while calling '_configure_cmake', line 92
cmake.configure()
ConanException: Error 1 while executing
`

perhaps we can drop 0.3.10 old release?

Regards.

@ghost ghost mentioned this pull request Mar 21, 2024
3 tasks
@ghost ghost mentioned this pull request May 20, 2024
3 tasks
@jcar87
Copy link
Contributor

jcar87 commented Jun 11, 2024

superseded by #24171 - please reopen (or open a new issue) if something is missing, thank you!

@jcar87 jcar87 closed this Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants