From 668ddb7de5b20e6804431ccd217c3acc49e30658 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cezary=20Skrzy=C5=84ski?= Date: Tue, 10 Aug 2021 14:03:42 +0200 Subject: [PATCH] #1202: add intel icpx workflow --- ci/azure/azure-intel-18-ubuntu-mpich.yml | 2 +- .../azure-intel-oneapi-icpx-ubuntu-mpich.yml | 181 ++++++++++++++++++ docker-compose.yml | 2 + scripts/workflows-azure.ini | 10 + 4 files changed, 194 insertions(+), 1 deletion(-) create mode 100644 ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml diff --git a/ci/azure/azure-intel-18-ubuntu-mpich.yml b/ci/azure/azure-intel-18-ubuntu-mpich.yml index ed35350a4e..02c2881cfd 100644 --- a/ci/azure/azure-intel-18-ubuntu-mpich.yml +++ b/ci/azure/azure-intel-18-ubuntu-mpich.yml @@ -24,7 +24,7 @@ variables: REPO: lifflander1/vt ARCH: amd64 UBUNTU: 18.04 - COMPILER_TYPE: intel-oneapi + COMPILER_TYPE: intel COMPILER: icc-18 BUILD_TYPE: release ULIMIT_CORE: 0 diff --git a/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml new file mode 100644 index 0000000000..5d852906e4 --- /dev/null +++ b/ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml @@ -0,0 +1,181 @@ +############################################################################### +############## Warning this is a generated file---do not modify ############### +############################################################################### + +name: PR tests (intel icpx, ubuntu, mpich) + +trigger: + branches: + include: + - develop + - 1.0.0* + +pr: + branches: + include: + - '*' + + +resources: +- repo: self + +variables: + tag: '$(Build.BuildId)' + REPO: lifflander1/vt + ARCH: amd64 + UBUNTU: 18.04 + COMPILER_TYPE: intel-oneapi + COMPILER: icpx + BUILD_TYPE: release + ULIMIT_CORE: 0 + CODE_COVERAGE: 0 + VT_LB: 1 + VT_TRACE: 1 + VT_TRACE_RT: 0 + VT_TRACE_ONLY: 1 + VT_MIMALLOC: 0 + VT_DOCS: 0 + VT_ASAN: 0 + VT_WERROR: 1 + VT_POOL: 0 + VT_EXTENDED_TESTS: 0 + VT_TESTS_NUM_NODES: 2 + VT_UNITY_BUILD: 1 + VT_PRODUCTION_BUILD: 0 + VT_FCONTEXT: 0 + VT_USE_OPENMP: 0 + VT_USE_STD_THREAD: 0 + VT_ZOLTAN: 0 + VT_CI_BUILD: 1 + VT_DIAGNOSTICS: 1 + CACHE: "$(Agent.TempDirectory)/cache/" + cache_name: ubuntu-intel-oneapi-icpx-cache + build_root: "$(CACHE)/$(ARCH)-ubuntu-$(UBUNTU)-$(COMPILER)-cache/" + TS: 0 + TS_YEAR: 0 + TS_MONTH: 0 + TS_DAY: 0 + + +stages: +- stage: Build + displayName: Build image + jobs: + - job: Build + displayName: Build + pool: + vmImage: 'ubuntu-18.04' + timeoutInMinutes: 180 + steps: + - task: Bash@3 + displayName: Job setup + inputs: + targetType: 'inline' + script: | + echo setup + - task: Bash@3 + displayName: Build timestamp for caching + inputs: + targetType: 'inline' + script: | + echo 'string(TIMESTAMP current_date "%H;%M;%S" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS]$val" + echo 'string(TIMESTAMP current_date "%Y" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS_YEAR]$val" + echo 'string(TIMESTAMP current_date "%m" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS_MONTH]$val" + echo 'string(TIMESTAMP current_date "%d" UTC)' > script + echo 'execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${current_date}")' >> script + val=$(cmake -P script) + echo "##vso[task.setvariable variable=TS_DAY]$val" + - task: Bash@3 + displayName: Output timestamp for caching + inputs: + targetType: 'inline' + script: 'echo "my pipeline variable is $(TS) $(TS_YEAR) $(TS_MONTH) $(TS_DAY)"' + - task: Cache@2 + displayName: Update cache + inputs: + securityNamespace: cache + key: $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) | $(TS_MONTH) | $(TS_DAY) | $(TS) + path: '$(build_root)/ccache' + restoreKeys: | + $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) | $(TS_MONTH) | $(TS_DAY) + $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) | $(TS_MONTH) + $(Agent.OS) | "$(cache_name)" | $(TS_YEAR) + $(Agent.OS) | "$(cache_name)" + - task: Bash@3 + displayName: Check for changes in containers + inputs: + targetType: 'inline' + script: | + val=$(./scripts/check_containers.sh) + echo "##vso[task.setvariable variable=compose_command]$val" + - task: DockerCompose@0 + displayName: Pull container + inputs: + containerregistrytype: 'Container Registry' + dockerComposeFile: '**/docker-compose.yml' + action: 'Run a Docker Compose command' + dockerComposeCommand: '$(compose_command) ubuntu-cpp-clean' + - task: DockerCompose@0 + displayName: Build container + inputs: + containerregistrytype: 'Container Registry' + dockerComposeFile: '**/docker-compose.yml' + action: 'Run a Docker Compose command' + dockerComposeCommand: 'run ubuntu-cpp-clean' + env: + CODECOV_TOKEN: $(codecov_token) + - task: Bash@3 + displayName: Put compilation's and tests' logs in PR comment + condition: and(succeededOrFailed(), eq(variables['Build.Reason'], 'PullRequest')) + inputs: + targetType: 'inline' + script: | + ./scripts/report_logs_in_comment.sh \ + "$(build_root)/vt/compilation_errors_warnings.out" \ + "$(build_root)/vt/cmake-output.log" \ + "$(Build.BuildNumber)" \ + "$(System.PullRequest.PullRequestNumber)" \ + "$(Build.Repository.Name)" \ + "$GITHUB_PAT" \ + "$(Build.BuildId)" \ + "$(System.JobId)" \ + "$(Agent.JobStatus)" + env: + GITHUB_PAT: $(github_pat) + - task: DockerCompose@0 + displayName: Push container to registry + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop')) + inputs: + containerregistrytype: 'Container Registry' + dockerRegistryEndpoint: 'dockerRegistryConnection1' + dockerComposeFile: '**/docker-compose.yml' + action: 'Run a Docker Compose command' + dockerComposeCommand: 'push ubuntu-cpp-clean' + - task: Bash@3 + displayName: Create artifacts + inputs: + targetType: 'inline' + script: | + zip -j $(Agent.TempDirectory)/LastTest.log.gz $(build_root)/vt/Testing/Temporary/LastTest.log + zip -j $(Agent.TempDirectory)/cmake-output.log.gz $(build_root)/vt/cmake-output.log + - task: PublishPipelineArtifact@1 + displayName: Upload CMake test output artifact + inputs: + targetPath: '$(Agent.TempDirectory)/LastTest.log.gz' + artifact: 'CMakeLastTestLog' + publishLocation: 'pipeline' + - task: PublishPipelineArtifact@1 + displayName: Upload CMake full output artifact + inputs: + targetPath: '$(Agent.TempDirectory)/cmake-output.log.gz' + artifact: 'CMakeOutputLog' + publishLocation: 'pipeline' diff --git a/docker-compose.yml b/docker-compose.yml index 58b65b16ee..a0800f5746 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -89,6 +89,7 @@ volumes: amd64-ubuntu-18.04-icc-18-cache: amd64-ubuntu-18.04-icc-19-cache: amd64-ubuntu-18.04-icc-20-cache: + amd64-ubuntu-18.04-icpx-cache: amd64-ubuntu-18.04-nvcc-10-cache: amd64-ubuntu-18.04-nvcc-10.2-cache: amd64-ubuntu-18.04-nvcc-11-cache: @@ -109,6 +110,7 @@ volumes: amd64-alpine-icc-18-cache: amd64-alpine-icc-19-cache: amd64-alpine-icc-20-cache: + amd64-alpine-icpx-cache: amd64-alpine-nvcc-10-cache: amd64-alpine-nvcc-10.2-cache: amd64-alpine-nvcc-11-cache: diff --git a/scripts/workflows-azure.ini b/scripts/workflows-azure.ini index c0c7d670eb..61c1ad2d54 100644 --- a/scripts/workflows-azure.ini +++ b/scripts/workflows-azure.ini @@ -53,6 +53,16 @@ vt_trace = 1 vt_pool = 0 vt_extended_tests = 0 +[PR-tests-intel-oneAPI] +test_configuration = "intel icpx, ubuntu, mpich" +compiler_type = intel-oneapi +compiler = icpx +cache_name = ubuntu-intel-oneapi-icpx-cache +output_name = ci/azure/azure-intel-oneapi-icpx-ubuntu-mpich.yml +vt_trace = 1 +vt_pool = 0 +vt_extended_tests = 0 + [PR-tests-intel-19] test_configuration = "intel 19, ubuntu, mpich" compiler_type = intel