Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Cannot build project #7

Closed
hericks opened this issue Jun 19, 2022 · 8 comments
Closed

Cannot build project #7

hericks opened this issue Jun 19, 2022 · 8 comments

Comments

@hericks
Copy link

hericks commented Jun 19, 2022

I am currently trying to build the project on my MacBook but cannot seem to get it to work. Here are some details of my setup.

  • macOS Big Sur 11.6.5
  • Python 3.7.13
  • Pytorch 1.10.1

Unfortunately, I get the following error.

(obl-paper) matthias@MacBookPro ~/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/build$ cmake ..
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at hanabi-learning-environment/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- pybind11 v2.6.2
CMake Warning (dev) at /Users/matthias/Developer/miniconda3/envs/obl-paper/share/cmake-3.22/Modules/CMakeDependentOption.cmake:84 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  third_party/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /Users/matthias/Developer/miniconda3/envs/obl-paper/bin/python (found version "3.7.13")
-- Found PythonLibs: /Users/matthias/Developer/miniconda3/envs/obl-paper/lib/libpython3.7m.dylib
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Performing Test HAS_FLTO_THIN
-- Performing Test HAS_FLTO_THIN - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
CMake Warning at /Users/matthias/Developer/miniconda3/envs/obl-paper/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /Users/matthias/Developer/miniconda3/envs/obl-paper/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:23 (find_package)


-- Found Torch: /Users/matthias/Developer/miniconda3/envs/obl-paper/lib/python3.7/site-packages/torch/lib/libtorch.dylib
---------------------
/Users/matthias/Developer/miniconda3/envs/obl-paper/lib/python3.7/site-packages/torch
-DPYBIND11_COMPILER_TYPE=\"_clang\" -DPYBIND11_STDLIB=\"_libcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1002\"
 -O3 -Wall -Wextra -Wno-register -Wno-attributes -fPIC -march=native -Wfatal-errors -DPYBIND11_COMPILER_TYPE=\"_clang\" -DPYBIND11_STDLIB=\"_libcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1002\"
