0

I'm trying to build arrow with conan + cmake. As you can read here, I have to affect an option variable to avoid optimizations based on my machine, because the code I'm building will be used in many computers, some of which don't have AVX2 as mine does (the options available in the conan arrow recipe are limited and don't include SIMD level).

Here's arrow's relevant piece of the cmake:

define_option_string(ARROW_RUNTIME_SIMD_LEVEL
                       "Max runtime SIMD optimization level"
                       "MAX" # default to max supported by compiler
                       "NONE"
                       "SSE4_2"
                       "AVX2"
                       "AVX512"
                       "MAX")

I tried adding the option as part of the conan install command:

conan install .. --build=arrow -e:b ARROW_RUNTIME_SIMD_LEVEL=NONE

and even setting it as an environment variable (and several other crazy ideas). But it doesn't matter. The end result is that cmake sets the default (MAX), as shown in this part of the build output:

--   ARROW_RUNTIME_SIMD_LEVEL=MAX [default=NONE|SSE4_2|AVX2|AVX512|MAX]
--       Max runtime SIMD optimization level

This looks like it should be something simple, but I cannot find information on how to do it, not from arrow nor from conan.

JACH
  • 996
  • 11
  • 20
  • 1
    It requires a new option in the official recipe. Nothing special, it can be done by opening an issue to Conan Center Index: https://github.com/conan-io/conan-center-index/issues, Or a directly PR with the solution. – uilianries Jul 28 '21 at 14:12
  • 1
    I've created a new PR with your request: https://github.com/conan-io/conan-center-index/pull/6571 Please, follow its progress. – uilianries Jul 28 '21 at 14:27
  • Thanks a lot @uilianries. Do you know if I can modify the recipe on my cache and construct with that in the meanwhile? – JACH Jul 28 '21 at 14:38
  • 1
    Of course! You can change your recipe locally and build as usual. To update in the future, you run `conan install --update arrow/2.0.0`. But if you don't want to touch your official recipe, you can use another namespace, like `arrow/2.0.0@jach/stable`. – uilianries Jul 28 '21 at 15:03

0 Answers0