构建ATLAS(以及后来带ATLAS的Octave)


9

我正在尝试设置ATLAS(以便以后可以在ATLAS支持下编译八度)。

如果我是正确的,由于特定于环境的优化,我仍然需要手动构建它。我确实看到了ATLAS的软件包,但看起来它正在使用跨平台的通用构建选项(例如,“它将很慢”)。

因此,按照文档中的描述运行配置脚本似乎效果不佳。作为Java开发人员,我从来都不擅长在这些构建过程中出错。我是否缺少依赖项(如果需要的话,是否有任何我需要的文档)?

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

Answers:


12

构建针对您的特定处理器定制的ATLAS库的最佳方法是按照中的说明进行操作/usr/share/doc/libatlas3-base/README.Debian(也可在此处在线阅读)。这些说明明确地告诉您如何atlas为Debian / Ubuntu 重建源软件包,该方法将为您提供定制的软件包,可以安装这些软件包来代替官方存储库中提供的软件包。

有关摘录README.Debian说:

在ARCH上构建优化的Atlas软件包

构建自己的Atlas优化软件包非常简单。只需获取软件包的来源及其构建依赖性:

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

并从Atlas源子目录中键入以下内容:

# fakeroot debian/rules custom

它应该产生一个名为:

../libatlas3-base_*.deb

针对Atlas建立的架构进行了优化。然后使用安装软件包dpkg -i


在最后一个“ dpkg -i”步骤之后,如何针对ATLAS的CBLAS和CLAPACK进行编译/链接?我在/ usr / local中没有任何ATLAS。我应该将哪些-I和-L参数传递给g ++?我尝试了'g ++ main.cpp -I $〜/ atlas-xxxx / include -L〜/ atlas-xxxx / build / atlas-base / lib / -lf77blas -lcblas -latlas',但这给了我'/ usr / bin / ld:找不到-lf77blas。谢谢。
Salmonstrikes

1
@Salmonstrikes安装还构建的libatlas-base-devlibatlas-dev软件包,并安装要在中构建的库/usr/lib
迈克·米勒

1
谢谢!奏效了,以供将来参考,要编译代码,我需要:1)对'cblas.h'和'clapack.h'都使用外部的“ C”防护stackoverflow.com/questions/10786237/…2)'g ++ main.cpp -I / usr / include / atlas -lf77blas -lcblas -llapack_atlas'; 由于某种原因,“-llapack”本身并不能工作,我需要“-llapack_atlas”
Salmonstrikes

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.