Warning when compiling LAMMPS

Hello LAMMPS users,

I get this warning when I’m compiling my LAMMPS.

[ 44%] Building CXX object CMakeFiles/lammps.dir/home/sanghoon/lammps-22Jul2025/src/pair_hybrid.cpp.o
/home/username/lammps-22Jul2025/src/nlohmann/json.hpp(12614): warning #186-D: pointless comparison of unsigned integer with zero
for (std::size_t i = 0; i < sz / 2; ++i)
detected during:
instantiation of “void nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::byte_swap(NumberType &) [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>, NumberType=uint8_t]” at line 12646
instantiation of “__nv_bool nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::get_number(nlohmann_lmp::json_abi_v3_12_0::detail::input_format_t, NumberType &) [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>, NumberType=uint8_t, InputIsLittleEndian=false]” at line 10036
instantiation of “__nv_bool nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::get_bson_binary(NumberType, nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::binary_t &) [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>, NumberType=int32_t]” at line 10084
instantiation of “__nv_bool nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::parse_bson_element_internal(nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::char_int_type, std::size_t) [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>]” at line 10160
instantiation of “__nv_bool nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::parse_bson_element_list(__nv_bool) [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>]” at line 9958
instantiation of “__nv_bool nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::parse_bson_internal() [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>]” at line 9896
instantiation of “__nv_bool nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::sax_parse(nlohmann_lmp::json_abi_v3_12_0::detail::input_format_t, nlohmann_lmp::json_abi_v3_12_0::detail::binary_reader<BasicJsonType, InputAdapterType, SAX>::json_sax_t *, __nv_bool, nlohmann_lmp::json_abi_v3_12_0::detail::cbor_tag_handler_t) [with BasicJsonType=nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, InputAdapterType=nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>, SAX=nlohmann_lmp::json_abi_v3_12_0::detail::json_sax_dom_parser<nlohmann_lmp::json_abi_v3_12_0::basic_json<std::map, std::vector, std::string, __nv_bool, int64_t, uint64_t, double, std::allocator, nlohmann_lmp::json_abi_v3_12_0::adl_serializer, std::vector<uint8_t, std::allocator<uint8_t>>, void>, nlohmann_lmp::json_abi_v3_12_0::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const uint8_t *, std::vector<uint8_t, std::allocator<uint8_t>>>>>]” at line 24545
instantiation of “nlohmann_lmp::json_abi_v3_12_0::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass> nlohmann_lmp::json_abi_v3_12_0::basic_json<ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType, CustomBaseClass>::from_ubjson(InputType &&, __nv_bool, __nv_bool) [with ObjectType=std::map, ArrayType=std::vector, StringType=std::string, BooleanType=__nv_bool, NumberIntegerType=int64_t, NumberUnsignedType=uint64_t, NumberFloatType=double, AllocatorType=std::allocator, JSONSerializer=nlohmann_lmp::json_abi_v3_12_0::adl_serializer, BinaryType=std::vector<uint8_t, std::allocator<uint8_t>>, CustomBaseClass=void, InputType=std::vector<uint8_t, std::allocator<uint8_t>> &]” at line 193 of /home/username/lammps-22Jul2025/src/molecule.cpp

My system information is as follows
System Information

  • LAMMPS Version: lammps-22Jul2025-update-2
  • Operating System: WSL-Ubuntu 24.04.1
  • GPU: NVIDIA GeForce RTX 5070
  • CPU: AMD Ryzen Threadripper PRO 7995WX

Is it fine to ignore these warnings? If not how can I fix it?

Thank you.

Yes, you can ignore this warning.

1 Like