Вы находитесь на странице: 1из 3

Installation of MPB with Vis5d+ in Ubuntu

- Wey Chun, Ooi Mar 18 2011 This guide is written and tested to be working under Ubuntu 10.10 Maverick Meerkat for MPB-1.4.2. I have not tried this for other distributions but my guess is that it should work for most debian based distributions. 1. Initial Setup 1. Update Ubuntu in the terminal sudoaptgetinstallupdate sudoaptgetinstallbuildessential 2. MPB installation 1. In the terminal sudoaptgetinstallmpb sudoaptgetinstallh5utils 2. Note: For Debian Users, skip to step 3. In my installation of Ubuntu, it was found that the *.h5 files would not output. But under Debian, everything worked nicely, thus I tried to install with the package from the Debian repository and it was working afterwards. Go to http://packages.debian.org/sid/i386/mpb/download assuming you are using 32-bit version of Linux. Download any of the one file to /home/username/Downloads in the terminal cd~/Downloads sudodpkgimpb_1.4.216_i386.deb 3. MPB should now be working for the 2D case. Vis5D needs to be installed for the 3D case. Try the trirods.ctl example from the MPB package at the MPB website by downloading the file below, extract and run the example based on the Data Analysis tutorial. I tried running the codes by copy and pasting from the Data Analysis Tutorial but the program refused to work http://ab-initio.mit.edu/mpb/mpb-1.4.2.tar.gz

3. Vis5d+ installation The installation for OpenGL is written with reference from the Ubuntu Forums. The subsequent part is with reference to the Manual provided at the Vis5d+ Homepage 1. First we need to install OpenGL In the Terminal (the command below is in 1 line) sudoaptgetinstalllibglu1mesadevfreeglut3devmesa commondev 2. Install NetCDF Go to http://www.unidata.ucar.edu/downloads/netcdf/netcdf-4_1_1/index.jsp Download netcdf-4.1.1.tar.gz In the Terminal cd~/Downloads tarxfnetcdf4.1.1.tar.gz cdnetcdf4.1.1 ./configure sudomakeCC='gccDf2cFortran'j6 sudomakeinstall 3. Install Vis5d+ Go to http://sourceforge.net/projects/vis5d/files/vis5d/ download the latest vis5d+, latest version is vis5d+-1.3.0-beta.tar.gz In the Terminal cd~/Downloads tarxfvis5d+1.3.0beta.tar.gz Vis5D needs the libnetcdf.a file, located in ~/Downloads/netcdf-4.1.1/libsrc/libnetcdf.a Copy this file to the Vis5D directory. (In case this file cannot be found, this step can be skipped should the NetCDF installation be successful) continue in the Terminal cdvis5d+1.3.0beta ./configureprefix=/usr/local/CC='gccDf2cFortran' Go to ~/Downloads/vis5d+-1.3.0-beta/src/ find the files misc.h and misc.c In the files, find instances of the function name 'round', and modify to 'custom_round' to prevent compilation error for misc.h: modify line 40 for misc.c: modify line 150 alternatively, use the search function to location the function name 'round' Note: The order has to be first ./configureand followed by the file modifications. Otherwise compilation may not work.

4. Once you have run configure and modified the files successfully, you can compile Vis5D by typing: sudomakej6 sudomakeinstall test the vis5d program by typing src/vis5dhole.v5dpathsrc 4. Install hdf5 1. In the Terminal sudoaptgetremoveh5utils 2. Go to http://www.hdfgroup.org/ftp/HDF5/prev-releases/hdf5-1.8.4-patch1/src/ Download hdf5-1.8.4-patch1.tar.gz Note: Downloading other versions may result in the program not working Type cd~/Downloads tarxfhdf51.8.4patch1.tar.gz cdhdf51.8.4patch1 ./configureprefix=/usr/local/ sudomakej6 sudomakeinstall 5. Install h5utils with h5tov5d 1. Download h5utils from http://ab-initio.mit.edu/h5utils/h5utils-1.12.1.tar.gz cd~/Downloads tarxfh5utils1.12.1.tar.gz cdh5utils1.12.1 Note: <insert username> should be changed to your computer username. The command below is 1 line only ./configurewithv5d=/home/<insert username>/Downloads/vis5d+1.3.0beta/srcCPPLAGS=' I/usr/local/include'LDFLAGS='L/usr/local/lib/' sudomakej6 sudomakeinstall 2. h5tov5d integration to MPB should now work. Try the tutorial at the MPB website to confirm 3. Play around with the plots. Example: under Isosurf, click epsilon, then at the vis5d control panel, move slider to the middle and click 'OK' . Hollow spheres should display for the diamond.ctl simulation

Вам также может понравиться