Skip to content

Commit

Permalink
#2046: build: remove detector as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
lifflander authored and cz4rs committed Mar 30, 2023
1 parent 1fefa6d commit 254f00a
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 103 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ build
transport
lib/*-build
lib/checkpoint
lib/detector
lib/googletest
lib/kokkos
.emacs.desktop
Expand Down
32 changes: 0 additions & 32 deletions ci/build_cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ source_dir=${1}
build_dir=${2}

# Dependency versions, when fetched via git.
detector_rev=master
checkpoint_rev=develop

if test "${VT_DOXYGEN_ENABLED:-0}" -eq 1
Expand Down Expand Up @@ -38,40 +37,11 @@ fi
mkdir -p "${build_dir}"
pushd "${build_dir}"

if test -d "detector"
then
rm -Rf detector
fi

if test -d "checkpoint"
then
rm -Rf checkpoint
fi

if test -d "${source_dir}/lib/detector"
then
{ echo "Detector already in lib... not downloading, building, and installing"; } 2>/dev/null
else
if test "${VT_DOXYGEN_ENABLED:-0}" -eq 1
then
cd "${source_dir}/lib"
git clone -b "${detector_rev}" --depth 1 https://github.com/DARMA-tasking/detector.git
cd -
else
git clone -b "${detector_rev}" --depth 1 https://github.com/DARMA-tasking/detector.git
export DETECTOR=$PWD/detector
export DETECTOR_BUILD=${build_dir}/detector
mkdir -p "$DETECTOR_BUILD"
cd "$DETECTOR_BUILD"
mkdir build
cd build
cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_INSTALL_PREFIX="$DETECTOR_BUILD/install" \
"$DETECTOR"
cmake --build . ${dashj} --target install
fi
fi

if test -d "${source_dir}/lib/checkpoint"
then
{ echo "Checkpoint already in lib... not downloading, building, and installing"; } 2>/dev/null
Expand All @@ -91,7 +61,6 @@ else
cd build
cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_INSTALL_PREFIX="$CHECKPOINT_BUILD/install" \
-Ddetector_DIR="$DETECTOR_BUILD/install" \
"$CHECKPOINT"
cmake --build . ${dashj} --target install
fi
Expand Down Expand Up @@ -144,7 +113,6 @@ cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_CXX_COMPILER="${CXX:-c++}" \
-DCMAKE_C_COMPILER="${CC:-cc}" \
-DCMAKE_EXE_LINKER_FLAGS="${CMAKE_EXE_LINKER_FLAGS:-}" \
-Ddetector_DIR="$DETECTOR_BUILD/install" \
-Dcheckpoint_DIR="$CHECKPOINT_BUILD/install" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH:-}" \
-DCMAKE_INSTALL_PREFIX="$VT_BUILD/install" \
Expand Down
4 changes: 1 addition & 3 deletions ci/build_vt_sample.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ then
export VT=${source_dir}
export VT_BUILD=${build_dir}/vt
export VT_INSTALL=${VT_BUILD}/install
export DETECTOR=${build_dir}/detector
export CHECKPOINT=${DETECTOR}/build/checkpoint
export CHECKPOINT=${build_dir}/checkpoint/install

cd "$VT_BUILD"

Expand All @@ -45,7 +44,6 @@ then
cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-Dvt_DIR="${VT}" \
-Dcheckpoint_DIR="${CHECKPOINT}" \
-Ddetector_DIR="${DETECTOR}" \
-Dkokkos_DISABLE:BOOL=1 \
-Dkokkos_kernels_DISABLE:BOOL=1 \
-Dvt_trace_only="1" \
Expand Down
31 changes: 0 additions & 31 deletions ci/ctest_build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ source_dir=${1}
build_dir=${2}

# Dependency versions, when fetched via git.
detector_rev=master
checkpoint_rev=develop

if test "${VT_DOXYGEN_ENABLED:-0}" -eq 1
Expand Down Expand Up @@ -40,40 +39,11 @@ fi
mkdir -p "${build_dir}"
pushd "${build_dir}"

if test -d "detector"
then
rm -Rf detector
fi

if test -d "checkpoint"
then
rm -Rf checkpoint
fi

if test -d "${source_dir}/lib/detector"
then
{ echo "Detector already in lib... not downloading, building, and installing"; } 2>/dev/null
else
if test "${VT_DOXYGEN_ENABLED:-0}" -eq 1
then
cd "${source_dir}/lib"
git clone -b "${detector_rev}" --depth 1 https://github.com/DARMA-tasking/detector.git
cd -
else
git clone -b "${detector_rev}" --depth 1 https://github.com/DARMA-tasking/detector.git
export DETECTOR=$PWD/detector
export DETECTOR_BUILD=${build_dir}/detector
mkdir -p "$DETECTOR_BUILD"
cd "$DETECTOR_BUILD"
mkdir build
cd build
cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_INSTALL_PREFIX="$DETECTOR_BUILD/install" \
"$DETECTOR"
cmake --build . ${dashj} --target install
fi
fi

if test -d "${source_dir}/lib/checkpoint"
then
{ echo "Checkpoint already in lib... not downloading, building, and installing"; } 2>/dev/null
Expand All @@ -93,7 +63,6 @@ else
cd build
cmake -G "${CMAKE_GENERATOR:-Ninja}" \
-DCMAKE_INSTALL_PREFIX="$CHECKPOINT_BUILD/install" \
-Ddetector_DIR="$DETECTOR_BUILD/install" \
"$CHECKPOINT"
cmake --build . ${dashj} --target install
fi
Expand Down
1 change: 0 additions & 1 deletion ci/ctest_job_script.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ set(configureOpts
"-DCMAKE_CXX_COMPILER=$ENV{CXX}"
"-DCMAKE_C_COMPILER=$ENV{CC}"
"-DCMAKE_EXE_LINKER_FLAGS=$ENV{CMAKE_EXE_LINKER_FLAGS}"
"-Ddetector_DIR=$ENV{DETECTOR_BUILD}/install"
"-Dcheckpoint_DIR=$ENV{CHECKPOINT_BUILD}/install"
"-DCMAKE_PREFIX_PATH=$ENV{CMAKE_PREFIX_PATH}"
"-DCMAKE_INSTALL_PREFIX=$ENV{VT_BUILD}/install"
Expand Down
10 changes: 0 additions & 10 deletions cmake/link_vt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function(link_target_with_vt)
LINK_ZLIB
LINK_FCONTEXT
LINK_CHECKPOINT
LINK_DETECTOR
LINK_CLI11
LINK_DL
LINK_ZOLTAN
Expand Down Expand Up @@ -194,15 +193,6 @@ function(link_target_with_vt)
)
endif()

if (NOT DEFINED ARG_LINK_DETECTOR AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_DETECTOR)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: detector=${ARG_LINK_DETECTOR}")
endif()
target_link_libraries(
${ARG_TARGET} PUBLIC ${ARG_BUILD_TYPE} vt::lib::detector
)
endif()

if (NOT DEFINED ARG_LINK_CLI11 AND ${ARG_DEFAULT_LINK_SET} OR ARG_LINK_CLI11)
if (${ARG_DEBUG_LINK})
message(STATUS "link_target_with_vt: cli11=${ARG_LINK_CLI11}")
Expand Down
9 changes: 0 additions & 9 deletions cmake/load_local_packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@

include(cmake/local_package.cmake)

if (EXISTS "${PROJECT_LIB_DIR}/detector")
add_subdirectory(${PROJECT_LIB_DIR}/detector)
else()
# require directories for these packages
require_pkg_directory(detector "VT detector library")
# find these required packages locally
find_package_local(detector "${detector_DIR}" detector)
endif()

if (EXISTS "${PROJECT_LIB_DIR}/checkpoint")
add_subdirectory(${PROJECT_LIB_DIR}/checkpoint)
else()
Expand Down
2 changes: 1 addition & 1 deletion cmake/load_packages.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
get_directory_property(projHasParent PARENT_DIRECTORY)

# Local packages that VT depends on (detector/checkpoint)
# Local packages that VT depends on: checkpoint
include(cmake/load_local_packages.cmake)

# MPI package
Expand Down
5 changes: 0 additions & 5 deletions cmake/vtConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ include(CMakeFindDependencyMacro)

find_dependency(MPI REQUIRED)

if (@detector_PACKAGE_LOADED@)
set (detector_DIR @detector_DIR@)
find_dependency(detector REQUIRED HINTS @detector_DIR@)
endif()

if (@checkpoint_PACKAGE_LOADED@)
set (checkpoint_DIR @checkpoint_DIR@)
find_dependency(checkpoint REQUIRED HINTS @checkpoint_DIR@)
Expand Down
2 changes: 1 addition & 1 deletion docs/Doxyfile.in-mcss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ M_LINKS_NAVBAR1 = \
M_LINKS_NAVBAR2 = \
"annotated" \
"files" \
"<a href=\"https://github.com/DARMA-tasking/vt\">GitHub</a> <a href=\"https://github.com/DARMA-tasking/checkpoint\">Checkpoint</a> <a href=\"https://github.com/DARMA-tasking/detector\">Detector</a> <a href=\"https://github.com/DARMA-tasking/LB-analysis-framework\">LBAF</a> <a href=\"https://github.com/DARMA-tasking/checkpoint-member-analyzer\">Checkpoint Analyzer</a> <a href=\"https://github.com/DARMA-tasking/DARMA-tasking.github.io\">Documentation</a>"
"<a href=\"https://github.com/DARMA-tasking/vt\">GitHub</a> <a href=\"https://github.com/DARMA-tasking/checkpoint\">Checkpoint</a> <a href=\"https://github.com/DARMA-tasking/LB-analysis-framework\">LBAF</a> <a href=\"https://github.com/DARMA-tasking/checkpoint-member-analyzer\">Checkpoint Analyzer</a> <a href=\"https://github.com/DARMA-tasking/DARMA-tasking.github.io\">Documentation</a>"


ALIASES += \
Expand Down
10 changes: 4 additions & 6 deletions docs/md/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,27 @@ external dependencies come bundled with \vt for ease of compiling.
To build \vt, one must obtain the following dependencies:

\subsection required-deps Required
- detector, (*vt* ecosystem)
- checkpoint, (*vt* ecosystem)
- MPI (mpich/openmpi/mvapich/IBM Spectrum MPI/Cray MPICH/etc.)

\subsection automatic-build-deps Automatically build dependencies

Assuming MPI is installed and accessible via CC/CXX, the only other dependencies
that are required are checkpoint and detector. The easiest way to get these
built are to clone them inside `vt/lib`:
Assuming MPI is installed and accessible via CC/CXX, the only other dependency
that is required is checkpoint. The easiest way to get these
built are to clone it inside `vt/lib`:

```bash
$ git clone git@github.com:DARMA-tasking/vt
$ cd vt/lib
$ git clone git@github.com:DARMA-tasking/checkpoint
$ git clone git@github.com:DARMA-tasking/detector
```

With these in `vt/lib`, cmake will automatically build them and stitch them into
*vt*'s linking process.

\subsection use-cmake-directly-vars Using cmake directly

One may use `cmake` as normal on *vt*, with checkpoint and detector cloned in
One may use `cmake` as normal on *vt*, with checkpoint cloned in
`vt/lib` to compile them all together as explained above. The following are some
custom configuration build options that can be provided to `cmake` to change the
build configuration:
Expand Down
1 change: 0 additions & 1 deletion docs/md/mainpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ supercomputer architectures. The main public repositories are:
| ---------------------------------- | -------------------------------------------------------------- | -------------------------- |
| HPC Runtime | @m_span{m-text m-success} DARMA/vt @m_endspan (Virtual Transport) | [Github](https://github.com/DARMA-tasking/vt) |
| HPC Serialization | @m_span{m-text m-success} DARMA/checkpoint @m_endspan (Checkpointing and Serialization Library) | [Github](https://github.com/DARMA-tasking/checkpoint) |
| C++ trait detection and checking | @m_span{m-text m-success} DARMA/detector @m_endspan (C++ trait detector) | [Github](https://github.com/DARMA-tasking/detector) |
| HPC LB Simulator | @m_span{m-text m-success} DARMA/LBAF @m_endspan (Load Balancing Analysis Framework) | [Github](https://github.com/DARMA-tasking/LB-analysis-framework) |
| HPC Serializer compiler analyzer | @m_span{m-text m-success} DARMA/checkpoint-analyzer @m_endspan (Static verification of serializers) | [Github](https://github.com/DARMA-tasking/checkpoint-member-analyzer) |
| Toolkit documentation | @m_span{m-text m-success} DARMA/docs @m_endspan | [Docs](https://github.com/DARMA-tasking/DARMA-tasking.github.io) |
Expand Down
2 changes: 1 addition & 1 deletion src/vt/topos/index/traits/traits.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
#include <functional>
#include <string>

#include "detector_headers.h"
#include "checkpoint/detector.h"

namespace vt { namespace index {

Expand Down
2 changes: 1 addition & 1 deletion src/vt/vrt/collection/traits/coll_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include "vt/config.h"

#include "detector_headers.h"
#include "checkpoint/detector.h"

namespace vt { namespace vrt { namespace collection {

Expand Down

0 comments on commit 254f00a

Please sign in to comment.