HARLEM Development

From Harlem

Jump to: navigation, search

Contents

[edit] Getting HARLEM sources

[edit] Getting Sources from SVN

You can download latest source codes of HARLEM from SVN server:

svn --username user checkout https://crete.chem.cmu.edu/svn/harlemsvn/HAPACK

[edit] How to Compile HARLEM

Compilation is made with the help of autotools (autoconf and automake) on two platforms: LINUX and WINDOWS. It is a simple 3 step process:

./configure
make
make install

But life is not a bowl of cherries: you need to make sure that you have all the libraries and auxiliary programs, which are needed for the HARLEM compilation.

Check #External Libraries Used in HARLEM and #Programs Needed for HARLEM Compilation for the current version of the libraries and programs. In the next sections the installation process will be described in more detail, including the installation of auxiliary libraries and programs.

[edit] Compiling HARLEM on Linux

Compiling stuff on Linux can be nice walk or nightmare, especially then the program depend on many libraries and other software. It is especially important to have exactly the same version of not standard libraries and programs, because their API can significantly vary from version to version. Here I will describe how to build HARLEM on linux from the very beginning to the first execution. The versions of compilers and Linux distributives listed below will work fine together, other combinations were not checked. Your are on your own there.

[edit] Catalog Structure

We found that it is convenient to store the sources separately from the objective files, this is especially convenient if you have several versions of a program (a debug version, versions with different levels of optimization, and those compiled by the different compilers). The following is an example of the directory structure:

  • HAPACK - sources
  • HAPACK_BLD - directory for building HARLEM
    • GCC - compiled with gcc
    • GCCDeb - compiled with gcc for debugging
  • HAPACK_DEP - extra library, if you want to have sources or do not want to install them into /usr/local

[edit] Step 1. Getting Sources

Download the source codes of HARLEM from the SVN server:

cd /home/username
svn --username username checkout https://crete.chem.cmu.edu/svn/harlemsvn/HAPACK

After executing the above command all HARLEM sources will be in the /home/username/HAPACK directory

[edit] Step 2. Get/Check Libraries

We will store all libraries that are not present in your system distributive, or have a different version in /home/username/HARLEM_DEP. We need to create it first:

cd /home/username
mkdir HARLEM_DEP
cd HARLEM_DEP

[edit] wxWidgets

wxWidgets is a cross-platform library for creation of the graphical user interface (GUI). It is used in HARLEM for making all windows, dialogs, buttons and other interface featucres.

Below are 3 possible ways to install it.

[edit] Where on Hercle Cluster

The latest version of wxWidgets is in the /usr/local, thus if you compile HARLEM on Hercle HARLEM configure script should find it.

[edit] Using Software Manager

You can use the software manager of your linux to install wxWidgets, but do not forget to check the code version.

[edit] Building From Source

Real enthusiasts can compile it by yourself. Download and unpack sources.

cd /home/username/HARLEM_DEP
wget http://prdownloads.sourceforge.net/wxwindows/wxGTK-2.8.7.tar.gz
gzip -dc wxGTK-2.8.7.tar.gz | tar -xvf -

Configure it, compile and install

mkdir wxGTK-2.8.7-Bld
cd wxGTK-2.8.7-Bld
../wxGTK-2.8.7/configure --prefix=/home/username/HAPACK/wxGTK --with-opengl --disable-shared
make
make install

[edit] Python

[edit] Where on Hercle Cluster

Currently used version of python is in the /usr/local, thus if you compile HARLEM on Hercle HARLEM configure script should find it.

[edit] Using Software Manager

You can use a software manager of your linux to install it, don't forget to check version, and don't forget to install developer version of package.

[edit] Building From the Source

Check [1] for it

[edit] MySQL

MySQL is a very widely spread library. There is no need to install your own version. Version which comes with Linux should be enough, unless you have very old or very new Linux.

[edit] MPICH

MPICH is an MPI implementation, version which come with your Linux should be fine

[edit] Berkley DB

Very spread DB, usually several versions are available on the same computer for the sake of compatibility, thus it is hard sometime to ensure that you compile with the right version.

[edit] WXHTTPENGINE

This Library is optional for linux

[edit] mkl (LinAlgebra)

