Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add mgard dependency to spack builds #3753

Merged
merged 4 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:

runs-on: ubuntu-20.04
container:
image: ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-${{ matrix.compiler }}
image: ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-${{ matrix.compiler }}
options: --shm-size=1g
env:
GH_YML_JOBNAME: ${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.shared == 'static' && '-static' || ''}}-${{ matrix.parallel }}
Expand Down
1 change: 0 additions & 1 deletion .shellcheck_exclude_paths
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ scripts/ci/circle/postCDashStatus.sh
scripts/ci/circle/run.sh
scripts/ci/gh-actions/check-branch-name.sh
scripts/ci/gh-actions/get-changed-files.sh
scripts/ci/gh-actions/linux-setup.sh
scripts/ci/gh-actions/macos-setup.sh
scripts/ci/gh-actions/run.sh
scripts/ci/scripts/github-prs-to-gitlab.sh
Expand Down
2 changes: 1 addition & 1 deletion bindings/CXX11/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ add_library(adios2_cxx11

set_property(TARGET adios2_cxx11 PROPERTY EXPORT_NAME cxx11)
set_property(TARGET adios2_cxx11 PROPERTY OUTPUT_NAME adios2${ADIOS2_LIBRARY_SUFFIX}_cxx11)
target_link_libraries(adios2_cxx11 PRIVATE adios2_core adios2::thirdparty::pugixml)
target_link_libraries(adios2_cxx11 PRIVATE adios2_core)
target_compile_features(adios2_cxx11 INTERFACE ${ADIOS2_CXX11_FEATURES})

target_include_directories(adios2_cxx11
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang10-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE)

set(dashboard_cache "
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang10-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE)

set(dashboard_cache "
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
Expand Down
6 changes: 5 additions & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang6-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE)

set(dashboard_cache "
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MGARD:BOOL=OFF
ADIOS2_USE_MPI:BOOL=ON
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand All @@ -37,6 +38,9 @@ MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe
MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS}
")

# We have a dedicated build for this setup without MPI
set(CTEST_TEST_ARGS EXCLUDE ".Serial$")

set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
3 changes: 2 additions & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-clang6-serial.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE)

set(dashboard_cache "
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_Blosc:BOOL=ON
ADIOS2_USE_BZip2:BOOL=ON
ADIOS2_USE_DataMan:BOOL=ON
ADIOS2_USE_Fortran:BOOL=ON
ADIOS2_USE_HDF5:BOOL=ON
ADIOS2_USE_MGARD:BOOL=OFF
ADIOS2_USE_MPI:BOOL=OFF
ADIOS2_USE_Python:BOOL=ON
ADIOS2_USE_SZ:BOOL=ON
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/cmake/ci-ubuntu20.04-gcc10-mpich.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS}
")

set(CTEST_TEST_ARGS
EXCLUDE "Engine.BPEngineTest.SzComplex.MPI|Engine.BPEngineTest.ZfpComplex.MPI")
EXCLUDE "Engine.BPEngineTest.SzComplex.MPI|Engine.BPEngineTest.ZfpComplex.MPI|.Serial$")

set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/cmake/ci-ubuntu20.04-gcc10-ompi.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe
MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS}
")

# We have a dedicated build for this setup without MPI
set(CTEST_TEST_ARGS EXCLUDE ".Serial$")

set(CTEST_CMAKE_GENERATOR "Ninja")
list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}")
include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake)
15 changes: 2 additions & 13 deletions scripts/ci/gh-actions/linux-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -ex
export CI_ROOT_DIR="${GITHUB_WORKSPACE}/.."
export CI_SOURCE_DIR="${GITHUB_WORKSPACE}/source"

declare -r local_scripts_dir="$(dirname -- $0)/config"
local_scripts_dir="$(dirname -- "$0")/config"
readonly local_scripts_dir

echo "**********Install dependencies Begin**********"

