Compiling with IBM xlC compiler - restrict

Asked by Chris Richardson on 2013-02-06

I am compiling dolfin on a machine with the IBM xl compilers.

 "restrict" appears to be a reserved word on this compiler, so I have had to go though and replace all occurences of "restrict" with e.g. "restrict0".

Is there any chance this might be changed?

Also, I have quite a few errors with armadillo - I guess this is no surprise...

In armadillo-3.6.1, the following changes:

eop_core_bones.hpp - remove "inline" from lines 26-31
SpValproxy_meat.hpp - change "typename T1" to "typename T1:elem_type" at line 321
Mat_bones.hpp - add "#define ARMA_GCC47_BUG 1" before line 562

seems to make it compile.... if anyone else has some better tips, let me know...

Question information

English Edit question
DOLFIN Edit question
No assignee Edit question
Solved by:
Martin Sandve Alnæs
Last query:
Last reply:

The restrict keyword is not standard C++. Based on a quick trip to google, try adding the compiler flag -qnokeyword=restrict to disable it.

You should direct problems with compiling armadillo to the armadillo developers.

Chris Richardson (chris-bpi) said : #2

I'll give it a go... probably should have thought of it myself...
and of course, armadillo is not part of fenics - I just wanted to share a problem, in case anyone
has similar issues...


Chris Richardson (chris-bpi) said : #3

Thanks Martin Sandve Alnæs, that solved my question.