diff --git a/.github/workflows/everything.yml b/.github/workflows/everything.yml index 01f09a6431..536fd23212 100644 --- a/.github/workflows/everything.yml +++ b/.github/workflows/everything.yml @@ -19,6 +19,7 @@ jobs: ####################################### format: + if: ${{ false }} # Disable while testing. Remove this before merging runs-on: ubuntu-latest container: image: ornladios/adios2:ci-formatting @@ -38,7 +39,7 @@ jobs: ####################################### linux: - needs: format + #needs: format runs-on: ubuntu-latest container: image: ${{ matrix.container }} @@ -51,31 +52,43 @@ jobs: fail-fast: false matrix: jobname: [ - el7, - el7-gnu8-ohpc, - el7-gnu8-openmpi-ohpc, - el7-gnu8-openmpi-ohpc-static, - suse-pgi, - suse-pgi-openmpi, - debian-sid, - debian-sid-openmpi ] + el8-gcc8-serial, + el8-gcc8-mpi, + el8-gcc9-serial, + el8-gcc9-mpi, + el8-gcc10-serial, + el8-gcc10-mpi, + el8-gcc11-serial, + el8-gcc11-mpi, + el8-icc-serial, + el8-icc-mpi, + el8-oneapi-serial, + el8-oneapi-mpi ] include: - - jobname: el7 - container: ornladios/adios2:ci-el7 - - jobname: el7-gnu8-ohpc - container: ornladios/adios2:ci-el7-gnu8-ohpc - - jobname: el7-gnu8-openmpi-ohpc - container: ornladios/adios2:ci-el7-gnu8-openmpi-ohpc - - jobname: el7-gnu8-openmpi-ohpc-static - container: ornladios/adios2:ci-el7-gnu8-openmpi-ohpc - - jobname: suse-pgi - container: ornladios/adios2:ci-suse-nvhpcsdk - - jobname: suse-pgi-openmpi - container: ornladios/adios2:ci-suse-nvhpcsdk-openmpi - - jobname: debian-sid - container: ornladios/adios2:ci-debian-sid - - jobname: debian-sid-openmpi - container: ornladios/adios2:ci-debian-sid + - jobname: el8-gcc8-serial + container: ornladios/adios2:ci-spack-el8-gcc8-serial + - jobname: el8-gcc8-mpi + container: ornladios/adios2:ci-spack-el8-gcc8-mpi + - jobname: el8-gcc9-serial + container: ornladios/adios2:ci-spack-el8-gcc9-serial + - jobname: el8-gcc9-mpi + container: ornladios/adios2:ci-spack-el8-gcc9-mpi + - jobname: el8-gcc10-serial + container: ornladios/adios2:ci-spack-el8-gcc10-serial + - jobname: el8-gcc10-mpi + container: ornladios/adios2:ci-spack-el8-gcc10-mpi + - jobname: el8-gcc11-serial + container: ornladios/adios2:ci-spack-el8-gcc11-serial + - jobname: el8-gcc11-mpi + container: ornladios/adios2:ci-spack-el8-gcc11-mpi + - jobname: el8-icc-serial + container: ornladios/adios2:ci-spack-el8-icc-serial + - jobname: el8-icc-mpi + container: ornladios/adios2:ci-spack-el8-icc-mpi + - jobname: el8-oneapi-serial + container: ornladios/adios2:ci-spack-el8-oneapi-serial + - jobname: el8-oneapi-mpi + container: ornladios/adios2:ci-spack-el8-oneapi-mpi steps: - uses: actions/checkout@v2 @@ -93,6 +106,7 @@ jobs: run: scripts/ci/gh-actions/run.sh test linux_emu: + if: ${{ false }} # Disable while testing. Remove this before merging needs: format runs-on: ubuntu-latest container: @@ -143,6 +157,7 @@ jobs: ####################################### docker: + if: ${{ false }} # Disable while testing. Remove this before merging needs: format runs-on: ubuntu-latest strategy: @@ -207,6 +222,7 @@ jobs: # run steps lets the steps be written as though they too were using a # standard container job. contract: + if: ${{ false }} # Disable while testing. Remove this before merging needs: docker runs-on: ubuntu-latest diff --git a/azure-pipelines.yml b/azure-pipelines.yml.bak similarity index 100% rename from azure-pipelines.yml rename to azure-pipelines.yml.bak diff --git a/scripts/ci/cmake-v2/ci-common.cmake b/scripts/ci/cmake-v2/ci-common.cmake new file mode 100644 index 0000000000..dc03b2febc --- /dev/null +++ b/scripts/ci/cmake-v2/ci-common.cmake @@ -0,0 +1,62 @@ +if(POLICY CMP0057) + cmake_policy(SET CMP0057 NEW) +endif() + +if(NOT CTEST_BUILD_CONFIGURATION) + set(CTEST_BUILD_CONFIGURATION Debug) +endif() + +if(NOT DEFINED NCPUS) + include(ProcessorCount) + ProcessorCount(NCPUS) +endif() +math(EXPR N2CPUS "${NCPUS}*2") +if(NOT CTEST_BUILD_FLAGS) + if(CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles") + set(CTEST_BUILD_FLAGS "-k -j${N2CPUS}") + elseif(CTEST_CMAKE_GENERATOR STREQUAL "Ninja") + set(CTEST_BUILD_FLAGS "-k0 -j${N2CPUS}") + endif() +endif() +if(NOT PARALLEL_LEVEL IN_LIST CTEST_TEST_ARGS) + list(APPEND CTEST_TEST_ARGS PARALLEL_LEVEL ${N2CPUS}) +endif() + +if(NOT dashboard_model) + set(dashboard_model Experimental) +endif() +if(NOT dashboard_binary_name) + set(dashboard_binary_name "build") +endif() +if(NOT dashboard_track) + set(dashboard_track "Continuous Integration") +endif() +find_program(CTEST_GIT_COMMAND git) +if(NOT "$ENV{CI_COMMIT_REF}" STREQUAL "") + set(dashboard_git_branch "$ENV{CI_COMMIT_REF}") + set(CTEST_UPDATE_VERSION_ONLY ON) +endif() +if(NOT "$ENV{CI_SITE_NAME}" STREQUAL "") + set(CTEST_SITE "$ENV{CI_SITE_NAME}") +endif() +if(NOT "$ENV{CI_BUILD_NAME}" STREQUAL "") + set(CTEST_BUILD_NAME "$ENV{CI_BUILD_NAME}") +endif() +if(NOT "$ENV{CI_ROOT_DIR}" STREQUAL "") + set(CTEST_DASHBOARD_ROOT "$ENV{CI_ROOT_DIR}") +endif() +if(NOT "$ENV{CI_SOURCE_DIR}" STREQUAL "") + set(CTEST_SOURCE_DIRECTORY "$ENV{CI_SOURCE_DIR}") +endif() +if(NOT "$ENV{CI_BIN_DIR}" STREQUAL "") + set(CTEST_BINARY_DIRECTORY "$ENV{CI_BIN_DIR}") +endif() + +list(APPEND CTEST_UPDATE_NOTES_FILES "${CMAKE_CURRENT_LIST_FILE}") +set(CTEST_UPDATE_COMMAND ${CTEST_GIT_COMMAND}) +set(CTEST_UPTATE_TYPE git) +set(CTEST_UPDATE_VERSION_ONLY TRUE) +include(${CMAKE_CURRENT_LIST_DIR}/../../dashboard/adios_common.cmake) +if(ctest_build_num_warnings GREATER 0) + message(FATAL_ERROR "Found ${ctest_build_num_warnings} warnings.") +endif() diff --git a/scripts/ci/cmake-v2/ci-el8-gcc10-mpi.cmake b/scripts/ci/cmake-v2/ci-el8-gcc10-mpi.cmake new file mode 100644 index 0000000000..e7850f7c47 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc10-mpi.cmake @@ -0,0 +1,38 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load gcc-10) + +include(ProcessorCount) +ProcessorCount(NCPUS) +math(EXPR N2CPUS "${NCPUS}*2") + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall + +MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe +MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc10-serial.cmake b/scripts/ci/cmake-v2/ci-el8-gcc10-serial.cmake new file mode 100644 index 0000000000..5596ae90b6 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc10-serial.cmake @@ -0,0 +1,31 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load gcc-10) + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc11-mpi.cmake b/scripts/ci/cmake-v2/ci-el8-gcc11-mpi.cmake new file mode 100644 index 0000000000..bef789a85f --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc11-mpi.cmake @@ -0,0 +1,38 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load gcc-11) + +include(ProcessorCount) +ProcessorCount(NCPUS) +math(EXPR N2CPUS "${NCPUS}*2") + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall + +MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe +MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc11-serial.cmake b/scripts/ci/cmake-v2/ci-el8-gcc11-serial.cmake new file mode 100644 index 0000000000..c76aeddff0 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc11-serial.cmake @@ -0,0 +1,31 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load gcc-11) + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc8-mpi.cmake b/scripts/ci/cmake-v2/ci-el8-gcc8-mpi.cmake new file mode 100644 index 0000000000..4bc8c1b644 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc8-mpi.cmake @@ -0,0 +1,34 @@ +# Client maintainer: chuck.atkins@kitware.com + +include(ProcessorCount) +ProcessorCount(NCPUS) +math(EXPR N2CPUS "${NCPUS}*2") + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall + +MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe +MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc8-serial.cmake b/scripts/ci/cmake-v2/ci-el8-gcc8-serial.cmake new file mode 100644 index 0000000000..78b7ef0698 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc8-serial.cmake @@ -0,0 +1,27 @@ +# Client maintainer: chuck.atkins@kitware.com + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc9-mpi.cmake b/scripts/ci/cmake-v2/ci-el8-gcc9-mpi.cmake new file mode 100644 index 0000000000..1462177267 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc9-mpi.cmake @@ -0,0 +1,38 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load gcc-9) + +include(ProcessorCount) +ProcessorCount(NCPUS) +math(EXPR N2CPUS "${NCPUS}*2") + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall + +MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe +MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-gcc9-serial.cmake b/scripts/ci/cmake-v2/ci-el8-gcc9-serial.cmake new file mode 100644 index 0000000000..14d57842b2 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-gcc9-serial.cmake @@ -0,0 +1,31 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load gcc-9) + +set(ENV{CC} gcc) +set(ENV{CXX} g++) +set(ENV{FC} gfortran) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-icc-mpi.cmake b/scripts/ci/cmake-v2/ci-el8-icc-mpi.cmake new file mode 100644 index 0000000000..6d2402586f --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-icc-mpi.cmake @@ -0,0 +1,38 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load icc) + +include(ProcessorCount) +ProcessorCount(NCPUS) +math(EXPR N2CPUS "${NCPUS}*2") + +set(ENV{CC} icc) +set(ENV{CXX} icpc) +set(ENV{FC} ifort) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall + +MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe +MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-icc-serial.cmake b/scripts/ci/cmake-v2/ci-el8-icc-serial.cmake new file mode 100644 index 0000000000..5e9ab805fa --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-icc-serial.cmake @@ -0,0 +1,31 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load icc) + +set(ENV{CC} icc) +set(ENV{CXX} icpc) +set(ENV{FC} ifort) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-oneapi-mpi.cmake b/scripts/ci/cmake-v2/ci-el8-oneapi-mpi.cmake new file mode 100644 index 0000000000..bf1e0076be --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-oneapi-mpi.cmake @@ -0,0 +1,38 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load compiler) + +include(ProcessorCount) +ProcessorCount(NCPUS) +math(EXPR N2CPUS "${NCPUS}*2") + +set(ENV{CC} icx) +set(ENV{CXX} icpx) +set(ENV{FC} ifx) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=ON +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall + +MPIEXEC_EXTRA_FLAGS:STRING=--allow-run-as-root --oversubscribe +MPIEXEC_MAX_NUMPROCS:STRING=${N2CPUS} +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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-v2/ci-el8-oneapi-serial.cmake b/scripts/ci/cmake-v2/ci-el8-oneapi-serial.cmake new file mode 100644 index 0000000000..285a4c7052 --- /dev/null +++ b/scripts/ci/cmake-v2/ci-el8-oneapi-serial.cmake @@ -0,0 +1,31 @@ +# Client maintainer: chuck.atkins@kitware.com + +find_package(EnvModules REQUIRED) + +env_module(load oneapi) + +set(ENV{CC} icx) +set(ENV{CXX} icpx) +set(ENV{FC} ifx) + +set(dashboard_cache " +ADIOS2_USE_BZip2:BOOL=ON +ADIOS2_USE_Blosc:BOOL=ON +ADIOS2_USE_DataMan:BOOL=ON +ADIOS2_USE_Fortran:BOOL=ON +ADIOS2_USE_HDF5:BOOL=ON +ADIOS2_USE_MPI:BOOL=OFF +ADIOS2_USE_Python:BOOL=ON +ADIOS2_USE_SZ:BOOL=ON +ADIOS2_USE_ZeroMQ:STRING=ON +ADIOS2_USE_ZFP:BOOL=ON + +CMAKE_C_FLAGS:STRING=-Wall +CMAKE_CXX_FLAGS:STRING=-Wall +CMAKE_Fortran_FLAGS:STRING=-Wall +") + +set(CTEST_TEST_ARGS PARALLEL_LEVEL 1) +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/gh-actions/run.sh b/scripts/ci/gh-actions/run.sh index c71f2be119..5f1cf3916e 100755 --- a/scripts/ci/gh-actions/run.sh +++ b/scripts/ci/gh-actions/run.sh @@ -25,7 +25,7 @@ fi export CI_BIN_DIR="${CI_ROOT_DIR}/${GH_YML_JOBNAME}" STEP=$1 -CTEST_SCRIPT=scripts/ci/cmake/ci-${GH_YML_JOBNAME}.cmake +CTEST_SCRIPT=scripts/ci/cmake-v2/ci-${GH_YML_JOBNAME}.cmake # Update and Test steps enable an extra step CTEST_STEP_ARGS="" diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base new file mode 100644 index 0000000000..dacf5c584b --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-base @@ -0,0 +1,22 @@ +FROM almalinux/almalinux:8 + +RUN dnf upgrade -y && \ + dnf install -y glibc-langpack-en +RUN dnf install -y dnf-plugins-core && \ + dnf config-manager --set-enabled powertools && \ + dnf install -y epel-release +RUN dnf install -y \ + bzip2 curl file gcc-c++ gcc git gnupg2 gzip \ + make patch tcl unzip which xz patchelf diffutils tar Lmod \ + python3 python3-pip +RUN dnf clean all + +RUN git clone https://github.com/spack/spack.git /opt/spack +COPY packages.yaml.base /etc/spack/packages.yaml +COPY modules.yaml /etc/spack/modules.yaml + +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack compiler find --scope system && \ + spack spec zlib && \ + spack clean -a && \ + spack spec zlib diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-clang13-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-clang13-base new file mode 100644 index 0000000000..efeb3a087a --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-clang13-base @@ -0,0 +1,45 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install build dependencies (Clang requires a newer GCC to build) +RUN dnf install -y elfutils-devel && \ + dnf install -y cmake ninja-build gcc-toolset-11 + +# Install the clang compilers from source +RUN cd /opt && \ + mkdir clang && \ + cd clang && \ + curl -L -O https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/llvm-project-13.0.1.src.tar.xz && \ + tar -xvf llvm-project-13.0.1.src.tar.xz && \ + mkdir build && \ + cd build && \ + . /opt/rh/gcc-toolset-11/enable && \ + cmake \ + -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/opt/clang/13.0.1 \ + -DLLVM_REQUIRES_RTTI=TRUE \ + -DLLVM_ENABLE_RTTI=TRUE \ + -DLLVM_ENABLE_EH=TRUE \ + -DLLVM_BUILD_LLVM_DYLIB=ON \ + -DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \ + -DLLVM_TARGETS_TO_BUILD=X86 \ + -DLLVM_ENABLE_PROJECTS="clang;flang;lld;openmp;clang-tools-extra;libcxx;libcxxabi;compiler-rt;pstl;mlir" \ + ../llvm-project-13.0.1.src/llvm && \ + ninja install + +# Remove build-time dependencies (leave elf-utils for OpenMP to work) +RUN rm -rf /opt/clang/llvm* /opt/clang/build && \ + dnf autoremove -y cmake ninja-build gcc-toolset-11 && \ + dnf install -y gcc-gfortran && \ + dnf clean all + +# Add compilers to spack +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack compiler add --scope system \ + /opt/clang/13.0.1 && \ + spack config --scope=system add 'packages:all:compiler: [clang, gcc]' && \ + sed \ + -e '15,100 s|f77: null|f77: /opt/clang/13.0.1/bin/flang|' \ + -e '15,100 s|fc: null|fc: /opt/clang/13.0.1/bin/flang|' \ + -i /etc/spack/compilers.yaml && \ + spack clean -a diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc10-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc10-base new file mode 100644 index 0000000000..0008b1b548 --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc10-base @@ -0,0 +1,17 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install gcc from the dev-toolset packages +RUN dnf install -y gcc-toolset-10 && \ + dnf clean all + +# Add the compilers to spack +COPY gcc-toolset-module.tcl /tmp/ +RUN . /opt/spack/share/spack/setup-env.sh && \ + sed 's|TOOLSET|10|' /tmp/gcc-toolset-module.tcl > /usr/share/Modules/modulefiles/gcc-10 && \ + rm -f /tmp/gcc-toolset-module.tcl && \ + . /etc/profile.d/modules.sh && \ + module load gcc-10 && \ + spack compiler add --scope=system && \ + MODLINE=$(grep -n modules /etc/spack/compilers.yaml | cut -d : -f 1 | tail -1) && \ + sed "${MODLINE} s|modules:.*|modules: [gcc-10]|" -i \ + /etc/spack/compilers.yaml diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc11-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc11-base new file mode 100644 index 0000000000..3a5d7ee14e --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc11-base @@ -0,0 +1,17 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install gcc from the dev-toolset packages +RUN dnf install -y gcc-toolset-11 && \ + dnf clean all + +# Add the compilers to spack +COPY gcc-toolset-module.tcl /tmp/ +RUN . /opt/spack/share/spack/setup-env.sh && \ + sed 's|TOOLSET|11|' /tmp/gcc-toolset-module.tcl > /usr/share/Modules/modulefiles/gcc-11 && \ + rm -f /tmp/gcc-toolset-module.tcl && \ + . /etc/profile.d/modules.sh && \ + module load gcc-11 && \ + spack compiler add --scope=system && \ + MODLINE=$(grep -n modules /etc/spack/compilers.yaml | cut -d : -f 1 | tail -1) && \ + sed "${MODLINE} s|modules:.*|modules: [gcc-11]|" -i \ + /etc/spack/compilers.yaml diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base new file mode 100644 index 0000000000..515aaa3b75 --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc8-base @@ -0,0 +1,11 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install the gcc fortran compiler missing from the base image +RUN dnf install -y gcc-gfortran && \ + dnf clean all + +# Add the compilers to spack +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack compiler rm --scope system gcc && \ + spack compiler add --scope system && \ + spack config --scope system add "packages:all:compiler:[gcc]" diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc9-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc9-base new file mode 100644 index 0000000000..2655bd362e --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-gcc9-base @@ -0,0 +1,17 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install gcc from the dev-toolset packages +RUN dnf install -y gcc-toolset-9 && \ + dnf clean all + +# Add the compilers to spack +COPY gcc-toolset-module.tcl /tmp/ +RUN . /opt/spack/share/spack/setup-env.sh && \ + sed 's|TOOLSET|9|' /tmp/gcc-toolset-module.tcl > /usr/share/Modules/modulefiles/gcc-9 && \ + rm -f /tmp/gcc-toolset-module.tcl && \ + . /etc/profile.d/modules.sh && \ + module load gcc-9 && \ + spack compiler add --scope=system && \ + MODLINE=$(grep -n modules /etc/spack/compilers.yaml | cut -d : -f 1 | tail -1) && \ + sed "${MODLINE} s|modules:.*|modules: [gcc-9]|" -i \ + /etc/spack/compilers.yaml diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-icc-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-icc-base new file mode 100644 index 0000000000..964e767aba --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-icc-base @@ -0,0 +1,14 @@ +FROM ornladios/adios2:ci-spack-el8-intel-base + +# Install the compilers from an external repo +RUN dnf install -y \ + intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic && \ + dnf clean all + +# Enable the classic intel compiler +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack compiler add --scope system \ + /opt/intel/oneapi/compiler/latest/linux/bin/intel64 && \ + sed '15,100 s|modules: \[\]|modules: \[icc\]|' \ + -i /etc/spack/compilers.yaml && \ + spack config --scope=system add 'packages:all:compiler: [intel, gcc]' diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-intel-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-intel-base new file mode 100644 index 0000000000..08a4992d06 --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-intel-base @@ -0,0 +1,13 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install the compilers from an external repo +COPY oneAPI.repo /etc/yum.repos.d/ +RUN dnf install -y \ + intel-oneapi-compiler-dpcpp-cpp \ + intel-oneapi-compiler-fortran && \ + dnf clean all + +# Setup module files for the compilers +RUN /opt/intel/oneapi/modulefiles-setup.sh \ + --force \ + --output-dir=/usr/share/modulefiles diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf new file mode 100644 index 0000000000..d39f9d5124 --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-leaf @@ -0,0 +1,40 @@ +ARG COMPILER_IMG_BASE +FROM ornladios/adios2:ci-spack-el8-${COMPILER_IMG_BASE}-base + +ARG EXTRA_VARIANTS +RUN sed "s|variants: +blosc|variants: ${EXTRA_VARIANTS} +blosc|" \ + -i /etc/spack/packages.yaml && \ + sed "s|variants: api=|variants: ${EXTRA_VARIANTS} api=|" \ + -i /etc/spack/packages.yaml + +# Build dependencies +ARG COMPILER_SPACK_ID +RUN . /etc/profile.d/modules.sh && \ + . /opt/spack/share/spack/setup-env.sh && \ + spack install \ + --fail-fast \ + -v \ + -j$(grep -c '^processor' /proc/cpuinfo) \ + libsodium%${COMPILER_SPACK_ID} && \ + spack install \ + --fail-fast \ + -v \ + -j$(grep -c '^processor' /proc/cpuinfo) \ + --only dependencies \ + adios2%${COMPILER_SPACK_ID} ^rhash%gcc && \ + spack clean -a + +# Setup modules +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack env create --without-view adios2-ci && \ + spack -e adios2-ci add $(spack find --format "/{hash}") && \ + spack -e adios2-ci install && \ + rm -rf /root/.spack && \ + spack env activate adios2-ci && \ + spack env deactivate && \ + spack -e adios2-ci env loads + +# Setup default login environment +RUN echo 'source /opt/spack/share/spack/setup-env.sh' > /etc/profile.d/zz-adios2-ci-env.sh && \ + echo 'module use ${SPACK_ROOT}/share/spack/modules/linux-almalinux8-haswell' >> /etc/profile.d/zz-adios2-ci-env.sh && \ + echo 'source ${SPACK_ROOT}/var/spack/environments/adios2-ci/loads' >> /etc/profile.d/zz-adios2-ci-env.sh diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-nvhpc-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-nvhpc-base new file mode 100644 index 0000000000..598a2c740f --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-nvhpc-base @@ -0,0 +1,22 @@ +FROM ornladios/adios2:ci-spack-el8-base + +# Install NVHPC SDK from external packages +RUN dnf install -y \ + https://developer.download.nvidia.com/hpc-sdk/22.1/nvhpc-22-1-22.1-1.x86_64.rpm \ + https://developer.download.nvidia.com/hpc-sdk/22.1/nvhpc-2022-22.1-1.x86_64.rpm && \ + dnf clean all + +# Purge the unneded parts of the install to reclaim some space +RUN rm -rf \ + /opt/nvidia/hpc_sdk/Linux_x86_64/2022 \ + /opt/nvidia/hpc_sdk/Linux_x86_64/22.1/comm_libs \ + /opt/nvidia/hpc_sdk/Linux_x86_64/22.1/math_libs \ + /opt/nvidia/hpc_sdk/Linux_x86_64/22.1/profilers \ + /opt/nvidia/hpc_sdk/Linux_x86_64/22.1/examples \ + /opt/nvidia/hpc_sdk/modulefiles +COPY nvhpc-22.1-module.tcl /opt/nvidia/hpc_sdk/modulefiles/nvhpc/22.1 + +# Enable the NVHPC compiler +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack compiler add --scope system \ + /opt/nvidia/hpc_sdk/Linux_x86_64/22.1/compilers/bin diff --git a/scripts/ci/images-v2/Dockerfile.ci-spack-el8-oneapi-base b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-oneapi-base new file mode 100644 index 0000000000..d2e71c99fe --- /dev/null +++ b/scripts/ci/images-v2/Dockerfile.ci-spack-el8-oneapi-base @@ -0,0 +1,9 @@ +FROM ornladios/adios2:ci-spack-el8-intel-base + +# Enable the classic intel compiler +RUN . /opt/spack/share/spack/setup-env.sh && \ + spack compiler add --scope system \ + /opt/intel/oneapi/compiler/latest/linux/bin && \ + sed '15,100 s|modules: \[\]|modules: \[compiler\]|' \ + -i /etc/spack/compilers.yaml && \ + spack config --scope=system add 'packages:all:compiler: [oneapi, gcc]' diff --git a/scripts/ci/images-v2/build-base.sh b/scripts/ci/images-v2/build-base.sh new file mode 100755 index 0000000000..19a81e99cf --- /dev/null +++ b/scripts/ci/images-v2/build-base.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +message1 "Building ci-spack-el8 base image" +if ! build_squash \ + almalinux/almalinux:8 \ + ornladios/adios2:ci-spack-el8-base \ + Dockerfile.ci-spack-el8-base +then + echo "Error: Failed to build ci-spack-el8 base image" + exit 3 +fi diff --git a/scripts/ci/images-v2/build-clang-base.sh b/scripts/ci/images-v2/build-clang-base.sh new file mode 100755 index 0000000000..36ef314aaf --- /dev/null +++ b/scripts/ci/images-v2/build-clang-base.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set +e + +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +message1 "Building clang13 base image" +if ! build_squash \ + ornladios/adios2:ci-spack-el8-base \ + ornladios/adios2:ci-spack-el8-clang13-base \ + Dockerfile.ci-spack-el8-clang13-base +then + echo "Error: Failed to build clang13 base image" + exit 3 +fi diff --git a/scripts/ci/images-v2/build-clang.sh b/scripts/ci/images-v2/build-clang.sh new file mode 100755 index 0000000000..881dfc7ef7 --- /dev/null +++ b/scripts/ci/images-v2/build-clang.sh @@ -0,0 +1,8 @@ +#!/bin/bash +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +if ! build_leafs clang13 clang +then + exit 1 +fi diff --git a/scripts/ci/images-v2/build-functions.sh b/scripts/ci/images-v2/build-functions.sh new file mode 100644 index 0000000000..9805c7302e --- /dev/null +++ b/scripts/ci/images-v2/build-functions.sh @@ -0,0 +1,73 @@ +function message1() { + echo "" + echo "****************************************" + printf '* %-36s *\n' "$1" + echo "****************************************" + echo "" +} + +function build_squash() +{ + local FROM=$1 + local TO=$2 + local DOCKERFILE=$3 + local ARGS="$4" + + if [ "${ADIOS2_CI_NO_SQUASH}" = "1" ] + then + echo "*" + echo "* Building ${TO}" + echo "*" + if ! docker build --rm ${ARGS} -t ${TO} -f ${DOCKERFILE} . + then + echo "Error: Failed to build ${TO} image" + return 1 + fi + else + echo "*" + echo "* Building ${TO}-tmp" + echo "*" + if ! docker build --rm ${ARGS} -t ${TO}-tmp -f ${DOCKERFILE} . + then + echo "Error: Failed to build ${TO}-tmp image" + return 1 + fi + echo "*" + echo "* Squashing:" + echo "* from ${FROM}" + echo "* to ${TO}-tmp" + echo "* as ${TO}" + echo "*" + docker-squash -c -f ${FROM} -t ${TO} ${TO}-tmp + fi + return 0 +} + +function build_leafs() +{ + local IMG_BASE=$1 + local SPACK_ID=$2 + + message1 "Building ${IMG_BASE}-serial image" + if ! build_squash \ + ornladios/adios2:ci-spack-el8-${IMG_BASE}-base \ + ornladios/adios2:ci-spack-el8-${IMG_BASE}-serial \ + Dockerfile.ci-spack-el8-leaf \ + "--build-arg COMPILER_IMG_BASE=${IMG_BASE} --build-arg COMPILER_SPACK_ID=${SPACK_ID} --build-arg EXTRA_VARIANTS=~mpi" + then + echo "Error: Failed to build ${IMG_BASE}-serial image" + return 1 + fi + + message1 "Building ${IMG_BASE}-mpi image" + if ! build_squash \ + ornladios/adios2:ci-spack-el8-${IMG_BASE}-base \ + ornladios/adios2:ci-spack-el8-${IMG_BASE}-mpi \ + Dockerfile.ci-spack-el8-leaf \ + "--build-arg COMPILER_IMG_BASE=${IMG_BASE} --build-arg COMPILER_SPACK_ID=${SPACK_ID} --build-arg EXTRA_VARIANTS=+mpi" + then + echo "Error: Failed to build ${IMG_BASE}-mpi image" + return 2 + fi + return 0 +} diff --git a/scripts/ci/images-v2/build-gcc-base.sh b/scripts/ci/images-v2/build-gcc-base.sh new file mode 100755 index 0000000000..3f709423ee --- /dev/null +++ b/scripts/ci/images-v2/build-gcc-base.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set +e + +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +for ver in 8 9 10 11 +do + message1 "Building gcc${ver} base image" + if ! build_squash \ + ornladios/adios2:ci-spack-el8-base \ + ornladios/adios2:ci-spack-el8-gcc${ver}-base \ + Dockerfile.ci-spack-el8-gcc${ver}-base + then + echo "Error: Failed to build gcc${ver} base image" + exit 3 + fi +done diff --git a/scripts/ci/images-v2/build-gcc.sh b/scripts/ci/images-v2/build-gcc.sh new file mode 100755 index 0000000000..86fa959cb1 --- /dev/null +++ b/scripts/ci/images-v2/build-gcc.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set +e + +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +for ver in 8 9 10 11 +do + message1 "Building gcc${ver}-serial image" + if ! build_squash \ + ornladios/adios2:ci-spack-el8-gcc${ver}-base \ + ornladios/adios2:ci-spack-el8-gcc${ver}-serial \ + Dockerfile.ci-spack-el8-leaf \ + "--build-arg COMPILER=gcc${ver} --build-arg EXTRA_VARIANTS=~mpi" + then + echo "Error: Failed to build gcc${ver}-serial image" + exit 3 + fi + + message1 "Building gcc${ver}-mpi image" + if ! build_squash \ + ornladios/adios2:ci-spack-el8-gcc${ver}-base \ + ornladios/adios2:ci-spack-el8-gcc${ver}-mpi \ + Dockerfile.ci-spack-el8-leaf \ + "--build-arg COMPILER=gcc${ver} --build-arg EXTRA_VARIANTS=+mpi" + then + echo "Error: Failed to build gcc${ver}-mpi image" + exit 3 + fi +done diff --git a/scripts/ci/images-v2/build-intel-base.sh b/scripts/ci/images-v2/build-intel-base.sh new file mode 100755 index 0000000000..264496d485 --- /dev/null +++ b/scripts/ci/images-v2/build-intel-base.sh @@ -0,0 +1,36 @@ +#!/bin/bash +set +e + +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +message1 "Building intel base image" +if ! build_squash \ + ornladios/adios2:ci-spack-el8-base \ + ornladios/adios2:ci-spack-el8-intel-base \ + Dockerfile.ci-spack-el8-intel-base +then + echo "Error: Failed to build intel base image" + exit 3 +fi + +message1 "Building icc base image" +if ! build_squash \ + ornladios/adios2:ci-spack-el8-intel-base \ + ornladios/adios2:ci-spack-el8-icc-base \ + Dockerfile.ci-spack-el8-icc-base +then + echo "Error: Failed to build icc base image" + exit 3 +fi + +message1 "Building oneapi base image" +ADIOS2_CI_NO_SQUASH=1 +if ! build_squash \ + ornladios/adios2:ci-spack-el8-intel-base \ + ornladios/adios2:ci-spack-el8-oneapi-base \ + Dockerfile.ci-spack-el8-oneapi-base +then + echo "Error: Failed to build oneapi base image" + exit 3 +fi diff --git a/scripts/ci/images-v2/build-intel.sh b/scripts/ci/images-v2/build-intel.sh new file mode 100755 index 0000000000..7c80d6f9b9 --- /dev/null +++ b/scripts/ci/images-v2/build-intel.sh @@ -0,0 +1,13 @@ +#!/bin/bash +BASE_DIR=$(dirname $(readlink -f ${BASH_SOURCE})) +source "${BASE_DIR}/build-functions.sh" + +if ! build_leafs icc intel +then + exit 1 +fi + +if ! build_leafs oneapi oneapi +then + exit 2 +fi diff --git a/scripts/ci/images-v2/build.sh b/scripts/ci/images-v2/build.sh new file mode 100755 index 0000000000..b82cbed7ad --- /dev/null +++ b/scripts/ci/images-v2/build.sh @@ -0,0 +1,135 @@ +#!/bin/bash + +function message1() { + echo "" + echo "****************************************" + printf '* %-36s *\n' "$1" + echo "****************************************" + echo "" +} + +function build_squash() { + local FROM=$1 + local TO=$2 + local DF=$3 + local ARGS="$4" + + echo "*" + echo "* Building $TO" + echo "*" + if ! docker build --rm $ARGS -t $TO -f $DF . + then + echo "Error: Failed to build $TO image" + return 1 + fi + echo "*" + echo "* Squashing:" + echo "* from $FROM" + echo "* to $TO" + echo "* as $TO" + echo "*" + docker-squash -f $FROM -t $TO $TO + return 0 +} + +enable_base=0 +enable_inter=0 +enable_gcc=0 +enable_clang=0 +enable_intel=0 +enable_nvhpc=0 +enable_serial=0 +enable_mpi=0 + +while [ $# -gt 0 ] +do + case $1 in + base) enable_base=1;; + no_base) enable_base=0;; + inter) enable_inter=1;; + no_inter) enable_inter=0;; + gcc) enable_gcc=1;; + no_gcc) enable_gcc=0;; + clang) enable_clang=1;; + no_clang) enable_clang=0;; + intel) enable_intel=1;; + no_intel) enable_intel=0;; + nvhpc) enable_nvhpc=1;; + no_nvhpc) enable_nvhpc=0;; + serial) enable_serial=1;; + no_serial) enable_serial=0;; + mpi) enable_mpi=1;; + no_mpi) enable_mpi=0;; + *) + echo "Error: Unknown option: $1" + exit 1;; + esac + shift +done + +if [ $enable_base -eq 1 ] +then + message1 "Building ci base image" + if ! build_squash \ + almalinux/almalinux:8 \ + ornladios/adios2:ci-spack-el8-base \ + Dockerfile.ci-spack-el8-base + then + echo "Error: Failed to build base image" + exit 2 + fi +fi + + +if [ $enable_inter -eq 1 ] +then + for COMPILER in gcc clang intel nvhpc + do + enabled_var="enable_$COMPILER" + if [ ${!enabled_var} -eq 1 ] + then + message1 "Building $COMPILER base image" + if ! build_squash \ + ornladios/adios2:ci-spack-el8-base \ + ornladios/adios2:ci-spack-el8-${COMPILER}-base \ + Dockerfile.ci-spack-el8-${COMPILER}-base + then + echo "Error: Failed to build ${COMPILER}-base image" + exit 3 + fi + fi + done +fi + +if [ $enable_serial -eq 0 ] && [ $enable_mpi -eq 0 ] +then + exit +fi + +for COMPILER in gcc clang intel nvhpc +do + enabled_var="enable_$COMPILER" + if [[ ${!enabled_var} -eq 0 ]] + then + continue + fi + + if [ $enable_serial -eq 1 ] + then + message1 "Building $COMPILER serial image" + build_squash \ + ornladios/adios2:ci-spack-el8-${COMPILER}-base \ + ornladios/adios2:ci-spack-el8-$COMPILER-serial \ + Dockerfile.ci-spack-el8-serial \ + "--build-arg COMPILER=$COMPILER" + fi + if [ $enable_mpi -eq 1 ] + then + message1 "Building $COMPILER mpi image" + build_squash \ + ornladios/adios2:ci-spack-el8-$COMPILER-serial \ + ornladios/adios2:ci-spack-el8-$COMPILER-mpi \ + Dockerfile.ci-spack-el8-mpi \ + "--build-arg COMPILER=$COMPILER" + fi +done diff --git a/scripts/ci/images-v2/gcc-toolset-module.tcl b/scripts/ci/images-v2/gcc-toolset-module.tcl new file mode 100644 index 0000000000..bc71576db0 --- /dev/null +++ b/scripts/ci/images-v2/gcc-toolset-module.tcl @@ -0,0 +1,10 @@ +#%Module1.0 + +set gcchome /opt/rh/gcc-toolset-TOOLSET/root + +prepend-path PATH $gcchome/usr/bin +prepend-path MANPATH $gcchome/usr/share/man +prepend-path INFOPATH $gcchome/usr/share/info +prepend-path PCP_DIR $gcchome +prepend-path LD_LIBRARY_PATH $gcchome/usr/lib64:$gcchome/usr/lib:$gcchome/usr/lib64/dyninst:$gcchome/usr/lib/dyninst +prepend-path PKG_CONFIG_PATH $gcchome/usr/lib64/pkgconfig diff --git a/scripts/ci/images-v2/modules.yaml b/scripts/ci/images-v2/modules.yaml new file mode 100644 index 0000000000..b908a05880 --- /dev/null +++ b/scripts/ci/images-v2/modules.yaml @@ -0,0 +1,9 @@ +modules: + enable: + - tcl + tcl: + hash_length: 0 + all: + autoload: 'direct' + projections: + all: '{name}/{version}' diff --git a/scripts/ci/images-v2/nvhpc-22.1-module.tcl b/scripts/ci/images-v2/nvhpc-22.1-module.tcl new file mode 100644 index 0000000000..a0ee026716 --- /dev/null +++ b/scripts/ci/images-v2/nvhpc-22.1-module.tcl @@ -0,0 +1,39 @@ +#%Module1.0 + +# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. +# +# NVIDIA CORPORATION and its licensors retain all intellectual property +# and proprietary rights in and to this software, related documentation +# and any modifications thereto. Any use, reproduction, disclosure or +# distribution of this software and related documentation without an express +# license agreement from NVIDIA CORPORATION is strictly prohibited. + +set nvhome /opt/nvidia/hpc_sdk +set target Linux_x86_64 +set version 22.1 + +set nvcudadir $nvhome/$target/$version/cuda +set nvcompdir $nvhome/$target/$version/compilers + +setenv CUDA_HOME $nvcudadir +setenv NVHPC $nvhome +setenv NVHPC_ROOT $nvhome/$target/$version +setenv CC $nvcompdir/bin/nvc +setenv CXX $nvcompdir/bin/nvc++ +setenv FC $nvcompdir/bin/nvfortran +setenv F90 $nvcompdir/bin/nvfortran +setenv F77 $nvcompdir/bin/nvfortran +setenv CPP cpp + +prepend-path PATH $nvcudadir/bin +prepend-path PATH $nvcompdir/bin +prepend-path PATH $nvcompdir/extras/qd/bin + +prepend-path LD_LIBRARY_PATH $nvcudadir/lib64 +prepend-path LD_LIBRARY_PATH $nvcudadir/extras/CUPTI/lib64 +prepend-path LD_LIBRARY_PATH $nvcompdir/extras/qd/lib +prepend-path LD_LIBRARY_PATH $nvcompdir/lib + +prepend-path CPATH $nvcompdir/extras/qd/include/qd + +prepend-path MANPATH $nvcompdir/man diff --git a/scripts/ci/images-v2/oneAPI.repo b/scripts/ci/images-v2/oneAPI.repo new file mode 100644 index 0000000000..ba35b673e6 --- /dev/null +++ b/scripts/ci/images-v2/oneAPI.repo @@ -0,0 +1,7 @@ +[oneAPI] +name=IntelĀ® oneAPI repository +baseurl=https://yum.repos.intel.com/oneapi +enabled=1 +gpgcheck=1 +repo_gpgcheck=1 +gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB diff --git a/scripts/ci/images-v2/packages.yaml.base b/scripts/ci/images-v2/packages.yaml.base new file mode 100644 index 0000000000..3369956106 --- /dev/null +++ b/scripts/ci/images-v2/packages.yaml.base @@ -0,0 +1,10 @@ +packages: + all: + target: [haswell] + cmake: + variants: ~ownlibs + adios2: + variants: +blosc +bzip2 +zfp +sz +png +sst +dataman +ssc +hdf5 +python +fortran + hdf5: + variants: api=default + version: ['1.13.0:'] diff --git a/scripts/ci/images-v2/packages.yaml.nvhpc b/scripts/ci/images-v2/packages.yaml.nvhpc new file mode 100644 index 0000000000..1cbc188f72 --- /dev/null +++ b/scripts/ci/images-v2/packages.yaml.nvhpc @@ -0,0 +1,10 @@ +packages: + all: + compiler: [nvhpc, gcc] + variants: +cuda + cuda: + buildable: false + externals: + - spec: cuda@11.5.119 + prefix: /opt/nvidia/hpc_sdk/Linux_x86_64/22.1/cuda/11.5 +