Math Kernel Library is one of the option for BLAS and LAPACK libraries for HARLEM.

[edit] Step 3. Get/Check Programs

[edit] Compiler

You need compiler for sure.

[edit] Autotools (autoconf, automake, gmake)

[edit] SWIG

[edit] Step 4. Configure HARLEM for Compilation

cd /home/username/HAPACK_BLD
mkdir GCC
cd GCC
../../HAPACK/configure

[edit] Step 5. Compile HARLEM

make

[edit] Step 6. Install HARLEM

make install

[edit] Step 7. Test HARLEM

harlem

[edit] Compiling HARLEM on Cray XT3 (BigBen of PSC)

Here is some information how to compile HARLEM on Cray XT3 (BigBen of PSC). It is pretty close to compiling HARLEM on Linux, but it is necessary to install some additional programs and libraries. Here we are doing cross-compilation, we compile HARLEM on front end to run it on nodes, software of frontend and nodes are diffrent.

[edit] Python

Python 2.5 was installed to $(HOME)/HAPACK_DEP/python2.5. It is very hard to cross-compile python so lets try to compile it for front end and use for nodes

Thats how cross compilation should look like but it doesn't work:

  • ./configure --prefix=$HOME/HAPACK_DEP/python2.5 --disable-shared CC=pgcc CXX=pgCC CXXFLAGS="-fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -I$HOME/HAPACK_DEP/zlib/include" CFLAGS="-fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -I$HOME/HAPACK_DEP/zlib/include" LDFLAGS="-L$HOME/HAPACK_DEP/zlib/lib" --host=cray

Compilation for front end with PGC:

  • ./configure --prefix=$HOME/HAPACK_DEP/python2.5 --disable-shared CC=pgcc CXX=pgCC CXXFLAGS="-fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -I$HOME/HAPACK_DEP/zlib/include" CFLAGS="-fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -I$HOME/HAPACK_DEP/zlib/include" LDFLAGS="-L$HOME/HAPACK_DEP/zlib/lib"
  • doesn't work too

Compilation for front end with GCC

  • ./configure --prefix=$HOME/HAPACK_DEP/python2.5 --disable-shared
  • make -j 4
  • cp libpython2.5.a $HOME/HAPACK_DEP/python2.5/lib/python2.5

[edit] SWIG

[edit] HAPACK

../../HAPACK/configure --prefix=$HOME/HARLEM --program-suffix=_pgc --with-mpich CC=cc CXX=CC F77=ftn FC=ftn MPICC=cc MPICXX=CC CXXFLAGS="-fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -I$HOME/HAPACK_DEP/zlib/include" CFLAGS="-fastsse -O3 -Mnontemporal -Mprefetch=distance:8,nta -I$HOME/HAPACK_DEP/zlib/include" LDFLAGS="-L$HOME/HAPACK_DEP/zlib/lib -L$HOME/HAPACK_DEP/python-2.5/lib" --with-wx-config=$HOME/HAPACK_DEP/wxX11/bin/wx-config --host=cray

[edit] Directory Structure for sources and final release package

[edit] Sources

Files are given in italic, directories in bold, grouping idea in bold purple.

  • HAPACK - parent directory, which contain autotool's configuration scripts
    • doc - place for documentation, not used so far
    • Configuration tools:
    • configure.in - input for autoconf
    • Makefile.am - input for automake
    • config - autotool's custom scripts
    • 3rd Party Libraries:
    • DELPHI_LIB - Poisson - Boltzmann Solver
    • GEOBALL -
    • JUMNA_LIB -
    • SANDER_LIB - MD library
    • WOLFGANG -
    • Our Libraries:
    • HALIB - library of reusable code withing HARLEM package
      • include - HALIB's headers
      • src - sources of HALIB
      • halib - instruction for compilation library for HARLEM, let's rename to libha to make autotools happy
      • halib_base - library without graphics and python script
      • Makefile.am -
      • Doxyfile -
      • HALIB.kdevelop - kdevelop's project used by Kolya under linux
      • HALIB.kdevelop.filelist - kdevelop's project used by Kolya under linux
    • PNPS - Poisson Nernst Planck Solver
      • src - sources for PNPS
      • pnps - instruction for compilation stand-along solver, for serial run
      • pnps_d - instruction for compilation stand-along solver, for serial run with double precision at some places (just tests, probably is not working)
      • libpnp - instruction for compilation library for HARLEM
      • Makefile.am -
      • Doxyfile -
      • PNPS.kdevelop - kdevelop's project used by Kolya under linux
      • PNPS.kdevelop.filelist - kdevelop's project used by Kolya under linux
    • HARLEM Main Code:
    • HARLEM - harlem as is
      • basis - database for QM
      • residues_db - molecular database
      • sources - HARLEM sources
      • scripts - it is examples of scripts now, one can call it scripts library
      • examples - other examples, a lot of diffrent examplas big and heavy should it be in source tree
      • HARLEM.kdevelop - kdevelop's project used by Kolya under linux
      • HARLEM.kdevelop.filelist - kdevelop's project used by Kolya under linux
      • Makefile.am -
      • Doxyfile -

