Supported Compilers

Back

For the serial code, the following compilers are fully supported:
Compiler Versions Flags Date Tested Notes
GCC, g++ 3.4, 4.0, 4.2 -ansi -pedantic -Wall July 11, 2006
IBM XL, xlC September 2004 July 11, 2006 Only supported for cpt.
Intel, icc 8.0 -strict_ansi July 11, 2006 Lots of warnings and remarks.
PathScale, pathCC 2.3 -ansi July 11, 2006
PGI, pgCC 6.1 July 11, 2006 Except ads::TranformIterator.
Note that above I only indicate the warning flags, not the optimization flags.

For the serial code, the following compilers are partially supported:
Compiler Versions Flags Date Tested Notes
IBM XL, xlC September 2004 July 11, 2006 Only supported for cpt.

The IBM compiler does not correctly implement some template arithmetic. For example, the following program will not compile.

template<int N, int M>
class A {};

template<int N, int M>
void
f(A<N,M> a, A<N, M-1> b) {}

int
main() {
  A<2,2> a;
  A<2,1> b;
  f(a, b);

  return 0;
}
It cannot understand the meaning of M - 1. There is a hack you can apply to get the program to compile. The function can be declared as follows:
template<int N, int M, int M_1>
void
f(A<N,M> a, A<N, M_1> b) {
  LOKI_STATIC_CHECK(M - 1 == M_1, BadTemplateParameterValues);
}
It's a little ugly, but it does the trick.


http://www.its.caltech.edu/~sean/ / at(sean, dot(caltech, edu)) / Last Modified: September 3, 2009