Build error using the USER-CUDA package

Christian – I’m building the CUDA package with the commands

cd lib/cuda
make clean
make CUDA_INSTALL_PATH=$CUDA_HOME cufft=1 precision=1 arch=20 # Redirect to current CUDA.
cd ../..

and LAMMPS using the commands

cd src
make clean-all
make yes-manybody # These were supposed to have been defaults.
make yes-molecule
make yes-kspace
make yes-replica # Need this one for kspace partitioning.
make yes-asphere # Need this one for Gay-Berne test.
# These packages have to be included *LAST*:
make yes-gpu # Add the GPU capability.
make yes-user-cuda # Add more GPU capability.
make package-status # List states of all packages.
rm -f Obj_xk6/Makefile # Residual Makefile is not writable,
# has to be deleted specially.

make xk6 # This one is adapted from Mike Brown.

but I’m getting this error:

make[1]: Entering directory /lustre/widow2/scratch/cponder/CUDA/LAMMPS/src/Obj_xk6’ CC -DLAMMPS_SMALLSMALL -O2 -march=amdfam10 -ftree-vectorize -DLAMMPS_GZIP -I…/…/lib/cuda -DLMP_USER_CUDA -DMPICH_SKIP_MPICXX -DFFT_FFTW3 -I/opt/fftw/3.3. 0.0/interlagos/include -I/opt/nvidia/cuda/4.0.17a//include -DUNIX -DFFT_CUFFT -DCUDA_PRECISION=1 -DCUDA_ARCH=20 -c pppm_cuda.cpp pppm_cuda.cpp: In constructor ‘LAMMPS_NS::PPPMCuda::PPPMCuda(LAMMPS_NS::LAMMPS*, int, char**)’: pppm_cuda.cpp:110:3: error: ‘precision’ was not declared in this scope pppm_cuda.cpp: In member function ‘void LAMMPS_NS::PPPMCuda::set_grid()’: pppm_cuda.cpp:1309:25: error: ‘precision’ was not declared in this scope pppm_cuda.cpp:1326:18: error: ‘precision’ was not declared in this scope pppm_cuda.cpp:1333:18: error: ‘precision’ was not declared in this scope pppm_cuda.cpp:1340:18: error: ‘precision’ was not declared in this scope make[1]: *** [pppm_cuda.o] Error 1 make[1]: Leaving directory /lustre/widow2/scratch/cponder/CUDA/LAMMPS/src/Obj_xk6'
make: *** [xk6] Error 2
[email protected]...:~/CUDA/LAMMPS/src$ exit

I see the variable being used in the code``

110 precision = atof(arg[0]);
111 if(narg>1)
112 precisionmodify=arg[1][0];
113 else precisionmodify='=';

1325 err = rms(h_x,xprd,natoms,q2,acons);
**1326 while (err > precision) {**
1327 err = rms(h_x,xprd,natoms,q2,acons);
1328 nx_pppm++;
1329 h_x = xprd/nx_pppm;
1330 }

I only see this declared as a field in fix_qeq_comb.h.
This is with the latest code in the repository (revision 7867), building on the ORNL/Jaguar (Cray) system.
Do you still have changes to check in?

– Carl

Hi Carl

a variable in the base pppm class was renamed a day ago or so, which broke compilation of pppm_cuda.cpp. A patch has been submitted, and I think it should already be in the tar file. It typically takes a day or so until its in the svn repository as well.

Best regards
Christian

-------- Original-Nachricht --------