Skip to content

Get OpenMOC

wbinventor edited this page Feb 12, 2012 · 44 revisions

Checkout Repository

Requirements

OpenMOC has been built and tested on Ubuntu, Gentoo, and OSX Lion. It is not yet supported for Microsoft Windows. Some additional requirements for building OpenMOC are the following:

    1. g++ compiler version 4.3 or above (Note: Macs come with version 4.2, so they must be upgraded)
    1. Expat xml parsing library
    1. libtiff
    1. libpng
    1. Image Magick
    1. Silo I/O library
    1. VisIt

Installation Instructions

###Ubuntu

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

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
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

###Gentoo Expat

  • You can get Expat from its Sourceforge website HERE.
  • Link against Expat (on my machine, the compiler flag is "-lexpat").

Doxygen

  • Doxygen is supported through portage tree.

###OS X

libtiff

  • You can download the source HERE. Any stable version should work. I downloaded tiff-3.9.5.tar.gz.

  • Navigate to the directory where tiff 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. I downloaded libpng-1.5.7.tar.gz.
  • 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! Documentation for Magick++ (the c++ library for Image Magick) can be found HERE.

  • Note: You can link Image Magick to other libraries such as jpeg, gvc, rsvg, etc. by downloading their respective libraries and reconfiguring Image Magick.

Expat

  • Download Expat source HERE. Naviage to the directory where Expat was downloaded and install using the following command line options:
    • tar xvfz expat-2.0.1.tar.gz
    • cd expat-2.0.1
    • ./configure
    • sudo make
    • sudo make install
  • Your all set!

g++ updated versions (4.3 or above)

  • Downloading and installing the g++ compile takes a few hours. Before going through this process, type g++ --version into your command line to see what your default g++ compiler is. If you have not manually updated the g++ compiler, it is probably version 4.2.
  • Download gnu compiler source HERE. Any version higher than 4.3 should do. I downloaded 4.6.2.
  • Installing the gnu compiler involves many steps. You can find directions HERE that give better directions than I ever could. I followed these directions exactly except for the last step that involves setting the path to the new g++ compiler. I have included directions for setting the path below.
  • You have now installed the new gnu compilers, but your command line still defaults to the older version. To change this you will need to modify the command line search path so that it finds the new compiler before the old one. Here are directions on how I accomplished this crucial task:
    • cd /etc (this should take you to the location of a "paths" file)
    • ls (you should see a file titled "paths". If this is not present, you will need to find out where your computer stores its path information)
    • nano paths
    • /Users/username/my_gcc/bin (append the path to the new gnu compilers as the first line. Your old compiler is probably in the directory /usr/bin so this path should be before that)
    • ctrl-o (save changes)
    • ctrl-x (close file)
  • Your computer should now recognize the new version of g++ as the default compiler. Entering `g++ --version' in the command line to confirm that 4.6.2 is the new default.

Silo I/O library

  • Download the Silo I/O library source HERE. We use very basic silo commands so any stable version should work. I downloaded Silo-4.7.2.tar.gz.
  • Navigate to the directory where the Silo-4.7.2.tar.gz was downloaded and install using the following command line options:
    • tar xvfz silo-4.7.2.tar.gz
    • cd silo-4.7.2
    • ./configure
    • sudo make
    • sudo make install
  • Silo is now installed. Library files will be in /usr/local/lib, packages will be in /usr/local/bin, and include files will be in /usr/local/include.
  • Silo has a browser function that makes it easy to view pdb files. See the Using Silo section (not available yet) for in viewing pdb files.

VisIt

  • Download the VisIt executable for your architecture HERE. If you have a mac made in the last 3 years, the architecture is likely darwin-x86_64.
  • This will download a dmg file. Open the dmg file and follow the on screen instructions.
  • VisIt should now be in your applications folder and is ready for use.
  • See Using VisIt section (not available yet) for more information on using VisIt.

Build OpenMOC

Once all of the requirements are satisfied, you can build OpenMOC by opening a console and typing the following:

  • cd {path to OpenMOC}/OpenMOC/Release
  • make clean
  • make

If all requirements are appropriately satisfied than OpenMOC should build which will be confirmed by the following message at the bottom of your console:

Finished building target: openmoc

Run OpenMOC

Once you build OpenMOC it is straightforward to run it using the default inputs using the following command:

  • ./openmoc

OpenMOC supports a number of command line arguments which can be passed to the program at runtime. The options which are supported are given below:

  • Geometry input xml file (default: xml-sample/5/geometry.xml)
    -g geometry.xml or --geometryfile geometry.xml

  • Materials input xml file (default: xml-sample/5/material.xml)
    -m geometry.xml or --materialfile geometry.xml

  • Track spacing (default: 0.05)
    -ts {spacing} or --trackspacing {spacing}

  • Number of azimuthal track angles (default: 128)
    -na {num angles} or --numazimuthal {num angles}

  • Number of radial rings per fuel rod (default: 0)
    -nr {num rings} or --numrings {num rings}

  • Number of angular sectors per pin cell (default: 0)
    -ns {num sectors} or --numsectors {num sectors}

  • Sector angular offset (degrees not radians) (default: 0)
    -so {offset angle} or --sectoroffset {offset angle}

  • Minimum verbosity level (NORMAL, INFO, WARNING, CRITICAL, ERROR, DEBUG, RESULT) (default: NORMAL)
    -v {level} or --verbosity {level}

  • Print geometry to the console after parsing (default: false)
    -dg or --dumpgeometry

Clone this wiki locally