Unable to compile ATLAS 3.10.1

I am trying to compile ATLAS 3.10.1 using the instructions at http://www.pgroup.com/resources/atlas/atlas3932_pgi2010.htm. I follow the steps outlined to step 4, which is where I run the configure utility, which compiles the programs. At this point, the system fails. It seems that it first fails when it cannot find features.h. I would appreciate any suggesions.

Here is the output:

jn_petersen@chebe-gpu:~/atlas/ATLAS3.10.1/my_build_dir$ …/configure -C ic pgcc -F ic “-O2” -C if pgf77 -F if “-O2” --with-netlib-lapack-tarfile=/home/jn_petersen/numerics/lapack.gz
make: `xconfig’ is up to date.
./xconfig -d s /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/…/ -d b /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir -C ic pgcc -F ic -O2 -C if pgf77 -F if -O2 -Si lapackref 1

OS configured as Linux (1)

Assembly configured as GAS_x8664 (2)

Vector ISA Extension configured as AVX (5,480)

Architecture configured as Corei2 (26)

Clock rate configured as 2001Mhz

Maximum number of threads configured as 24
Parallel make command configured as ‘$(MAKE) -j 24’
Cannot detect CPU throttling.
rm -f config1.out
make atlas_run atldir=/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir exe=xprobe_comp redir=config1.out
args="-v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C ic ‘pgcc’ -F ic ‘-O2’ -C if ‘pgf77’ -F if ‘-O2’ -b 64 -d b /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir"
make[1]: Entering directory /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir' cd /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir ; ./xprobe_comp -v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C ic 'pgcc' -F ic '-O2' -C if 'pgf77' -F if '-O2' -b 64 -d b /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir > config1.out sh: 2: Syntax error: EOF in backquote substitution sh: 2: Syntax error: EOF in backquote substitution sh: 2: Syntax error: EOF in backquote substitution PGC-F-0206-Can't find include file bits/predefs.h (/usr/include/features.h: 324) PGC/x86-64 Linux 13.2-0: compilation aborted make[2]: *** [IRunCComp] Error 2 \ \ Unable to find usable compiler for ICC; 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 1 make[1]: Leaving directory /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir’
make: *** [IRun_comp] Error 2
ERROR 512 IN SYSCMND: ‘make IRun_comp args="-v 0 -o atlconf.txt -O 1 -A 26 -Si nof77 0 -V 480 -C ic ‘pgcc’ -F ic ‘-O2’ -C if ‘pgf77’ -F if ‘-O2’ -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/jn_petersen/atlas/ATLAS3.10.1/my_build_dir' 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/jn_petersen/atlas/ATLAS3.10.1/my_build_dir' make: *** [startup] Error 2 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
jn_petersen@chebe-gpu:~/atlas/ATLAS3.10.1/my_build_dir$

Hi Jim,

I just tried configuring ATLAS 3.10 with PGI 13.2 on my system, and it was fine. It seem so me to be some OS header file issue the following:

PGC-F-0206-Can’t find include file bits/predefs.h (/usr/include/features.h: 324)

What OS are you using? Are you able to compile a simple C program with pgcc?

I was able to find one system running Ubuntu 12.04 that had a “/usr/include/features.h” header file that contained an include of predefs.h at line 324. However, ATLAS configure correctly and predefs.h exists in “/usr/include/bits”.

  • Mat

I am using Ubuntu 12.04.2. i have the features.h. But the system didn’t have the .h file referenced here. I found that i could instiall it using (sudo apt-get install libc6-dev-i386).

It seems to have compiled. Now, when i execute the “make build” command, it is stopping with an error report. I will now seek help from the ATLAS support team, as this seems to be unrelated to PGI compilers at this stage.

Thanks.

–Jim

While attempting to install ATLAS, the “make build” step stops at the following:

/opt/pgi/linux86-64/13.2/bin/pgcc -fomit-frame-pointer -mfpmath=sse -O2 -fno-schedule-insns2 -mavx -m64 -x assembler-with-cpp -DL2SIZE=4194304 -I/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/include -I/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/…//include -I/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/…//include/contrib -DAdd_ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_Linux -DATL_ARCH_Corei2 -DATL_CPUMHZ=2001 -DATL_AVX -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664 -m64 -DATL_FULL_LAPACK -DATL_NCPU=24 -DDREAL -o ATL_dset_xp1yp0aXbX.o -c ATL_dset_xp1yp0aXbX.c
pgcc-Error-Unknown switch: -fomit-frame-pointer
pgcc-Error-Unknown switch: -mfpmath=sse
pgcc-Error-Unknown switch: -fno-schedule-insns2
pgcc-Error-Unknown switch: -mavx
pgcc-Error-Unknown switch: -x
make[6]: *** [ATL_dset_xp1yp0aXbX.o] Error 1

These options work with gcc, but not with the pgcc compiler. Consequently, there seems to be an incompatibility between ATLAS and the pgi compilers.

Suggestions?

Hi Jim,

I’ve tried multiple option to ATLAS’s configure script, but it seems that they have hard coded “gcc” and some of it’s options into the build. I was able to work around the error you’re seeing by setting all the “-F” options (i.e. xc, gc, sk, dk, etc.) to “-O2”, but later in the build a "-x " flag is added which we don’t recognize. I tried adding our “-noswitcherror” to have pgcc ignore flags it doesn’t recognize, but I then get a syntax error later in the build.

Unfortunately, I’m not sure how to work around these issues and would recommend you use gcc instead of pgcc since that what ATLAS 3.10 is expecting.

../configure -C if pgf77 -F if "-O2" --with-netlib-lapack-tarfile=/home/jn_petersen/numerics/lapack.gz
  • Mat

Thanks, Mat. I’ll give this a try.

I’ve also posted the question on the ATLAS support page. If they provide a solution, I’ll let you know.

–Jim

Atlas compiled with pgf77. During the “make check” step, I now get these errors, though.

/opt/pgi/linux86-64/13.2/bin/pgf77 -Mnomain -o xsqrtst sqrtst.o
/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/libtstatlas.a /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/liblapack.a /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/libcblas.a /home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/libf77blas.a
/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/libatlas.a -lpthread -lm
/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/liblapack.a(ATL_C2Fsormlq.o): In function ATL_C2Fsormlq_wrk': ATL_C2Formlq.c:(.text+0xde): undefined reference to sormlq_’
/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/liblapack.a(ATL_C2Fsormql.o): In function ATL_C2Fsormql_wrk': ATL_C2Formql.c:(.text+0xde): undefined reference to sormql_’
/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/liblapack.a(ATL_C2Fsormqr.o): In function ATL_C2Fsormqr_wrk': ATL_C2Formqr.c:(.text+0xde): undefined reference to sormqr_’
/home/jn_petersen/atlas/ATLAS3.10.1/my_build_dir/lib/liblapack.a(ATL_C2Fsormrq.o): In function ATL_C2Fsormrq_wrk': ATL_C2Formrq.c:(.text+0xde): undefined reference to sormrq_’
make[3]: *** [xsqrtst] Error 2

Is it not able to find these routines because of a naming issue between pgf77 and gcc?

Hi Jim,

It looks like you need to add “-llapack -lblas” to the “LIBS” variable in Make.inc. I’m not sure why these symbols aren’t in the versions found in the “lib” directory, but they aren’t.

% grep LIBS Make.inc 
   LIBS = -lpthread -lm -llapack -lblas
% make check
...
DONE BUILDING TESTERS, RUNNING:
SCOPING FOR FAILURES IN BIN TESTS:
fgrep -e fault -e FAULT -e error -e ERROR -e fail -e FAIL \
	        bin/sanity.out
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
8 cases: 8 passed, 0 skipped, 0 failed
4 cases: 4 passed, 0 skipped, 0 failed
DONE
SCOPING FOR FAILURES IN CBLAS TESTS:
%
  • Mat

Mat,

I am now getting:

/opt/pgi/linux86-64/13.2/bin/pgf77 -O2 -o xscblat2 c_sblat2.o c_sblas2.o
c_s2chke.o c_xerbla.o auxiliary.o /home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir/lib/liblapack.a
/home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir/lib/libcblas.a /home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir/lib/libatlas.a -lpthread -lm
c_sblat2.o: In function sblat2': /home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir/..//interfaces/blas/C/testing/c_sblat2.f:246: undefined reference to slamch_’
make[3]: *** [xscblat2] Error 2
make[3]: Leaving directory /home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir/interfaces/blas/C/testing' make[2]: *** [sanity_test] Error 2 make[2]: Leaving directory /home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir/interfaces/blas/C/testing’
make[1]: *** [sanity_test] Error 2
make[1]: Leaving directory `/home/jn_petersen/numerics/ATLAS3.10.1/my_build_dir’
make: *** [test] Error 2

I did make the change so it will search the libraries
jn_petersen@chebe-gpu:~/numerics/ATLAS3.10.1/my_build_dir$ grep LIBS Make.inc
LIBS = -lpthread -lm -llapack -lblas

It seems that it should find slmch as a part of the lapack library. Any suggestions now?

–Jim

I’m not sure why it’s not in you Lapack lib. Does “nm” show it in the lib? Is the symbol decorated correctly?

% nm /opt/pgi/linux86-64/13.2/lib/liblapack.a | grep slamch | grep T
0000000000000000 T slamch_
  • Mat