Configuration tools

ohmms core libraries and applications can be configured by

For typical ohmms applications without GUI supports on generic unix/linux machines, configuring with autoconf/automake is the best choice and is recommended. On some High-performance computers (so called, Super Computers), autoconf/automake often fails to work properly. Things will improve over the time but JK found that cmake or the perl script she wrote sometimes works better and easier to change for the local environments. Especially, if OpenGL/Qt should be used, using cmake is recommended and most likely that only cmake will work.

From this point, we assume that you are in the top-directory of ohmms and working in a unix environment which includes Mac OS X and windows/cygwin.

autoconf/automake

Like many open-source libraries, start with ./configure -h to find out what options are available and how to configure ohmms. We recommend out-of-source compilation to separate codes from object files and executables for the developers as described below.

Procedure 2.1. out-of-source compilation in a build directory

  1. mkdir build

    create a directory to build the libraries and applications.

  2. cd build

    move to build directory.

  3. ../configure --prefix=path-of-build [options]

    configure with options. prefix is set to install binaries and libraries in the build directory. Default value of prefix is /usr/local as usual.

  4. make

    build libraries and executables

  5. make install

    install libraries and executables in

    • build/include
    • build/lib
    • build/bin

cmake

cmake (Cross-platform Make) is an open-source make system to control the software compilation process using simple platform and compiler independent configuration files. For large-scale projects that have to be ported on many platforms, like ohmms, using cmake is highly recommended. The only drawback is that cmake has to be installed but it is very easy to do and does not require root permission. The current versions of cmake is not well suited for fortran codes but there are several ways to make cmake work for them as implemented in ohmms.

Procedure 2.2. out-of-source compilation in a build directory with cmake

  1. mkdir build

    create a directory to build the libraries and applications.

  2. cd build

    move to build directory.

  3. cmake ..

    run cmake to create Makefiles.

  4. make

    build libraries and executables in

    • build/include
    • build/lib
    • build/bin

Perl script

The perl script configure.pl is kept for historical reasons and is available only by cvs. Often, configure.pl does not reflect the revisions of the codes and should be used only for quick tests and for the platforms where automake/autoconf or cmake fail to work.

Procedure 2.3. Configuration with configure.pl

  1. ./configure.pl --arch xyz [options]

    a build directory bin/xyz is created and Makefiles are created in there. The executable is created in bin/xyz/ohmmsapp directory.

  2. cd bin

    move to bin/xyz directory.

  3. make

    run make to compile.