yao::installation
HOME | INSTALL | MANUAL | NEWS

## Installation overview

These instructions have been updated on 12 October 2009.

Basically there are three install methods (pick one):

1. From source. You'll get the latest version of everything. Not too many dependencies to yao, so it's not too challenging. You will need a C compiler, or
2. using yorick's pkg_mngr. or
3. on several Linux distributions (Ubuntu, Archlinux, Fedora), using the distribution package manager (apt-get/synaptic, pacman,yum)

Yorick/yao generally install without problem on any recent flavor of Linux or osx. As usual, it will work better if your OS is up to date and not too old. Note that yorick, as it is written in ANSI-C, should basically compile on any xorg-enabled platform with a gcc compiler. The same goes for FFTW, and yao (except the optional gtk interface, which requires gtk libraries and, mostly, a whole gnome environment).

## Option 1: From Source

Installation from source presupposes a basic familiarity with the command line environment. In the following, I give instructions that should be enough to get you out of troubles. The process is essentially the same whatever OS you're on:

1. Install yorick (howto)
2. Install the plugins yorick-yutils≥1.3, yorick-imutil≥0.5 (howto), yorick-soy≥1.2 if you plan to use the sparse matrices techniques and yorick-svipc≥0.9 if you wish to use the parallel features
3. Install FFTW (howto)
4. Finally, install yao (howto)

Detailled instructions are here. Once you are done, proceed to the test section.

## Option 2: Using yorick's pkg_mngr

This method does not install yorick; only yao and its dependent plugins and libraries (refer to method 1 or 3 if you need to install yorick).

Using `pkg_mngr` should be very simple. One thing though: the pkg_mngr binary packages are not always up to date; they are released for a number of binary platforms (osx and linux: ppc, i386/x86 and amd64/x86-64), but because I'm the sole maintainer and there are so many platforms, I am often short of time or machine availability to update all plugins (in particular, I do not have access to PPC anymore). Nevertheless, it should generally work. The bonus of this approach is that it also include static libraries for the dependent packages (e.g. FFTW), so the install is much streamlined. Yorick's pkg_mngr is safe: it will only install things in your yorick tree. There's also a "remove" option so you will always be able to come back if anything goes wrong.

The instructions are simple:

    $ yorick
    > #include "pkg_mngr.i"
    > pkg_setup

Except for the OS field, all the default should be ok, so just type return everywhere. When prompted about your OS:

      What is your OS-machine type?
        (1) darwin-i386
        (2) darwin-ppc
        (3) linux-x86
        (4) linux-ppc
        (5) linux-amd64
        (6) darwin10-x86_64
      PKG_OS (enter a number):

Just type the corresponding number (note that darwin = OsX).Then:

    > pkg_sync
    > pkg_list
    > pkg_install,"yao"

This will fetch and install yao and its plugins dependencies (yutils and imutil). You will have to quit yorick and restart for it to find yao. Proceed to the test section.

## Option 3: Using your Linux package manager

For the easiest way to install yao, the winner is debian (and debian derivatives, e.g. Ubuntu):

    sudo apt-get install yao

and then `yao` to run it (with the gtk GUI). Easy, but you won't get the very last version. For instance, I just release 4.5.0 and I am fairly sure it won't make it in Debian/Ubuntu before a few months. I have also built packages for Fedora and Mandriva, but I am afraid I haven't updated it lately (if you want to try it, the instructions are here. These are the repos for yorick, but also include the plugins, and yao in particular). For archlinux (these ones are fresh as of october09), look here.

## Test it

However you have installed `yao`, it should have created an "examples" directory with many example parameter files (use the command `find_examples_path()` within yao to print the path to the example directory).

To test yao:

    cd yao_examples_directory  (see above)
    yorick -i test-all.i

There is also some tests functions for the SHWFS (`shwfs_tests()` for general sh_wfs testing and `svipc_shwfs_tests` for testing the wfs.svipc features (parallel extension). Use help,function for the usage of these 2 functions.