[edit] Release Package, Semi Unix Way

programs should be able to be installed in /usr/local and files should follow unix files distribution

  • bin - all binaries + some shell
    • harlembin - harlem binary
    • harlem - shell which setup all environment variables for successive HARLEM execution
    • pnps - PNP solver
    • mpi_pnps - Parallel PNP solver
  • share
    • harlem
      • doc
      • basis
      • residues_db
      • scripts - python API (hamolset.py, halib.py, pnpmod.py), default python initiator, other python custom library
      • examples - this directory should come in separate package

[edit] HARLEM distribution directories on WINDOWS

  • harlem
    • doc
    • basis - database of gaussian basis set for use in Quantum Chemistry modules
    • residues_db - database of residue templates and force fields for Molecular Mechanics modules
    • scripts - python scripts providing interface to HARLEM classes from PYTHON:
      molset.py, halib.py, pnpmod.py.
      These scripts are automatically generated by SWIG utility during program compilation. Other core python scripts are expected to be placed here.
    • examples - examples and tutorials of HARLEM usage, useful python scripts
    • harlem.exe - HARLEM executable
    • pnps - PNP solver
    • mpi_pnps - Parallel PNP solver

[edit] External Libraries Used in HARLEM

Here is libraries which is needed to compile HARLEM. In the table also shown current version libraries.

Library Windows Version Linux Version comments
wxWidgets 2.8.7 2.8.7
Python 2.5.2 2.5.1, 2.5.2(Hercle)
MySQL 5.0.51b 5.0.45
MPICH 1.2.5 1.2.7
Berkley DB 4.6.21 4.4.20
WXHTTPENGINE 2.0 not used
mkl (LinAlgebra) not used 10.0.1.014

[edit] Programs Needed for HARLEM Compilation

Program Windows Version Linux Version comments
SWIG 1.3.29(cygwin) 1.3.31 Python API generator
cygwin not needed to run configure.in
autoconf 2.61 2.61
automake 1.10.1 1.10.1
make

[edit] Compilers

[edit] GCC 4.2.1, Linux

Works well on OpenSuse 10.3

[edit] GCC 3.3.5, Linux

[edit] Microsoft Compilers, Windows

[edit] Configuration tools

[edit] configure.in

[edit] Options and Default Behaviour

[edit] Building Release Package

[edit] For Windows

[edit] Dll Required For HARLEM

DLL that are wanted by harlem
dll where it is comments
mysql.dll C:\MYSQL\lib\opt\libmysql.dll mysql
DFORMD.dll C:\Program Files\Microsoft Visual Studio\DF98\REDIST DIGITAL Visual Fortran Rtl (thread-safe)
python25.dll Python scripting

[edit] Information about Sources

[edit] wxWidgets Forms, via wxDesigner

Since we have a lot of different dialogs, and also due to binary format of wdr, we have several of them to avoid merging problems.

To avoid ambiguity all of them shoud have different starting ID:

wdr file Starting ID
ha_wx_res.wdr 11000
ha_wx_res_2.wdr 20000
ha_wx_res_5.wdr 10000
ha_wx_res_mikola.wdr 25000
ha_wx_ed.wdr 12900
ha_wx_res_molflex.wdr 32000
Personal tools