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

how can i run pachi on raspberry pi 3 B? #79

Open
enricoT opened this issue Mar 21, 2018 · 3 comments
Open

how can i run pachi on raspberry pi 3 B? #79

enricoT opened this issue Mar 21, 2018 · 3 comments

Comments

@enricoT
Copy link

enricoT commented Mar 21, 2018

Is there a tutorial for newbie or some tip specific to run pachi dcnn ? Im using archlinux armv7h

@lemonsqueeze
Copy link
Collaborator

Hi, yes, there are lots of tips on running pachi =)
Are you looking for raspberry pi specific stuff or general Pachi building/running tips ?
I have some notes for raspberry pi 3 somewhere which haven't been published, could dig that up.

@enricoT
Copy link
Author

enricoT commented Mar 27, 2018

i have rpi 3 b it would be nice to be able to run it on archlinuxarm for me. I would like to build and run the program. So, any tip about build first, in addiction later, some tip on how to run it.... if built succeed ^^

@lemonsqueeze
Copy link
Collaborator

lemonsqueeze commented Mar 31, 2018

Here's my notes: in my case it's raspian with a Pi 3B, but should be pretty similar.

Getting started is pretty easy, just follow build instructions from readme:

  • Get openblas (either compile or install) and caffe (cpu build from source)
  • Clone repository, 'make' (if you installed caffe in a special place put it in the Makefile)
  • Install dcnn files and large patterns
  • Done !

Raspberry Pi specific:

Compiler
You're probably better off with arch, but with raspian bundled gcc is quite old (4.x). gcc for arm got a lot better in later versions, so if you feel brave enough (and have time to spare) you might want to get a more recent version. I ended up compiling gcc 6.4 from source (mix of these two iirc), optimizes a lot better. Took ~7h !

With gcc 6.4, had to add -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++98 to CXXFLAGS.

Overheating issues
Pi 3B+'s are probably fine but Pi 3B's can be unstable under heavy load at the standard cpu clock (1.2GHz). When temperature reaches 80 degrees throttling kicks in and reduces speed, but not fast enough to prevent overheating and undefined behavior. Pachi would randomly crash / assert out without reason. A good way to test this is to run dcnn code non-stop (t-predict/predict -e dcnn on a bunch of sgfs) and watch random stuff happen as the temperatures go up the roof !

So either you live with the once_in_a_while random crash, do whatever it takes to make sure the Pi never reaches 80 degrees (pound coin heatsink, anyone ?) or underclock it a little bit and it'll never freak out. I found mine is rock stable at 1150MHz.

SD card
get a good one, it makes a difference.

Swap
enabled some zram swap, swapping to sdcard is horrible.
If you run it headless you can get some memory back by disabling X and lowering gpu mem in raspi-config.

I think that's about it, good luck !

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

No branches or pull requests

2 participants