Re: building single-threaded ATLAS
Sylvestre Ledru <sylvestre@debian.org> writes:
>> when rebuilding libatlas3gf-base (from testing) the debian way, how to
>> specify the number of threads to be used? How to disable threading
>> altogether?
> Did you try with -t 1 ?
Now I tried. (That's why the reply took so long.)
Getting the source with "apt-get source libatlas3gf-base/testing" and
building the package with "fakeroot debian/rules custom" works.
OTOH, with the following change to debian/rules
if test "$(ARCHS)" != "base__"; then \
../../configure $(COMMON_CONFIG_PARAMS) -t 2; \
else \
- ../../configure $(COMMON_CONFIG_PARAMS); \
+ ../../configure $(COMMON_CONFIG_PARAMS) -t 1; \
fi; \
echo "Configure done. targetName = $$targetName / atlasArch = $$atlasArch / atlasISA = $$atlasISA"; \
if test ! -s Make.inc; then echo "Configure failed: Make.inc not found"; exit 1; fi; \
It does not finish.
I attach the final lines of output to the end of this message.
>> I found that on my machine (Sandy Bridge CPU) complex matrix-matrix
>> product (zgemm) is actually slower for large matrices with a custom
>> build ATLAS than with the default one. I believe the culprit is
>> hyperthreading: the default ATLAS uses two threads which corresponds to
>> the physical number of cores of my machine, while the custom-build uses
>> four threads, which seems not to be optimal in this case.
> You should report a bug upstream about that.
I will do some more tests and tell them. Judging from the peak
performance reached, ATLAS also doesn't seem to take advantage of the
AVX instructions yet...
Christoph
make[7]: Entering directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/pklevel3/sprk'
/usr/bin/make -j 1 zlib.grd
make[8]: Entering directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/pklevel3/sprk'
make[8]: `zlib.grd' is up to date.
make[8]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/pklevel3/sprk'
make[7]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/pklevel3/sprk'
make[6]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/pklevel3'
/usr/bin/make -j 1 zblas3.grd
make[6]: Entering directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/level3'
gcc -o ATL_ztrsm.o -c -DL2SIZE=4194304 -I/tmp/build/atlas-3.8.3/build/atlas-base/include -I/tmp/build/atlas-3.8.3/build/atlas-base/../..//include -I/tmp/build/atlas-3.8.3/build/atlas-base/../..//include/contrib -DAdd_ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_UNKNOWNx86 -DATL_CPUMHZ=2501 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664 -DWALL -O -fomit-frame-pointer -Wa,--noexecstack -fPIC -m64 -DDCPLX /tmp/build/atlas-3.8.3/build/atlas-base/../..//src/blas/level3/ATL_trsm.c
ar r /tmp/build/atlas-3.8.3/build/atlas-base/lib/libatlas.a ATL_zhemm.o ATL_zher2k.o ATL_zherk.o ATL_zsymm.o ATL_zsyr2k.o ATL_zsyrk.o ATL_ztrmm.o ATL_ztrsm.o
echo /tmp/build/atlas-3.8.3/build/atlas-base/lib/libatlas.a
/tmp/build/atlas-3.8.3/build/atlas-base/lib/libatlas.a
touch zblas3.grd
make[6]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/level3'
make[5]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/src/blas/level3'
make[4]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/bin'
done.
ATLAS install complete. Examine
ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.
cd lib/ ; /usr/bin/make atlas/libblas.a
make[4]: Entering directory `/tmp/build/atlas-3.8.3/build/atlas-base/lib'
make[4]: *** No rule to make target `libptf77blas.a', needed by `atlas/libblas.a'. Stop.
make[4]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base/lib'
make[3]: *** [build] Error 2
make[3]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base'
make[2]: *** [build] Error 2
make[2]: Leaving directory `/tmp/build/atlas-3.8.3/build/atlas-base'
make[1]: *** [build-arch-stamp] Error 2
make[1]: Leaving directory `/tmp/build/atlas-3.8.3'
make: *** [custom-stamp] Error 2
Reply to: