Skip to content

Commit 6782da4

Browse files
authored
Fix flags for aarch64 containers using FFTW (#1127)
1 parent 67681ab commit 6782da4

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.devcontainer/recipe.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
'lcov',
3535
'ninja-build',
3636
'numactl',
37+
'python3-numpy',
3738
'python3-pip',
3839
'python3-dev',
3940
'python3-venv',
@@ -54,9 +55,16 @@
5455
Stage0 += shell(commands=["python3 --version"])
5556

5657
# Note: Configure and build twice. First for float, second for double.
58+
# SSE2/AVX2/AVX512 are x86-only; omit on aarch64.
59+
if cpu_target == 'x86_64':
60+
fftw_configure_float = "./configure --enable-sse2 --enable-avx2 --enable-avx512 --enable-openmp --enable-float --enable-shared && make -j && make install"
61+
fftw_configure_double = "./configure --enable-sse2 --enable-avx2 --enable-avx512 --enable-openmp --enable-shared && make -j && make install"
62+
else:
63+
fftw_configure_float = "./configure --enable-openmp --enable-float --enable-shared && make -j && make install"
64+
fftw_configure_double = "./configure --enable-openmp --enable-shared && make -j && make install"
5765
Stage0 += shell(commands=[f"cd /tmp && wget https://www.fftw.org/fftw-{FFTW_VER}.tar.gz && tar -xzf fftw-{FFTW_VER}.tar.gz && cd fftw-{FFTW_VER}",
58-
f"./configure --enable-sse2 --enable-avx2 --enable-avx512 --enable-openmp --enable-float --enable-shared && make -j && make install",
59-
f"./configure --enable-sse2 --enable-avx2 --enable-avx512 --enable-openmp --enable-shared && make -j && make install"])
66+
fftw_configure_float,
67+
fftw_configure_double])
6068

6169
# Stage0 += shell(commands=[f"cd /tmp && wget https://github.com/OpenMathLib/OpenBLAS/releases/download/v{OPENBLAS_VER}/OpenBLAS-{OPENBLAS_VER}.tar.gz && tar -zxvf OpenBLAS-{OPENBLAS_VER}.tar.gz && cd OpenBLAS-{OPENBLAS_VER}",
6270
# "make -j && sudo make USE_OPENMP=1 INTERFACE64=1 install"])

0 commit comments

Comments
 (0)