-
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. Instructions are given on how to install each library from package manager; however, you may choose to install them from source instead if you wish (in which case, follow the instructions for libtiff, libpng, libjpeg, ImageMagick and Silo for Mac OSX instead).
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
$ sudo apt-get install libexpat-dev
libtiff
Install libtiff from package manager using the following command in the console:
$ sudo apt-get install libtiff4
libpng
Install libtiff from package manager using the following command in the console:
$ sudo apt-get install libpng12-0
libjpeg
Install libjpeg from package manager using the following command in the console:
$ sudo apt-get install libjpeg8
Image Magick
It is important to install libtiff, libpng and libjpeg before you configure Image Magick. Install ImageMagick from package manager using the following command in the console:
$ sudo apt-get install imagemagick libmagickwand3 libmagickcore3
If you installed Image Magick before installing any one of these, you will need to uninstall imagemagick using the command below and then reinstall.
$ sudo apt-get remove imagemagick libmagickwand3 libmagickcore3
If for some reason you are unable to compile and run OpenMOC after installing libtiff, libpng, libjpeg and ImageMagick from package manager using the instructions above, please try following the instructions given for installing each of these from source described in detail at Install on Mac OSX
Silo I/O library
Install Silo from package manager using the following command in the console:
$ sudo apt-get install libsilo-dev libsilo0 libsilo-bin
VisIt
VisIt is a visualization tool developed at Lawrence Livermore National Laboratory that 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