-
Notifications
You must be signed in to change notification settings - Fork 4
Install on Ubuntu
OpenMOC is hosted on GitHub. To obtain the code you will first need to install git on your machine. We recommend that you follow GitHub's set of instructions on how to install git and get it running with GitHub. Once you have completed this step you can download OpenMOC from the repository into the directory of your choice with the following command:
git clone [email protected]:wbinventor/OpenMOC.git
To run OpenMOC, you will first need to compile it on your machine. To compile in Ubuntu we recommend using the GNU gcc compiler version 4.3 or above. OpenMOC also depends on several external libraries which you will need to install:
- Expat xml parsing library for C++
- libtiff, libpng, libjpeg
- ImageMagick
- Silo
- VisIt (optional)
Instructions for installing each of these libraries is given below. Please install each library in the same order as is shown below.
Expat
To install the expat xml parsing package on Ubuntu, type the following commands in the terminal:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install expat
libtiff
You can download the source HERE. Any stable version should work. Next, navigate to the directory where libtiff was downloaded and install using the following command line options:
$ tar xvfz tiff-version.tar.gz
$ cd tiff-version
$ ./configure
$ sudo make
$ sudo make install
It is important to install tiff before you configure Image Magick. If you installed Image Magick before installing tiff, you will need to repeat the configure, make, and install process for Image Magick using the same commands as listed in the Image Magick installation directions below.
libpng
You can download the source HERE. Any stable version should work. Navigate to the directory where libpng was downloaded and install using the following command line options:
$ tar xvfz libpng-version.tar.gz
$ cd libpng-version
$ ./configure
$ sudo make
$ sudo make install
It is important to install libpng before you configure Image Magick. If you installed Image Magick before installing libpng, you will need to repeat the configure, make, and install process for Image Magick using the same commands as listed in the Image Magick installation directions below.
Image Magick
Download the Image Magick source HERE. Navigate to the directory where Image Magick was downloaded and install using the following command line options:
$ tar xvfz ImageMagick.tar.gz
$ cd ImageMagick-6.7.5
$ ./configure
$ sudo make
$ sudo make install
After configuring ImageMagick, you will see a summary of the libraries that are linked to ImageMagick. If the tiff and png libraries was installed correctly, they should be linked. You are all set!
Silo I/O library
You can get the Silo library from the Synaptic package manager. In the console type:
$ sudo apt-get install libsilo-dev libsilo0 libsilo-bin
VisIt
VisIt is a visualization tool developed at Lawrence Livermore National Laboratory and which can be useful for viewing output files from OpenMOC. VisIt IS NOT required to compile and run OpenMOC. We recommend installing VisIt, however, so that you may take advantage of all of the functionality that is implemented in OpenMOC for plotting the results of your problems.
Installing VisIt on Ubuntu appears to be very specific to your distribution. The most recent version of Ubuntu which VisIt officially supports is Ubuntu 8.04, however these instructions are on how to install that version of VisIt for Ubuntu 11.10. First you will need to install some requirements for VisIt:
$ sudo apt-get install m4
$ sudo apt-get install mesa-utils
$ sudo apt-get install libgl1-mesa-swx11
$ sudo apt-get install tcl-vtk
$ sudo apt-get install libxmu-dev
$ sudo apt-get install gtk2-engines-pixbuf
Next, create a directory to download the VisIt binaries and script file in a directory of your choice (this will not be where VisIt is installed, only where the binaries are installed from).
$ mkdir VisIt
Now, download the VisIt Linux - x86_64 64 bit tarball from HERE into the VisIt directory. Again, the download site indicates that this is for Ubuntu 8.04 but these instructions will help you install it for the most recent version, Ubuntu 11.10. Do not untar the file. Instead, download the VisIt install script which is linked to on the VisIt site above the tarballs. Now, change the permissions for the install script (the version number for the install script may be different):
$ chmod 755 visit-install2_4_1.sh
Now install VisIt:
$ sudo ./visit-install2_4_1 2.4.1 linux-x86_64-ubuntu8 /usr/local/visit
If it installs properly there should be no error messages. If there are any errors, you will need to resolve them before going further. You can check whether it installed correctly by launching the VisIt GUI:
$ /usr/local/visit/bin/visit
If the GUI launches properly, you should exit it. The final thing to do is to put VisIt in the user path so you can run it directly from the console. Open up your .bashrc file in a text editor. If you use gedit you can use the following command:
$ sudo gedit ~/.bashrc &
Now add the following two lines to the end of the .bashrc file:
PATH=$PATH:/usr/local/visit/bin
export PATH
Save and close your text editor and from the console run:
$ source ~/.bashrc
$ set
You are now finished and should now be able to run VisIt directly from the console with the following command:
$ visit
See Using VisIt section (not available yet) for more information on using VisIt.
If you have downloaded OpenMOC and installed all of the necessary dependencies described above, you are ready to compile and run the code! Follow the next set of instructions on how to Build OpenMOC