-
Notifications
You must be signed in to change notification settings - Fork 4
Install on Mac OSX
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 in the console:
$ git clone [email protected]:wbinventor/OpenMOC.git
To run OpenMOC, you will first need to compile it on your machine. To compile in Mac OS X we recommend using the GNU C++ compiler, gcc 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
- HDF5
- VisIt (optional)
Instructions for installing each of these libraries is given below. Please install each library in the same order as is shown below.
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.
Installing the gnu compiler involves many steps. You can find an excellent set of directions HERE. We recommend following those directions exactly except for the last step which involves setting the path to the new g++ compiler. We 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 to accomplish 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.
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!
HDF5
Download the HDF5 binary for your platform HERE. I downloaded the static version, however I don't believe it matters what version you use. We use the HDF5 library in conjunction with Silo to output h5 files. Navigate to the directory where the hdf5-version-platform.tar.gz was downloaded and install using the following command line options:
$ tar xvfz hdf5-_version-platform_.tar.gz
$ cd hdf5-_version_
$ ./configure --enable-cxx --prefix=/usr/local/hdf5 (or other location)
$ sudo make
$ sudo make install
HDF5 is now installed. Library files will be in /usr/local/hdf5/lib, packages will be in /usr/local/hdf5/bin, and include files will be in /usr/local/hdf5/include.
Silo I/O library
Download the Silo I/O library source HERE. We use very basic silo commands so any stable version should work. We recommend 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 --prefix=/usr/local/silo --with-hdf5=/usr/local/hdf5/include,/usr/local/hdf5/lib
$ 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 *.h5 files.
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.
To install VisIt, first 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.
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