[lammps-users] error message when compile lammps

hello,everyone,this is rufer,when I compile lammps in ubuntu, error message comes as follows:
…/domain_omp.cpp:37:6: error: ‘DomainOMP’ has not been declared
37 | void DomainOMP::pbc()

^~~~~~~~~
…/domain_omp.cpp: In function ‘void pbc()’:
…/domain_omp.cpp:39:42: error: ‘atom’ was not declared in this scope; did you mean ‘atol’?
39 | dbl3_t * _noalias const x = (dbl3_t *)&atom->x[0][0];
^~~~
atol
…/domain_omp.cpp:41:43: error: ‘triclinic’ was not declared in this scope
41 | const double * _noalias const lo = (triclinic == 0) ? boxlo : boxlo_lamda;
^~~~~~~~~
…/domain_omp.cpp:41:61: error: ‘boxlo’ was not declared in this scope
41 | const double * _noalias const lo = (triclinic == 0) ? boxlo : boxlo_lamda;
^~~~~
…/domain_omp.cpp:41:69: error: ‘boxlo_lamda’ was not declared in this scope
41 | const double * _noalias const lo = (triclinic == 0) ? boxlo : boxlo_lamda;
^~~~~~~~~~~

…/domain_omp.cpp:42:61: error: ‘boxhi’ was not declared in this scope
42 | const double * _noalias const hi = (triclinic == 0) ? boxhi : boxhi_lamda;

^~~~~
…/domain_omp.cpp:42:69: error: ‘boxhi_lamda’ was not declared in this scope
42 | const double * _noalias const hi = (triclinic == 0) ? boxhi : boxhi_lamda;
^~~~~~~~~~~

…/domain_omp.cpp:43:61: error: ‘prd’ was not declared in this scope
43 | const double * _noalias const period = (triclinic == 0) ? prd : prd_lamda;

