Commit a5acba81 authored by Marc Vef's avatar Marc Vef
Browse files

Added cci and libfabric to clone/install scripts and added help to Readme.md

parent 112a69e3
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -53,8 +53,16 @@ __Notice:__ Once installed, please add the include path for gflags to your CPAT

## Clone and compile direct ADA-FS dependencies

- Go to the subfolder `ifs/scripts` and first clone all dependencies projects: `./clone_dep.sh <git_clone_path>`
- Now use the install script to compile them and install them to the desired directory: `./compile_dep.sh <git_clone_path> <install_path>`
- Go to the subfolder `ifs/scripts` and first clone all dependencies projects. You can choose the according na_plugin (execute the script for help):

```bash
./clone_dep.sh <git_clone_path> <na_layer>
```
- Now use the install script to compile them and install them to the desired directory. You can choose the according na_plugin (execute the script for help):

```bash
./compile_dep.sh <git_clone_path> <install_path> <na_layer>
```

## Compile ADA-FS
You need to decide what Mercury NA plugin you want to use. The following NA plugins are available, although only BMI is considered stable at the moment.
+31 −6
Original line number Diff line number Diff line
@@ -21,22 +21,47 @@ assertdir()
    echo "Done"
}

if [ -z ${1+x} ]; then
    echo "No git clone destination path given as first parameter.";
usage() {

    echo "Usage:
    ./clone_dep [ clone_path ] [ NA_Plugin ]
    Valid NA_Plugin arguments: {bmi,cci,ofi,all}"
}

if [[ ( -z ${1+x} ) || ( -z ${2+x} ) ]]; then
    echo "Arguments missing."
    usage
    exit
else
    echo "Clone path is set to '$1'";
    echo "Cloning output is logged at /tmp/adafs_clone.log"
fi

LOG=/tmp/adafs_clone.log
echo "" &> $LOG
GIT=$1
NA_LAYER=$2
if [ "$NA_LAYER" == "cci" ] || [ "$NA_LAYER" == "bmi" ] || [ "$NA_LAYER" == "ofi" ] || [ "$NA_LAYER" == "all" ]; then
    echo "$NA_LAYER plugin(s) selected"
else
    echo "No valid plugin selected"
    usage
    exit
fi
echo "Clone path is set to '$1'"
echo "Cloning output is logged at /tmp/adafs_clone.log"

mkdir -p $GIT

# get BMI
if [ "$NA_LAYER" == "bmi" ] || [ "$NA_LAYER" == "all" ]; then
    assertdir "bmi" "git clone git://git.mcs.anl.gov/bmi" "2abbe991edc45b713e64c5fed78a20fdaddae59b"
fi
# get CCI
if [ "$NA_LAYER" == "cci" ] || [ "$NA_LAYER" == "all" ]; then
    assertdir "cci" "git clone https://github.com/CCI/cci" "58fd58ea2aa60c116c2b77c5653ae36d854d78f2"
fi
# get libfabric
if [ "$NA_LAYER" == "ofi" ] || [ "$NA_LAYER" == "all" ]; then
    assertdir "libfabric" "git clone https://github.com/ofiwg/libfabric" "tags/v1.5.2"
fi
# get Mercury
assertdir "mercury" "git clone --recurse-submodules https://github.com/mercury-hpc/mercury" "afd70055d21a6df2faefe38d5f6ce1ae11f365a5"
# get Argobots
+76 −23
Original line number Diff line number Diff line
#!/bin/bash

if [[ ( -z ${1+x} ) || ( -z ${2+x} ) ]]; then
    echo "Please give git destination path as first parameter and install path as second";
usage() {

    echo "Usage:
    ./compile_dep [ clone_path ] [ install_path ] [ na_plugin ]
    Valid na_plugin arguments: {bmi,cci,ofi,all}"
}

prepare_build_dir() {
    if [ ! -d "$1/build" ]; then
        mkdir $1/build
    fi
    rm -rf $1/build/*
}

if [[ ( -z ${1+x} ) || ( -z ${2+x} ) || ( -z ${3+x} ) ]]; then
    echo "Arguments missing."
    usage
    exit
else
    echo "Git path is set to '$1'";
    echo "Install path is set to '$2'";
#    echo "Install output is logged at /tmp/adafs_dep_install.log"
fi

#LOG=/tmp/adafs_install.log
#echo "" &> $LOG
GIT=$1
INSTALL=$2
NA_LAYER=$3
USE_BMI="-DNA_USE_BMI:BOOL=OFF"
USE_CCI="-DNA_USE_CCI:BOOL=OFF"
USE_OFI="-DNA_USE_OFI:BOOL=OFF"

mkdir -p $GIT

prepare_build_dir() {
    if [ ! -d "$1/build" ]; then
        mkdir $1/build
if [ "$NA_LAYER" == "cci" ] || [ "$NA_LAYER" == "bmi" ] || [ "$NA_LAYER" == "ofi" ] || [ "$NA_LAYER" == "all" ]; then
    echo "$NA_LAYER plugin(s) selected"
else
    echo "No valid plugin selected"
    usage
    exit
fi
    rm -rf $1/build/*
}

echo "Git path is set to '$1'";
echo "Install path is set to '$2'";

mkdir -p $GIT

if [ "$NA_LAYER" == "bmi" ] || [ "$NA_LAYER" == "all" ]; then
    USE_BMI="-DNA_USE_BMI:BOOL=ON"
    echo "Installing BMI"
    # BMI
    CURR=$GIT/bmi
@@ -33,6 +55,37 @@ cd $CURR/build
    ../configure --prefix=$INSTALL --enable-shared --enable-bmi-only  || exit 1
    make -j8 || exit 1
    make install || exit 1
fi

if [ "$NA_LAYER" == "cci" ] || [ "$NA_LAYER" == "all" ]; then
    USE_CCI="-DNA_USE_CCI:BOOL=ON"
    echo "Installing CCI"
    # CCI
    CURR=$GIT/cci
    prepare_build_dir $CURR
    cd $CURR
    ./autogen.pl || exit 1
    cd $CURR/build
    ../configure --prefix=$INSTALL LIBS="-lpthread"  || exit 1
    make -j8 || exit 1
    make install || exit 1
    make check || exit 1
fi

if [ "$NA_LAYER" == "ofi" ] || [ "$NA_LAYER" == "all" ]; then
    USE_OFI="-DNA_USE_OFI:BOOL=ON"
    echo "Installing LibFabric"
    #libfabric
    CURR=$GIT/libfabric
    prepare_build_dir $CURR
    cd $CURR
    ./autogen.sh || exit 1
    cd $CURR/build
    ../configure --prefix=$INSTALL  || exit 1
    make -j8 || exit 1
    make install || exit 1
    make check || exit 1
fi

echo "Installing Mercury"

@@ -42,7 +95,7 @@ prepare_build_dir $CURR
cd $CURR/build
cmake -DMERCURY_USE_SELF_FORWARD:BOOL=ON -DMERCURY_USE_CHECKSUMS:BOOL=OFF -DBUILD_TESTING:BOOL=ON \
-DMERCURY_USE_BOOST_PP:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_INSTALL_PREFIX=$INSTALL \
-DCMAKE_BUILD_TYPE:STRING=Release -DNA_USE_BMI:BOOL=ON ../  || exit 1
-DCMAKE_BUILD_TYPE:STRING=Release $USE_BMI $USE_CCI $USE_OFI ../  || exit 1
make -j8  || exit 1
make install  || exit 1