[lammps-users] problem with IBM AIX compiler

A user says the IBM AIX compiler has this line in the
system header file /usr/include/sys/m_param.h

#define hz 100

Since the LAMMPS file pppm.cpp uses a variable named "hz"
this causes a line like

hz = 1.0

to be changed by the pre-processor to

100 = 1.0

which the compiler obviously doesn't like.

Does anyone know a compiler setting that will get around
this? E.g. one that will force a #define statement to be
ignored? I don't really want to change LAMMPS source
code each time a compiler creates a problem like this.

If any IBM person wants to comment on why it's a good
design decision to preempt a common 2-letter lower-case
variable name with their header file, please chime in.


if this is exposed to user level, it has to be considered
a bug in the OS. have him/her tell IBM to fix it. the best
way to work around it, would to be to tell the user to
create a header file 'm_param.h' under his/her account in
some/dir with the content:

#include "/usr/include/sys/m_param.h"
#if defined(hz)
#undef hz

and then compile with -I$(HOME)/some/dir that will
take care of it without needing to change LAMMPS.

i doubt that this is a common occurance. it will
break far too many codes.