-
Notifications
You must be signed in to change notification settings - Fork 0
/
atlas.build
36 lines (30 loc) · 1.54 KB
/
atlas.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@LSST UPS@ &&
curl -L \
http://downloads.sourceforge.net/project/math-atlas/Stable/@REPOVERSION@/atlas@[email protected] \
> @PRODUCT@-@[email protected] &&
# The tar file is somewhat malformed, producing errors for BSD tar,
# so we don't check for errors when extracting. For more information,
# see http://code.google.com/p/libarchive/issues/detail?id=299
bunzip2 < @PRODUCT@-@[email protected] | tar -xkf -
product_dir=$(eups path 0)/$(eups flavor)/@PRODUCT@/@VERSION@ &&
cd ATLAS &&
# The following patch overrides the check for CPU throttling.
# Note that this means that the automatic tuning at the heart of the ATLAS library will be nonsensical,
# likely resulting in degraded performance. If at all possible, use a custom-installed version of
# ATLAS built with CPU throttling disabled. There are some helpful instructions in the INSTALL.txt file.
git archive --format=tar --remote=git://hsca.ipmu.jp/repos/devenv/buildFiles.git HEAD atlas-cpu-throttling.patch | tar --extract --verbose &&
patch -p0 CONFIG/src/probe_arch.c < atlas-cpu-throttling.patch &&
mkdir build &&
cd build &&
curl -L http://www.netlib.org/lapack/lapack-3.5.0.tgz > lapack.tgz &&
CONFIGURE_FLAGS=() &&
if [ "$(eups flavor)" = DarwinX86 ]; then
CONFIGURE_FLAGS+=(--cc=clang -C acg clang)
fi &&
if [ -n "$CFLAGS" ]; then
CONFIGURE_FLAGS+=(-Fa acg "$CFLAGS")
fi &&
../configure --prefix=$product_dir --shared --nof77 -Fa alg "-fPIC" "${CONFIGURE_FLAGS[@]}" --with-netlib-lapack-tarfile=`pwd`/lapack.tgz &&
make -j 1 build &&
make install &&
lsst_ups @PRODUCT@ @VERSION@ $product_dir