kuz / DeepMind-Atari-Deep-Q-Learner

The original code from the DeepMind article + my tweaks
http://www.nature.com/nature/journal/v518/n7540/full/nature14236.html
1.83k stars 532 forks source link

./run_cpu: line 46: 23755 Segmentation fault #31

Open encore2020 opened 7 years ago

encore2020 commented 7 years ago

After installation, I tried to run breakout game by cpu mode. sudo ./run_cpu breakout, error appear:

Log is

Updating manifest for /home/ubuntu/DeepMind/torch/lib/luarocks/rocks luagd 2.0.33r3-1 is now built and installed in /home/ubuntu/DeepMind/torch/ (license: MIT/X11)

Lua-GD installation completed

You can run experiments by executing:

./run_cpu game_name

        or   

./run_gpu game_name

For this you need to provide the rom files of the respective games (game_name.bin) in the roms/ directory

ubuntu@tegra-ubuntu:~/DeepMind$ sudo ./run_cpu breakout -framework alewrap -game_path /home/ubuntu/DeepMind/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -env_params useRGB=true -agent NeuralQLearner -agent_params lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="convnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_size=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,clip_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -eval_steps 125000 -prog_freq 5000 -save_freq 125000 -actrep 4 -gpu -1 -random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4 Torch Threads: 4 Using CPU code only. GPU device id: -1 Torch Seed: 1

Playing: breakout Creating Agent Network from convnet_atari3 nn.Sequential { [input -> (1) -> (2) -> (3) -> (4) -> (5) -> (6) -> (7) -> (8) -> (9) -> (10) -> (11) -> output] (1): nn.Reshape(4x84x84) (2): nn.SpatialConvolution(4 -> 32, 8x8, 4,4, 1,1) (3): nn.Rectifier (4): nn.SpatialConvolution(32 -> 64, 4x4, 2,2) (5): nn.Rectifier (6): nn.SpatialConvolution(64 -> 64, 3x3) (7): nn.Rectifier (8): nn.Reshape(3136) (9): nn.Linear(3136 -> 512) (10): nn.Rectifier (11): nn.Linear(512 -> 4) } Convolutional layers flattened output size: 3136 ./run_cpu: line 46: 23755 Segmentation fault ../torch/bin/qlua train_agent.lua $args

encore2020 commented 7 years ago

This is the gpu run error:

Log is

ubuntu@tegra-ubuntu:~/DeepMind$ sudo ./run_gpu breakout -framework alewrap -game_path /home/ubuntu/DeepMind/roms/ -name DQN3_0_1_breakout_FULL_Y -env breakout -env_params useRGB=true -agent NeuralQLearner -agent_params lr=0.00025,ep=1,ep_end=0.1,ep_endt=replay_memory,discount=0.99,hist_len=4,learn_start=50000,replay_memory=1000000,update_freq=4,n_replay=1,network="convnet_atari3",preproc="net_downsample_2x_full_y",state_dim=7056,minibatch_size=32,rescale_r=1,ncols=1,bufferSize=512,valid_size=500,target_q=10000,clip_delta=1,min_reward=-1,max_reward=1 -steps 50000000 -eval_freq 250000 -eval_steps 125000 -prog_freq 10000 -save_freq 125000 -actrep 4 -gpu 0 -random_starts 30 -pool_frms type="max",size=2 -seed 1 -threads 4 Torch Threads: 4 qlua: ./initenv.lua:58: module 'cutorch' not found: no field package.preload['cutorch'] no file './cutorch.lua' no file '/home/ubuntu/DeepMind/torch/share/luajit-2.0.4/cutorch.lua' no file '/usr/local/share/lua/5.1/cutorch.lua' no file '/usr/local/share/lua/5.1/cutorch/init.lua' no file '/home/ubuntu/DeepMind/torch/share/lua/5.1/cutorch.lua' no file '/home/ubuntu/DeepMind/torch/share/lua/5.1/cutorch/init.lua' no file './cutorch.so' no file '/usr/local/lib/lua/5.1/cutorch.so' no file '/home/ubuntu/DeepMind/torch/lib/lua/5.1/cutorch.so' no file '/usr/local/lib/lua/5.1/loadall.so' stack traceback: [C]: at 0xf7257bdd [C]: in function 'require' ./initenv.lua:58: in function 'torchSetup' ./initenv.lua:112: in function 'setup' train_agent.lua:52: in main chunk ubuntu@tegra-ubuntu:~/DeepMind$

encore2020 commented 7 years ago

my hardware is not x86-64