^~~
…/domain_omp.cpp:43:69: error: ‘prd_lamda’ was not declared in this scope
43 | const double * _noalias const period = (triclinic == 0) ? prd : prd_lamda;
^~~~~~~~~
…/domain_omp.cpp:54:9: error: ‘xperiodic’ was not declared in this scope; did you mean ‘period’?
54 | if (xperiodic) {
^~~~~~~~~
period
…/domain_omp.cpp:57:13: error: ‘deform_vremap’ was not declared in this scope
57 | if (deform_vremap && mask[i] & deform_groupbit) v[i].x += h_rate[0];
^~~~~~~~~~~~~
…/domain_omp.cpp:57:40: error: ‘deform_groupbit’ was not declared in this scope
57 | if (deform_vremap && mask[i] & deform_groupbit) v[i].x += h_rate[0];
^~~~~~~~~~~~~~~
…/domain_omp.cpp:57:67: error: ‘h_rate’ was not declared in this scope
57 | if (deform_vremap && mask[i] & deform_groupbit) v[i].x += h_rate[0];
^~~~~~
…/domain_omp.cpp:67:13: error: ‘deform_vremap’ was not declared in this scope
67 | if (deform_vremap && mask[i] & deform_groupbit) v[i].x -= h_rate[0];
^~~~~~~~~~~~~
…/domain_omp.cpp:67:40: error: ‘deform_groupbit’ was not declared in this scope
67 | if (deform_vremap && mask[i] & deform_groupbit) v[i].x -= h_rate[0];
^~~~~~~~~~~~~~~
…/domain_omp.cpp:67:67: error: ‘h_rate’ was not declared in this scope
67 | if (deform_vremap && mask[i] & deform_groupbit) v[i].x -= h_rate[0];
^~~~~~
…/domain_omp.cpp:76:9: error: ‘yperiodic’ was not declared in this scope; did you mean ‘period’?
76 | if (yperiodic) {
^~~~~~~~~
period
…/domain_omp.cpp:79:13: error: ‘deform_vremap’ was not declared in this scope
79 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~
…/domain_omp.cpp:79:40: error: ‘deform_groupbit’ was not declared in this scope
79 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~~~
…/domain_omp.cpp:80:21: error: ‘h_rate’ was not declared in this scope
80 | v[i].x += h_rate[5];
^~~~~~
…/domain_omp.cpp:92:13: error: ‘deform_vremap’ was not declared in this scope
92 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~
…/domain_omp.cpp:92:40: error: ‘deform_groupbit’ was not declared in this scope
92 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~~~
…/domain_omp.cpp:93:21: error: ‘h_rate’ was not declared in this scope
93 | v[i].x -= h_rate[5];
^~~~~~
…/domain_omp.cpp:104:9: error: ‘zperiodic’ was not declared in this scope; did you mean ‘period’?
104 | if (zperiodic) {
^~~~~~~~~
period
…/domain_omp.cpp:107:13: error: ‘deform_vremap’ was not declared in this scope
107 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~
…/domain_omp.cpp:107:40: error: ‘deform_groupbit’ was not declared in this scope
107 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~~~
…/domain_omp.cpp:108:21: error: ‘h_rate’ was not declared in this scope
108 | v[i].x += h_rate[4];
^~~~~~
…/domain_omp.cpp:121:13: error: ‘deform_vremap’ was not declared in this scope
121 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~
…/domain_omp.cpp:121:40: error: ‘deform_groupbit’ was not declared in this scope
121 | if (deform_vremap && mask[i] & deform_groupbit) {
^~~~~~~~~~~~~~~
…/domain_omp.cpp:122:21: error: ‘h_rate’ was not declared in this scope
122 | v[i].x -= h_rate[4];
^~~~~~
…/domain_omp.cpp: At global scope:
…/domain_omp.cpp:141:6: error: ‘DomainOMP’ has not been declared
141 | void DomainOMP::lamda2x(int n)
^~~~~~~~~
…/domain_omp.cpp: In function ‘void lamda2x(int)’:
…/domain_omp.cpp:143:42: error: ‘atom’ was not declared in this scope; did you mean ‘atol’?
143 | dbl3_t * _noalias const x = (dbl3_t *)&atom->x[0][0];
^~~~
atol
…/domain_omp.cpp:150:14: error: ‘h’ was not declared in this scope
150 | x[i].x = h[0]*x[i].x + h[5]*x[i].y + h[4]*x[i].z + boxlo[0];
^
…/domain_omp.cpp:150:56: error: ‘boxlo’ was not declared in this scope
150 | x[i].x = h[0]*x[i].x + h[5]*x[i].y + h[4]*x[i].z + boxlo[0];
^~~~~
…/domain_omp.cpp: At global scope:
…/domain_omp.cpp:161:6: error: ‘DomainOMP’ has not been declared
161 | void DomainOMP::x2lamda(int n)
^~~~~~~~~
…/domain_omp.cpp: In function ‘void x2lamda(int)’:
…/domain_omp.cpp:163:42: error: ‘atom’ was not declared in this scope; did you mean ‘atol’?
163 | dbl3_t * _noalias const x = (dbl3_t *)&atom->x[0][0];
^~~~
atol
…/domain_omp.cpp:170:30: error: ‘boxlo’ was not declared in this scope
170 | double delta0 = x[i].x - boxlo[0];
^~~~~
…/domain_omp.cpp:174:14: error: ‘h_inv’ was not declared in this scope
174 | x[i].x = h_inv[0]*delta0 + h_inv[5]*delta1 + h_inv[4]*delta2;
^~~~~
make[1]: *** [Makefile:113: domain_omp.o] Error 1
make[1]: Leaving directory ‘/home/rufer/Documents/lammps-stable/lammps-29Oct20/src/Obj_ubuntu’
make: *** [Makefile:212: ubuntu] Error 2

any advice will be appreatiate.

This looks like you have inconsistents installed packages.

Please start from a clean folder directly extracted from the downloaded source code and then mention the exact sequence of steps you performed to compile. Also report any errors or warnings along the way.

Chances are that the error will go away right away, or we will be able to tell from the descriptions of the steps and the screen log where things when wrong.

You could also consider using the CMake build procedure instead where such inconsistencies are not possible (unless you make inconsistent changes manually which cannot be handled with either procedure).

Thanks for your advice, I will try it.

Axel Kohlmeyer <[email protected]> 于2021年8月23日周一 下午10:09写道:

Got it!

Axel Kohlmeyer <[email protected]> 于2021年8月23日周一 下午10:17写道: