[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

building single-threaded ATLAS



Hello,

when rebuilding libatlas3gf-base (from testing) the debian way, how to
specify the number of threads to be used?  How to disable threading
altogether?

I tried replacing

			if test "$(ARCHS)" != "base__"; then 		\
			../../configure $(COMMON_CONFIG_PARAMS) -t 2;	\
			else 						\
			../../configure $(COMMON_CONFIG_PARAMS);	\
			fi;						\

with

			if test "$(ARCHS)" != "base__"; then 		\
			../../configure $(COMMON_CONFIG_PARAMS) -t 2;	\
			else 						\
			../../configure $(COMMON_CONFIG_PARAMS) -t 0;	\
			fi;						\

in debian/rules, but building the package with

fakeroot debian/rules custom

doesn't finish then.  (Without the change it works.)


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.

Also, often one will want to have a single threaded ATLAS for use with
programs which can parallelize things on a higher level.

thanks,
Christoph


Reply to: