CLAIRE: Installation and Requirements

Go back to README.md.

Content

Installation Overview

What follows is a minimal installation guide. We provide scripts to download and install the dependencies using generic settings that have worked on our systems. A more detailed installation guide can be found below.

To install the dependencies go to the top level directory of CLAIRE in your command window and execute the following commands in your command window:

cd deps
./get_libs.sh
./build_libs.sh --build

The first bash script downloads the libraries you need to install. The second bash script compiles these libraries using default settings. To add these dependencies to your environment type the following into your command line and press return:

source environment_vars.sh

This step needs to be done every time you log out of your computer. As an alternative, you can add the content of environment_vars.sh to your .bashrc or bash_profile.

Return to the top level directory of CLAIRE and type

cd ..
make -j

If you would like to verify if CLAIRE has been installed correctly run the following command in your command window:

./bin/claire -synthetic 0

If you have trouble executing CLAIRE take a look at the examples and tests described in README-RUNME.md.

Detailed Installation Guide

Requirements

Make sure that the standard wrappers for mpicc and mpicxx are available on your system (either by loading the appropriate modules and/or by setting up the appropriate PATH and LD_LIBRARY_PATH definitions below). The compilation has been tested with Open MPI, MVAPICH, and Intel MPI.

Dependencies

CLAIRE requires the following libraries to be installed on your system:

Step 1: Downloading Dependencies

To download the libraries we provide a script called get_libs.sh (see deps/get_libs.sh). Simply run this script in your command window to download tarball files of the libraries identified above.

cd debs
./get_libs.sh

The compressed tarball files (i.e, LIBRARY-NAME.tar.gz) should remain located in or be added to the deps folder. Make sure that all libraries are downloaded (the progress bar of wget should be full). If the download failed, delete the tarball file and run get_libs.sh again. To view the urls for the libraries you can take a look at deps/get_libs.sh. We provide additional information about these libraries below. This also includes links to versions for these libraries that we have used with CLAIRE before.

Step 2: Installing Dependencies

Quick Shot

To build all libraries at once, execute the build script in your command window as follows:

cd deps
./build_libs.sh --build

This will decompress the tarball files and compile them with standard settings. The compiled libraries will be installed in in a subfolder of your deps folder called libs.

Detailed Instructions

We build all libraries as static by default.

The libraries can be compiled by running the build_libs.sh script in the external subdirectory. To see all the options do

./build_libs.sh --help

This will provide information on what parameters you can parse. Ideally, it is sufficient to do ./build_libs.sh --build. You can also build the individual libraries one after another, via the --bLIBNAME option, where LIBNAME is the name of the library. For precise instructions, do ./build_libs.sh --help. If you want to clean up the libraries folder, you can do ./build_libs.sh --clean. The build folders will be removed each time you recompile the libraries. We provide the commands to compile the individual libraries also in the description of the dependencies above.

Please check the cmake, make and automake outputs for errors. To check if everything worked you can also take a look at the “build” subdirectories of the individual libraries in the “lib” folder (subdirectories of deps). See if folders in “build” were created and the library and include files exist. If not, something went wrong during the build.

Step 3: Setting Environment Variables

Before you are able to compile and run CLAIRE you need to add environment variables to your system. When building the libraries a file called environment_vars.sh is created. This file should be located in the debs/libs subfolder. To add the environment variables temporarily (for the current session) to your system, do

source environment_vars.sh

To add them permanently, copy the content of environment_vars.sh to your ~/.bashrc. Notice that environment_vars.sh defines absolute paths.

Building CLAIRE

Before you can build CLAIRE you need to

To build the code using the make system do (in the top level directory):

make -j

If you build in parallel using make -j, on certain systems to many threads will be used. This will result in compilation errors. To fix this, run make -j 12 instead (for quick access, you may want to define an alias in your ~/.bashrc).

Instructions for Specific Systems

Information about the Texas Advanced Computing Center (TACC) can be found at https://www.tacc.utexas.edu.In the following we will mainly provide information on which modules you need to load on the individual TACC systems to compile the code and the libraries. For more information on the systems please visit the TACC web pages.

Maverick Systems (TACC)

Info about Maverick can be found here: https://www.tacc.utexas.edu/systems/maverick.

CLAIRE has been tested with the following module settings:

module load intel/15.0.3
module load impi/5.0.3
module load git/2.7.0
module load cmake/2.8.12.2

Opuntia System (RCDC)

Info about Maverick can be found here: https://www.uh.edu/rcdc/resources/hpc/opuntia.

CLAIRE has been tested with the following module settings (04/16/2021):

module load intel
module load matlab
module load OpenMPI/intel/3.1.2

Troubleshooting

  1. libstdc++ or GLIBCXX... not found
    • required by ACCFFT and niftilib
    • libstdc++ is the GNU Standard C++ library
    • you might be able to locate this library via locate libstdc
    • fix: if gcc is on your system, you need to add it to the LD_LIBRARY_PATH; add export LD_LIBRARY_PATH=/path/to/gcc/lib(64):$LD_LIBRARY_PATH to your bashrc
  2. PETSc requires at least python 2.7(.11) for compilation; python 3 is not supported in PETSc 3.7
  3. when compiling PETSc: ERROR:root:code for hash md5 was not found…
    • this is a problem with your python 2.7 installation
    • fix upgrade to python 2.7.11
  4. g++: error: unrecognized command line option -parallel
    • you probably set USEINTEL in the makefile to yes, but are not using an intel compiler
    • fix: USEINTEL=no
  5. ./include/RegOpt.hpp: fatal error: petsc.h: No such file or directory
    • you probably forgot to set the environment variables
    • fix: source external/libs/environment_vars.sh
  6. definition in …libmpi_mt.so section .tbss mismatches non-TLS definition in …libmpi.so.4 section .bss
    • you have used inconsistent MPI libraries during the build (thread safe vs. non-thread safe)
    • fix:
      • set USEINTELMPI in the makefile to yes
      • when building the libraries add --useimpi: ./build_libs.sh --build --useimpi
  7. libmpi.so: could not read symbols: Bad value (see 6.)
  8. libimf.so: warning: warning: feupdateenv is not implemented and will always fail
    • you probably use an intel compiler but did not set USEINTEL to yes
    • fix: set USEINTEL in the makefile to yes
  9. Other dependencies that may cause problems (should in general be available on your system)
    • cmake (https://cmake.org; required by ACCFFT and niftilib; version 2.8 or greater)
    • openMP (required by ACCFFT)
    • crypt library (required by PETSc)
    • ssl library (required by PETSc)
    • BLAS (required by PETSc; we install it along with PETSc; http://www.netlib.org/blas/)
    • LAPACK (required by PETSc; we install it along with PETSc; http://www.netlib.org/lapack/)
  10. There are compilation issues with avx instructions using GCC 9.3.0 (compiles with GCC 7; see https://github.com/andreasmang/claire/issues/10)