Ohmms:Getting started
From CMS Tools
Contents |
Download source
- Please register at MCC Software Archive for future update on OHMMS and other software
- Download of beta-version of source (read-only) using subversion
svn co http://cms.mcc.uiuc.edu/svn/ohmms/trunk ohmms
Developers
- Valid userid and password are required to commit your changes.
- As May 2006, autoconf/automake files are broken. Use cmake.
- Do not use tight-binding codes with MPI. Debugging/testing/performance tuning is in progress.
How to install OHMMS for simulations using cmake
Prerequisite
In order to install OHMMS, the users have to install several required packages. These packages are included in the standard Linux/cygwin distributions or can be downloaded by following the links. If these libraries are installed in standard directories, /usr /usr/local, no action is necessary. Alternatively, the users can set environment variables XYZ_HOME where XYZ stands for the name of package; the build utility can locate the libraries and use them.
With few exceptions, the build utility cmake will look for XYZ_HOME/include for the header files and XYZ_HOME/lib for the library files. When multiple environment variables apply to a library, e.g., blas/lapack, the library is searched according to the listed order.
| Name | Category | Environment variables | Comments |
| cmake | utility | source and binary distribution on multiple platforms | |
| blas/lapack | Numerical library | MKL_HOME, LAPACK, ATLAS | Alternatives: vendor-provided blas, e.g., ESSL |
| hdf5 | I/O | HDF5_HOME, HDF_HOME | source and binary distribution on multiple platforms |
| libxml2 | I/O | LIBXML2_HOME | Standard library for Linux distributions |
On many HPC centers, these packages are managed by utilities like module and softenv. Consult the documentations on each site.
Notes on Numerical Libraries: If lapack/blas or atlas is not in your standard paths, do one of the followings. location is where the libraries are located.
For bash users,
export LAPACK="-L/location -llapack -lblas" export ATLAS="-L/location -llapack -lf77blas -lcblas -latlas"
For tcsh users,
setenv LAPACK "-L/location -llapack -lblas" setenv ATLAS "-L/location -llapack -lf77blas -lcblas -latlas"
Build OHMMS libraries and executable
In order to build ohmms with cmake, you need to download a binary from the website on your target platform or build it from the source
- cmake homepage
- binary files on multiple platforms are available
- cmake help
Build OHMMS with cmake
Require cmake to compile qmcpack package cmake wiki Theoretically speaking, OHMMS can be used on any *nix machine with recent GNU C/C++ compilers.
- unpack the tar-gziped file (skip this with subversion)
tar -zxvf ohmms-vx.y-YYYYMMDD.tgz code>
- change to the top directory (name can be different)
cd ohmms-vx.y-YYYYMMDD code>
- Create a directory to build the library and binaries, e.g., build
mkdir build code>
- Change to the build directory
cd build code>
- run cmake to create Makefiles (Don't forget ..)
cmake .. code>
- make everything
make code>
If everything goes well, then you should see topdir/build/bin/ohmmsapp.
ohmms directory tree
- ohmms topdir
- CMakeLists.txt : main cmake build file
- src : source directory
- CMake : cmake directory for external package and compiler
Out-of-source compilation is recommend. The procedure above, creating build directory and running camke in a new directory, is an example. We can further separate the source (development) and build. Let's assume that the QMCPACK topdir is /home/foo/src/ohmms. Then, one can build multiple executables in different locations by creating new directories and build OHMMS in each directory.
/home/foo/build/gcc /home/foo/build/mpi ....
In each directory, e.g., /home/foo/build/gcc (after setting the environments properly), execute
$cmake /home/foo/src/ohmms $make
There is no need to change sources or cmake files. cmake .. in the main procedure uses .. because the source tree resides in the parent directory.
If something did not work, simply remove the directory (e.g., rm -rf gcc-real code>) and start again.
