Skip to content
Norbert Bátfai edited this page Sep 20, 2015 · 1 revision

Samu for Linux

This documentation is based on the version of Samu tagged with "Judah".

How to install Samu's descendants on GNU/Linux systems

Installation of related software

Troubleshooting/FAQ

When installing link-grammar (https://github.com/opencog/link-grammar) we got the following error "cannot find jni.h in standard location".

Please install JDK (1.8.*.tar.gz from Oracle: https://www.oracle.com/technetwork/java/javase/downloads/index.html then extract it into the directory ) and set the env variables JAVA_HOME and PATH:

export JAVA_HOME=<path to jdk>jdk1.8.*
export PATH=$JAVA_HOME/bin:$PATH

Finally the variable CPPFLAGS should be set before typing the ./configure command as follows:

export CPPFLAGS=-I$JAVA_HOME/include

Installation of Samu

Building Samu, uncomment the appropriate lines in the file CMakeLists.txt. For example, if you have CUDA installed on your system Samu may be built with CUDA support,

set(CUDA_LAYERS ON)
#set(CUDA_LAYERS OFF)

Or, if you want to use TUI you need uncomment the following line:

set(DISP_CURSES ON)
#set(DISP_CURSES OFF)

After finishing the edit of the CMakeLists.txt type cmake .

nbatfai@orchmach:~/GitHubRepos/judah$ cmake .
-- Found CUDA: /usr/local/cuda-7.0 (found version "7.0") 
-- Found Curses: /usr/lib/x86_64-linux-gnu/libcurses.so  
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp  
-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   date_time
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8") 
-- Found PNG: /usr/lib/x86_64-linux-gnu/libpng.so (found suitable version "1.2.51", minimum required is "1.2.9") 
-- Found Freetype: /usr/lib/x86_64-linux-gnu/libfreetype.so (found version "2.5.2") 
-- Found PNGwriter: /home/nbatfai/NLP/pngwriter/lib/libpngwriter.so;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libfreetype.so (found version "0.5.4") 
-- Link Grammar  found.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nbatfai/GitHubRepos/judah

If cmake . finishes without problems you can run the make command to build Samu.

Running

To run Samu, type the following command

./samu 2>out

If you use ncurses you will see something like this:

Samu TUI

In another terminal window, run the command

tail -f out|grep iter

to see Samu's "training curve".