XLC compiler rejects pair_adp_omp.cpp - The incomplete class "Timer" must not be used as a qualifier.

XLC is more strict than GCC or Intel about language syntax so I
wouldn't be surprised if this is erroneous code but I recognize that
Axel may have other opinions.

I am trying to build the 30Sep13 source on the ALCF Vesta BGQ. I know
some developers have access for verification if necessary.

Thanks,

Jeff

[[email protected] src]$ make yes-user-omp no-gpu bgq
Installing package user-omp
Uninstalling package gpu
make[1]: Entering directory
`/gpfs/vesta-home/jhammond/LAMMPS/lammps-30Sep13/src/Obj_bgq'
/bgsys/drivers/ppcfloor/comm/xl.ndebug/bin/mpixlcxx_r -g -O3 -qarch=qp
-qtune=qp -qsmp=omp -qstrict -DLAMMPS_GZIP -DLMP_USER_OMP
-DMPICH_SKIP_MPICXX -I/soft/libraries/alcf/current/xl/FFTW2/include
-DFFT_FFTW -DFFTW_SIZE -c ../pair_adp_omp.cpp
"../pair_adp_omp.cpp", line 74.16: 1540-0062 (S) The incomplete class
"Timer" must not be used as a qualifier.
make[1]: *** [pair_adp_omp.o] Error 1
make[1]: Leaving directory
`/gpfs/vesta-home/jhammond/LAMMPS/lammps-30Sep13/src/Obj_bgq'
make: *** [bgq] Error 2

I'd love to know what compiler will accept this file...

Jeff

[[email protected] src]$ make bgq
make[1]: Entering directory
`/gpfs/vesta-home/jhammond/LAMMPS/lammps-30Sep13/src/Obj_bgq'
/bgsys/drivers/ppcfloor/comm/gcc.legacy/bin/mpicxx -g -O3 -fopenmp
-DLAMMPS_GZIP -DLMP_USER_OMP -DMPICH_SKIP_MPICXX
-I/soft/libraries/alcf/current/xl/FFTW2/include -DFFT_FFTW -DFFTW_SIZE
  -c ../pair_adp_omp.cpp
../pair_adp_omp.cpp: In member function 'void
LAMMPS_NS::PairADPOMP::eval(int, int, LAMMPS_NS::ThrData*)':
../pair_adp_omp.cpp:205: error: 'class LAMMPS_NS::ThrData' has no
member named 'timer'
../pair_adp_omp.cpp:205: error: incomplete type 'LAMMPS_NS::Timer'
used in nested name specifier
../pair_adp_omp.cpp:223: error: 'class LAMMPS_NS::ThrData' has no
member named 'timer'
../pair_adp_omp.cpp:223: error: incomplete type 'LAMMPS_NS::Timer'
used in nested name specifier
make[1]: *** [pair_adp_omp.o] Error 1
make[1]: Leaving directory
`/gpfs/vesta-home/jhammond/LAMMPS/lammps-30Sep13/src/Obj_bgq'
make: *** [bgq] Error 2

[[email protected] src]$ /bgsys/drivers/ppcfloor/comm/gcc.legacy/bin/mpicxx -v
mpicxx for MPICH2 version 1.5
Reading specs from
/bgsys/drivers/toolchain/V1R2M1_base/gnu-linux/lib/gcc/powerpc64-bgq-linux/4.4.6/specs
Target: powerpc64-bgq-linux
Configured with:
/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/gcc-4.4.6/configure
--prefix=/bgsys/drivers/toolchain/V1R2M1_base/gnu-linux
--target=powerpc64-bgq-linux --with-pkgversion=BGQ-V1R2M1-130923
--host=powerpc64-linux-gnu --build=powerpc64-linux-gnu
--disable-multilib --enable-shared --enable-secureplt
--disable-libmudflap --disable-libspp
--with-headers=/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/build-powerpc64-bgq-linux/tempglibc-4.4.6-install/include
--with-libs=/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/build-powerpc64-bgq-linux/tempglibc-4.4.6-install/lib
--with-bin=/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/build-powerpc64-bgq-linux/tempglibc-4.4.6-install/bin
--with-sbin=/bgsys/drivers/V1R2M1/ppc64/toolchain/gnu/build-powerpc64-bgq-linux/tempglibc-4.4.6-install/sbin
--with-long-double-128 --enable-threads=posix
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.4.6 (BGQ-V1R2M1-130923)

XLC is more strict than GCC or Intel about language syntax so I
wouldn't be surprised if this is erroneous code but I recognize that
Axel may have other opinions.

no. this is a bug.

i recently sent steve an updated version of this file and forgot that
while i had also sent him updates to the Timer class quite a while
ago, they have not yet surfaced in the main repository.

please find attached a corrected version.

axel.

ps.: if you want more detailed timer accounting, you should try out
the corresponding LAMMPS-ICMS version which has a "timers full"
command, which can break down timings down to the thread level.

pair_adp_omp.cpp.gz (3.24 KB)