Please Help, Install Failing, Errors Listed

Hi,

I’m trying to install ver 20220623 and it proceeds well for a while but generates several errors and eventually fails. The errors are as follows, many related to format.h. See build info at end too please.

Please advise. Is there perhaps a previous version that might not yield these issues please? I’m needing one which has “lepton” option.

Much appreciated,
Anton

[ 34%] Building CXX object CMakeFiles/lammps.dir/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmtlib_format.cpp.o
In file included from /mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format-inl.h:29:0,
from /mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmtlib_format.cpp:9:
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h: In instantiation of ‘constexpr fmt::v9_lmp::detail::format_decimal_result fmt::v9_lmp::detail::format_decimal(Iterator, UInt, int) [with Char = char; UInt = unsigned int; Iterator = fmt::v9_lmp::appender; typename std::enable_if<(! std::is_pointer<typename std::remove_cv<typename std::remove_reference<_Arg>::type>::type>::value), int>::type = 0]’:
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:2068:38: required from ‘fmt::v9_lmp::detail::write_int(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref)::<lambda(fmt::v9_lmp::detail::reserve_iterator)> [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int; fmt::v9_lmp::detail::reserve_iterator = fmt::v9_lmp::appender]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:2068:54: required from ‘struct fmt::v9_lmp::detail::write_int(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref) [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int]::<lambda(fmt::v9_lmp::detail::reserve_iteratorfmt::v9_lmp::appender)>’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:2066:21: required from ‘constexpr OutputIt fmt::v9_lmp::detail::write_int(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref) [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:2115:19: required from ‘constexpr OutputIt fmt::v9_lmp::detail::write_int_noinline(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref) [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:2124:28: required from ‘constexpr OutputIt fmt::v9_lmp::detail::write(OutputIt, T, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref) [with Char = char; OutputIt = fmt::v9_lmp::appender; T = int; typename std::enable_if<((fmt::v9_lmp::detail::is_integral::value && (! std::is_same<T, bool>::value)) && std::is_same<OutputIt, typename std::conditional<std::is_same<Char, char>::value, fmt::v9_lmp::appender, std::back_insert_iterator<fmt::v9_lmp::detail::buffer > >::type>::value), int>::type = 0]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:3396:25: required from ‘constexpr fmt::v9_lmp::detail::arg_formatter::iterator fmt::v9_lmp::detail::arg_formatter::operator()(T) [with T = int; Char = char; fmt::v9_lmp::detail::arg_formatter::iterator = fmt::v9_lmp::appender]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/core.h:1639:15: required from ‘constexpr decltype (vis(0)) fmt::v9_lmp::visit_format_arg(Visitor&&, const fmt::v9_lmp::basic_format_arg&) [with Visitor = fmt::v9_lmp::detail::arg_formatter&; Context = fmt::v9_lmp::basic_format_context<fmt::v9_lmp::appender, char>; decltype (vis(0)) = fmt::v9_lmp::appender]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:4134:42: required from ‘const Char* fmt::v9_lmp::detail::vformat_to(fmt::v9_lmp::detail::buffer&, fmt::v9_lmp::basic_string_view, fmt::v9_lmp::basic_format_args<fmt::v9_lmp::basic_format_context<typename std::conditional<std::is_same<typename fmt::v9_lmp::type_identity::type, char>::value, fmt::v9_lmp::appender, std::back_insert_iterator<fmt::v9_lmp::detail::buffer<typename fmt::v9_lmp::type_identity::type> > >::type, typename fmt::v9_lmp::type_identity::type> >, fmt::v9_lmp::detail::locale_ref)::format_handler::on_format_specs(int, const Char*, const Char*) [with Char = char]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:4137:3: required from ‘void fmt::v9_lmp::detail::vformat_to(fmt::v9_lmp::detail::buffer&, fmt::v9_lmp::basic_string_view, fmt::v9_lmp::basic_format_args<fmt::v9_lmp::basic_format_context<typename std::conditional<std::is_same<typename fmt::v9_lmp::type_identity::type, char>::value, fmt::v9_lmp::appender, std::back_insert_iterator<fmt::v9_lmp::detail::buffer<typename fmt::v9_lmp::type_identity::type> > >::type, typename fmt::v9_lmp::type_identity::type> >, fmt::v9_lmp::detail::locale_ref) [with Char = char; typename fmt::v9_lmp::type_identity::type = char; typename std::conditional<std::is_same<typename fmt::v9_lmp::type_identity::type, char>::value, fmt::v9_lmp::appender, std::back_insert_iterator<fmt::v9_lmp::detail::buffer<typename fmt::v9_lmp::type_identity::type> > >::type = fmt::v9_lmp::appender]’
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format-inl.h:1472:39: required from here
/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1241:8: error: uninitialized variable ‘buffer’ in ‘constexpr’ function
Char buffer[digits10() + 1];
^~~~~~

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1667:9: error: use of ‘fmt::v9_lmp::detail::write_int(OutputIt, int, unsigned int, const fmt::v9_lmp::basic_

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1116:4: error: use of ‘fmt::v9_lmp::detail::count_digits(UInt)::<lambda(UInt)> [with int BITS = 4; UInt = unsigned int]’ before deduction of ‘auto’

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1921:43: error: use of ‘fmt::v9_lmp::detail::write_int(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref)::<lambda(fmt::v9_lmp::detail::reserve_iterator)> [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int; fmt::v9_lmp::detail::reserve_iterator = fmt::v9_lmp::appender]’ before deduction of ‘auto’

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1667:9: error: use of ‘fmt::v9_lmp::detail::write_int(OutputIt, int, unsigned int, const fmt::v9_lmp::basic_

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1116:4: error: use of ‘fmt::v9_lmp::detail::count_digits(UInt)::<lambda(UInt)> [with int BITS = 1; UInt = unsigned int]’ before deduction of ‘auto’

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1921:43: error: use of ‘fmt::v9_lmp::detail::write_int(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref)::<lambda(fmt::v9_lmp::detail::reserve_iterator)> [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int; fmt::v9_lmp::detail::reserve_iterator = fmt::v9_lmp::appender]’ before deduction of ‘auto’
return base_iterator(out, write_digits(it));

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1667:9: error: use of ‘fmt::v9_lmp::detail::write_int(OutputIt, int, unsigned int, const fmt::v9_lmp::basic_format_specs&, W)::<lambda(fmt::v9_lmp::detail::reserve_iterator)> [with OutputIt = fmt::v9_lmp::appender; Char = char; W = fmt::v9_lmp::detail::write_int(Ou

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1116:4: error: use of ‘fmt::v9_lmp::detail::count_digits(UInt)::<lambda(UInt)> [with int BITS = 3; UInt = unsigned int]’ before deduction of ‘auto’

/mnt/lustre/users/alopis/Installs/LAMMPS/June23/src/fmt/format.h:1921:43: error: use of ‘fmt::v9_lmp::detail::write_int(OutputIt, fmt::v9_lmp::detail::write_int_arg, const fmt::v9_lmp::basic_format_specs&, fmt::v9_lmp::detail::locale_ref)::<lambda(fmt::v9_lmp::detail::reserve_iterator)> [with Char = char; OutputIt = fmt::v9_lmp::appender; T = unsigned int; fmt::v9_lmp::detail::reserve_iterator = fmt::v9_lmp::appender]’ before deduction of ‘auto’

etc.

The build setup info from the log is as follows:
– The CXX compiler identification is GNU 6.1.0
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /cm/local/apps/gcc/6.1.0/bin/c++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Found Git: /bin/git (found version “1.8.3.1”)
– Running check for auto-generated files from make-based build system
– Found MPI_CXX: /apps/libs/openmpi/4.0.0-gcc6.1.0/lib/libmpi.so (found version “3.1”)
– Found MPI: TRUE (found version “3.1”)
– Looking for C++ include omp.h
– Looking for C++ include omp.h - found
– Found OpenMP_CXX: -fopenmp (found version “4.5”)
– Found OpenMP: TRUE (found version “4.5”) found components: CXX
– Found GZIP: /bin/gzip
– Could NOT find FFMPEG (missing: FFMPEG_EXECUTABLE)
– Found PkgConfig: /bin/pkg-config (found version “0.27.1”)
– Checking for module ‘fftw3’
– No package ‘fftw3’ found
– Looking for C++ include cmath
– Looking for C++ include cmath - found
– Setting default Kokkos CXX standard to 14
– Setting policy CMP0074 to use _ROOT variables
– The project name is: Kokkos
– SERIAL backend is being turned on to ensure there is at least one Host space. To change this, you must enable another host execution space and configure with -DKokkos_ENABLE_SERIAL=OFF or change CMakeCache.txt
– Using -std=c++14 for C++14 standard as feature
– Built-in Execution Spaces:
– Device Parallel: NoTypeDefined
– Host Parallel: NoTypeDefined
– Host Serial: SERIAL

– Architectures:
– Found TPLLIBDL: /usr/lib64/libdl.so
– Kokkos Devices: SERIAL, Kokkos Backends: SERIAL
– Generating style headers…
– Generating package headers…
– Generating lmpinstalledpkgs.h…
– 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
  • PkgConfig
  • TPLLIBDL

– <<< Build configuration >>>
LAMMPS Version: 20220623
Operating System: Linux CentOS Linux 7
CMake Version: 3.20.0-rc4
Build type: RelWithDebInfo
Install path: /mnt/lustre/users/alopis/Installs/LAMMPS/June23
Generator: Unix Makefiles using /bin/gmake
– Enabled packages: BODY;COLLOID;DIPOLE;GRANULAR;KOKKOS;KSPACE;MANYBODY;MISC;MOLECULE;REAXFF;RIGID
– <<< Compilers and Flags: >>>
– C++ Compiler: /cm/local/apps/gcc/6.1.0/bin/c++
Type: GNU
Version: 6.1.0
C++ Flags: -O2 -g -DNDEBUG
Defines: LAMMPS_SMALLBIG;LAMMPS_MEMALIGN=64;LAMMPS_OMP_COMPAT=3;LAMMPS_GZIP;FFT_KISS;$<BUILD_INTERFACE:LMP_KOKKOS>
– <<< Linker flags: >>>
– Executable name: lmp
– Static library flags:
– <<< MPI flags >>>
– MPI_defines: MPICH_SKIP_MPICXX;OMPI_SKIP_MPICXX;_MPICC_H
– MPI includes: /apps/libs/openmpi/4.0.0-gcc6.1.0/include
– MPI libraries: /apps/libs/openmpi/4.0.0-gcc6.1.0/lib/libmpi.so;
– Kokkos Devices: SERIAL
– <<< FFT settings >>>
– Primary FFT lib: KISS
– Using double precision FFTs
– Using non-threaded FFTs
– Kokkos FFT: KISS
– Configuring done
– Generating done
– Build files have been written to: /mnt/lustre/users/alopis/Installs/LAMMPS/June23/build

Your problem is due to using GCC 6 in combination with the KOKKOS package.

LAMMPS by default uses the C++11 standard and GCC 6 is fully compatible with that. However, adding KOKKOS to the mix, switches the C++ standard setting to C++14 and GCC 6 (or 7) is not fully compatible with that and thus the embedded fmtlib package fails to compile (so KOKKOS is not causing the problem directly, but its requirement to enable C++14). The fmtlib package adjusts its features automatically to the C++ language standard enabled and thus would use alternate code paths (or disable features or optimizations) with C++11 versus C++14 (and C++17 or C++20).

From what I could figure out, you need to either compile LAMMPS with GCC 8 or later or drop the KOKKOS package.

Thanks Axel! That worked.

Thanks for all your previous help too. Don;t wish to inundate you with messages “thank you”, so I don’t always reply.

The run now gives me this message

LAMMPS (23 Jun 2022 - Update 4)
WARNING: Using I/O redirection is unreliable with parallel runs. Better use -in switch to read input file. (src/lammps.cpp:530)
using 24 OpenMP thread(s) per MPI task

  1. The OMP message seems to indicate that using OMP will help, it is the same if I specify OMP_NUM_THREADS=1

Using OMP 6 processes with 4 cores each then it’s a lot slower. So best not to use OMP at all, but including that specification of 1 thread is probably better to be consistent.

  1. How/where do I set the “-in” switch please?

  2. From which version is Lepton available please?

Your efforts always appreciated Axel!

Not really. The message merely confirms the LAMMPS has been compiled with -fopenmp nad confirms the value of OMP_NUM_THREADS that is set on the shell level. If OMP_NUM_THREADS is not set, LAMMPS will default to 1 and not the usual compiler dependent setting of using all available threads. LAMMPS is primarily designed for parallel computation using MPI and domain decomposition. To use OpenMP threads, three additional conditions must be met:

  1. you must compile with OpenMP enabled (that is the default setting with CMake, if the compiler supports it)
  2. you must include a package that includes OpenMP enabled styles. These are currently: OPENMP, INTEL, and KOKKOS (with the suitable additional flag, by default it only compiles the SERIAL backend)
  3. you must use the suitable settings to enable those styles, which can be either calling them explicitly and the corresponding package commands or using suitable command line flags and suffixes

What is the optimal setting depends a lot on your input, your command line, your environment variables, your system, and your hardware. There are detailed discussions in the manual: 7. Accelerate performance — LAMMPS documentation But before using any of those, you should first try with MPI only and no threads.

Then you are not specifying it correctly.

https://docs.lammps.org/Run_options.html

Check out the individual LEPTON package styles’ documentation, e.g.
pair_style lepton command — LAMMPS documentation, and look for “New in” and “Changed in” statements.

Thanks Axel,

It looks like I don’t need to employ OMP and the -in is not vital if my jobs are running (reading n the input).

I had been thinking tat only certain newer versions had Lepton available, but the most recent is also complaining.

LAMMPS (15 Jun 2023)

pair_style lepton 2.5
ERROR: Unrecognized pair style ‘lepton’ is part of the LEPTON package which is not enabled in this LAMMPS binary. (src/force.cpp:271)
Last command: pair_style lepton 2.5

So, is there a different binary I should run instead of “lmp”
Perhaps it is “nvcc_wrapper” ? I’ll try it.

You need to read the error message and documentation more carefully. You cannot use a style from a package if the package has not been enabled/installed.