a compile error of fix_gravity_omp.cpp in lammps-2jun12

Hi all,

I try to build lammps-2Jun12 on Mac OS X with OpenMPI and OpenMP.
I employ:
i686-apple-darwin11-llvm-g++-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)

I got the following error message:
$ mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -fopenmp -DLAMMPS_GZIP -DLMP_USER_OMP -I../../lib/colvars -I../../lib/awpmd/ivutils/include -I../../lib/awpmd/systems/interact -I../../lib/atc -I../../lib/reax -I../../lib/poems -I../../lib/meam -DFFT_FFTW3 -I/Users/chibaf/openkim-api-v1.0.1/KIM_API -c fix_gravity_omp.cpp
fix_gravity_omp.cpp: In member function ‘virtual void LAMMPS_NS::FixGravityOMP::post_force(int)’:
fix_gravity_omp.cpp:48: error: ‘dt’ was not declared in this scope
fix_gravity_omp.cpp:48: error: ‘phigrad’ was not declared in this scope
fix_gravity_omp.cpp:50: error: ‘thetagrad’ was not declared in this scope
fix_gravity_omp.cpp:56: error: ‘dt’ was not declared in this scope
fix_gravity_omp.cpp:56: error: ‘thetagrad’ was not declared in this scope
fix_gravity_omp.cpp: At global scope:
fix_gravity_omp.cpp:41: warning: unused parameter ‘vflag’
fix_gravity_omp.cpp:111: warning: unused parameter ‘iloop’

But in the case with lammps-1Jun12, a compile error of fix_gravity_omp.cpp did't happened.
lammps-1Jun12 includes a same code of fix_gravity_omp.cpp.

What happened?

regards,
chibaf (Fumihiro Chiba)

The OMP version hasn't been updated yet with the new fix gravity
command. So just don't compile with the USER-OMP package
until that update is made, which will happen in the next patch.

Steve

The OMP version hasn't been updated yet with the new fix gravity
command. So just don't compile with the USER-OMP package
until that update is made, which will happen in the next patch.

or better yet. use the attached updated version of fix gravity,
or use LAMMPS-ICMS instead of regular LAMMPS, if you
want a version where the USER-OMP package works.

axel.

fix_gravity_omp.cpp.gz (1.16 KB)

Thank you, Axel, Steve.
The problem was fixed.

chibaf (Fumihiro CHIBA)