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

Preprocessor error when compiling with torchlib #1131

Closed
robinpdev opened this issue Oct 30, 2023 · 1 comment · Fixed by #1132
Closed

Preprocessor error when compiling with torchlib #1131

robinpdev opened this issue Oct 30, 2023 · 1 comment · Fixed by #1132

Comments

@robinpdev
Copy link
Contributor

robinpdev commented Oct 30, 2023

steps to reproduce (from alphazero libtorch build instructions )

  1. In global_variables.sh, find the
    OPEN_SPIEL_BUILD_WITH_LIBNOP variable and set its value to "ON".
  2. In global_variables.sh, find the
    OPEN_SPIEL_BUILD_WITH_LIBTORCH variable and set its value to "ON".
  3. In global_variables.sh, find the
    OPEN_SPIEL_BUILD_WITH_LIBTORCH_DOWNLOAD_URL variable and set its value to
    the LibTorch version URL compatible with your OS and hardware (see the
    comments in global_variables.sh for the URLs):
  4. Download libnop and the specified version of LibTorch by running:
    $ ./install.sh
  5. Build OpenSpiel to compile LibTorch-dependent and libnop-dependent code
    (such as LibTorch AlphaZero).
    $ ./open_spiel/scripts/build_and_run_tests.sh

the error this generates when running open_spiel/scripts/build_and_run_tests.sh:

.../open_spiel/algorithms/dqn_torch/dqn_torch_test.cc:25:10: fatal error: 'open_spiel/games/efg_game.h' file not found #include "open_spiel/games/efg_game.h"

This error is caused by 2 include statements in open_spiel/algorithms/dqn_torch/dqn_torch_test.cc

It was seemingly introduced when the referenced files were moved but these statements were not updated.

#include "open_spiel/games/efg_game.h"
#include "open_spiel/games/efg_game_data.h"

@robinpdev
Copy link
Contributor Author

robinpdev commented Oct 30, 2023

I made pull request #1132 to correct this issue.

@robinpdev robinpdev changed the title Include error when compiling with torchlib Preprocessor error when compiling with torchlib Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant