Skip to content

Commit

Permalink
Merge pull request #666 from DARMA-tasking/1.0.0-beta.5-proposed-update
Browse files Browse the repository at this point in the history
Merge 1.0.0 beta.5 proposed update into 1.0.0
  • Loading branch information
lifflander authored Feb 20, 2020
2 parents ed85964 + 6c7f0e9 commit aaa1110
Show file tree
Hide file tree
Showing 105 changed files with 3,737 additions and 1,642 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/dockerimage-clang-8-alpine-mpich-trace-lb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR tests (alpine, clang-8, mpich, trace, LB)

on: [pull_request]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build . --file Dockerfile --build-arg TRACE_ENABLED=1 --build-arg LB_ENABLED=1 --tag vt:$(date +%s)
14 changes: 14 additions & 0 deletions .github/workflows/dockerimage-clang-8-alpine-mpich.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR tests (alpine, clang-8, mpich)

on: [pull_request]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build . --file Dockerfile --build-arg TRACE_ENABLED=0 --build-arg LB_ENABLED=0 --tag vt:$(date +%s)
14 changes: 14 additions & 0 deletions .github/workflows/dockerimage-gcc-5-ubuntu-mpich.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: PR tests (gcc-5, ubuntu, mpich)

on: [pull_request]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: docker build . --file Dockerfile-ubuntu --tag vt:$(date +%s)
30 changes: 30 additions & 0 deletions .github/workflows/pushdockerimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Image CI

on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- develop
- 1.*

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Docker Build & Push
uses: jerray/publish-docker-action@master
with:
# Name of the Docker image
repository: lifflander1/vt
# Target Docker registry
registry: docker.io
auto_tag: true
# Docker registry username
username: ${{ secrets.DOCKER_USERNAME }}
# Docker registry password
password: ${{ secrets.DOCKER_PASSWORD }}
17 changes: 12 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ include(cmake/link_vt.cmake)
include(cmake/load_packages.cmake)

# Code coverage option of VT
OPTION(CODE_COVERAGE_ENABLED FALSE)
if(CODE_COVERAGE_ENABLED)
include(cmake/code_coverage.cmake)
endif(CODE_COVERAGE_ENABLED)
option(CODE_COVERAGE "Enable coverage reporting" OFF)
# OPTION(CODE_COVERAGE_ENABLED FALSE)
# if(CODE_COVERAGE_ENABLED)
# include(cmake/code_coverage.cmake)
# endif(CODE_COVERAGE_ENABLED)

set(MPI_EXTRA_FLAGS "" CACHE STRING "Flags to pass to mpirun/mpiexec")

set(PROJECT_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(PROJECT_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
Expand All @@ -37,8 +40,12 @@ set(PROJECT_EXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/examples)

include(cmake/build_git_info.cmake)

option(vt_fcontext_enabled "Build VT with fcontext (ULT) enabled" OFF)

# Add subdirectories for tests and examples
add_subdirectory(${PROJECT_LIB_DIR}/context)
if (${vt_fcontext_enabled})
add_subdirectory(${PROJECT_LIB_DIR}/context)
endif()
add_subdirectory(${PROJECT_LIB_DIR}/CLI)
add_subdirectory(${PROJECT_LIB_DIR}/fmt)
add_subdirectory(src)
Expand Down
62 changes: 62 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
FROM lifflander1/vt:alpine-final
MAINTAINER Jonathan Lifflander <[email protected]>

COPY . /usr/src/vt/

WORKDIR /usr/src

ARG LB_ENABLED
ARG TRACE_ENABLED

RUN /bin/bash -c 'source $HOME/.bashrc && \
source /usr/share/spack/share/spack/setup-env.sh && \
spack env activate clang-mpich && \
ls /usr/src/vt && \
export CC=clang && \
export CXX=clang++ && \
echo $HTTP_PROXY && \
echo $HTTPS_PROXY && \
echo $ALL_PROXY && \
echo $http_proxy && \
echo $https_proxy && \
echo $all_proxy && \
unset https_proxy && \
unset http_proxy && \
unset all_proxy && \
unset HTTPS_PROXY && \
unset HTTP_PROXY && \
unset ALL_PROXY && \
if [ -d "detector" ]; then rm -Rf detector; fi && \
if [ -d "checkpoint" ]; then rm -Rf checkpoint; fi && \
git clone -b develop --depth 1 https://github.com/DARMA-tasking/checkpoint.git && \
export CHECKPOINT=$PWD/checkpoint && \
export CHECKPOINT_BUILD=/usr/build/checkpoint && \
git clone -b master --depth 1 https://github.com/DARMA-tasking/detector.git && \
export DETECTOR=$PWD/detector && \
export DETECTOR_BUILD=/usr/build/detector && \
export VT=/usr/src/vt && \
export VT_BUILD=/usr/build/vt && \
echo $SOURCE_COMMIT && \
cd $DETECTOR_BUILD && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=$DETECTOR_BUILD/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC $DETECTOR && \
make && \
make install && \
cd $CHECKPOINT_BUILD && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=$CHECKPOINT_BUILD/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -Ddetector_DIR=$DETECTOR_BUILD/install $CHECKPOINT && \
make && \
make install && \
cd $VT_BUILD && \
mkdir build && \
cd build && \
cmake -GNinja -Dvt_lb_enabled=$LB_ENABLED -Dvt_trace_enabled=$TRACE_ENABLED -DCMAKE_INSTALL_PREFIX=$VT_BUILD/install -DCMAKE_EXE_LINKER_FLAGS=-lexecinfo -DCMAKE_BUILD_TYPE=release -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -Ddetector_DIR=$DETECTOR_BUILD/install -Dcheckpoint_DIR=$CHECKPOINT_BUILD/install $VT && \
ninja && \
ninja install && \
ninja test || ctest -V'

COPY $DETECTOR_BUILD/ $DETECTOR_BUILD
COPY $CHECKPOINT_BUILD/ $CHECKPOINT_BUILD
COPY $VT_BUILD/ $VT_BUILD
78 changes: 78 additions & 0 deletions Dockerfile-ubuntu
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
FROM ubuntu:18.04
MAINTAINER Jonathan Lifflander <[email protected]>

RUN apt-get update && apt-get install -y \
curl \
cmake \
git \
googletest \
libmpich-dev \
wget \
gcc-5 \
zlib1g \
zlib1g-dev \
libopenmpi-dev \
ninja-build

COPY . /usr/src/vt/

WORKDIR /usr/src

ARG LB_ENABLED
ARG TRACE_ENABLED

RUN \
dpkg -L zlib1g && \
export CC=mpicc && \
export CXX=mpicxx && \
if [ -d "googletest" ]; then rm -Rf googletest; fi && \
if [ -d "detector" ]; then rm -Rf detector; fi && \
if [ -d "checkpoint" ]; then rm -Rf checkpoint; fi && \
git clone -b release-1.8.1 --depth 1 https://github.com/google/googletest.git && \
export GTEST=$PWD/googletest && \
export GTEST_BUILD=/usr/build/googletest && \
git clone -b develop --depth 1 https://github.com/DARMA-tasking/checkpoint.git && \
export CHECKPOINT=$PWD/checkpoint && \
export CHECKPOINT_BUILD=/usr/build/checkpoint && \
git clone -b master --depth 1 https://github.com/DARMA-tasking/detector.git && \
export DETECTOR=$PWD/detector && \
export DETECTOR_BUILD=/usr/build/detector && \
export VT=$PWD/vt && \
export VT_BUILD=/usr/build/vt && \
mkdir -p $DETECTOR_BUILD && \
mkdir -p $GTEST_BUILD && \
mkdir -p $VT_BUILD && \
mkdir -p $CHECKPOINT_BUILD && \
echo $SOURCE_COMMIT && \
cd $GTEST_BUILD && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=$GTEST_BUILD/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC $GTEST && \
make && \
make install && \
cd $DETECTOR_BUILD && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=$DETECTOR_BUILD/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC $DETECTOR && \
make && \
make install && \
cd $CHECKPOINT_BUILD && \
mkdir build && \
cd build && \
cmake -DCMAKE_INSTALL_PREFIX=$CHECKPOINT_BUILD/install -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -Ddetector_DIR=$DETECTOR_BUILD/install $CHECKPOINT && \
make && \
make install && \
cd $VT_BUILD && \
mkdir build && \
cd build && \
uname -p && \
uname && \
cmake -GNinja -Dvt_lb_enabled=$LB_ENABLED -Dvt_trace_enabled=$TRACE_ENABLED -DMPI_EXTRA_FLAGS=--allow-run-as-root -DVT_NO_BUILD_EXAMPLES=1 -Dgtest_DIR=$GTEST_BUILD/install -DGTEST_ROOT=$GTEST_BUILD/install -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DMPI_C_COMPILER=mpicc -DMPI_CXX_COMPILER=mpicxx -Ddetector_DIR=$DETECTOR_BUILD/install -DCMAKE_PREFIX_PATH="$GTEST_BUILD/install;/lib/x86_64-linux-gnu/" -Dcheckpoint_DIR=$CHECKPOINT_BUILD/install $VT && \
ninja && \
ninja install && \
ninja test

COPY $DETECTOR_BUILD/ $DETECTOR_BUILD
COPY $CHECKPOINT_BUILD/ $CHECKPOINT_BUILD
COPY $VT_BUILD/ $VT_BUILD
COPY $GTEST_BUILD/ $GTEST_BUILD
8 changes: 8 additions & 0 deletions cmake/define_build_types.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ else()
set(vt_feature_cmake_bit_check_overflow "0")
endif()

if (${vt_fcontext_enabled})
message(STATUS "Building VT with fcontext (ULT) enabled")
set(vt_feature_cmake_fcontext "1")
else()
message(STATUS "Building VT with fcontext (ULT) disabled")
set(vt_feature_cmake_fcontext "0")
endif()

set(vt_feature_cmake_no_feature "0")
set(vt_feature_cmake_production "0")

Expand Down
27 changes: 20 additions & 7 deletions cmake/link_vt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function(link_target_with_vt)
LINK_CHECKPOINT
LINK_DETECTOR
LINK_CLI11
LINK_DL
)
set(
multiValueArg
Expand Down Expand Up @@ -76,25 +77,37 @@ function(link_target_with_vt)
endif()
endif()

if (NOT DEFINED ARG_LINK_MPI AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_MPI)
if (NOT DEFINED ARG_LINK_DL AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_DL)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: MPI=${ARG_LINK_MPI}")
message(STATUS "link_target_with_vt: dl=${ARG_LINK_DL}")
endif()

target_link_libraries(
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} MPI::MPI_CXX
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} ${CMAKE_DL_LIBS}
)
endif()

if (NOT DEFINED ARG_LINK_FCONTEXT AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_FCONTEXT)
if (NOT DEFINED ARG_LINK_MPI AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_MPI)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: fcontext=${ARG_LINK_FCONTEXT}")
message(STATUS "link_target_with_vt: MPI=${ARG_LINK_MPI}")
endif()

target_link_libraries(
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} ${FCONTEXT_LIBRARY}
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} MPI::MPI_CXX
)
endif()

if (${vt_fcontext_enabled})
if (NOT DEFINED ARG_LINK_FCONTEXT AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_FCONTEXT)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: fcontext=${ARG_LINK_FCONTEXT}")
endif()
target_link_libraries(
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} ${FCONTEXT_LIBRARY}
)
endif()
endif()

if (NOT DEFINED ARG_LINK_ZLIB AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_ZLIB)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: zlib=${ARG_LINK_ZLIB}")
Expand All @@ -108,7 +121,7 @@ function(link_target_with_vt)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: fmt=${ARG_LINK_FMT}")
endif()
target_compile_definitions(${ARG_TARGET} PUBLIC FMT_HEADER_ONLY=1)
target_compile_definitions(${ARG_TARGET} PUBLIC FMT_HEADER_ONLY=1 FMT_USE_USER_DEFINED_LITERALS=0)
target_include_directories(${ARG_TARGET} PUBLIC
$<BUILD_INTERFACE:${PROJECT_BASE_DIR}/lib/fmt>
$<INSTALL_INTERFACE:include/fmt>
Expand Down
2 changes: 1 addition & 1 deletion cmake/test_vt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function(run_executable_with_mpi)
COMMAND
${MPI_RUN_COMMAND}
${MPI_NUMPROC_FLAG} ${ARG_TARGET_NPROC}
${MPI_PRE_FLAGS}
${MPI_PRE_FLAGS} ${MPI_EXTRA_FLAGS}
${ARG_WRAPPER_EXECUTABLE} ${ARG_WRAPPER_ARGS} ./${ARG_TARGET_EXECUTABLE}
${MPI_EPI_FLAGS} ${ARG_TARGET_ARGS}
)
Expand Down
1 change: 1 addition & 0 deletions cmake_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@
#define vt_feature_cmake_cons_multi_idx @vt_feature_cmake_cons_multi_idx@
#define vt_feature_cmake_priority_bits_level @vt_feature_cmake_priority_bits_level@
#define vt_feature_cmake_priorities @vt_feature_cmake_priorities@
#define vt_feature_cmake_fcontext @vt_feature_cmake_fcontext@
2 changes: 1 addition & 1 deletion examples/collection_insert.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int main(int argc, char** argv) {
for (int i = range.x()/2; i < range.x(); i++) {
proxy[i].insert(i % 2);
}
proxy.finishedInserting([proxy]{
proxy.finishedInserting([]{
::fmt::print("insertions are finished2\n");
});
});
Expand Down
3 changes: 1 addition & 2 deletions examples/jacobi2d_vt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ struct LinearPb2DJacobi : vt::Collection<LinearPb2DJacobi,Index2D> {
size_t numObjsX_ = 1, numObjsY_ = 1;
size_t numRowsPerObject_ = default_nrow_object;
size_t maxIter_ = 5;
double normRes_ = 0.0;

public:

Expand All @@ -106,7 +105,7 @@ struct LinearPb2DJacobi : vt::Collection<LinearPb2DJacobi,Index2D> {
msgReceived_(0), totalReceive_(0),
numObjsX_(1), numObjsY_(1),
numRowsPerObject_(default_nrow_object),
maxIter_(5), normRes_(0.0)
maxIter_(5)
{ }


Expand Down
2 changes: 1 addition & 1 deletion examples/rdma_channel_sync.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ int main(int argc, char** argv) {
num_nodes = theContext()->getNumNodes();

if (num_nodes != 4) {
CollectiveOps::output("requires exactly 4 nodes");
fmt::print("requires exactly 4 nodes\n");
CollectiveOps::finalize();
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/rdma_collective.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ int main(int argc, char** argv) {
num_nodes = theContext()->getNumNodes();

if (num_nodes < 4) {
CollectiveOps::output("requires exactly 4 nodes");
fmt::print("requires exactly 4 nodes\n");
CollectiveOps::finalize();
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion examples/rdma_simple_put.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ int main(int argc, char** argv) {
num_nodes = theContext()->getNumNodes();

if (num_nodes != 4) {
CollectiveOps::output("requires exactly 4 nodes");
fmt::print("requires exactly 4 nodes\n");
CollectiveOps::finalize();
return 0;
}
Expand Down
Loading

0 comments on commit aaa1110

Please sign in to comment.