File: build-mpich-linux.sh

package info (click to toggle)
tiledarray 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 9,568 kB
  • sloc: cpp: 53,449; javascript: 1,599; sh: 393; ansic: 226; python: 223; xml: 195; makefile: 36
file content (42 lines) | stat: -rwxr-xr-x 1,259 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /bin/sh

# Exit on error
set -ev

# Install packages

# always use gcc to compile MPICH, there are unexplained issues with clang (e.g. MPI_Barrier aborts)
export CC=/usr/bin/gcc-$GCC_VERSION
export CXX=/usr/bin/g++-$GCC_VERSION
export FC=/usr/bin/gfortran-$GCC_VERSION

# Print compiler information
$CC --version
$CXX --version
$FC --version

# log the CMake version (need 3+)
cmake --version

# Install MPICH unless previous install is cached ... must manually wipe cache on version bump or toolchain update
export INSTALL_DIR=${INSTALL_PREFIX}/mpich
if [ ! -d "${INSTALL_DIR}" ]; then
    cd ${BUILD_PREFIX}
    export MPICH_VERSION=3.3
    wget --no-check-certificate -q http://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz
    tar -xzf mpich-${MPICH_VERSION}.tar.gz
    cd mpich-${MPICH_VERSION}
    ./configure FC=$FC CC=$CC CXX=$CXX --prefix=${INSTALL_DIR}
    make -j2
    make install
    ${INSTALL_DIR}/bin/mpichversion
    ${INSTALL_DIR}/bin/mpicc -show
    ${INSTALL_DIR}/bin/mpicxx -show
    ${INSTALL_DIR}/bin/mpifort -show
else
    echo "MPICH installed..."
    find ${INSTALL_DIR} -name mpiexec
    find ${INSTALL_DIR} -name mpicc
    find ${INSTALL_DIR} -name mpicxx
    find ${INSTALL_DIR} -name mpifort
fi