Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: invalid operands to binary expression ('const lbann::callback::(anonymous namespace)::MemUsage' and 'const lbann::callback::(anonymous namespace)::MemUsage') #2406

Closed
yurivict opened this issue Dec 14, 2023 · 5 comments
Assignees
Labels

Comments

@yurivict
Copy link

Build breaks:

In file included from /usr/ports/misc/lbann/work/lbann-0.104/src/callbacks/memory_profiler.cpp:29:
In file included from /usr/ports/misc/lbann/work/lbann-0.104/include/lbann/callbacks/memory_profiler.hpp:32:
In file included from /usr/ports/misc/lbann/work/lbann-0.104/include/lbann/callbacks/callback.hpp:32:
In file included from /usr/ports/misc/lbann/work/lbann-0.104/include/lbann/utils/description.hpp:30:
In file included from /usr/include/c++/v1/ostream:168:
In file included from /usr/include/c++/v1/__memory/shared_ptr.h:30:
In file included from /usr/include/c++/v1/__memory/uninitialized_algorithms.h:13:
In file included from /usr/include/c++/v1/__algorithm/copy.h:14:
In file included from /usr/include/c++/v1/__algorithm/min.h:12:
/usr/include/c++/v1/__algorithm/comp.h:47:71: error: invalid operands to binary expression ('const lbann::callback::(anonymous namespace)::MemUsage' and 'const lbann::callback::(anonymous namespace)::MemUsage')
    bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
                                                                  ~~~ ^ ~~~
/usr/include/c++/v1/__algorithm/sift_down.h:44:34: note: in instantiation of member function 'std::__less<lbann::callback::(anonymous namespace)::MemUsage>::operator()' requested here
    if ((__child + 1) < __len && __comp(*__child_i, *(__child_i + difference_type(1)))) {
                                 ^
/usr/include/c++/v1/__algorithm/make_heap.h:36:14: note: in instantiation of function template specialization 'std::__sift_down<std::_ClassicAlgPolicy, std::__less<lbann::callback::(anonymous namespace)::MemUsage> &, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>>' requested here
        std::__sift_down<_AlgPolicy>(__first, __comp_ref, __n, __first + __start);
             ^
/usr/include/c++/v1/__algorithm/partial_sort.h:39:8: note: in instantiation of function template specialization 'std::__make_heap<std::_ClassicAlgPolicy, std::__less<lbann::callback::(anonymous namespace)::MemUsage> &, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>>' requested here
  std::__make_heap<_AlgPolicy>(__first, __middle, __comp);
       ^
/usr/include/c++/v1/__algorithm/partial_sort.h:66:12: note: in instantiation of function template specialization 'std::__partial_sort_impl<std::_ClassicAlgPolicy, std::__less<lbann::callback::(anonymous namespace)::MemUsage> &, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>>' requested here
      std::__partial_sort_impl<_AlgPolicy>(__first, __middle, __last, static_cast<__comp_ref_type<_Compare> >(__comp));
           ^
/usr/include/c++/v1/__algorithm/sort.h:693:10: note: in instantiation of function template specialization 'std::__partial_sort<std::_ClassicAlgPolicy, std::__less<lbann::callback::(anonymous namespace)::MemUsage>, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>>' requested here
    std::__partial_sort<_AlgPolicy>(__first, __last, __last, __comp);
         ^      
/usr/include/c++/v1/__algorithm/sort.h:706:8: note: in instantiation of function template specialization 'std::__sort_impl<std::_ClassicAlgPolicy, std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>, std::__less<lbann::callback::(anonymous namespace)::MemUsage>>' requested here
  std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
       ^
/usr/include/c++/v1/__algorithm/sort.h:712:8: note: in instantiation of function template specialization 'std::sort<std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>, std::__less<lbann::callback::(anonymous namespace)::MemUsage>>' requested here
  std::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
       ^
/usr/ports/misc/lbann/work/lbann-0.104/src/callbacks/memory_profiler.cpp:309:8: note: in instantiation of function template specialization 'std::sort<std::__wrap_iter<lbann::callback::(anonymous namespace)::MemUsage *>>' requested here
  std::sort(usage.begin(), usage.end());

Version: 0.104
clang-16
FreeBSD 13.2

@tbennun
Copy link
Contributor

tbennun commented Dec 14, 2023

Thank you for reporting. Which revision are you compiling? I cannot reproduce the issue (and MemUsage has a comparator here: https://github.com/LLNL/lbann/blob/develop/src/callbacks/memory_profiler.cpp#L270)

@yurivict
Copy link
Author

I am compiling the tag 0.104

@yurivict
Copy link
Author

I cannot reproduce the issue [...]

Are you using clang?

@tbennun
Copy link
Contributor

tbennun commented Dec 14, 2023

I see the build issue was fixed at a later PR (#2384). Can you reproduce the issue on the latest develop branch of LBANN? If you intend on using LBANN, please use that for now and we will release a fix. Thanks again for reporting!

@yurivict
Copy link
Author

Thank you.

@yurivict yurivict closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants