[lammps-users] 18Jan11 build problems on BG/L platform

Hi -- I am trying to build the 18Jan11 release of LAMMPS on a small
BGL test bed using the 9.0 release of the bgxlC compiler. I get the
occasional

mpxlC -I/bgl/local/bglfftwgel-2.1.5/include -O3 -DFFT_FFTW -DMPICH_IGNORE_CXX_SEEK -M -c thermo.cpp
"thermo.cpp", line 361.30: 1540-0274 (S) The name lookup for "LLONG_MAX" did not find a declaration.
make[1]: [thermo.u] Error 1 (ignored)

error message during the build dependencies portion. However, all of
the actual compiles fail with the same type of message:

mpxlC -I/bgl/local/bglfftwgel-2.1.5/include -O3 -DFFT_FFTW -DMPICH_IGNORE_CXX_SEEK -c thermo.cpp
"thermo.cpp", line 361.30: 1540-0274 (S) The name lookup for "LLONG_MAX" did not find a declaration.
make[1]: [thermo.o] Error 1 (ignored)

and the overall build then fails at link time with missing object
files.

A build of the 29Jan10 release of LAMMPS with the same compiler
and evnironment succeeds.

Unfortunately, I only use LAMMPS as an application in Livermore's
Synthetic Work Load (SWL) and so am a novice in its technology
and its build procedures. So, any help would be muchly appreciated.

hi sheila,

please try to locate a local expert on IBM system software.
there are some recent changes in LAMMPS that essentially
require compatibility with the ANSI c standard from 1999.
based on previous experience, IBM XL compilers may need
a specific additional flag or a preprocessor define. way back
when it used to be either -D_BSD_SOURCE or -D_ANY_SOURCE
and similar things. the definitions that you are missing are from
the file "stdint.h" which might be a useful hint to the systems person.

as an alternative, you might try to work around this by editing
the file lmptypes.h and replace all instances of LLONG_MAX
by INT64_MAX, which might be a more consistent choice for
this definition in the first place.

you won't see this in much older versions of lammps, since
the process of changing some internal counters to 64-bit,
was started only recently.

please let us know if and how you got it to work.

thanks,
    axel.

Also, if you look in lmptype.h you will see this note:

// NOTE: if your machine/MPI does not support "long long" ints,
// but only "long" ints, then you will likely need to set
// MPI_LONG_LONG to MPI_LONG, LLONG_MAX to LONG_MAX,
// "lld" to "ld", and atoll to atol

If you do what it says in the handful of lines below (just the section
that isn't commented out), then you will probably be able to compile/run.

Steve