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

QuEST/CMakeLists.txt broken on arm #389

Open
ashterenli opened this issue Nov 20, 2023 · 4 comments
Open

QuEST/CMakeLists.txt broken on arm #389

ashterenli opened this issue Nov 20, 2023 · 4 comments

Comments

@ashterenli
Copy link

arm does not have avx.
This is a crude workaround for gnu:

sed -i '261,265d' ../QuEST/CMakeLists.txt 

and build with e.g.

COMMON_FLAGS="-Wall -Wextra -Wpedantic -Wshadow -Wbad-function-cast -g -O2 -fopenmp -mcpu=neoverse-512tvb -march=armv8.4-a+sve -std=c11"

  cmake .. \
    -DCMAKE_C_COMPILER=mpicc \
    -DCMAKE_C_FLAGS="$COMMON_FLAGS" \
    -DCMAKE_CXX_COMPILER=mpicxx \
    -DCMAKE_CXX_FLAGS="$COMMON_FLAGS" \

@TysonRayJones
Copy link
Member

Hi there,

The assumptive AVX flag was raised in #259 and forgotten about (hehe). QuEST's cmake build is due to be remade, given it was originally a bit rushedly created from an existing GNUmake build, causing some very minor issues since. The carefully remade cmake build will ensure all flags are arch compatible.

Relatedly, we don't invoke any explicit AVX instructions; we just encourage auto-vectorising. I'm still unsure myself whether flags -O3 and -march=native together already make -mavx redundant, or whether including the latter introduces additional opportunities for auto-vectorising. Is it verbose overkill given openmp itself may vectorise? Would love to hear your thoughts! It's otherwise something I wish to test the performance impact of during build refactoring.

@fieldofnodes
Copy link

Does AVX get flagged on non x86 arch?

@TysonRayJones
Copy link
Member

@fieldofnodes the current CMake build erroneously includes the ARX flag for non-x86 arches, as the OP reports. One can simply delete the flag from the CMake file for a workaround.

@TysonRayJones
Copy link
Member

Noting we'll address this in #402

@otbrown otbrown mentioned this issue Jul 2, 2024
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

No branches or pull requests

3 participants