9

I'm trying to set up ATLAS (so I can later compile octave with ATLAS support).

If I'm correct, I still need to build this manually due to the environment specific optimizations. I do see a package for ATLAS, but it looks like it's using the cross platform generic build options (e.g. "it'll be slow").

So, running the configure script as described in the docs seems to go poorly. As a java developer I never do well at making heads or tails of errors in these build processes. Am I missing dependencies (if so is there any documentation on what I need)?

allusers@vbubuntu:~/Downloads/atlas3.10.1/build_vbubuntu$ ../configure -b 64 -D c -DPentiumCPS=3000 --with-netlib-lapack-tarfile=/home/allusers/Downloads/lapack-3.5.0.tgz

make: `xconfig' is up to date.
./xconfig -d s /home/allusers/Downloads/atlas3.10.1/build_vbubuntu/../ -d b /home/allusers/Downloads/atlas3.10.1/build_vbubuntu  -b 64 -D c -DPentiumCPS=3000 -Si lapackref 1

OS configured as Linux (1)

Assembly configured as GAS_x8664 (2)

Vector ISA Extension configured as  SSE3 (6,448)
ERROR: enum fam=3, chip=2, mach=0
make[3]: *** [atlas_run] Error 44
make[2]: *** [IRunArchInfo_x86] Error 2

Architecture configured as  Corei1 (25)
ERROR: enum fam=3, chip=2, mach=0
make[3]: *** [atlas_run] Error 44
make[2]: *** [IRunArchInfo_x86] Error 2

Clock rate configured as 2350Mhz
ERROR: enum fam=3, chip=2, mach=0
make[3]: *** [atlas_run] Error 44
make[2]: *** [IRunArchInfo_x86] Error 2

Maximum number of threads configured as  4
Parallel make command configured as '$(MAKE) -j 4'
ERROR: enum fam=3, chip=2, mach=0
make[3]: *** [atlas_run] Error 44
make[2]: *** [IRunArchInfo_x86] Error 2
Cannot detect CPU throttling.
rm -f config1.out
make atlas_run atldir=/home/allusers/Downloads/atlas3.10.1/build_vbubuntu exe=xprobe_comp redir=config1.out \
                args="-v 0 -o atlconf.txt -O 1 -A 25 -Si nof77 0 -V 448   -b 64 -d b /home/allusers/Downloads/atlas3.10.1/build_vbubuntu"
make[1]: Entering directory `/home/allusers/Downloads/atlas3.10.1/build_vbubuntu'
cd /home/allusers/Downloads/atlas3.10.1/build_vbubuntu ; ./xprobe_comp -v 0 -o atlconf.txt -O 1 -A 25 -Si nof77 0 -V 448   -b 64 -d b /home/allusers/Downloads/atlas3.10.1/build_vbubuntu > config1.out
make[2]: gfortran: Command not found
make[2]: *** [IRunF77Comp] Error 127
make[2]: g77: Command not found
make[2]: *** [IRunF77Comp] Error 127
make[2]: f77: Command not found
make[2]: *** [IRunF77Comp] Error 127


Unable to find usable compiler for F77; abortingMake sure compilers are in your path, and specify good compilers to configure
(see INSTALL.txt or 'configure --help' for details)make[1]: *** [atlas_run] Error 8
make[1]: Leaving directory `/home/allusers/Downloads/atlas3.10.1/build_vbubuntu'
make: *** [IRun_comp] Error 2
ERROR 512 IN SYSCMND: 'make IRun_comp args="-v 0 -o atlconf.txt -O 1 -A 25 -Si nof77 0 -V 448   -b 64"'
mkdir src bin tune interfaces
mkdir: cannot create directory ‘src’: File exists
mkdir: cannot create directory ‘bin’: File exists
mkdir: cannot create directory ‘tune’: File exists
mkdir: cannot create directory ‘interfaces’: File exists
make: *** [make_subdirs] Error 1
make -f Make.top startup
make[1]: Entering directory `/home/allusers/Downloads/atlas3.10.1/build_vbubuntu'
Make.top:1: Make.inc: No such file or directory
Make.top:325: warning: overriding commands for target `/AtlasTest'
Make.top:76: warning: ignoring old commands for target `/AtlasTest'
make[1]: *** No rule to make target `Make.inc'.  Stop.
make[1]: Leaving directory `/home/allusers/Downloads/atlas3.10.1/build_vbubuntu'
make: *** [startup] Error 2
mv: cannot move ‘lapack-3.5.0’ to ‘../reference/lapack-3.5.0’: Directory not empty
mv: cannot stat ‘lib/Makefile’: No such file or directory
../configure: 450: ../configure: cannot create lib/Makefile: Directory nonexistent
../configure: 451: ../configure: cannot create lib/Makefile: Directory nonexistent
../configure: 452: ../configure: cannot create lib/Makefile: Directory nonexistent
../configure: 453: ../configure: cannot create lib/Makefile: Directory nonexistent
../configure: 509: ../configure: cannot create lib/Makefile: Directory nonexistent
DONE configure

2 Answers 2

12

The best way to build the ATLAS library customized to your particular processor is to follow the instructions in /usr/share/doc/libatlas3-base/README.Debian (also available for reading online here). The instructions tell explicitly how to rebuild the atlas source package for Debian/Ubuntu in a way that will give you custom-built packages that can be installed in place of packages provided in the official repositories.

The relevant excerpt from README.Debian says:

Building Optimized Atlas Packages on your ARCH

Building your own optimized packages of Atlas is straightforward. Just get the sources of the package and its build-dependencies:

# apt-get source atlas
# apt-get build-dep atlas
# apt-get install devscripts

and type the following from the atlas source subdir:

# fakeroot debian/rules custom

it should produce a package called:

../libatlas3-base_*.deb

which is optimized for the architecture Atlas has been built on. Then install the package using dpkg -i.

3
  • After the last 'dpkg -i' step, how do I compile/link against ATLAS' CBLAS and CLAPACK? I don't have any ATLAS in /usr/local. What -I and -L argumets should I pass to g++? I tried 'g++ main.cpp -I$~/atlas-xxxx/include -L~/atlas-xxxx/build/atlas-base/lib/ -lf77blas -lcblas -latlas', but it gives me '/usr/bin/ld: cannot find -lf77blas'. Thanks. May 6, 2016 at 8:02
  • 1
    @Salmonstrikes Install the libatlas-base-dev and libatlas-dev packages that were also built, and the libraries are installed for building in /usr/lib. May 6, 2016 at 20:19
  • 1
    Thanks! That worked For future reference, to get code to compile, I needed: 1) to use extern "C" guards for both 'cblas.h' and 'clapack.h' stackoverflow.com/questions/10786237/… 2) 'g++ main.cpp -I/usr/include/atlas -lf77blas -lcblas -llapack_atlas'; for some reason '-llapack' alone doesn't work and I needed '-llapack_atlas' May 6, 2016 at 21:35
3

Looks like these were the dependencies it needed, the build process is now running. These things are never just easily documented in a nice consumable form.

For Ubuntu (gfortran, g77, and f77 respectively):

sudo apt-get install gfortran f2c libcnf-dev

Also, anyone finding this question may find this related stackoverflow question of use:

https://stackoverflow.com/questions/23876286/building-octave-from-source-did-atlas-get-included-properly-in-octaves-confi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .