LAMMPS compiling-[pair_adp_omp.o] Error

Dear developers and users,

I am new to LAMMPS and just trying to install and compile the software in my Ubuntu 12.04lts OS. After I untar the source code then I run make yes-all; make no-lib; make openmpi commands. It ends with error as below. Please be kind enough to guide me to overcome this problem and proceed my compilation successfully. Is this a problem of pair_adp_omp header file ?? Thanks a lot in advance.

In file included from …/pair_adp_omp.h:28:0,
from …/pair_adp_omp.cpp:18:
…/thr_omp.h:171:20: warning: unused parameter ‘nthreads’ [-Wunused-parameter]
…/pair_adp_omp.cpp: In member function ‘virtual void LAMMPS_NS::PairADPOMP::compute(int, int)’:
…/pair_adp_omp.cpp:74:10: error: ‘class LAMMPS_NS::ThrData’ has no member named ‘timer’
…/pair_adp_omp.cpp:74:16: error: incomplete type ‘LAMMPS_NS::Timer’ used in nested name specifier
…/pair_adp_omp.cpp:95:10: error: ‘class LAMMPS_NS::ThrData’ has no member named ‘timer’
…/pair_adp_omp.cpp:95:16: error: incomplete type ‘LAMMPS_NS::Timer’ used in nested name specifier
…/pair_adp_omp.cpp: In member function ‘void LAMMPS_NS::PairADPOMP::eval(int, int, LAMMPS_NS::ThrData*)’:
…/pair_adp_omp.cpp:205:10: error: ‘class LAMMPS_NS::ThrData’ has no member named ‘timer’
…/pair_adp_omp.cpp:205:16: error: incomplete type ‘LAMMPS_NS::Timer’ used in nested name specifier
…/pair_adp_omp.cpp:223:10: error: ‘class LAMMPS_NS::ThrData’ has no member named ‘timer’
…/pair_adp_omp.cpp:223:16: error: incomplete type ‘LAMMPS_NS::Timer’ used in nested name specifier
make[1]: *** [pair_adp_omp.o] Error 1
make[1]: Leaving directory `/home/vampire/tools/lammps-30Sep13/src/Obj_openmpi’
make: *** [openmpi] Error 2

Dear developers and users,

I am new to LAMMPS and just trying to install and compile the software in my
Ubuntu 12.04lts OS. After I untar the source code then I run make yes-all;
make no-lib; make openmpi commands. It ends with error as below. Please be
kind enough to guide me to overcome this problem and proceed my compilation
successfully. Is this a problem of pair_adp_omp header file ?? Thanks a lot
in advance.

just delete the two lines as indicated below or delete
pair_adp_omp.cpp pair_adp_omp.h completely, if you do not need the adp
pair style with threading.

axel.

diff --git a/src/USER-OMP/pair_adp_omp.cpp b/src/USER-OMP/pair_adp_omp.cpp
index ec63dea..56139c8 100644
--- a/src/USER-OMP/pair_adp_omp.cpp
+++ b/src/USER-OMP/pair_adp_omp.cpp
@@ -71,7 +71,6 @@ void PairADPOMP::compute(int eflag, int vflag)

     loop_setup_thr(ifrom, ito, tid, inum, nthreads);
     ThrData *thr = fix->get_thr(tid);
- thr->timer(Timer::START);
     ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);

     if (force->newton_pair)
@@ -92,7 +91,6 @@ void PairADPOMP::compute(int eflag, int vflag)
       else eval<0,0,0>(ifrom, ito, thr);
     }

- thr->timer(Timer::PAIR);
     reduce_thr(this, eflag, vflag, thr);
   } // end of omp parallel region
}

Dear Dr Axel,

Thanks for your prompt reply. However, it is not so clear which lines you are talking about (Sorry for my limited knowledge). Is it “void PairADPOMP::compute(int eflag, int vflag)” or " thr->timer(Timer::PAIR) reduce_thr(this, eflag, vflag, thr)" or both??

Thanks

Dear developers and users,

I am new to LAMMPS and just trying to install and compile the software in my
Ubuntu 12.04lts OS. After I untar the source code then I run make yes-all;
make no-lib; make openmpi commands. It ends with error as below. Please be
kind enough to guide me to overcome this problem and proceed my compilation
successfully. Is this a problem of pair_adp_omp header file ?? Thanks a lot
in advance.

just delete the two lines as indicated below or delete
pair_adp_omp.cpp pair_adp_omp.h completely, if you do not need the adp
pair style with threading.

axel.

diff --git a/src/USER-OMP/pair_adp_omp.cpp b/src/USER-OMP/pair_adp_omp.cpp
index ec63dea…56139c8 100644
— a/src/USER-OMP/pair_adp_omp.cpp
+++ b/src/USER-OMP/pair_adp_omp.cpp
@@ -71,7 +71,6 @@ void PairADPOMP::compute(int eflag, int vflag)

loop_setup_thr(ifrom, ito, tid, inum, nthreads);
ThrData *thr = fix->get_thr(tid);

  • thr->timer(Timer::START);
    ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);

if (force->newton_pair)
@@ -92,7 +91,6 @@ void PairADPOMP::compute(int eflag, int vflag)
else eval<0,0,0>(ifrom, ito, thr);
}

  • thr->timer(Timer::PAIR);
    reduce_thr(this, eflag, vflag, thr);
    } // end of omp parallel region
    }

Dear Dr Axel,

Thanks for your prompt reply. However, it is not so clear which lines you
are talking about (Sorry for my limited knowledge). Is it "void
PairADPOMP::compute(int eflag, int vflag)" or " thr->timer(Timer::PAIR)
reduce_thr(this, eflag, vflag, thr)" or both??

this is a standard patch file, thus only the lines with the '-' in front.

Dr Axel,
I have deleted the lines " thr->timer(Timer::START)" and “thr->timer(Timer::PAIR)” but is still giving the same error!!
How to proceed now?
Thanks
Jeffrey

Dear Dr Axel,

Thanks for your prompt reply. However, it is not so clear which lines you
are talking about (Sorry for my limited knowledge). Is it “void
PairADPOMP::compute(int eflag, int vflag)” or " thr->timer(Timer::PAIR)
reduce_thr(this, eflag, vflag, thr)" or both??

this is a standard patch file, thus only the lines with the ‘-’ in front.

Dr Axel,
I have deleted the lines " thr->timer(Timer::START)" and
"thr->timer(Timer::PAIR)" but is still giving the same error!!
How to proceed now?

you probably forgot to do: make package-update

I am afriad that I did package-update and still the error is there:
In file included from …/pair_adp_omp.h:28:0,
from …/pair_adp_omp.cpp:18:
…/thr_omp.h:171:20: warning: unused parameter ‘nthreads’ [-Wunused-parameter]
…/pair_adp_omp.cpp: In member function ‘void LAMMPS_NS::PairADPOMP::eval(int, int, LAMMPS_NS::ThrData*)’:
…/pair_adp_omp.cpp:203:10: error: ‘class LAMMPS_NS::ThrData’ has no member named ‘timer’
…/pair_adp_omp.cpp:203:16: error: incomplete type ‘LAMMPS_NS::Timer’ used in nested name specifier
…/pair_adp_omp.cpp:221:10: error: ‘class LAMMPS_NS::ThrData’ has no member named ‘timer’
…/pair_adp_omp.cpp:221:16: error: incomplete type ‘LAMMPS_NS::Timer’ used in nested name specifier
make[1]: *** [pair_adp_omp.o] Error 1
make[1]: Leaving directory `/home/vampire/tools/lammps-30Sep13/src/Obj_openmpi’
make: *** [openmpi] Error 2

Dr Axel,
I have deleted the lines " thr->timer(Timer::START)" and
“thr->timer(Timer::PAIR)” but is still giving the same error!!
How to proceed now?

you probably forgot to do: make package-update

I am afriad that I did package-update and still the error is there:

then you changed the wrong file. you need to change the file in src/USER-OMP
if you change the copy in src/ it will be overwritten by make package-update

Dear Dr Axel,

I deleted the lines of file in my src/USER-OMP directory. It has

pair_adp_omp.cpp file and I removed the lines and now I rechecked the content. It is fine: Look at the lines below:

loop_setup_thr(ifrom, ito, tid, inum, nthreads);
ThrData *thr = fix->get_thr(tid);
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);

if (force->newton_pair)
thr->init_adp(nall, rho, mu, lambda);
else
thr->init_adp(nlocal, rho, mu, lambda);

if (evflag) {
if (eflag) {
if (force->newton_pair) eval<1,1,1>(ifrom, ito, thr);
else eval<1,1,0>(ifrom, ito, thr);
} else {
if (force->newton_pair) eval<1,0,1>(ifrom, ito, thr);
else eval<1,0,0>(ifrom, ito, thr);
}
} else {
if (force->newton_pair) eval<0,0,1>(ifrom, ito, thr);
else eval<0,0,0>(ifrom, ito, thr);
}

reduce_thr(this, eflag, vflag, thr);
} // end of omp parallel region

I am afriad that I did package-update and still the error is there:

then you changed the wrong file. you need to change the file in src/USER-OMP
if you change the copy in src/ it will be overwritten by make package-update

I just solved the problem by adding corrected file provided by Dr Axel in the following link
http://lammps.sandia.gov/threads/msg41047.html

Then it workes.

Dear Dr Axel,

I deleted the lines of file in my src/USER-OMP directory. It has

pair_adp_omp.cpp file and I removed the lines and now I rechecked the content. It is fine: Look at the lines below:

loop_setup_thr(ifrom, ito, tid, inum, nthreads);
ThrData *thr = fix->get_thr(tid);
ev_setup_thr(eflag, vflag, nall, eatom, vatom, thr);

if (force->newton_pair)
thr->init_adp(nall, rho, mu, lambda);
else
thr->init_adp(nlocal, rho, mu, lambda);

if (evflag) {
if (eflag) {
if (force->newton_pair) eval<1,1,1>(ifrom, ito, thr);
else eval<1,1,0>(ifrom, ito, thr);
} else {
if (force->newton_pair) eval<1,0,1>(ifrom, ito, thr);
else eval<1,0,0>(ifrom, ito, thr);
}
} else {
if (force->newton_pair) eval<0,0,1>(ifrom, ito, thr);
else eval<0,0,0>(ifrom, ito, thr);
}

reduce_thr(this, eflag, vflag, thr);
} // end of omp parallel region

I am afriad that I did package-update and still the error is there:

then you changed the wrong file. you need to change the file in src/USER-OMP
if you change the copy in src/ it will be overwritten by make package-update