Life In 19x19
http://lifein19x19.com/

rn-4.2.5 how to use
http://lifein19x19.com/viewtopic.php?f=18&t=14265
Page 1 of 2

Author:  zookar [ Sun May 28, 2017 10:06 am ]
Post subject:  Re: rn-4.2.5 how to use

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.

Author:  johnsmith [ Sun May 28, 2017 11:56 am ]
Post subject:  Re: rn-4.2.5 how to use

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?

Author:  goame [ Tue May 30, 2017 8:37 am ]
Post subject:  Re: rn-4.2.5 how to use

Just use it in SmartGo or ask the developer how to use it in SmartGo he will love to help :)

Author:  pnprog [ Thu Jun 01, 2017 9:08 am ]
Post subject:  Re: rn-4.2.5 how to use

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.

Author:  johnsmith [ Thu Jun 01, 2017 11:24 am ]
Post subject:  Re: rn-4.2.5 how to use

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.

Author:  as0770 [ Mon Jun 05, 2017 7:37 am ]
Post subject:  Re: rn-4.2.5 how to use

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?

Author:  zakki [ Wed Jun 07, 2017 8:28 pm ]
Post subject:  Re: rn-4.2.5 how to use

Perhaps g++-4.8 or
Code:
-D _GLIBCXX_USE_CXX11_ABI=0
is needed.
https://github.com/zakki/Ray/issues/8

Author:  as0770 [ Thu Jun 08, 2017 12:50 pm ]
Post subject:  Re: rn-4.2.5 how to use

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 :-(

Author:  as0770 [ Thu Jun 15, 2017 12:08 pm ]
Post subject:  Re: rn-4.2.5 how to use

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

Author:  Tiktaalik [ Thu Jun 15, 2017 3:12 pm ]
Post subject:  Re: rn-4.2.5 how to use

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.

Author:  pnprog [ Thu Jun 15, 2017 6:51 pm ]
Post subject:  Re: rn-4.2.5 how to use

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?

Author:  as0770 [ Thu Jun 15, 2017 8:57 pm ]
Post subject:  Re: rn-4.2.5 how to use

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

Author:  Tiktaalik [ Fri Jun 16, 2017 4:05 pm ]
Post subject:  Re: rn-4.2.5 how to use

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.

Author:  as0770 [ Fri Jun 16, 2017 9:53 pm ]
Post subject:  Re: rn-4.2.5 how to use

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

Author:  Tiktaalik [ Sat Jun 17, 2017 4:24 am ]
Post subject:  Re: rn-4.2.5 how to use

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..

Author:  as0770 [ Sat Jun 17, 2017 8:06 am ]
Post subject:  Re: rn-4.2.5 how to use

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,

Author:  pandora [ Sat Jun 24, 2017 10:14 pm ]
Post subject:  Re: rn-4.2.5 how to use

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 ?

Author:  as0770 [ Mon Jul 03, 2017 1:03 pm ]
Post subject:  Re: rn-4.2.5 how to use

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

Author:  as0770 [ Wed Aug 30, 2017 12:24 pm ]
Post subject:  Re: rn-4.2.5 how to use

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

Author:  zakki [ Thu Aug 31, 2017 6:07 am ]
Post subject:  Re: rn-4.2.5 how to use

Rn requires CNTK 2.1 now.

Page 1 of 2 All times are UTC - 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/