Robert Kern wrote:
My guess is that I need to compile LAPACK and ATLAS with a combination of f77 and cc. The documentation for ATLAS strongly suggests using gcc though. Should I ignore this?
I don't know any specific details about building on Solaris, but using a different compiler for the ATLAS library than your Python is probably not going to work too well.
ATLAS uses different compilers in 8 or so different ways. You are suggesting I want to change all of them? Here is some info from ATLAS's install guide: 3.2 Changing the compilers and flags that ATLAS uses for the build ATLAS defines eight different compilers and associated flag macros in its Make.inc which are used to compile various files during the install process. ATLAS's configure provides flags for changing both the compiler and flags for each of these macros. In the following list, the macro name is given first, and the configure flag abbreviation is in parentheses: 1. XCC (xc): C compiler used to compile ATLAS's build harness routines (these never appear in any user-callable library) 2. GOODGCC (gc): gcc with any required architectural flags (eg. -m64), which will be used to assemble cpp-enabled assembly and to compile certain multiple implementation routines that specifically request gcc 3. F77 (if): FORTRAN compiler used to compile ATLAS's FORTRAN77 API interface routines. 4. ICC (ic): C compiler used to compile ATLAS's C API interface routines. 5. DMC (dm): C compiler used to compile ATLAS's generated double precision (real and complex) matmul kernels 6. SMC (sm): C compiler used to compile ATLAS's generated single precision (real and complex) matmul kernels 7. DKC (dk): C compiler used to compile all other double precision routines (mainly used for other kernels, thus the K) 8. SKC (sk): C compiler used to compile all other single precision routines (mainly used for other kernels, thus the K) It is almost never a good idea to change DMC or SMC, and it is only very rarely a good idea to change DKC or SKC. For ATLAS 3.8.0, all architectural defaults are set using gcc 4.2 only (the one exception is MIPS/IRIX, where SGI's compiler is used). In most cases, switching these compilers will get you worse performance and accuracy, even when you are absolutely sure it is a better compiler and flag combination! In particular we tried the Intel compiler icc (called icl on Windows) on Intel x86 platforms, and overall performance was lower than gcc. Even worse, from the documentation icc does not seem to have any firm IEEE floating point compliance unless you want to run so slow that you could compute it by hand faster. This means that whenever icc achieves reasonable performance, I have no idea if the error will be bounded or not. I could not obtain access to icc on the Itaniums, where icc has historically been much faster than gcc, but I note that the performance of gcc4.2 is much better than gcc3 for most routines, so gcc may be the best compiler there now as well. There is almost never a need to change XCC, since it doesn't affect the output libraries in any way, and we have seen that changing the kernel compilers is a bad idea. However, what if you yourself use a non-gnu compiler, like Intel's icc or ifort, then what you need to do is tell ATLAS to compile its interface routines with your compilers, which is discussed in Section 3.2.1. Another common problem is that your OS has been built with an older gcc whose libraries are incompatible with gcc 4.2. In this case, creating an executable with gcc4.2 can cause problems, and so what you want to do is keep gcc3 as you default compiler (compiling ATLAS interface routines with it, as well as using it for all linking) but compile the ATLAS kernel routines with gcc4. This case is discussed in Section 3.2.2. For those who insist on monkeying with other compilers, Section 3.2.3 gives some guidance. Finally installing ATLAS without a FORTRAN compiler is discussed in Section 3.2.4.