Expand All @@ -18,15 +19,3 @@ find "$local_scripts_dir" -type f -name '*.sh' -perm /a=x -exec ./{} \;
find "$local_scripts_dir" -type f -name '*.cmake' -exec cmake --trace -VV -P {} \;

echo "**********Install dependencies End**********"

SETUP_SCRIPT=${CI_SOURCE_DIR}/scripts/ci/setup/ci-${GH_YML_JOBNAME}.sh

if [ -x "${SETUP_SCRIPT}" ]
then
echo "**********Setup Begin**********"
echo "${SETUP_SCRIPT}"
"${SETUP_SCRIPT}"
echo "**********Setup End**********"
fi

exit 0
19 changes: 5 additions & 14 deletions scripts/ci/gh-actions/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ then
else
export CI_BUILD_NAME="${GITHUB_REF_NAME}_${GH_YML_JOBNAME}"
fi

if [[ "${GH_YML_BASE_OS}" =~ "Windows" ]]
then
export CI_ROOT_DIR="${GITHUB_WORKSPACE//\\//}"
Expand Down Expand Up @@ -75,24 +76,14 @@ then
export OMPI_MCA_btl_base_warn_component_unused=0
export OMPI_MCA_btl_vader_single_copy_mechanism=none

# Force only shared mem backends
export OMPI_MCA_btl="self,vader"

# Workaround for open-mpi/ompi#7516
export OMPI_MCA_gds=hash

# Workaround for open-mpi/ompi#5798
export OMPI_MCA_btl_vader_backing_directory="/tmp"

# Enable overscription in OpenMPI
export OMPI_MCA_rmaps_base_oversubscribe=1
export OMPI_MCA_hwloc_base_binding_policy=none
fi

# Disable OpenMPI rsh launching
export OMPI_MCA_plm_rsh_agent=false

# Disable cuda warnings
export OMPI_MCA_opal_warn_on_missing_libcuda=0
if [[ "${GH_YML_MATRIX_PARALLEL}" =~ ompi ]]
then
export HYDRA_LAUNCHER=fork
fi

# Make sure staging tests use localhost
Expand Down
43 changes: 30 additions & 13 deletions scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-base
Original file line number Diff line number Diff line change
@@ -1,43 +1,60 @@
# vim: ft=dockerfile
FROM ecpe4s/ubuntu20.04:23.02
FROM ecpe4s/ubuntu20.04:23.05

COPY packages.yaml /etc/spack/packages.yaml
COPY specs.yaml /tmp/specs.yaml

# Install Base specs
RUN . /spack/share/spack/setup-env.sh && \
export ADIOS_SPEC_NO_MPI="adios2~mpi" && \
export ADIOS_SPEC_OPENMPI="adios2+mpi^openmpi@4.1.4" && \
export ADIOS_SPEC_MPICH="adios2+mpi^mpich device=ch3 netmod=tcp" && \
spack env create adios2-ci-serial /tmp/specs.yaml && \
export ADIOS_SPEC_OPENMPI="adios2+mpi^openmpi" && \
export ADIOS_SPEC_MPICH="adios2+mpi^mpich" && \
spack config add "config:checksum:false" && \
spack config add "config:build_jobs:$(nproc)" && \
spack config add "concretizer:unify:false" && \
spack env create adios2-ci-serial && \
spack -e adios2-ci-serial add ${ADIOS_SPEC_NO_MPI} && \
spack -e adios2-ci-serial concretize && \
spack -e adios2-ci-serial install \
--include-build-deps \
--no-check-signature \
--fail-fast \
--only dependencies \
-j$(grep -c '^processor' /proc/cpuinfo) && \
spack env create adios2-ci-ompi /tmp/specs.yaml && \
--only dependencies && \
spack env create adios2-ci-ompi && \
spack -e adios2-ci-ompi add ${ADIOS_SPEC_OPENMPI} && \
spack -e adios2-ci-ompi concretize && \
spack -e adios2-ci-ompi install \
--include-build-deps \
--no-check-signature \
--fail-fast \
--only dependencies \
-j$(grep -c '^processor' /proc/cpuinfo) && \
spack env create adios2-ci-mpich /tmp/specs.yaml && \
--only dependencies && \
spack env create adios2-ci-mpich && \
spack -e adios2-ci-mpich add ${ADIOS_SPEC_MPICH} && \
spack -e adios2-ci-mpich concretize && \
spack -e adios2-ci-mpich install \
--include-build-deps \
--no-check-signature \
--fail-fast \
--only dependencies \
-j$(grep -c '^processor' /proc/cpuinfo) && \
--only dependencies && \
spack clean -a && \
echo "source /spack/share/spack/setup-env.sh" >> /etc/profile.d/zz-spack.sh

