Makefile for building LAMMPS on Blue Gene/Q

Dear Lammps-users,

I have encountered the same MIN/MAX error when compiling the latest version of LAMMPS on BGQ, and I’m seeking the aid of the local admin with regards to this issue. In the meantime, I would just like to enquire whether this issue had been resolved previously? I am using the makefile from:

https://wiki.alcf.anl.gov/parts/index.php/Mira_LAMMPS_Documentation#Building_on_Blue_Gene.2FQ

The modifications I made were:

vpath .cpp .. vpath .h …

and compiling without FFTW. I’ve also used:

make yes-standard yes-USER-MISC yes-USER-PHONON yes-USER-REAXC no-REAX no-GPU no-POEMS no-MEAM no-KIM no-VORONOI

I have attached the makefile herewith. If anyone has ever resolved this MIN/MAX issue before, kindly advise on how I should proceed with compilation.

The error I obtained was:

1500-036: (I) The NOSTRICT option (default at OPT(3)) has the potential to alter the semantics of a program. Please refer to documentation on the STRICT/NOSTRICT option for more information.
/bgsys/drivers/ppcfloor/comm/xl/bin/mpixlcxx_r -g -O3 -qarch=qp -qtune=qp -qsmp=omp -qsimd=auto -qhot=level=2 -qprefetch -qunroll=yes -DLAMMPS_GZIP -DMPICH_SKIP_MPICXX -c …/dump_xtc.cpp
“/bgsys/drivers/toolchain/V1R2M0-efix23/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/…/…/…/…/powerpc64-bgq-linux/sys-include/sys/param.h”, line 74.9: 1540-0848 (S) The macro name “MIN” is already defined with a different definition.
“…/pointers.h”, line 34.9: 1540-0425 (I) “MIN” is defined on line 34 of “…/pointers.h”.
“/bgsys/drivers/toolchain/V1R2M0-efix23/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/…/…/…/…/powerpc64-bgq-linux/sys-include/sys/param.h”, line 75.9: 1540-0848 (S) The macro name “MAX” is already defined with a different definition.
“…/pointers.h”, line 35.9: 1540-0425 (I) “MAX” is defined on line 35 of “…/pointers.h”.
make[1]: *** [dump_xtc.o] Error 1
make[1]: Leaving directory `/scratch/home/ihpc/ihpcjyeo/scratch/lammps-16Aug13/src/Obj_bgq’
make: *** [bgq] Error 2

Best Regards,
Jingjie Yeo
Ph.D. Student
School of Mechanical and Aerospace Engineering
Nanyang Technological University, Singapore

Makefile.bgq (3.56 KB)

It seems there is a clash in the header files between the USER-REAXC package (reaxc_defs.h) and the pointers.h. Try again with the MIN and MAX macros in reaxc_defs.h commented.

Ray

Dear Dr. Shan,

Are you referring to:

// #define MAX(x,y) (((x) > (y)) ? (x) : (y))
// #define MIN(x,y) (((x) < (y)) ? (x) : (y))

I believe it is already commented out by default.

Best Regards,
Jingjie Yeo
Ph.D. Student
School of Mechanical and Aerospace Engineering
Nanyang Technological University, Singapore

Dear Lammps-users,

I have encountered the same MIN/MAX error when compiling the latest version
of LAMMPS on BGQ, and I'm seeking the aid of the local admin with regards to
this issue. In the meantime, I would just like to enquire whether this issue
had been resolved previously? I am using the makefile from:

first off, the LAMMPS code is correct. it is your compiler that is
flagging an error, where there is none. if this was an error, about
50% of all C/C++ code in existence would be at fault.

second, i see that you are compiling in the XTC package, but last time
i checked, on the blue gene you need to use the XDR compatibility
wrapper, which is activated by -DLAMMPS_XDR. i don't see that in your
makefile and it appears that your compilation fails when compiling
dump_xdr.cpp

axel.

Dear Dr. Kohlmeyer,

That particular error seems to have been resolved, but now another error cropped up further along:

/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r -g -O3 -qarch=qp -qtune=qp -qsmp=omp -qsimd=auto -qhot=level=2 -qprefetch -qunroll=yes -DLAMMPS_GZIP -DLAMMPS_XDR -DMPICH_SKIP_MPICXX -c ../fix_qeq_reax.cpp
"../fix_qeq_reax.cpp", line 44.9: 1540-0848 (S) The macro name "DANGER_ZONE" is already defined with a different definition.
"../reaxc_defs.h", line 100.9: 1540-0425 (I) "DANGER_ZONE" is defined on line 100 of "../reaxc_defs.h".
"../fix_qeq_reax.cpp", line 45.9: 1540-0848 (S) The macro name "LOOSE_ZONE" is already defined with a different definition.
"../reaxc_defs.h", line 101.9: 1540-0425 (I) "LOOSE_ZONE" is defined on line 101 of "../reaxc_defs.h".
make[1]: *** [fix_qeq_reax.o] Error 1
make[1]: Leaving directory `/scratch/home/ihpc/ihpcjyeo/scratch/lammps-16Aug13/src/Obj_bgq'
make: *** [bgq] Error 2

Best Regards,
Jingjie Yeo
Ph.D. Student
School of Mechanical and Aerospace Engineering
Nanyang Technological University, Singapore

Dear Dr. Kohlmeyer,

That particular error seems to have been resolved, but now another error cropped up further along:

i think ray already has some changes for that, they just didn't make
it yet into the distribution. for the time being, i either comment out
the conflicting definition in fix_qeq_reax.cpp or see, if there is a
compiler flag to make it behave more reasonable. every other compiler
that people use simply prints a warning for this (and that is what
should happen).

axel.