From e93e63ca9b504e7378cf8710643fa23b3eb4e071 Mon Sep 17 00:00:00 2001 From: Chuck Atkins Date: Thu, 7 May 2020 00:08:34 -0400 Subject: [PATCH] ci: Add olcf gitlab --- .gitlab/gitlab-ci-olcf.yml | 30 +++++++++++++++++ scripts/ci/cmake/ci-ascent-gcc.cmake | 39 ++++++++++++++++++++++ scripts/ci/cmake/ci-ascent-xl.cmake | 36 +++++++++++++++++++++ scripts/ci/gitlab-ci/run.sh | 48 ++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 .gitlab/gitlab-ci-olcf.yml create mode 100644 scripts/ci/cmake/ci-ascent-gcc.cmake create mode 100644 scripts/ci/cmake/ci-ascent-xl.cmake create mode 100755 scripts/ci/gitlab-ci/run.sh diff --git a/.gitlab/gitlab-ci-olcf.yml b/.gitlab/gitlab-ci-olcf.yml new file mode 100644 index 0000000000..d2fd3abbc2 --- /dev/null +++ b/.gitlab/gitlab-ci-olcf.yml @@ -0,0 +1,30 @@ +stages: + - full + +.all-steps: + stage: full + variables: + GITLAB_SITE: "OLCF GitLab" + CMAKE_ENV_MODULE: "cmake" + script: + - bash scripts/ci/gitlab-ci/run.sh update + - bash scripts/ci/gitlab-ci/run.sh configure + - bash scripts/ci/gitlab-ci/run.sh build + - bash scripts/ci/gitlab-ci/run.sh test + +ascent-xl: + extends: + - .all-steps + tags: [nobatch] + +ascent-gcc: + extends: + - .all-steps + tags: [nobatch] + +#ascent-xl-smpi: +# extends: +# - .all-steps +# tags: [batch] +# variables: +# SCHEDULER_PARAMETERS: "-P CSC303 -W 1:00 -nnodes 1" diff --git a/scripts/ci/cmake/ci-ascent-gcc.cmake b/scripts/ci/cmake/ci-ascent-gcc.cmake new file mode 100644 index 0000000000..9e67411f6e --- /dev/null +++ b/scripts/ci/cmake/ci-ascent-gcc.cmake @@ -0,0 +1,39 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(purge) +env_module(load git) +env_module(load gcc/8.1.1) +env_module(load hdf5) +env_module(load libfabric) +env_module(load python/3.7.0) +env_module(load zfp) +env_module(load zeromq) + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) +set(ENV{CFLAGS} "-Werror -Wno-error=builtin-declaration-mismatch") +set(ENV{CXXFLAGS} "-Werror -Wno-error=builtin-declaration-mismatch") +set(ENV{FFLAGS} "-Werror -Wno-error=builtin-declaration-mismatch") + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=OFF +ADIOS2_USE_Blosc:BOOL=OFF +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=OFF +ADIOS2_USE_SST:BOOL=ON +ADIOS2_USE_SZ:BOOL=OFF +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=OFF +") + +set(NCPUS 4) +set(CTEST_TEST_ARGS PARALLEL_LEVEL 8) +set(CTEST_CMAKE_GENERATOR "Unix Makefiles") +list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}") +include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake) diff --git a/scripts/ci/cmake/ci-ascent-xl.cmake b/scripts/ci/cmake/ci-ascent-xl.cmake new file mode 100644 index 0000000000..fec3729755 --- /dev/null +++ b/scripts/ci/cmake/ci-ascent-xl.cmake @@ -0,0 +1,36 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(purge) +env_module(load git) +env_module(load xl) +env_module(load hdf5) +env_module(load libfabric) +env_module(load python/3.7.0) +env_module(load zfp) +env_module(load zeromq) + +set(ENV{CC} xlc) +set(ENV{CXX} xlc++) +set(ENV{FC} xlf) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=OFF +ADIOS2_USE_Blosc:BOOL=OFF +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=OFF +ADIOS2_USE_SST:BOOL=ON +ADIOS2_USE_SZ:BOOL=OFF +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=OFF +") + +set(NCPUS 4) +set(CTEST_TEST_ARGS PARALLEL_LEVEL 8) +set(CTEST_CMAKE_GENERATOR "Unix Makefiles") +list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}") +include(${CMAKE_CURRENT_LIST_DIR}/ci-common.cmake) diff --git a/scripts/ci/gitlab-ci/run.sh b/scripts/ci/gitlab-ci/run.sh new file mode 100755 index 0000000000..cf7532f5b2 --- /dev/null +++ b/scripts/ci/gitlab-ci/run.sh @@ -0,0 +1,48 @@ +#!/bin/bash --login + +if [ -n "${GITLAB_SITE}" ] +then + export CI_SITE_NAME="${GITLAB_SITE}" +else + export CI_SITE_NAME="GitLab CI" +fi + +export CI_BUILD_NAME="${CI_COMMIT_BRANCH}_${CI_JOB_NAME}" +export CI_SOURCE_DIR="${CI_PROJECT_DIR}" +export CI_ROOT_DIR="${CI_PROJECT_DIR}/.." +export CI_BIN_DIR="${CI_ROOT_DIR}/${CI_BUILD_NAME}" +export CI_COMMIT_REF=${CI_COMMIT_SHA} + +STEP=$1 +CTEST_SCRIPT=scripts/ci/cmake/ci-${CI_JOB_NAME}.cmake + +# Update and Test steps enable an extra step +CTEST_STEP_ARGS="" +case ${STEP} in + test) CTEST_STEP_ARGS="${CTEST_STEP_ARGS} -Ddashboard_do_end=ON" ;; +esac +CTEST_STEP_ARGS="${CTEST_STEP_ARGS} -Ddashboard_do_${STEP}=ON" + +if [ -n "${CMAKE_ENV_MODULE}" ] +then + module load ${CMAKE_ENV_MODULE} + + echo "**********module avail Begin************" + module avail + echo "**********module avail End**************" +fi + +CTEST=ctest + +echo "**********Env Begin**********" +env | sort +echo "**********Env End************" + +echo "**********CTest Begin**********" +${CTEST} --version +echo ${CTEST} -VV -S ${CTEST_SCRIPT} -Ddashboard_full=OFF ${CTEST_STEP_ARGS} +${CTEST} -VV -S ${CTEST_SCRIPT} -Ddashboard_full=OFF ${CTEST_STEP_ARGS} +RET=$? +echo "**********CTest End************" + +exit ${RET}