Dear Lammps-users,
I encountered an error during compilation of the latest version of LAMMPS on Cygwin:
mpicxx -O -DLAMMPS_GZIP -DLAMMPS_XDR -DOMPI_SKIP_MPICXX=1 -c …/replicate.cpp
…/replicate.cpp: In member function ‘void LAMMPS_NS::Replicate::command(int, char**)’:
…/replicate.cpp:142:50: error: ‘INT64_MAX’ was not declared in this scope
Makefile:100: recipe for target `replicate.o’ failed
make[1]: *** [replicate.o] Error 1
May I know what is generating this error? I have attached the makefile which I used.
Best Regards,
Jingjie Yeo
Ph.D. Student
School of Mechanical and Aerospace Engineering
Nanyang Technological University, Singapore
Makefile.cygwin (2.55 KB)
Dear Lammps-users,
please always add a meaningful subject line to your e-mails. this will
*massively* improve your chance to get help.
I encountered an error during compilation of the latest version of LAMMPS on
Cygwin:
mpicxx -O -DLAMMPS_GZIP -DLAMMPS_XDR -DOMPI_SKIP_MPICXX=1 -c
../replicate.cpp
../replicate.cpp: In member function ‘void
LAMMPS_NS::Replicate::command(int, char**)’:
../replicate.cpp:142:50: error: ‘INT64_MAX’ was not declared in this scope
Makefile:100: recipe for target `replicate.o' failed
make[1]: *** [replicate.o] Error 1
May I know what is generating this error? I have attached the makefile which
I used.
INT64_MAX is a constant that is defined in the system headers that is
needed by LAMMPS for supporting very particle counts beyond the 32-bit
limit (i.e. beyond 2 billion). the error means that either, your
compiler is not finding the system headers or it does not fully
support 64-bit integers. in the former case, you need to set the
proper -I flag in the makefile, in the latter case, you need to
compile without 64-bit integer support using -DLAMMPS_SMALLSMALL
more info is at: http://lammps.sandia.gov/doc/Section_start.html#start_2_4
axel.
I apologize for the lack of a subject line, a little too hasty.
I encountered another error after including -DLAMMPS_SMALLSMALL:
mpicxx -O -DLAMMPS_GZIP -DLAMMPS_XDR -DLAMMPS_SMALLSMALL -DOMPI_SKIP_MPICXX=1 -c ../pair_hybrid.cpp
In file included from ../style_pair.h:86:0,
from ../pair_hybrid.cpp:19:
../pair_meam_spline.h:77:31: error: expected ‘,’ or ‘...’ before numeric constant
../pair_meam_spline.h: In member function ‘void LAMMPS_NS::PairMEAMSpline::SplineFunction::init(int)’:
../pair_meam_spline.h:79:34: error: ‘_deriv0’ was not declared in this scope
../pair_meam_spline.h:80:34: error: ‘_derivN’ was not declared in this scope
In file included from ../style_pair.h:87:0,
from ../pair_hybrid.cpp:19:
../pair_meam_sw_spline.h: At global scope:
../pair_meam_sw_spline.h:77:31: error: expected ‘,’ or ‘...’ before numeric constant
../pair_meam_sw_spline.h: In member function ‘void LAMMPS_NS::PairMEAMSWSpline::SplineFunction::init(int)’:
../pair_meam_sw_spline.h:79:34: error: ‘_deriv0’ was not declared in this scope
../pair_meam_sw_spline.h:80:34: error: ‘_derivN’ was not declared in this scope
Makefile:100: recipe for target `pair_hybrid.o' failed
make[1]: *** [pair_hybrid.o] Error 1
make[1]: Leaving directory `/usr/lammps-24Apr13/src/Obj_cygwin'
Makefile:77: recipe for target `cygwin' failed
make: *** [cygwin] Error 2
As far as I can tell, this should be an issue with the USER-MISC package. However I do need to use the Shifted Force Lennard-Jones in this package. May I know whether there is a way to resolve this error or a workaround for this?
Best Regards,
Jingjie Yeo
Ph.D. Student
School of Mechanical and Aerospace Engineering
Nanyang Technological University, Singapore
I apologize for the lack of a subject line, a little too hasty.
I encountered another error after including -DLAMMPS_SMALLSMALL:
mpicxx -O -DLAMMPS_GZIP -DLAMMPS_XDR -DLAMMPS_SMALLSMALL -DOMPI_SKIP_MPICXX=1 -c ../pair_hybrid.cpp
In file included from ../style_pair.h:86:0,
from ../pair_hybrid.cpp:19:
../pair_meam_spline.h:77:31: error: expected ‘,’ or ‘...’ before numeric constant
../pair_meam_spline.h: In member function ‘void LAMMPS_NS::PairMEAMSpline::SplineFunction::init(int)’:
../pair_meam_spline.h:79:34: error: ‘_deriv0’ was not declared in this scope
../pair_meam_spline.h:80:34: error: ‘_derivN’ was not declared in this scope
In file included from ../style_pair.h:87:0,
from ../pair_hybrid.cpp:19:
../pair_meam_sw_spline.h: At global scope:
../pair_meam_sw_spline.h:77:31: error: expected ‘,’ or ‘...’ before numeric constant
../pair_meam_sw_spline.h: In member function ‘void LAMMPS_NS::PairMEAMSWSpline::SplineFunction::init(int)’:
../pair_meam_sw_spline.h:79:34: error: ‘_deriv0’ was not declared in this scope
../pair_meam_sw_spline.h:80:34: error: ‘_derivN’ was not declared in this scope
Makefile:100: recipe for target `pair_hybrid.o' failed
make[1]: *** [pair_hybrid.o] Error 1
make[1]: Leaving directory `/usr/lammps-24Apr13/src/Obj_cygwin'
Makefile:77: recipe for target `cygwin' failed
make: *** [cygwin] Error 2
As far as I can tell, this should be an issue with the USER-MISC package. However I do need to use the Shifted Force Lennard-Jones in this package. May I know whether there is a way to resolve this error or a workaround for this?
it looks as if there is something in your setup that defines _N to some number.
you could try changing these lines in pair_meam_spline.h and
pair_meam_sw_spline.h:
/// Initialization of spline function.
void init(int _N, double _deriv0, double _derivN) {
N = _N;
into something like this:
/// Initialization of spline function.
void init(int _num, double _deriv0, double _derivN) {
N = _num;
alternatively you can just delete pair_meam_spline.h,
pair_meam_spline.cpp, pair_meam_sw_spline.h, and
pair_meam_sw_spline.cpp
axel.