---------------------
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   pyhanabi

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/build
(obl-paper) matthias@MacBookPro ~/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/build$ make -j10
[ 12%] Building CXX object CMakeFiles/rela_lib.dir/rela/batcher.cc.o
[ 15%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_card.cc.o
[ 15%] Building CXX object CMakeFiles/rela_lib.dir/rela/batch_runner.cc.o
[ 15%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_game.cc.o
[ 18%] Building CXX object CMakeFiles/rela_lib.dir/rela/transition.cc.o
[ 12%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_move.cc.o
[ 21%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_history_item.cc.o
[ 25%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_hand.cc.o
[ 28%] Building CXX object CMakeFiles/rela_lib.dir/rela/context.cc.o
[ 31%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_observation.cc.o
[ 34%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_state.cc.o
[ 37%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/util.cc.o
[ 40%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/canonical_encoders.cc.o
[ 43%] Linking CXX static library libhanabi.a
[ 43%] Built target hanabi
[ 46%] Building CXX object hanabi-learning-environment/CMakeFiles/pyhanabi.dir/pyhanabi.cc.o
[ 50%] Building CXX object hanabi-learning-environment/CMakeFiles/game_example.dir/game_example.cc.o
[ 53%] Linking CXX executable game_example
[ 53%] Built target game_example
[ 56%] Linking CXX shared library libpyhanabi.dylib
[ 56%] Built target pyhanabi
[ 59%] Linking CXX static library librela_lib.a
[ 59%] Built target rela_lib
make[2]: *** No rule to make target `/Users/matthias/Developer/miniconda3/envs/obl-paper/lib/python3.7/site-packages/torch/lib/libtorch_python.so', needed by `rela.cpython-37m-darwin.so'.  Stop.
make[2]: *** Waiting for unfinished jobs....
[ 62%] Building CXX object CMakeFiles/rela.dir/rela/pybind.cc.o
[ 68%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/clone_data_generator.cc.o
[ 68%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/hybrid_model.cc.o
[ 71%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/r2d2_actor.cc.o
[ 75%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/utils.cc.o
[ 78%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/sparta.cc.o
[ 81%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/hand_dist.cc.o
[ 84%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/rl_search.cc.o
[ 87%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/thread_loop.cc.o
[ 90%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/sim_actor.cc.o
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/hybrid_model.cc:7:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/hybrid_model.h:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/game_sim.h:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:24:
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_hand.h:98:3: warning: definition of implicit copy assignment operator for 'HanabiHand' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
  HanabiHand(const HanabiHand& hand)
  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithmIn file included from :/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/hand_dist.cc1711::919:
: note: in implicit copy assignment operator for 'hanabi_learning_env::HanabiHand' first required here
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/game_sim.h:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:24:
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_hand.h:98:        *__result = *__first;3
                  ^
: warning: /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:1745:23: note: in instantiation of function template specialization 'std::__copy_constexpr<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
        return _VSTD::__copy_constexpr(
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1451:30: note: in instantiation of function template specialization 'std::copy<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested heredefinition of implicit copy assignment operator for 'HanabiHand' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/sparta.cc:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/sparta.h:9:
In file included from         pointer __m = _VSTD::copy(__first, __mid, this->__begin_);

                             ^
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/game_sim.h:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector24::
1405:/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_hand.h9::98 :3:note : in instantiation of function template specialization 'std::vector<hanabi_learning_env::HanabiHand>::assign<hanabi_learning_env::HanabiHand *>' requested herewarning
: definition of implicit copy assignment operator for 'HanabiHand' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
        assign(__x.__begin_, __x.__end_);
        ^
  HanabiHand(const HanabiHand& hand)
  ^
  HanabiHand(const HanabiHand& hand)
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:36:  ^7
: note: in instantiation of member function 'std::vector<hanabi_learning_env::HanabiHand>::operator=' requested here
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:class HanabiState {1711
:19      ^:
 note: in implicit copy assignment operator for 'hanabi_learning_env::HanabiHand' first required here
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:1711:19:         *__result = *__first;note
:                   ^in implicit copy assignment operator for 'hanabi_learning_env::HanabiHand' first required here

 /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:1745:23:        *__result = *__first;note:
in instantiation of function template specialization 'std::__copy_constexpr<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
                  ^
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/thread_loop.cc:7:
        return _VSTD::__copy_constexpr(
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/thread_loop.h                      ^:/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm
9::
1745In file included from :/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/rlcc/utils.h23::9 :
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/canonical_encoders.hnote:: 24:
in instantiation of function template specialization 'std::__copy_constexpr<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested hereIn file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_observation.h::145123::
30: /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_hand.h:note98: :3in instantiation of function template specialization 'std::copy<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here:
warning: definition of implicit copy assignment operator for 'HanabiHand' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]

        pointer __m = _VSTD::copy(__first, __mid, this->__begin_);        return _VSTD::__copy_constexpr(In file included from
  HanabiHand(const HanabiHand& hand)
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/rl_search.cc
:7                             ^:

  ^In file included from
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/rl_search.h:12:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/game_sim.h:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:24:
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_hand.h:                      ^98/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector
::1405:39::  warningnote: : in instantiation of function template specialization 'std::vector<hanabi_learning_env::HanabiHand>::assign<hanabi_learning_env::HanabiHand *>' requested heredefinition of implicit copy assignment operator for 'HanabiHand' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]

/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1451:30:         assign(__x.__begin_, __x.__end_);
note        ^:
in instantiation of function template specialization 'std::copy<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
  HanabiHand(const HanabiHand& hand)
  ^
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:36:7:         pointer __m = _VSTD::copy(__first, __mid, this->__begin_);
                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1405:9: note: in instantiation of function template specialization 'std::vector<hanabi_learning_env::HanabiHand>::assign<hanabi_learning_env::HanabiHand *>' requested here
        assign(__x.__begin_, __x.__end_);
        ^
note: in instantiation of member function 'std::vector<hanabi_learning_env::HanabiHand>::operator=' requested here
class HanabiState {/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h
:36/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm::71711:: 19: note: notein instantiation of member function 'std::vector<hanabi_learning_env::HanabiHand>::operator=' requested here:
in implicit copy assignment operator for 'hanabi_learning_env::HanabiHand' first required here      ^class HanabiState {In file included from


/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/sim_actor.cc:      ^/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm7
::
1711In file included from :/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/sim_actor.h19::11 :
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/hybrid_model.hnote:: 10:
in implicit copy assignment operator for 'hanabi_learning_env::HanabiHand' first required hereIn file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/game_sim.h
:10:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h        *__result = *__first;:
24:
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_hand.h                  ^:
98:3: warning: definition of implicit copy assignment operator for 'HanabiHand' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:1745:23: note: in instantiation of function template specialization 'std::__copy_constexpr<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
        return _VSTD::__copy_constexpr(
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1451:30: note: in instantiation of function template specialization 'std::copy<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here        *__result = *__first;  HanabiHand(const HanabiHand& hand)


                  ^  ^

        pointer __m = _VSTD::copy(__first, __mid, this->__begin_);
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:                             ^1745:23
: /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:1711note:: 19:in instantiation of function template specialization 'std::__copy_constexpr<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
note: in implicit copy assignment operator for 'hanabi_learning_env::HanabiHand' first required here/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector
:1405:9:         return _VSTD::__copy_constexpr(note
:         *__result = *__first;                      ^in instantiation of function template specialization 'std::vector<hanabi_learning_env::HanabiHand>::assign<hanabi_learning_env::HanabiHand *>' requested here

/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:        assign(__x.__begin_, __x.__end_);
        ^
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:36:7: note: in instantiation of member function 'std::vector<hanabi_learning_env::HanabiHand>::operator=' requested here
1451:class HanabiState {30
:       ^
note: in instantiation of function template specialization 'std::copy<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
        pointer __m = _VSTD::copy(__first, __mid, this->__begin_);
                             ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1405:9: note: in instantiation of function template specialization 'std::vector<hanabi_learning_env::HanabiHand>::assign<hanabi_learning_env::HanabiHand *>' requested here
        assign(__x.__begin_, __x.__end_);
        ^
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h:36:7: note: in instantiation of member function 'std::vector<hanabi_learning_env::HanabiHand>::operator=' requested here
class HanabiState {
      ^

                  ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:1745:23: note: in instantiation of function template specialization 'std::__copy_constexpr<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
        return _VSTD::__copy_constexpr(
                      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1451:30: note: in instantiation of function template specialization 'std::copy<hanabi_learning_env::HanabiHand *, hanabi_learning_env::HanabiHand *>' requested here
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/sparta.cc        pointer __m = _VSTD::copy(__first, __mid, this->__begin_);
                             ^
:/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:81405:
:In file included from 9/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/future:: 366:
In file included from note/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/system_error: :149:
in instantiation of function template specialization 'std::vector<hanabi_learning_env::HanabiHand>::assign<hanabi_learning_env::HanabiHand *>' requested hereIn file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string
:511:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/string_view:179:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/__string:57:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithm:653:
        assign(__x.__begin_, __x.__end_);/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory
:1072:        ^5
: fatal error: In file included from static_assert failed due to requirement '__is_cpp17_move_insertable<std::allocator<search::GameSimulator>, void>::value' "The specified type does not meet the requirements of Cpp17MoveInsertable"
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/thread_loop.cc:7:
In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/thread_loop.h:/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/hanabi_state.h9::
36In file included from :/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/co7: note    static_assert(__is_cpp17_move_insertable<_Alloc>::value,: de/obl-paper/off-belief-learning/rlcc/utils.hin instantiation of member function 'std::vector<hanabi_learning_env::HanabiHand>::operator=' requested here

In file included from :    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/rl_search.cc:7class HanabiState {:

In file included from       ^/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/rl_search.h
9:9:
:
In file included from In file included from /Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/rela/context.h/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/hanabi-learning-environment/hanabi_lib/canonical_encoders.h::1121:
/Library/Developer/CommandLineTools/SDKs/M:
acOSX12.1.sdk/usr/include/c++/v1/memoryIn file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:954::27612:
:In file included from  /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/__bit_reference:15note:
: In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/algorithmin instantiation of function template specialization 'std::__construct_backward_with_exception_guarantees<std::allocator<search::GameSimulator>, search::GameSimulator *>' requested here:653
:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/memory::10721072::55::  fatal errorfatal error: : static_assert failed due to requirement '__is_cpp17_move_insertable<std::allocator<search::GameSimulator>, void>::value' "The specified type does not meet the req    _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
           ^
uirements of Cpp17MoveInsertable"static_assert failed due to requirement '__is_cpp17_move_insertable<std::allocator<search::GameSimulator>, void>::value' "The specified type does not meet the requirements of Cpp17MoveInsertable"
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1588:9: note: in instantiation of member function 'std::vector<search::GameSimulator>::__swap_out_circular_buffer' requested here

    static_assert(__is_cpp17_move_insertable<_Alloc>::value,
    ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        __swap_out_circular_buffer(__v);

        ^
/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/sparta.cc:23    static_assert(__is_cpp17_move_insertable<_Alloc>::value,:
9:     ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: in instantiation of member function 'std::vector<search::GameSimulator>::reserve' requested here
/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:954  games.reserve(hands.size());:
12:        ^ /Library/Developer/CommandLineTools/SDKs/
MacOSX12.1.sdk/usr/include/c++/v1/vector:954:12: notenote: in instantiation of function template specialization 'std::__construct_backward_with_exception_guarantees<std::allocator<search::GameSimulator>, search::GameSimulator *>' requested here
: in instantiation of function template specialization 'std::__construct_backward_with_exception_guarantees<std::allocator<search::GameSimulator>, search::GameSimulator *>' requested here    _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);
           ^

    _VSTD::__construct_backward_with_exception_guarantees(this->__alloc(), this->__begin_, this->__end_, __v.__begin_);/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector
:1588:9: note: in instantiation of member function 'std::vector<search::GameSimulator>::__swap_out_circular_buffer' requested here
        __swap_out_circular_buffer(__v);
           ^        ^

/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/thread_loop.cc:104:9: note: in instantiation of member function 'std::vector<search::GameSimulator>::reserve' requested here/Library/Developer/CommandLineTools/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/vector:1588:9: note: in instantiation of member function 'std::vector<search::GameSimulator>::__swap_out_circular_buffer' requested here
        __swap_out_circular_buffer(__v);
        ^

/Users/matthias/Documents/Studium/Oxford/trinity/dissertation/code/obl-paper/off-belief-learning/searchcc/rl_search.cc:174:9  envs_.reserve(numEnv_);:
        ^
 note: in instantiation of member function 'std::vector<search::GameSimulator>::reserve' requested here
  games.reserve(hands.size());
        ^
1 warning and 1 error generated.
1 warning and 1 error generated.
1 warning and 1 error generated.
make[2]: *** [CMakeFiles/hanalearn.dir/searchcc/sparta.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [CMakeFiles/hanalearn.dir/searchcc/thread_loop.cc.o] Error 1
make[2]: *** [CMakeFiles/hanalearn.dir/searchcc/rl_search.cc.o] Error 1
1 warning generated.
1 warning generated.
1 warning generated.
make[1]: *** [CMakeFiles/hanalearn.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/rela.dir/all] Error 2
make: *** [all] Error 2

Moreover, listing the files in the folder mentioned by the error message gives the following.

(base) matthias@MacBookPro ~/Developer/miniconda3/envs/obl-paper/lib/python3.7/site-packages/torch/lib$ ls -Algp
total 906216
-rwxr-xr-x  1 matthias  staff     377704 Jun 19 18:10 libc10.dylib
-rwxr-xr-x  1 matthias  staff   56551680 Jun 19 18:10 libcaffe2_detectron_ops.dylib
-rwxr-xr-x  1 matthias  staff      66664 Jun 19 18:10 libcaffe2_module_test_dynamic.dylib
-rwxr-xr-x  1 matthias  staff     143864 Jun 19 18:10 libcaffe2_observers.dylib
-rwxr-xr-x  1 matthias  staff    3052912 Jun 19 18:10 libiomp5.dylib
-rwxr-xr-x  1 matthias  staff      59968 Jun 19 18:10 libshm.dylib
-rwxr-xr-x  1 matthias  staff      16432 Jun 19 18:10 libtorch.dylib
-rwxr-xr-x  1 matthias  staff  369404224 Jun 19 18:10 libtorch_cpu.dylib
-rwxr-xr-x  1 matthias  staff      16432 Jun 19 18:10 libtorch_global_deps.dylib
-rwxr-xr-x  1 matthias  staff   29149776 Jun 19 18:10 libtorch_python.dylib

Renaming libtorch_python.dylib to libtorch_python.so doesn't fix the main error in the output above. What else could I try at this point?

@hengyuan-hu
Copy link
Contributor

I may not be able to give you useful tips as I haven't built this repo in mac and I haven't used torch with mac for a long time. My best guess is to change the CMakeLists.txt to link the right files (.dylib instead of .so). The repo is unlikely to be useful on a mac given its lack of powerful GPUs.

@hericks
Copy link
Author

hericks commented Jun 23, 2022

Thanks so much for the response. I tried it on a machine with powerful GPUs but now python cannot locate the rela module.

Here is the stack trace:

(obl-paper) [XXX@YYY build]$ cmake ..
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /apps/system/easybuild/software/GCCcore/10.2.0/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /apps/system/easybuild/software/GCCcore/10.2.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at hanabi-learning-environment/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- pybind11 v2.6.2
CMake Warning (dev) at /data/xxx/yyyy/envs/obl-paper/share/cmake-3.22/Modules/CMakeDependentOption.cmake:84 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  third_party/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /data/xxx/yyy/envs/obl-paper/bin/python (found version "3.7.13")
-- Found PythonLibs: /data/xxx/yyy/envs/obl-paper/lib/libpython3.7m.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /apps/system/easybuild/software/CUDAcore/11.1.1 (found version "11.1")
-- Caffe2: CUDA detected: 11.1
-- Caffe2: CUDA nvcc is: /apps/system/easybuild/software/CUDAcore/11.1.1/bin/nvcc
-- Caffe2: CUDA toolkit directory: /apps/system/easybuild/software/CUDAcore/11.1.1
-- Caffe2: Header version is: 11.1
-- Found CUDNN: /apps/system/easybuild/software/cuDNN/8.0.4.30-CUDA-11.1.1/lib/libcudnn.so
-- Found cuDNN: v8.0.4  (include: /apps/system/easybuild/software/cuDNN/8.0.4.30-CUDA-11.1.1/include, library: /apps/system/easybuild/software/cuDNN/8.0.4.30-CUDA-11.1.1/lib/libcudnn.so)
-- /apps/system/easybuild/software/CUDAcore/11.1.1/lib64/libnvrtc.so shorthash is 3a20f2b6
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.5;5.0;5.2;6.0;6.1;7.0;7.5;8.0;8.6;8.6+PTX
-- Added CUDA NVCC flags for: -gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_86,code=compute_86
CMake Warning at /home/xxx/.local/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /home/xxx/.local/lib/python3.9/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:23 (find_package)


-- Found Torch: /home/xxx/.local/lib/python3.9/site-packages/torch/lib/libtorch.so
---------------------
/home/xxx/.local/lib/python3.9/site-packages/torch
-DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\"
 -O3 -Wall -Wextra -Wno-register -Wno-attributes -fPIC -march=native -Wfatal-errors -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\"
---------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /data/xxx/yyy/off-belief-learning/build
(obl-paper) [xxx@yyy build]$ make
[  3%] Building CXX object CMakeFiles/rela_lib.dir/rela/transition.cc.o
[  6%] Building CXX object CMakeFiles/rela_lib.dir/rela/batcher.cc.o
[  9%] Building CXX object CMakeFiles/rela_lib.dir/rela/batch_runner.cc.o
[ 12%] Building CXX object CMakeFiles/rela_lib.dir/rela/context.cc.o
[ 15%] Linking CXX static library librela_lib.a
[ 15%] Built target rela_lib
[ 18%] Building CXX object CMakeFiles/rela.dir/rela/pybind.cc.o
[ 21%] Linking CXX shared module rela.cpython-37m-x86_64-linux-gnu.so
[ 21%] Built target rela
[ 25%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_card.cc.o
[ 28%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_game.cc.o
[ 31%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_hand.cc.o
[ 34%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_history_item.cc.o
[ 37%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_move.cc.o
[ 40%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_observation.cc.o
[ 43%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_state.cc.o
[ 46%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/util.cc.o
[ 50%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/canonical_encoders.cc.o
[ 53%] Linking CXX static library libhanabi.a
[ 53%] Built target hanabi
[ 56%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/utils.cc.o
[ 59%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/clone_data_generator.cc.o
[ 62%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/r2d2_actor.cc.o
[ 65%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/hand_dist.cc.o
[ 68%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/hybrid_model.cc.o
[ 71%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/rl_search.cc.o
[ 75%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/sim_actor.cc.o
[ 78%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/sparta.cc.o
[ 81%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/thread_loop.cc.o
[ 84%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/pybind.cc.o
[ 87%] Linking CXX shared module hanalearn.cpython-37m-x86_64-linux-gnu.so
[ 87%] Built target hanalearn
[ 90%] Building CXX object hanabi-learning-environment/CMakeFiles/pyhanabi.dir/pyhanabi.cc.o
[ 93%] Linking CXX shared library libpyhanabi.so
[ 93%] Built target pyhanabi
[ 96%] Building CXX object hanabi-learning-environment/CMakeFiles/game_example.dir/game_example.cc.o
[100%] Linking CXX executable game_example
[100%] Built target game_example
(obl-paper) [xxx@yyy build]$ cd ..
(obl-paper) [xxx@yyy off-belief-learning]$ cd pyhanabi/
(obl-paper) [xxx@yyy pyhanabi]$ python3 selfplay.py
Traceback (most recent call last):
  File "/data/xxx/yyy/off-belief-learning/pyhanabi/selfplay.py", line 22, in <module>
    from act_group import ActGroup
  File "/data/xxx/yyy/off-belief-learning/pyhanabi/act_group.py", line 16, in <module>
    import rela
ModuleNotFoundError: No module named 'rela'

Do you have an idea what I could try here?

@hengyuan-hu
Copy link
Contributor

Can you run which python3 and python3 --versionand ls -l build showing the content of the build folder and post all the output? I suspect that your python3 is running a different version of python than the one found during building process.

@hengyuan-hu
Copy link
Contributor

Ah, from your cmake log, you have Found PythonInterp: /data/xxx/yyy/envs/obl-paper/bin/python (found version "3.7.13") so the library are built against python 3.7. But you also have Found Torch: /home/xxx/.local/lib/python3.9/site-packages/torch/lib/libtorch.so, which is using python 3.9. So it is quite possible that your python3 command uses 3.9 while your rela library is built against 3.7.

I mostly use conda to manage the python binaries and make sure that I am building in the correct conda environment, i.e. using the consistent python and use the cmake provided by conda. If for any reason you cannot use conda on your system, you may need to figure out why it finds inconsistent pythons on your system.

@hericks
Copy link
Author

hericks commented Jun 23, 2022

I am also using Conda to manage the python binaries and am really unsure about why the torch binary in .local was used during the build.

Here are the requested outputs:

Python

  (obl-paper) [xxx@yyy pyhanabi]$ which python3
  /data/xxx/yyy/envs/obl-paper/bin/python3

Python version

(obl-paper) [xxx@yyy pyhanabi]$ python3 --version
Python 3.7.13

build folder

(obl-paper) [xxx@yyy pyhanabi]$ ls -l ../build/
total 16851
-rw-r--r--. 1 xxx yyy   34346 Jun 23 21:05 CMakeCache.txt
drwxr-sr-x. 7 xxx yyy    4096 Jun 23 21:09 CMakeFiles
-rw-r--r--. 1 xxx yyy   20677 Jun 23 21:05 Makefile
-rw-r--r--. 1 xxx yyy    2139 Jun 23 21:05 cmake_install.cmake
-rw-r--r--. 1 xxx yyy     375 Jun 23 21:05 detect_cuda_compute_capabilities.cpp
-rw-r--r--. 1 xxx yyy     130 Jun 23 21:05 detect_cuda_version.cc
drwxr-sr-x. 4 xxx yyy    4096 Jun 23 21:09 hanabi-learning-environment
-rwxr-xr-x. 1 xxx yyy 1412280 Jun 23 21:09 hanalearn.cpython-37m-x86_64-linux-gnu.so
-rw-r--r--. 1 xxx yyy  383162 Jun 23 21:06 librela_lib.a
-rwxr-xr-x. 1 xxx yyy  533976 Jun 23 21:06 rela.cpython-37m-x86_64-linux-gnu.so
drwxr-sr-x. 3 xxx yyy    4096 Jun 23 21:05 third_party

These outputs were generated after I removed python 3.9 from the .local folder and ran the build-process again. The stack trace for this new process contains the correct versions and looks as follows:

(obl-paper) [xxx@yyy off-belief-learning]$ cd build/
(obl-paper) [xxx@yyy build]$ rm -rf *
(obl-paper) [xxx@yyy build]$ cmake ..
-- The C compiler identification is GNU 10.2.0
-- The CXX compiler identification is GNU 10.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /apps/system/easybuild/software/GCCcore/10.2.0/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /apps/system/easybuild/software/GCCcore/10.2.0/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at hanabi-learning-environment/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- pybind11 v2.6.2
CMake Warning (dev) at /data/xxx/yyy/envs/obl-paper/share/cmake-3.22/Modules/CMakeDependentOption.cmake:84 (message):
  Policy CMP0127 is not set: cmake_dependent_option() supports full Condition
  Syntax.  Run "cmake --help-policy CMP0127" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.
Call Stack (most recent call first):
  third_party/pybind11/CMakeLists.txt:98 (cmake_dependent_option)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: /data/xxx/yyy/envs/obl-paper/bin/python (found version "3.7.13")
-- Found PythonLibs: /data/xxx/yyy/envs/obl-paper/lib/libpython3.7m.so
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /apps/system/easybuild/software/CUDAcore/11.1.1 (found version "11.1")
-- Caffe2: CUDA detected: 11.1
-- Caffe2: CUDA nvcc is: /apps/system/easybuild/software/CUDAcore/11.1.1/bin/nvcc
-- Caffe2: CUDA toolkit directory: /apps/system/easybuild/software/CUDAcore/11.1.1
-- Caffe2: Header version is: 11.1
-- Found CUDNN: /apps/system/easybuild/software/cuDNN/8.0.4.30-CUDA-11.1.1/lib/libcudnn.so
-- Found cuDNN: v8.0.4  (include: /apps/system/easybuild/software/cuDNN/8.0.4.30-CUDA-11.1.1/include, library: /apps/system/easybuild/software/cuDNN/8.0.4.30-CUDA-11.1.1/lib/libcudnn.so)
-- /apps/system/easybuild/software/CUDAcore/11.1.1/lib64/libnvrtc.so shorthash is 3a20f2b6
-- Automatic GPU detection failed. Building for common architectures.
-- Autodetected CUDA architecture(s): 3.5;5.0;5.2;6.0;6.1;7.0;7.5;8.0;8.6;8.6+PTX
-- Added CUDA NVCC flags for: -gencode;arch=compute_35,code=sm_35;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_52,code=sm_52;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_86,code=compute_86
CMake Warning at /data/xxx/yyy/envs/obl-paper/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /data/xxx/yyy/envs/obl-paper/lib/python3.7/site-packages/torch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:23 (find_package)


-- Found Torch: /data/xxx/yyy/envs/obl-paper/lib/python3.7/site-packages/torch/lib/libtorch.so
---------------------
/data/xxx/yyy/envs/obl-paper/lib/python3.7/site-packages/torch
-DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\"
 -O3 -Wall -Wextra -Wno-register -Wno-attributes -fPIC -march=native -Wfatal-errors -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\"
---------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /data/xxx/yyy/off-belief-learning/build
(obl-paper) [xxx@yyy build]$ make
[  3%] Building CXX object CMakeFiles/rela_lib.dir/rela/transition.cc.o
[  6%] Building CXX object CMakeFiles/rela_lib.dir/rela/batcher.cc.o
[  9%] Building CXX object CMakeFiles/rela_lib.dir/rela/batch_runner.cc.o
[ 12%] Building CXX object CMakeFiles/rela_lib.dir/rela/context.cc.o
[ 15%] Linking CXX static library librela_lib.a
[ 15%] Built target rela_lib
[ 18%] Building CXX object CMakeFiles/rela.dir/rela/pybind.cc.o
[ 21%] Linking CXX shared module rela.cpython-37m-x86_64-linux-gnu.so
[ 21%] Built target rela
[ 25%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_card.cc.o
[ 28%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_game.cc.o
[ 31%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_hand.cc.o
[ 34%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_history_item.cc.o
[ 37%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_move.cc.o
[ 40%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_observation.cc.o
[ 43%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/hanabi_state.cc.o
[ 46%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/util.cc.o
[ 50%] Building CXX object hanabi-learning-environment/hanabi_lib/CMakeFiles/hanabi.dir/canonical_encoders.cc.o
[ 53%] Linking CXX static library libhanabi.a
[ 53%] Built target hanabi
[ 56%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/utils.cc.o
[ 59%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/clone_data_generator.cc.o
[ 62%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/r2d2_actor.cc.o
[ 65%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/hand_dist.cc.o
[ 68%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/hybrid_model.cc.o
[ 71%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/rl_search.cc.o
[ 75%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/sim_actor.cc.o
[ 78%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/sparta.cc.o
[ 81%] Building CXX object CMakeFiles/hanalearn.dir/searchcc/thread_loop.cc.o
[ 84%] Building CXX object CMakeFiles/hanalearn.dir/rlcc/pybind.cc.o
[ 87%] Linking CXX shared module hanalearn.cpython-37m-x86_64-linux-gnu.so
[ 87%] Built target hanalearn
[ 90%] Building CXX object hanabi-learning-environment/CMakeFiles/pyhanabi.dir/pyhanabi.cc.o
[ 93%] Linking CXX shared library libpyhanabi.so
[ 93%] Built target pyhanabi
[ 96%] Building CXX object hanabi-learning-environment/CMakeFiles/game_example.dir/game_example.cc.o
[100%] Linking CXX executable game_example
[100%] Built target game_example
(obl-paper) [xxx@yyyy build]$ cd ../
build/                       hanabi-learning-environment/ pyhanabi/                    rlcc/                        third_party/
.git/                        models/                      rela/                        searchcc/
(obl-paper) [xxx@yyy build]$ cd ../pyhanabi/
(obl-paper) [xxx@yyy pyhanabi]$ python3 selfplay.py
Traceback (most recent call last):
  File "selfplay.py", line 22, in <module>
    from act_group import ActGroup
  File "/data/xxx/yyy/off-belief-learning/pyhanabi/act_group.py", line 16, in <module>
    import rela
ImportError: libcuda.so.1: cannot open shared object file: No such file or directory

@hengyuan-hu
Copy link
Contributor

Lol you must have a very strange setup for the paths.
https://stackoverflow.com/questions/54249577/importerror-libcuda-so-1-cannot-open-shared-object-file

@hericks
Copy link
Author

hericks commented Jun 24, 2022

Thanks again! Your comments were really helpful. I accidentally worked in a cluster session without a GPU assigned. Therefore, I couldn't find libcuda.so.1 to append its location to the path.

This issue is resolved and can be closed.

@hengyuan-hu
Copy link
Contributor

Glad it works!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants