It is currently Thu Mar 28, 2024 3:52 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
Author Message
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #1 Posted: Sun May 28, 2017 10:06 am 
Beginner

Posts: 7
Liked others: 0
Was liked: 0
Rank: 1 dan amateur
rn-4.2.5 release is a diff pack, which contains only files that has been added or modified.
Download rn-4.2.1 first, and copy files in rn-4.2.5 into rn-4.2.1.

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #2 Posted: Sun May 28, 2017 11:56 am 
Lives with ko

Posts: 136
Liked others: 47
Was liked: 21
Rank: KGS 6 dan
What should someone do if they do not have nvidia GPU and want to run it with CPU only? Where should they download CNTK from and how to start it up, say in Sabaki editor?

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #3 Posted: Tue May 30, 2017 8:37 am 
Lives with ko

Posts: 131
Liked others: 0
Was liked: 7
Just use it in SmartGo or ask the developer how to use it in SmartGo he will love to help :)

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #4 Posted: Thu Jun 01, 2017 9:08 am 
Lives with ko
User avatar

Posts: 284
Liked others: 94
Was liked: 153
Rank: OGS 7 kyu
johnsmith wrote:
What should someone do if they do not have nvidia GPU and want to run it with CPU only? Where should they download CNTK from and how to start it up, say in Sabaki editor?
Currently, I have no nvidia GPU (in fact no GPU card at all...), so I run the version 4.2.5 (windows) with the --no-gpu parameter.
It is very slow this way, but it is fine for me as I only use it for testing so far.

Then, Ray does only run in GTP mode, so you need to use another software that can handle the GTP protocol to play Ray using a nice goban interface. Checkout Sensei for Go software that can handle GTP protocol, there are a lot.

_________________
I am the author of GoReviewPartner, a small software aimed at assisting reviewing a game of Go. Give it a try!

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #5 Posted: Thu Jun 01, 2017 11:24 am 
Lives with ko

Posts: 136
Liked others: 47
Was liked: 21
Rank: KGS 6 dan
pnprog wrote:
johnsmith wrote:
What should someone do if they do not have nvidia GPU and want to run it with CPU only? Where should they download CNTK from and how to start it up, say in Sabaki editor?
Currently, I have no nvidia GPU (in fact no GPU card at all...), so I run the version 4.2.5 (windows) with the --no-gpu parameter.
It is very slow this way, but it is fine for me as I only use it for testing so far.

Then, Ray does only run in GTP mode, so you need to use another software that can handle the GTP protocol to play Ray using a nice goban interface. Checkout Sensei for Go software that can handle GTP protocol, there are a lot.


Thank you! --no-gpu parameter was what I had been missing.

Though, as you said Ray needs 30x more time for the same number of playouts as Leela.

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #6 Posted: Mon Jun 05, 2017 7:37 am 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
On Ubuntu I get this error message:

Code:
Init CNTK
terminate called after throwing an instance of 'Microsoft::MSR::CNTK::ExceptionWithCallStack<std::runtime_error>'
  what():  unmatched bracket found in parameters
Abgebrochen (Speicherabzug geschrieben)


with the --no-nn parameter ray works.

Trying the windows compile I get this:

Code:
err:module:import_dll Loading library MSVCP140.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") failed (error c000007b).
err:module:import_dll Library VCRUNTIME140.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-stdio-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-runtime-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-string-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-convert-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-heap-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-math-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library api-ms-win-crt-filesystem-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library VCOMP140.DLL (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\EvalDll.dll") not found
err:module:import_dll Library EvalDll.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Loading library MSVCP140.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") failed (error c000007b).
err:module:import_dll Library VCRUNTIME140.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-runtime-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-stdio-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-convert-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-heap-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-math-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-string-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-utility-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-filesystem-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-time-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:import_dll Library api-ms-win-crt-locale-l1-1-0.dll (which is needed by L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe") not found
err:module:LdrInitializeThunk Main exe initialization for L"Z:\\home\\alex\\Downloads\\Rn.4.2.1\\Rn.4.2.1.exe" failed, status c0000135


Copying the .dlls to rays folder don't help.

Any ideas?

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #7 Posted: Wed Jun 07, 2017 8:28 pm 
Beginner

Posts: 13
Liked others: 1
Was liked: 3
Perhaps g++-4.8 or
Code:
-D _GLIBCXX_USE_CXX11_ABI=0
is needed.
https://github.com/zakki/Ray/issues/8

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #8 Posted: Thu Jun 08, 2017 12:50 pm 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
zakki wrote:
Perhaps g++-4.8 or
Code:
-D _GLIBCXX_USE_CXX11_ABI=0
is needed.
https://github.com/zakki/Ray/issues/8


Thanks for your help, much appreciated.

I tried both, reinstalled cntk like described in the solved issue, still the same error message :-(

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #9 Posted: Thu Jun 15, 2017 12:08 pm 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
as0770 wrote:
zakki wrote:
Perhaps g++-4.8 or
Code:
-D _GLIBCXX_USE_CXX11_ABI=0
is needed.
https://github.com/zakki/Ray/issues/8


Thanks for your help, much appreciated.

I tried both, reinstalled cntk like described in the solved issue, still the same error message :-(


I finally got it to work!

Compiling with g++ 4.8 lead to an error while compiling with g++ 5 and the -D _GLIBCXX_USE_CXX11_ABI=0 option worked. It didn't work if there was a faulty compile in the folder before, that means trying different compiling options and only deleting the binary between the tries won't work...

Thanks for your help,
Alex

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #10 Posted: Thu Jun 15, 2017 3:12 pm 
Beginner

Posts: 5
Liked others: 1
Was liked: 2
I recently managed to compile and successfully run the GPU version of Rn-4.2.5 on Ubuntu Linux 16.04 LTS after some struggles.
Since there seems to be no summary of how to set it up on Ubuntu, let me share my experience with you..

1. Install CNTK

This installation takes time and you will be required to install a whole bunch of other programs along the way. I had to cope with some compile errors and compatibility issues, which I will not describe in detail here because there is a rather detailed installation guide for CNTK (https://docs.microsoft.com/en-us/cognit ... k-on-linux). Follow the instruction step by step and hopefully you will be fine..
Just make sure that you have properly installed the GPU version of CNTK if you want to use Rayon with GPU (for that, I had to add "--cuda=yes" when I ran "configure" as well as modifying some relevant options in the "configure" file).

2. Download the Rayon 4.2.5 source code from zakki's repository and unpack it

I downloaded Ray-rn-4.2.5.tar.gz from the release page below.
https://github.com/zakki/Ray/releases
Unpack it by, e.g. "tar xzvf Ray-rn-4.2.5.tar.gz".

3. Modify "Makefile"

Now you have to modify "Makefile" in "Ray-rn-4.2.5" directory so that the compiler knows where all the CNTK libraries and binaries are.

(Ln8) CNTKDIR = <path to your CNTK directory>

## If you have followed the CNTK installation guide above, this is the directory where your configure file is, not where the CTNK binaries are.

(Ln9) CFLAGS = ${OPTIMIZE} ${WARNING} ${CPP11} ${DEBUG} -Xlinker -rpath -Xlinker ${CNTKDIR}/build/release/lib -I${CNTKDIR}/Source/Common/Include/

## The part I changed is in italics. If you have followed the CNTK installation guide above, this should work. If not, the path may be different in your environment. You have to check where the CNTK libraries and the Include directory are.

(Ln10) LIBS = -lm -pthread -L${CNTKDIR}/build/release/lib -lCntk.Eval-2.0

## Again, make sure your library binaries can be found by the compiler. Also, make sure CNTK evaluation file is called libCntk.Eval-2.0.so, which is implied by the "-l" option. If it is just called libeval.so in your system, you have to retain "-leval" in the original Makefile.

And this is it. For 4.2.1, which I tried to compile first, I had to modify a few other things, but those issues seem to have been resolved in 4.2.5, so I definitely recommend you to begin with 4.2.5.

4. "Make" and compile!

In Ray-rn-4.2.5 directory, type "make".
If you are lucky enough, you will find "ray" executable on your directory. Enjoy!

As expected, Rayon 4.2.5 with GPU seems to be fairly strong, at least as strong as leela 0.10.0 judging from Rayon 7 - 5 Leela record on my PC so far.. I (KGS 4-5d) lost with 2 stone hadi.. haven't tried 3 stone yet.. Anyhow, happy to have such a strong Go program in open source. Kudos to the developers.


This post by Tiktaalik was liked by 2 people: as0770, pnprog
Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #11 Posted: Thu Jun 15, 2017 6:51 pm 
Lives with ko
User avatar

Posts: 284
Liked others: 94
Was liked: 153
Rank: OGS 7 kyu
Quote:
I finally got it to work!

Quote:
I recently managed to compile and successfully run the GPU version of Rn-4.2.5 on Ubuntu Linux 16.04 LTS after some struggles.
Since there seems to be no summary of how to set it up on Ubuntu, let me share my experience with you..

This is a great news! and thanks a lot for the detailed tutorial.

Do you think it would be possible to share the binary ? (what is its size?) I can offer a place online for others to download.
In case the binary is downloaded and ran on a computer, the CNTK library still has to be installed? or is it necessary only for compilation?

_________________
I am the author of GoReviewPartner, a small software aimed at assisting reviewing a game of Go. Give it a try!

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #12 Posted: Thu Jun 15, 2017 8:57 pm 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
Tiktaalik wrote:
I recently managed to compile and successfully run the GPU version of Rn-4.2.5 on Ubuntu Linux 16.04 LTS after some struggles.
Since there seems to be no summary of how to set it up on Ubuntu, let me share my experience with you..

1. Install CNTK

This installation takes time and you will be required to install a whole bunch of other programs along the way. I had to cope with some compile errors and compatibility issues, which I will not describe in detail here because there is a rather detailed installation guide for CNTK (https://docs.microsoft.com/en-us/cognit ... k-on-linux). Follow the instruction step by step and hopefully you will be fine..
Just make sure that you have properly installed the GPU version of CNTK if you want to use Rayon with GPU (for that, I had to add "--cuda=yes" when I ran "configure" as well as modifying some relevant options in the "configure" file).

2. Download the Rayon 4.2.5 source code from zakki's repository and unpack it

I downloaded Ray-rn-4.2.5.tar.gz from the release page below.
https://github.com/zakki/Ray/releases
Unpack it by, e.g. "tar xzvf Ray-rn-4.2.5.tar.gz".

3. Modify "Makefile"

Now you have to modify "Makefile" in "Ray-rn-4.2.5" directory so that the compiler knows where all the CNTK libraries and binaries are.

(Ln8) CNTKDIR = <path to your CNTK directory>

## If you have followed the CNTK installation guide above, this is the directory where your configure file is, not where the CTNK binaries are.

(Ln9) CFLAGS = ${OPTIMIZE} ${WARNING} ${CPP11} ${DEBUG} -Xlinker -rpath -Xlinker ${CNTKDIR}/build/release/lib -I${CNTKDIR}/Source/Common/Include/

## The part I changed is in italics. If you have followed the CNTK installation guide above, this should work. If not, the path may be different in your environment. You have to check where the CNTK libraries and the Include directory are.

(Ln10) LIBS = -lm -pthread -L${CNTKDIR}/build/release/lib -lCntk.Eval-2.0

## Again, make sure your library binaries can be found by the compiler. Also, make sure CNTK evaluation file is called libCntk.Eval-2.0.so, which is implied by the "-l" option. If it is just called libeval.so in your system, you have to retain "-leval" in the original Makefile.

And this is it. For 4.2.1, which I tried to compile first, I had to modify a few other things, but those issues seem to have been resolved in 4.2.5, so I definitely recommend you to begin with 4.2.5.

4. "Make" and compile!

In Ray-rn-4.2.5 directory, type "make".
If you are lucky enough, you will find "ray" executable on your directory. Enjoy!

As expected, Rayon 4.2.5 with GPU seems to be fairly strong, at least as strong as leela 0.10.0 judging from Rayon 7 - 5 Leela record on my PC so far.. I (KGS 4-5d) lost with 2 stone hadi.. haven't tried 3 stone yet.. Anyhow, happy to have such a strong Go program in open source. Kudos to the developers.


My way was a little bit different, also on Ubuntu 16.04:

    Download the cntk binaries
    Go to the Script subfolder and start "./install-cntk.sh --py-version 35".
    Edit the Rayon Makefile: CNTKDIR =/.../cntk
    And add to CFLAGS: -D _GLIBCXX_USE_CXX11_ABI=0
    Before that I had to install anaconda3: https://wiki.ubuntuusers.de/Anaconda/
    and start the Python 3.5 enviroment with: source .../anaconda3/bin/activate cntk-py35

I uploaded my Linux-binary here:

http://www.mediafire.com/file/n4wnmlgay ... -4.2.5.zip

You have to add the sim_params and uct_params folders from the original download. I renamed the cntk directory and it still worked, so there is a chance it works also on other systems, good luck :)

Alex


This post by as0770 was liked by: Tiktaalik
Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #13 Posted: Fri Jun 16, 2017 4:05 pm 
Beginner

Posts: 5
Liked others: 1
Was liked: 2
Quote:
My way was a little bit different, also on Ubuntu 16.04:

Download the cntk binaries
Go to the Script subfolder and start "./install-cntk.sh --py-version 35".
Edit the Rayon Makefile: CNTKDIR =/.../cntk
And add to CFLAGS: -D _GLIBCXX_USE_CXX11_ABI=0
Before that I had to install anaconda3: https://wiki.ubuntuusers.de/Anaconda/
and start the Python 3.5 enviroment with: source .../anaconda3/bin/activate cntk-py35

Oh, I did not know the presence of CNTK linux binaries and installation scripts! :shock:
This page, right? It would have made my life a lot easier..
Then, for Ubuntu, your installation steps must be the easiest, although for some Linux distros where compilation from CNTK sources is needed, people may have to do something similar to mine..

I could run your rayon binary with --no-nn option after changing the library path and file names linked to it. I could not run it in the GPU mode, but probably it was not compiled for it.

Quote:
In case the binary is downloaded and ran on a computer, the CNTK library still has to be installed? or is it necessary only for compilation?

I do not think you can get away with the installation of CNTK. For Ubuntu, there are binaries and installation scripts, so I guess it should not be so difficult.

By the way, a 50 game match of Leela 0.10.0 vs Rayon 4.2.5 on my PC (20000 PO, no pondering) resulted in Rayon 27-23 Leela. I think they are fairly even. The funny thing is, in 2 games, Rayon failed to recognise seki, so Leela and Rayon disagreed on the results! (Leela was right) Certainly, there is still a lot of room for improvement for Rayon.

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #14 Posted: Fri Jun 16, 2017 9:53 pm 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
Tiktaalik wrote:
Oh, I did not know the presence of CNTK linux binaries and installation scripts! :shock:
This page, right?

I took the 2.0 Beta 12 from here: https://github.com/Microsoft/CNTK/releases

Tiktaalik wrote:
I could run your rayon binary with --no-nn option after changing the library path and file names linked to it. I could not run it in the GPU mode, but probably it was not compiled for it.


In fact it is a GPU compile.

Alex

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #15 Posted: Sat Jun 17, 2017 4:24 am 
Beginner

Posts: 5
Liked others: 1
Was liked: 2
as0770 wrote:
In fact it is a GPU compile.

OK, I can actually "run" your Rayon binary in the GPU mode, but then I get the following:

./rayon
Init CNTK
Segmentation fault (core dumped)

Maybe the GPU version has to be tailored for each specific hardware? I don't know..

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #16 Posted: Sat Jun 17, 2017 8:06 am 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
Tiktaalik wrote:
as0770 wrote:
In fact it is a GPU compile.

OK, I can actually "run" your Rayon binary in the GPU mode, but then I get the following:

./rayon
Init CNTK
Segmentation fault (core dumped)

Maybe the GPU version has to be tailored for each specific hardware? I don't know..


Well it was worth a try. Maybe it works only with the same graphic card as I have,

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #17 Posted: Sat Jun 24, 2017 10:14 pm 
Beginner

Posts: 11
Liked others: 0
Was liked: 0
Rank: 1 kyu
GD Posts: 10
KGS: 1 dan
Tygem: 4 dan
IGS: 3 dan
Wbaduk: 1 kyu
DGS: 4 dan
OGS: 2 dan
how can I use rn-4.2.5 in linux (I use ubuntu) but I don't know how I can run her,you can show me video or teach me ?

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #18 Posted: Mon Jul 03, 2017 1:03 pm 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
pandora wrote:
how can I use rn-4.2.5 in linux (I use ubuntu) but I don't know how I can run her,you can show me video or teach me ?


See post #11 and #13 in this thread. Also this is useful: https://github.com/zakki/Ray/issues/8

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #19 Posted: Wed Aug 30, 2017 12:24 pm 
Lives with ko

Posts: 180
Liked others: 15
Was liked: 23
Rank: Beginner
as0770 wrote:
    Edit the Rayon Makefile: CNTKDIR =/.../cntk
    And add to CFLAGS: -D _GLIBCXX_USE_CXX11_ABI=0
    Before that I had to install anaconda3: https://wiki.ubuntuusers.de/Anaconda/
    and start the Python 3.5 enviroment with: source .../anaconda3/bin/activate cntk-py35


With the latest Ray it don't work anymore, I get this error:

Code:
src/UctSearch.cpp:2390:15: error: ‘Load’ is not a member of ‘CNTK::Function’
   nn_policy = CNTK::Function::Load(policy_name, device);
               ^
src/UctSearch.cpp:2394:14: error: ‘Load’ is not a member of ‘CNTK::Function’
   nn_value = CNTK::Function::Load(value_name, device);
              ^


Any ideas?

Alex

Top
 Profile  
 
Offline
 Post subject: Re: rn-4.2.5 how to use
Post #20 Posted: Thu Aug 31, 2017 6:07 am 
Beginner

Posts: 13
Liked others: 1
Was liked: 3
Rn requires CNTK 2.1 now.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group