Hello Everyone,
I am trying to install the latest stable release of LAMMPS (23 Jun 2022) and get the error shown below during compilation on a Ubuntu 18.04 machine. I am using the downloaded tar ball for the stable release.
I am using the cmake command shown below with custom preset files in cmake.
Build and configuration succeed without any hiccups.
However, during compilation using make
I run into an error that appears to be a syntax error in the file ../lammpsDir/src/OPENMP/reaxff_forces_omp.cpp
. See below for the full error message.
Can anyone please help? Also, please do let me know if there’s more information needed to understand or resolve this.
Many thanks.
Warm regards,
Vaibhav.
cmake -C ../cmake/presets/vt_all_on.cmake -C ../cmake/presets/vt_nolib.cmake ../cmake -DKokkos_ARCH_PASCAL61=yes -DKokkos_ENABLE_CUDA=yes -DKokkos_ENABLE_OPENMP=yes -DCMAKE_CXX_COMPILER=/home/vthakore/src/gLammps-noonian/lib/kokkos/bin/nvcc_wrapper -DBUILD_SHARED_LIBS=on -DCMAKE_Fortran_COMPILER=/usr/bin/gfortran -DLAMMPS_SIZES=smallbig -DGPU_API=cuda -DLAMMPS_EXCEPTIONS=on -DN2P2_DIR=/home/vthakore/src/gn2p2-noonian -DGPU_ARCH=sm_61
loading initial cache file ../cmake/presets/vt_all_on.cmake
loading initial cache file ../cmake/presets/vt_nolib.cmake
-- Running check for auto-generated files from make-based build system
CMake Warning (dev) at /usr/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (MPI). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/usr/local/share/cmake-3.22/Modules/FindPkgConfig.cmake:88 (find_package_handle_standard_args)
/usr/local/share/cmake-3.22/Modules/FindMPI.cmake:270 (include)
CMakeLists.txt:338 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/local/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:438 (message):
The package name passed to `find_package_handle_standard_args` (PkgConfig)
does not match the name of the calling package (MPI). This can lead to
problems in calling code that expects `find_package` result variables
(e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
/usr/local/share/cmake-3.22/Modules/FindPkgConfig.cmake:88 (find_package_handle_standard_args)
/usr/local/share/cmake-3.22/Modules/FindMPI.cmake:270 (include)
CMakeLists.txt:352 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found Python: /usr/bin/python3.6 (found version "3.6.9") found components: Interpreter Development Development.Module Development.Embed
-- Found Python: /usr/include/python3.6m (found version "3.6.9") found components: NumPy Interpreter Development.Module
-- KOKKOS: Enabling CUDA LAMBDA function support
-- Setting default Kokkos CXX standard to 14
-- Setting policy CMP0074 to use <Package>_ROOT variables
-- The project name is: Kokkos
-- Compiler Version: 11.0.194
-- Using -std=c++14 for C++14 standard as feature
-- Built-in Execution Spaces:
-- Device Parallel: Kokkos::Cuda
-- Host Parallel: Kokkos::OpenMP
-- Host Serial: NONE
--
-- Architectures:
-- PASCAL61
-- Kokkos Devices: OPENMP;CUDA, Kokkos Backends: OPENMP;CUDA
CMake Warning at Modules/Packages/INTEL.cmake:46 (message):
INTEL gives best performance with Intel compilers
Call Stack (most recent call first):
CMakeLists.txt:675 (include)
-- Pair style dpd/intel will be faster with MKL libraries
-- Generating style headers...
-- Generating package headers...
-- Generating lmpinstalledpkgs.h...
-- Found Python: /usr/bin/python3.6 (found version "3.6.9") found components: Interpreter
-- Could NOT find ClangFormat (missing: ClangFormat_EXECUTABLE) (Required is at least version "8.0")
-- The following tools and libraries have been found and configured:
* Git
* MPI
* OpenMP
* LAPACK
* BLAS
* JPEG
* FFTW3
* Cythonize
* N2P2
* ZLIB
* HDF5
* CUDAToolkit
* TPLCUDA
* TPLLIBDL
* TBB_MALLOC
* Threads
* CUDA
* Python
-- <<< Build configuration >>>
LAMMPS Version: 20220623
Operating System: Linux Ubuntu 18.04
CMake Version: 3.22.0-rc2
Build type: RelWithDebInfo
Install path: /home/vthakore/.local
Generator: Unix Makefiles using /usr/bin/make
-- Enabled packages: ASPHERE;ATC;BOCS;BODY;BPM;BROWNIAN;CG-DNA;CG-SDK;CLASS2;COLLOID;COLVARS;COMPRESS;CORESHELL;DIELECTRIC;DIFFRACTION;DIPOLE;DPD-BASIC;DPD-MESO;DPD-REACT;DPD-SMOOTH;DRUDE;EFF;ELECTRODE;EXTRA-COMPUTE;EXTRA-DUMP;EXTRA-FIX;EXTRA-MOLECULE;EXTRA-PAIR;FEP;GPU;GRANULAR;H5MD;INTEL;INTERLAYER;KOKKOS;KSPACE;LATBOLTZ;MANIFOLD;MANYBODY;MC;MEAM;MGPT;MISC;ML-HDNNP;ML-IAP;ML-RANN;ML-SNAP;MOFFF;MOLECULE;MOLFILE;MPIIO;OPENMP;OPT;ORIENT;PERI;PHONON;PLUGIN;POEMS;PTM;PYTHON;QEQ;QTB;REACTION;REAXFF;REPLICA;RIGID;SHOCK;SMTBQ;SPH;SPIN;SRD;TALLY;UEF;YAFF
-- <<< Compilers and Flags: >>>
-- C++ Compiler: /home/vthakore/src/gLammps-noonian/lib/kokkos/bin/nvcc_wrapper
Type: GNU
Version: 7.5.0
C++ Flags: -O2 -g -DNDEBUG
Defines: LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_EXCEPTIONS;LAMMPS_OMP_COMPAT=3;LAMMPS_JPEG;LAMMPS_GZIP;LAMMPS_FFMPEG;FFT_FFTW3;FFT_FFTW_THREADS;LMP_PYTHON;MLIAP_PYTHON;LAMMPS_ZSTD;LMP_MPIIO;LMP_OPENMP;$<BUILD_INTERFACE:LMP_KOKKOS>;FFT_CUFFT;LMP_INTEL;LMP_INTEL_USELRT;LMP_GPU;LMP_PLUGIN
Options: -Xcudafe;--diag_suppress=unrecognized_pragma
-- C compiler: /usr/bin/cc
Type: GNU
Version: 7.5.0
C Flags: -O2 -g -DNDEBUG
-- <<< Linker flags: >>>
-- Executable name: lmp
-- Shared library flags:
-- <<< MPI flags >>>
-- MPI_defines: MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H
-- MPI includes: /usr/lib/x86_64-linux-gnu/openmpi/include/openmpi;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent;/usr/lib/x86_64-linux-gnu/openmpi/include/openmpi/opal/mca/event/libevent2022/libevent/include;/usr/lib/x86_64-linux-gnu/openmpi/include
-- MPI libraries: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi_cxx.so;/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so;
-- <<< GPU package settings >>>
-- GPU API: CUDA
-- CUDA Compiler: /usr/local/cuda-11.0/bin/nvcc
-- GPU default architecture: sm_61
-- GPU binning with CUDPP: OFF
-- CUDA MPS support: OFF
-- GPU precision: MIXED
-- Kokkos Devices: CUDA;CUDA_LAMBDA;OPENMP
-- Kokkos Architecture: PASCAL61
-- <<< FFT settings >>>
-- Primary FFT lib: FFTW3
-- Using double precision FFTs
-- Using threaded FFTs
-- Kokkos FFT: cuFFT
-- Configuring done
-- Generating done
-- Build files have been written to: /home/vthakore/src/lammps-23Jun2022/build
ERROR:
[ 88%] Building CXX object CMakeFiles/lammps.dir/home/vthakore/src/lammps-23Jun2022/src/KOKKOS/comm_kokkos.cpp.o
/home/vthakore/src/lammps-23Jun2022/src/OPENMP/reaxff_forces_omp.cpp: In function ‘void ReaxFF::Init_Forces_noQEq_OMP(ReaxFF::reax_system*, ReaxFF::control_params*, ReaxFF::simulation_data*, ReaxFF::storage*, ReaxFF::reax_list**)’:
/home/vthakore/src/lammps-23Jun2022/src/OPENMP/reaxff_forces_omp.cpp:361:1: error: for statement expected before ‘}’ token
#endif
^
/home/vthakore/src/lammps-23Jun2022/src/OPENMP/reaxff_forces_omp.cpp:356:20: error: barrier region may not be closely nested inside of work-sharing, ‘critical’, ‘ordered’, ‘master’, explicit ‘task’ or ‘taskloop’ region
#pragma omp barrier
^
[ 88%] Building CXX object CMakeFiles/lammps.dir/home/vthakore/src/lammps-23Jun2022/src/KOKKOS/comm_tiled_kokkos.cpp.o
CMakeFiles/lammps.dir/build.make:19193: recipe for target 'CMakeFiles/lammps.dir/home/vthakore/src/lammps-23Jun2022/src/OPENMP/reaxff_forces_omp.cpp.o' failed
make[2]: *** [CMakeFiles/lammps.dir/home/vthakore/src/lammps-23Jun2022/src/OPENMP/reaxff_forces_omp.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CMakeFiles/Makefile2:351: recipe for target 'CMakeFiles/lammps.dir/all' failed
make[1]: *** [CMakeFiles/lammps.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2