source: trunk/se/lu/thep/wenni/INSTALL @ 409

Last change on this file since 409 was 409, checked in by Peter Johansson, 16 years ago

some more INSTALL docs. refs #53

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
  • Property svn:mime-type set to text/x-trac-wiki
File size: 7.0 KB

$Id: INSTALL 409 2007-08-29 20:26:19Z peter $


Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson
Copyright (C) 2007 Peter Johansson
This file is part of WeNNI,
http://lev.thep.lu.se/trac/baseplugins/wiki/WeNNI
WeNNI is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your
option) any later version.
WeNNI is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.

If you think the instructions are worthless or stupid or maybe both, please tell me and I'll try to improve them. Even better, tell me how to improve them. My email address is jari@…

This package can be built in three different modes: base2, base1, and stand-alone. The base2 mode is default and the mode you should use if you plan on running WeNNI as plugin to BASE2. The base1 mode is the old (classic) mode similar WeNNI 0.6 (or earlier). This is the mode you should use if you plan on using WeNNI as a plugin to BASE1. The stand-alone mode is intended for you who want to use the WeNNI algorithm independently of BASE. The different modes build and require different things. You choose the mode by giving the configure script the appropriate option. See below for more details on the different modes

BASE 2 mode

Pre-requisite

  1. Download and install GSL, http://www.gnu.org/software/gsl/.
  2. A working Base2 installation.

WeNNI install

  1. Download and unpack WeNNI. cd to the root directory of the distribution.
  1. Run configure script with $ ./configure

The configure script accepts a few options that may be of interest. You can provide ./configure with BASE location information with --with-basedir=DIR. This information is used to find jar files such as BASE2Core.jar. You can configure where files WeNNI.jar and the nni will be installed using with-plugindir=DIR. Files will be installed in <DIR>/se/lu/thep/wenni/. Default DIR is set to path/to/base/www/plugins/. You may use with-gsl=DIR to provide •information on GSL location. The option enable-debug turns on debug options on the compilation of binary nni (e.g. enables assertions).

  1. Now build using $ make

If all went well nni created in directory bin/nni as well as WeNNI.jar in directory base/base2/.

  1. Optionally, run the test program $ make check
  1. Install files using $ make install
  1. Make BASE aware of the plugin, see BASE documentation http://base.thep.lu.se/chrome/site/doc/html/index.html

BASE 1 mode

Pre-requisite

  1. Download and install GSL, http://www.gnu.org/software/gsl/.
  2. Perl, http://www.cpan.org/.
  3. A working BASE1 installation.

WeNNI install

pre-requisite:

Mandatory:

a) Download and install GSL, http://www.gnu.org/software/gsl/.

Optional:

b) If you plan to run WeNNI as a plug-in you need a running BASE

installation. If you have to set up a BASE server, please go to http://base.thep.lu.se for information on how to download and install BASE.

c) You need Perl, http://www.cpan.org/, to run the tests or

examples. You must install Perl on the BASE server if you plan to run WeNNI as a plug-in. You do not need Perl if you plan to run WeNNI as a stand alone package (skip 'make check' below and perform tests manually according to the README file).

WeNNI install

i) Download and unpack WeNNI. 'cd' to the root directory of the

distribution.

ii) If you are going to run WeNNI as a plug-in to BASE, do the

following steps starting in the WeNNI distribution root directory

$ mkdir BASE-plugindevkit $ cd BASE-plugindevkit $ ln -s /path/to/base bogus_base $ cd ..

iii) If you have a BASE installation available and intend to use WeNNI

as a BASE plug-in you can safely skip this item. Others must download the BASE plug-in development kit (http://lev.thep.lu.se/trac/baseplugins/wiki/PluginDownload), unpack the package in the WeNNI root directory, compile the package, and then create a symbolic link to this directory. Basically, after download, issue the following sequence of commands in to prepare the devkit for WeNNI:

$ tar zxpf BASE-plugindevkit-1.2.17.tar.gz $ cd BASE-plugindevkit-1.2.17/bogus_base $ ./bootstrap $ ./configure $ make $ cd ../.. $ ln -s BASE-plugindevkit-1.2.17 BASE-plugindevkit

iv) Very brief WeNNI compilation instructions:

a) If you are compiling in a BASE server environment do:

$ ./configure --prefix=/path/to/base

b) If not do

$ ./configure --bindir=/path/where/to/install/binaries

The --bindir is optional, if you do not set it programs will be installed in /usr/local/bin. The install is performed only if you choose to do it with an explicit command ('make install').

Now, irrespective if you choose a) or b) above do

$ make

If all went well a few binaries where created.

v) Optionally, run the test program

$ make check

The numerical checks are very resitrictive, if 'make check' fails this may due to this. You can loosen the error bound in the tests by changing the default in test/wenni_test.cc line 17:

bool compare(const std::string&, const std::string&,

double error_bound=1e-20);

If you are installing a BASE plug-in read beyond this point, others may want to do 'make install' to install the binaries in the directory set in step iv) above, and then return to the README file.

vi) BASErs need to copy the binaries to their plug-in directory on the

BASE server. Do this (5 one-liners):

$ mkdirhier /path/to/base/plugins/bin/thep.lu.se/wenni $ cp -p bin/BaseFileConverter/BaseFileConverter \

/path/to/base/plugins/bin/thep.lu.se/wenni

$ cp -p bin/base_plugin_script/wenni.pl \

/path/to/base/plugins/bin/thep.lu.se/wenni

$ cp -p bin/nni/nni /path/to/base/plugins/bin/thep.lu.se/wenni $ cp -p bin/NNIFileConverter/NNIFileConverter \

/path/to/base/plugins/bin/thep.lu.se/wenni

vii) BASErs make sure that the settings in the plug-in definitions

file are set appropriately when importing the plug-in definitions file (bin/base_plugin_script/plugin_WeNNI.base) into BASE. More explicitly make sure that the entry in the web GUI: 'Name of executable' is set according to the wenni.pl copying in step vi) above. If you prefer to make the change in the file you should manipulate the line looking like

'execName thep.lu.se/jari/wenni/wenni.pl'

viii) Now you should go to the README file.

Note: See TracBrowser for help on using the repository browser.