Skip to content

Commit

Permalink
Add bootstrap.sh, and selectable AXL transfer types
Browse files Browse the repository at this point in the history
- Add bootstrap.sh script to download and build dependencies

- Add an optional axl_xfer_str argument to Filo_Fetch()/
  Filo_Flush()/Filo_Flush_start(). This allows you to set the AXL
  transfer type on a per-stream basis.

- Remove some trailing whitespace

- Update travis.yml per @CamStan's instructions to get rid of an
  error.
  • Loading branch information
tonyhutter committed Jan 28, 2020
1 parent f7ce43e commit 4a37dff
Show file tree
Hide file tree
Showing 11 changed files with 198 additions and 74 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ langauge: c
dist: trusty

compiler:
- gcc
- clang

matrix:
include:
Expand Down
37 changes: 4 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,42 +15,13 @@ For usage, see [src/filo.h](src/filo.h), [test/test\_filo.c](test/test_filo.c),

To build dependencies:

git clone [email protected]:ECP-VeloC/KVTree.git KVTree.git
git clone [email protected]:ECP-VeloC/AXL.git AXL.git
git clone [email protected]:ECP-VeloC/spath.git spath.git
./bootstrap.sh

mkdir install

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=../install -DMPI=ON ../KVTree.git
make clean
make
make install
make test
cd ..

rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install ../AXL.git
make clean
make
make install
cd ..
To build filo:

rm -rf build
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install ../spath.git
make clean
make
make install
cd ..

To build filo:

cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=./install -DWITH_KVTREE_PREFIX=`pwd`/install -DWITH_AXL_PREFIX=`pwd`/install -DWITH_SPATH_PREFIX=`pwd`/install .
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install ..
make
make install

Expand All @@ -63,7 +34,7 @@ All the tests can be run with:

To build a test for the filo API:

mpicc -g -O0 -o test_filo test_filo.c -I../install/include -L../install/lib64 -I../src -L../src -lkvtree -laxl -lspath -lfilo
mpicc -g -O0 -o test_filo ../test/test_filo.c -I../install/include -L../install/lib64 -I../src -L../src -lkvtree -laxl -lspath -lfilo

## Release

Expand Down
65 changes: 65 additions & 0 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/bash
#
# This is an easy-bake script to download and build all FILO's external
# dependencies. The dependencies will be built in filo/deps/ and
# installed to filo/install/
#
# Usage:
#
# ./bootstrap.sh

ROOT="$(pwd)"

mkdir -p deps
mkdir -p install
INSTALL_DIR=$ROOT/install

cd deps

repos=(https://github.com/ECP-Veloc/KVTree.git
https://github.com/ECP-Veloc/AXL.git
https://github.com/ECP-Veloc/spath.git
)

for i in "${repos[@]}" ; do
# Get just the name of the project (like "mercury")
name=$(basename $i | sed 's/\.git//g')
if [ -d $name ] ; then
echo "$name already exists, skipping it"
else
git clone $i
fi
done

cd KVTree
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DMPI=ON ..
make -j `nproc`
make install
cd ../..

cd AXL
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DAXL_ASYNC_DAEMON=OFF -DMPI=ON ..
make -j `nproc`
make install
cd ../..

# spath
cd spath
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DMPI=ON ..
make -j `nproc`
make install
#make test

cd "$ROOT"

echo "*************************************************************************"
echo "Dependencies are all built. You can now build FILO with:"
echo ""
echo " mkdir -p build && cd build"
echo " cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR ../"
echo " make"
echo ""
echo "*************************************************************************"
4 changes: 2 additions & 2 deletions cmake/FindAXL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ FIND_PATH(WITH_AXL_PREFIX

FIND_LIBRARY(AXL_LIBRARIES
NAMES axl
HINTS ${WITH_AXL_PREFIX}/lib
HINTS ${WITH_AXL_PREFIX}/lib install/lib64
)

FIND_PATH(AXL_INCLUDE_DIRS
NAMES axl.h
HINTS ${WITH_AXL_PREFIX}/include
HINTS ${WITH_AXL_PREFIX}/include install/include
)

INCLUDE(FindPackageHandleStandardArgs)
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindKVTREE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ FIND_PATH(WITH_KVTREE_PREFIX

FIND_LIBRARY(KVTREE_LIBRARIES
NAMES kvtree
HINTS ${WITH_KVTREE_PREFIX}/lib
HINTS ${WITH_KVTREE_PREFIX}/lib install/lib64
)

FIND_PATH(KVTREE_INCLUDE_DIRS
NAMES kvtree.h
HINTS ${WITH_KVTREE_PREFIX}/include
HINTS ${WITH_KVTREE_PREFIX}/include install/include
)

INCLUDE(FindPackageHandleStandardArgs)
Expand Down
4 changes: 2 additions & 2 deletions cmake/FindSPATH.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ FIND_PATH(WITH_SPATH_PREFIX

FIND_LIBRARY(SPATH_LIBRARIES
NAMES spath
HINTS ${WITH_SPATH_PREFIX}/lib
HINTS ${WITH_SPATH_PREFIX}/lib install/lib64
)

FIND_PATH(SPATH_INCLUDE_DIRS
NAMES spath.h
HINTS ${WITH_SPATH_PREFIX}/include
HINTS ${WITH_SPATH_PREFIX}/include install/include
)

INCLUDE(FindPackageHandleStandardArgs)
Expand Down
Loading

0 comments on commit 4a37dff

Please sign in to comment.