A5. I want to run CASINO on my multi-processor PC, which I administer myself. How do I set that up? How do I set up multiple compilers to work with the MPI library?

Recent Linux distributions offer ready-to-use MPI-enabled compilers. Installing the relevant packages should provide you with an ‘mpif90‘ executable, an ‘mpirun‘ launcher, libraries etc, and you would not need to go through the instructions below (see A1 above instead).

If you want a different compiler, or if your distribution does not provide said package(s), follow these instructions:

  1. Install the Fortran compilers you want to use (ifort, g95, gfortran, etc).
  2. Download OpenMPI from www.open-mpi.org . (NB, we use OpenMPI in this example, but you can choose to use any other MPI implementation so long as it fully supports MPI-2 [LAM/MPI can not be used].).
  3. Extract from the archive and change into the newly created directory.
  4. Choose a directory for the installation. We will refer to this directory as (e.g. /opt/openmpi).
  5. For each compiler you want OpenMPI to work with, let:
    <fc>= name of Fortran compiler binary,
    <f77>= name of Fortran 77 compiler (may be the same as ),
    <cc>= name of C compiler, and
    <c++> = name of C++ compiler
    <comp>= name under which we will refer to this setup.
    (e.g., <fc>=<f77>=<comp>=ifort,<cc> =icc <c++>=icpc).

    Configure OpenMPI with:
    ./configure CC=<cc> CXX=<c++> FC=<fc> F77=<f77> --prefix=<install-dir>/<comp>
    Then run:
    make all
    sudo make install
    make clean

    Repeat this step with the next compiler.
  6. Add <install-dir>/<comp>/bin to your PATH, and <install-dir>/<comp>/lib
    to your LD_LIBRARY_PATH. Use the compiler as mpif90 / mpicc.
  7. Refer to A2 above to set up CASINO for this compiler.
  8. To switch compilers, change your PATH, LD_LIBRARY_PATH and CASINO_ARCH. Simple bash functions (which can be put in your .bashrc file) can be written to simplify this task.

Please log in to rate this.
0 people found this helpful.


Category: A: Installing CASINO

← Frequently Asked Questions

Leave a Reply