# Install deps
RUN pip install shyaml
COPY specs.yaml /tmp/specs.yaml
RUN . /spack/share/spack/setup-env.sh && \
spack env create adios2-ci-deps /tmp/specs.yaml && \
vicentebolea marked this conversation as resolved.
Show resolved Hide resolved
spack -e adios2-ci-deps install \
--no-check-signature \
--include-build-deps \
--fail-fast && \
spack -e adios2-ci-serial add $(shyaml get-values spack.specs < /tmp/specs.yaml) && \
vicentebolea marked this conversation as resolved.
Show resolved Hide resolved
spack -e adios2-ci-serial concretize && \
spack -e adios2-ci-ompi add $(shyaml get-values spack.specs < /tmp/specs.yaml) && \
spack -e adios2-ci-ompi concretize && \
spack -e adios2-ci-mpich add $(shyaml get-values spack.specs < /tmp/specs.yaml) && \
spack -e adios2-ci-mpich concretize && \
spack clean -a

### Other missing packages (compared to el8 base):
RUN apt-get update && apt-get install -y \
ccache \
Expand Down
5 changes: 3 additions & 2 deletions scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-clang
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-base
FROM ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-base
ARG CLANG_VERSION=10

RUN apt-get update && apt-get install -y \
clang-${CLANG_VERSION} && \
clang-${CLANG_VERSION} \
libomp-dev && \
rm -rf /var/lib/apt/lists/*
2 changes: 1 addition & 1 deletion scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-gcc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-base
FROM ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-base
ARG GCC_VERSION=8

RUN apt-get update && apt-get install -y \
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci/images/Dockerfile.ci-spack-ubuntu20.04-intel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-base
FROM ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-base

RUN wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | tee /usr/share/keyrings/oneapi-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | tee /etc/apt/sources.list.d/oneAPI.list && \
Expand Down
28 changes: 14 additions & 14 deletions scripts/ci/images/build-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
set -ex

# Build the base image
docker build --rm -f ./Dockerfile.ci-spack-ubuntu20.04-base -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-base .
docker build --rm -f ./Dockerfile.ci-spack-ubuntu20.04-base -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-base .

# Which is also the gcc11 image
docker tag ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-base ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc11
docker tag ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-base ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc11

# Build the gcc8, gcc9, and gcc10 images
docker build --rm --build-arg GCC_VERSION=8 -f ./Dockerfile.ci-spack-ubuntu20.04-gcc -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc8 .
docker build --rm --build-arg GCC_VERSION=9 -f ./Dockerfile.ci-spack-ubuntu20.04-gcc -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc9 .
docker build --rm --build-arg GCC_VERSION=10 -f ./Dockerfile.ci-spack-ubuntu20.04-gcc -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc10 .
docker build --rm --build-arg GCC_VERSION=8 -f ./Dockerfile.ci-spack-ubuntu20.04-gcc -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc8 .
docker build --rm --build-arg GCC_VERSION=9 -f ./Dockerfile.ci-spack-ubuntu20.04-gcc -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc9 .
docker build --rm --build-arg GCC_VERSION=10 -f ./Dockerfile.ci-spack-ubuntu20.04-gcc -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc10 .

# Build the clang6 and clang10 images
docker build --rm --build-arg CLANG_VERSION=6.0 -f ./Dockerfile.ci-spack-ubuntu20.04-clang -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-clang6 .
docker build --rm --build-arg CLANG_VERSION=10 -f ./Dockerfile.ci-spack-ubuntu20.04-clang -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-clang10 .
docker build --rm --build-arg CLANG_VERSION=6.0 -f ./Dockerfile.ci-spack-ubuntu20.04-clang -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-clang6 .
docker build --rm --build-arg CLANG_VERSION=10 -f ./Dockerfile.ci-spack-ubuntu20.04-clang -t ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-clang10 .

# Push images to github container registry
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-base
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc8
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc9
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc10
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-gcc11
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-clang6
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-clang10
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-base
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc8
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc9
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc10
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-gcc11
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-clang6
docker push ghcr.io/ornladios/adios2:ci-spack-ubuntu20.04-tmp-clang10
8 changes: 5 additions & 3 deletions scripts/ci/images/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ packages:
all:
target: [haswell]
adios2:
require: +blosc+bzip2+zfp+sz+png+sst+dataman+ssc+hdf5+python+fortran
cmake:
version: [3.24]
require: '+blosc+bzip2+zfp+sz+png+sst+dataman+ssc+hdf5+python+fortran'
mpich:
require: 'device=ch3 netmod=tcp'
openmpi:
require: '@4.1'
7 changes: 3 additions & 4 deletions scripts/ci/images/specs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
spack:
view: true
config:
checksum: false
concretizer:
unify: false
specs:
# https://github.com/ornladios/ADIOS2/issues/3754
- mgard@2023-01-10
16 changes: 9 additions & 7 deletions source/adios2/toolkit/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@

add_executable(remote_server ./remote_server.cpp remote_common.cpp)

target_link_libraries(remote_server
PUBLIC EVPath::EVPath
PUBLIC adios2_core adios2sys
PRIVATE adios2::thirdparty::pugixml $<$<PLATFORM_ID:Windows>:shlwapi>)
target_include_directories(remote_server PRIVATE ${PROJECT_BINARY_DIR})
target_link_libraries(remote_server PUBLIC EVPath::EVPath adios2_core adios2sys
PRIVATE $<$<PLATFORM_ID:Windows>:shlwapi>)

get_property(pugixml_headers_path
vicentebolea marked this conversation as resolved.
Show resolved Hide resolved
TARGET pugixml
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)

target_include_directories(remote_server PRIVATE ${PROJECT_BINARY_DIR} ${pugixml_headers_path})

set_property(TARGET remote_server PROPERTY OUTPUT_NAME remote_server${ADIOS2_EXECUTABLE_SUFFIX})
install(TARGETS remote_server EXPORT adios2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime
)


15 changes: 13 additions & 2 deletions source/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,19 @@ configure_file(
add_executable(bpls ./bpls/bpls.cpp)
target_link_libraries(bpls
PUBLIC adios2_core adios2sys
PRIVATE adios2::thirdparty::pugixml $<$<PLATFORM_ID:Windows>:shlwapi>)
target_include_directories(bpls PRIVATE ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}/bindings/C)
PRIVATE $<$<PLATFORM_ID:Windows>:shlwapi>)

get_property(pugixml_headers_path
TARGET pugixml
PROPERTY INTERFACE_INCLUDE_DIRECTORIES
)

target_include_directories(bpls PRIVATE
${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/bindings/C
${pugixml_headers_path}
)

set_property(TARGET bpls PROPERTY OUTPUT_NAME bpls${ADIOS2_EXECUTABLE_SUFFIX})
install(TARGETS bpls EXPORT adios2
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT adios2_tools-runtime
Expand Down
Loading