Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • robertmaynard/vtk-m
  • sujin.philip/vtk-m
  • chunmingchen/vtk-m
  • smadhueagle/vtk-m
  • kmorel/vtk-m
  • Twinklebear/vtk-m
  • jsmeredith/vtk-m
  • blessley/vtk-m
  • luke7/vtk-m
  • heschroots/vtk-m
  • chrismsewell/vtk-m
  • mclarsen/vtk-m
  • pkf/vtk-m
  • tjcorona/vtk-m
  • biddisco/vtk-m
  • applekey/vtk-m
  • chuck.atkins/vtk-m
  • ahota/vtk-m
  • dheeru298/vtk-m
  • samuelli/vtk-m
  • m-kim/mark-vtk-m
  • m-kim/glutunit-vtk-m
  • jameskress/vtk-m
  • berkgeveci/vtk-m
  • Otahal/vtk-m
  • ollielo/vtk-m
  • allisonvacanti/vtk-m
  • acbauer/vtk-m
  • dongliangchu/vtk-m_from_Dave
  • tfogal/vtk-m
  • ben.boeckel/vtk-m
  • aowen87/vtk-m
  • dongliangchu/vtk-m
  • caseywang777/vtk-m
  • sampollard/vtk-m
  • dcthomp/vtk-m
  • locuscaeruleus/vtk-m
  • shawn.waldon/vtk-m
  • sebastien.jourdain/vtk-m
  • m-kim/vtk-m
  • mletter1/vtk-m
  • marcelotrevisani/vtk-m
  • utkarsh.ayachit/vtk-m
  • luzpaz/vtk-m
  • sudhanshusane/vtk-m
  • BenNewton/vtk-m
  • haocheng.liu/vtk-m
  • tkordenbrock/vtk-m
  • phcerdan/vtk-m
  • dloyd2/vtk-m
  • OlegI94/vtk-m
  • ssane/vtk-m
  • knolla/vtk-m
  • MarvinP/vtk-m
  • tberger/vtk-m
  • oruebel/vtk-m
  • hewenbin/vtk-m
  • Belnut/vtk-m
  • sreekanth-arikatla/vtk-m
  • stevenwalton/vtk-m
  • ayanbiswas/vtk-m
  • badwaik.jayesh/vtk-m
  • lee/vtk-m
  • hankchilds/vtk-m
  • Hristov/vtk-m
  • kab163/vtk-m
  • petarhristov/vtk-m
  • vbolea/vtk-m
  • JeromeDuboisPro/vtk-m
  • peltier.val/vtk-m
  • Wiebke/vtk-m
  • subhashis/vtk-m
  • ghweber/vtk-m
  • thomas.caissard/vtk-m
  • dcamp/vtk-m
  • caitlin.ross/vtk-m
  • NAThompson/vtk-m
  • bzindovic/vtk-m
  • srizzi/vtk-m
  • pprovins/vtk-m
  • mmathai/vtk-m
  • bujack/vtk-m
  • dpugmire/vtk-m
  • ayenpure/vtk-m
  • charles.gueunet/vtk-m
  • cjy7117/vtk-m
  • nadavi/vtk-m
  • danlipsa/vtk-m
  • chrstphrchvz/vtk-m
  • athawaletm/vtk-m
  • shreeraj.jadhav/vtk-m
  • jcfr/vtk-m
  • bolstadm/vtk-m
  • aessiari/vtk-m
  • c.wetterer-nelson/vtk-m
  • jiapei100/vtk-m
  • zhe.wang/vtk-m
  • ryan.krattiger1/vtk-m
  • mwestphal/vtk-m
  • whophil/vtk-m
  • zw241/vtk-m
  • thomasgibson/vtk-m
  • cgohlke/vtk-m
  • jeffamstutz/vtk-m
  • louis.gombert/vtk-m
  • nrushad2001/vtk-m
  • cavingoo/vtk-m
  • chrysarpretre/vtk-m
  • mli3/vtk-m
  • mingzhefluorite/vtk-m
  • jules.bourdais/vtk-m
  • YVautrin/vtk-m
  • cyrush1/vtk-m
  • Gautam/vtk-m
  • leon.victor/vtk-m
  • Punzo/vtk-m
  • spiros.tsalikis/vtk-m
  • Dave-Allured/vtk-m
  • brad.king/vtk-m
  • srisaisanthosh91/vtk-m
  • yixiangrong/vtk-m
  • LunaNebula/vtk-m
  • ericmli/vtk-m
123 results
Select Git revision
Show changes
Commits on Source (11680)
Showing
with 1168 additions and 0 deletions
---
# This configuration requires clang-format 9 or higher.
BasedOnStyle: Mozilla
AlignAfterOpenBracket: Align
AlignEscapedNewlines: true
AlignOperands: false
AllowAllParametersOfDeclarationOnNextLine: false
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Allman
ColumnLimit: 100
# FixNamespaceComments: true
MaxEmptyLinesToKeep: 4
ReflowComments: false
SpaceAfterTemplateKeyword: true
Standard: Cpp11
...
# Attributes used for formatting.
[attr]our-c-style whitespace=tab-in-indent format.clang-format=9
*.cxx our-c-style
*.h our-c-style
*.hxx our-c-style
*.cu our-c-style
data/** filter=lfs diff=lfs merge=lfs -text
/**/data/** filter=lfs diff=lfs merge=lfs -text
/**/images/** filter=lfs diff=lfs merge=lfs -text
*.cmake whitespace=tab-in-indent
*.md whitespace=tab-in-indent whitespace=-blank-at-eol conflict-marker-size=79 -whitespace
*.md.tmpl whitespace=tab-in-indent whitespace=-blank-at-eol conflict-marker-size=79 -whitespace
*.rst whitespace=tab-in-indent conflict-marker-size=79
*.txt whitespace=tab-in-indent
vtkm/thirdparty/diy/vtkmdiy/** -format.clang-format -whitespace
vtkm/thirdparty/optionparser/vtkmoptionparser/** -format.clang-format -whitespace
vtkm/thirdparty/lodepng/vtkmlodepng/** -format.clang-format -whitespace
vtkm/thirdparty/lcl/vtkmlcl/** -format.clang-format -whitespace
Thanks for trying to contribute to VTK-m. The GitHub repository is a mirror provided
for convenience, as VTK-m uses https://gitlab.kitware.com/vtk/vtk-m/-/issues for issue tracking.
Thanks for trying to contribute to VTK-m. The GitHub repository
is a mirror provided for convenience, as VTK-m uses gitlab.kitware.com
for all pull requests. Our contribution instructions are located at:
https://gitlab.kitware.com/vtk/vtk-m/-/tree/master/CONTRIBUTING.md
.DS_Store
*vscode
.anari_deps
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
.docker_image: &docker_image
variables:
GIT_CLONE_PATH: $CI_BUILDS_DIR/gitlab-kitware-sciviz-ci
.centos7: &centos7
image: "kitware/vtkm:ci-centos7_cuda10.2-20210128"
extends:
- .docker_image
.centos8: &centos8
image: "kitware/vtkm:ci-centos8-20201016"
extends:
- .docker_image
.rhel8: &rhel8
image: "kitware/vtkm:ci-rhel8_cuda10.2-20201016"
extends:
- .docker_image
.ubuntu1604: &ubuntu1604
image: "kitware/vtkm:ci-ubuntu1604-20230906"
extends:
- .docker_image
.ubuntu1604_cuda: &ubuntu1604_cuda
image: "kitware/vtkm:ci-ubuntu1604_cuda9.2-20201016"
extends:
- .docker_image
.ubuntu1804: &ubuntu1804
image: "kitware/vtkm:ci-ubuntu1804-20230906"
extends:
- .docker_image
.ubuntu1804_cuda: &ubuntu1804_cuda
image: "kitware/vtkm:ci-ubuntu1804_cuda11-20230906"
extends:
- .docker_image
.ubuntu1804_cuda_kokkos: &ubuntu1804_cuda_kokkos
image: "kitware/vtkm:ci-ubuntu1804_cuda11_kokkos-20230906"
extends:
- .docker_image
.ubuntu2004_doxygen: &ubuntu2004_doxygen
image: "kitware/vtkm:ci-doxygen-20231020"
extends:
- .docker_image
.ubuntu2004: &ubuntu2004
image: "kitware/vtkm:ci-ubuntu2004-20230906"
extends:
- .docker_image
.ubuntu2004_kokkos: &ubuntu2004_kokkos
image: "kitware/vtkm:ci-ubuntu2004_kokkos-20240119"
extends:
- .docker_image
.ubuntu2204_hip_kokkos: &ubuntu2204_hip_kokkos
image: "kitware/vtkm:ci-ubuntu2204_hip_kokkos-20240625"
extends:
- .docker_image
.opensuse: &opensuse
image: "kitware/vtkm:ci-opensuse-20231121"
extends:
- .docker_image
.run_automatically: &run_automatically
rules:
- if: '$CI_MERGE_REQUEST_ID'
when: on_success
- if: '$CI_PROJECT_PATH == "vtk/vtk-m"'
when: on_success
- when: never
.run_only_merge_requests: &run_only_merge_requests
rules:
- if: '$CI_MERGE_REQUEST_ID && $CI_PROJECT_PATH == "vtk/vtk-m"'
when: on_success
- when: never
.run_scheduled: &run_scheduled
rules:
- if: '$CI_PROJECT_PATH == "vtk/vtk-m" && $CI_COMMIT_TAG'
when: on_success
- if: '$CI_PROJECT_PATH == "vtk/vtk-m" && $CI_PIPELINE_SOURCE == "schedule"'
when: on_success
- when: never
.run_upstream_branches: &run_upstream_branches
rules:
- if: '$CI_PROJECT_PATH == "vtk/vtk-m" && $CI_MERGE_REQUEST_ID == null'
when: on_success
- when: never
.run_frontier_ci: &run_frontier_ci
rules:
- if: '$CI_PROJECT_PATH == "ci/ums033/dev/vtk-m"'
when: on_success
- when: never
# General Longer Term Tasks:
# - Setup clang tidy as sub-pipeline
# - Setup a machine to replicate the issue in https://gitlab.kitware.com/vtk/vtk-m/-/issues/447
# Note: Centos7 doesn't work as they ship separate standard library
# headers for each version. We will have to figure out something else
# like using spack or building llvm/clang from source
stages:
- build
- test
.use_minimum_supported_cmake:
variables:
CMAKE_VERSION: "3.15.5"
.warning_policy:
allow_failure:
exit_codes: [ 47 ]
.install_cmake: &install_cmake |
export PATH=$PWD/.gitlab/cmake/bin:$PATH
.gitlab/ci/config/cmake.sh "$CMAKE_VERSION"
cmake --version
.cmake_build_linux: &cmake_build_linux
stage: build
timeout: 2 hours
interruptible: true
before_script:
- *install_cmake
- "cmake -VV -P .gitlab/ci/config/ninja.cmake"
- export PATH=$PWD/.gitlab:$PATH
- .gitlab/ci/config/sccache.sh
- SCCACHE_IDLE_TIMEOUT=0 sccache --start-server
- sccache --show-stats
- .gitlab/ci/config/google_benchmarks.sh
- "cmake --version"
- "cmake -V -P .gitlab/ci/config/fetch_vtkm_tags.cmake"
- "cmake -V -P .gitlab/ci/config/gitlab_ci_setup.cmake"
- "ctest -VV -S .gitlab/ci/ctest_configure.cmake"
script:
- "ctest -VV -S .gitlab/ci/ctest_build.cmake"
- sccache --show-stats
- cmake -P .gitlab/ci/check_warnings.cmake || exit 47
extends:
- .cmake_build_artifacts
- .warning_policy
.cmake_test_linux: &cmake_test_linux
stage: test
timeout: 50 minutes
interruptible: true
before_script:
- *install_cmake
- "cmake -VV -P .gitlab/ci/config/ninja.cmake"
- export PATH=$PWD/.gitlab:$PATH
script:
- "ctest $CTEST_TIMEOUT -VV -S .gitlab/ci/ctest_test.cmake"
extends:
- .cmake_test_artifacts
.cmake_memcheck_linux: &cmake_memcheck_linux
stage: test
timeout: 2 hours
interruptible: true
before_script:
- *install_cmake
script:
- "ctest -VV -S .gitlab/ci/ctest_memcheck.cmake"
artifacts:
expire_in: 24 hours
when: always
paths:
# The generated regression testing images
- build/*.png
- build/*.pnm
- build/*.pmm
- build/junit.xml
reports:
junit: build/junit.xml
.cmake_build_artifacts: &cmake_build_artifacts
artifacts:
expire_in: 24 hours
when: always
paths:
# The artifacts of the build.
- build/bin/
- build/include/
- build/vtkm/thirdparty/diy/vtkmdiy/
- build/lib/
- build/config/
# CTest and CMake install files.
# Note: this also captures our CIState.cmake file
- build/CMakeCache.txt
- build/compile_num_warnings.log
- build/**/*.cmake
- build/Testing/
# CDash files.
- build/DartConfiguration.tcl
# Users guide
- build/docs/users-guide/html
- build/docs/users-guide/latex
.cmake_test_artifacts: &cmake_test_artifacts
artifacts:
expire_in: 24 hours
when: always
paths:
# The generated regression testing images
- build/**/*.png
- build/**/*.pnm
- build/**/*.pmm
- build/junit.xml
reports:
junit: build/junit.xml
include:
- local: '/.gitlab/ci/centos7.yml'
- local: '/.gitlab/ci/centos8.yml'
- local: '/.gitlab/ci/doxygen.yml'
- local: '/.gitlab/ci/frontier.yml'
- local: '/.gitlab/ci/macos.yml'
- local: '/.gitlab/ci/opensuse.yml'
- local: '/.gitlab/ci/rhel8.yml'
- local: '/.gitlab/ci/ubuntu1604.yml'
- local: '/.gitlab/ci/ubuntu1804.yml'
- local: '/.gitlab/ci/ubuntu2004.yml'
- local: '/.gitlab/ci/ubuntu2204.yml'
- local: '/.gitlab/ci/windows10.yml'
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
# Build on centos7 with CUDA and test on rhel8 and centos7
# gcc 7.3.1
build:centos7_gcc73:
tags:
- build
- vtkm
- docker
- linux-x86_64
- large-memory
extends:
- .centos7
- .cmake_build_linux
- .run_automatically
- .use_minimum_supported_cmake
variables:
CMAKE_BUILD_TYPE: RelWithDebInfo
CMAKE_GENERATOR: "Unix Makefiles"
VTKM_SETTINGS: "cuda+turing+32bit_ids+no_rendering+shared"
test:centos7_gcc73:
tags:
- test
- vtkm
- docker
- linux-x86_64
- cuda-rt
- turing
extends:
- .centos7
- .cmake_test_linux
- .run_automatically
- .use_minimum_supported_cmake
needs:
- build:centos7_gcc73
test:rhel8_test_centos7:
tags:
- test
- vtkm
- docker
- linux-x86_64
- cuda-rt
- turing
extends:
- .rhel8
- .cmake_test_linux
- .run_automatically
variables:
CTEST_EXCLUSIONS: "built_against_test_install"
needs:
- build:centos7_gcc73
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
# Build on centos8 with serial and test on centos8
# Uses gcc 8.2.1
build:centos8_sanitizer:
tags:
- build
- vtkm
- docker
- linux-x86_64
extends:
- .centos8
- .cmake_build_linux
- .run_automatically
variables:
CMAKE_BUILD_TYPE: RelWithDebInfo
CMAKE_GENERATOR: "Unix Makefiles"
VTKM_SETTINGS: "serial+shared+openmp+asan+leak"
test:centos8_sanitizer:
tags:
- test
- vtkm
- docker
- linux-x86_64
- privileged
extends:
- .centos8
- .cmake_memcheck_linux
- .run_automatically
variables:
OMP_NUM_THREADS: 4
CTEST_MEMORYCHECK_TYPE: LeakSanitizer
CTEST_EXCLUSIONS: >-
smoke_test_cmake_built_against_test_install
smoke_test_make_built_against_test_install
smoke_test_pkgconfig_make_built_against_test_install
needs:
- build:centos8_sanitizer
# Build on centos8 without tests
# Uses gcc 8.2.1
build:centos8:
tags:
- build
- vtkm
- docker
- linux-x86_64
extends:
- .centos8
- .cmake_build_linux
- .run_automatically
variables:
CMAKE_BUILD_TYPE: RelWithDebInfo
CMAKE_GENERATOR: "Unix Makefiles"
VTKM_SETTINGS: "serial+no_testing+min_build"
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
set(configure_warning_exceptions
".*CMake Warning at CMake/VTKmDetermineVersion.cmake.*"
)
# Find the path of the logs from the last configure
set(cnf_log_path "${CMAKE_SOURCE_DIR}/build/Testing/Temporary/LastConfigure*.log")
file(GLOB cnf_log_files ${cnf_log_path})
# Check for warnings during the configure phase
foreach(file IN LISTS cnf_log_files)
file(STRINGS ${file} lines)
foreach(line IN LISTS lines)
if ("${line}" MATCHES "Warning|WARNING|warning")
set(exception_matches FALSE)
foreach(exception IN LISTS configure_warning_exceptions)
if (${line} MATCHES "${exception}")
set(exception_matches TRUE)
break()
endif()
endforeach()
if (NOT exception_matches)
message(FATAL_ERROR "Configure warnings detected, please check cdash-commit job: ${line}")
endif()
endif()
endforeach()
endforeach()
# `compile_num_warnings` contains a single integer symbolizing the number of
# warnings of the last build.
set(bld_log_path "${CMAKE_SOURCE_DIR}/build/compile_num_warnings.log")
file(STRINGS "${bld_log_path}" output)
if (NOT "${output}" STREQUAL "0")
message(FATAL_ERROR "Build warnings detected, please check cdash-commit job")
endif()
##============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##============================================================================
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
set(version 4.6.1)
set(arch x86_64)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(sha256sum da1e1781bc1c4b019216fa16391af3e1daaee7e7f49a8ec9b0cdc8a1d05c50e2)
set(base_url https://github.com/ccache/ccache/releases/download)
set(platform linux)
set(extension tar.xz)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(sha256sum 3e36ba8c80fbf7f2b95fe0227b9dd1ca6143d721aab052caf0d5729769138059)
set(full_url https://gitlab.kitware.com/utils/ci-utilities/-/package_files/534/download)
set(filename ccache)
set(extension tar.gz)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(sha256sum a6c6311973aa3d2aae22424895f2f968e5d661be003b25f1bd854a5c0cd57563)
set(base_url https://github.com/ccache/ccache/releases/download)
set(platform windows)
set(extension zip)
else()
message(FATAL_ERROR "Unrecognized platform ${CMAKE_HOST_SYSTEM_NAME}")
endif()
if(NOT DEFINED filename)
set(filename "ccache-${version}-${platform}-${arch}")
endif()
set(tarball "${filename}.${extension}")
if(NOT DEFINED full_url)
set(full_url "${base_url}/v${version}/${tarball}")
endif()
file(DOWNLOAD
"${full_url}" $ENV{CCACHE_INSTALL_DIR}/${tarball}
EXPECTED_HASH SHA256=${sha256sum}
SHOW_PROGRESS
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xf ${tarball}
WORKING_DIRECTORY $ENV{CCACHE_INSTALL_DIR}
RESULT_VARIABLE extract_results
)
if(extract_results)
message(FATAL_ERROR "Extracting `${tarball}` failed: ${extract_results}.")
endif()
file(RENAME $ENV{CCACHE_INSTALL_DIR}/${filename} $ENV{CCACHE_INSTALL_DIR}/ccache)
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
$erroractionpreference = "stop"
$version = "3.21.1"
$sha256sum = "9fba6df0b89be0dc0377f2e77ca272b3f8c38691fe237699de275ea0c2254242"
$filename = "cmake-$version-windows-x86_64"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri "https://github.com/Kitware/CMake/releases/download/v$version/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
}
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir")
Move-Item -Path "$outdir\$filename" -Destination "$outdir\cmake"
#!/usr/bin/env bash
# shellcheck disable=SC2079
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
set -ex
version="${1:-3.30.2}"
case "$( uname -s )" in
Linux)
readonly -A sumsByVersion=(
# We require CMake >= 3.13 in the CI to support CUDA builds
['3.15.5']='03cfd669d0f990040ec89bb63a3ae7f6d61fd17c1c4d5e7ec3d1a35fe1f043f0'
['3.30.2']='cdd7fb352605cee3ae53b0e18b5929b642900e33d6b0173e19f6d4f2067ebf16'
)
shatool="sha256sum"
sha256sum="${sumsByVersion[$version]}"
platform="linux"
arch="x86_64"
;;
Darwin)
shatool="shasum -a 256"
sha256sum="c6fdda745f9ce69bca048e91955c7d043ba905d6388a62e0ff52b681ac17183c"
platform="macos"
arch="universal"
;;
*)
echo "Unrecognized platform $( uname -s )"
exit 1
;;
esac
readonly shatool
readonly sha256sum
readonly platform
readonly arch
cd .gitlab || exit
readonly tarball="cmake-$version-$platform-$arch.tar.gz"
curl -SOL "https://github.com/Kitware/CMake/releases/download/v$version/$tarball"
echo "$sha256sum $tarball" > cmake.sha256sum
$shatool --check cmake.sha256sum
# Extract cmake install root into director named cmake
mkdir cmake
tar xf "$tarball" --strip-components=1 -C cmake
if [ "$( uname -s )" = "Darwin" ]; then
ln -s CMake.app/Contents/bin cmake/bin
fi
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
## Fetch latests tags from VTK-m main repo
find_package(Git)
if(NOT Git_FOUND)
message(ERROR "Git not installed, Could not fetch vtk/vtk-m tags")
return()
endif()
set(REPO_URL "https://gitlab.kitware.com/vtk/vtk-m.git")
## Only fetch tags when in a fork in a MR since often times forks do not have
## the latest tags from the main repo.
if(DEFINED ENV{CI_MERGE_REQUEST_ID} AND NOT $ENV{CI_REPOSITORY_URL} MATCHES "vtk/vtk-m\\.git$")
message("Fetching vtk/vtk-m repo latest tags")
execute_process(
COMMAND
${GIT_EXECUTABLE}
fetch
${REPO_URL}
"refs/tags/*:refs/tags/*"
)
endif()
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
if (NOT DEFINED "ENV{GITLAB_CI}")
message(FATAL_ERROR
"This script assumes it is being run inside of GitLab-CI")
endif ()
# Set up the source and build paths.
set(CTEST_SOURCE_DIRECTORY "$ENV{CI_PROJECT_DIR}")
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/build")
if ("$ENV{VTKM_SETTINGS}" STREQUAL "")
message(FATAL_ERROR
"The VTKM_SETTINGS environment variable is required to know what "
"build options should be used.")
endif ()
# Default to Release builds.
if (NOT "$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_BUILD_TYPE}")
endif ()
if (NOT CTEST_BUILD_CONFIGURATION)
set(CTEST_BUILD_CONFIGURATION "Release")
endif ()
# Set the build metadata.
string(TOLOWER ${CTEST_BUILD_CONFIGURATION} build_type)
set(CTEST_BUILD_NAME "${build_type}+$ENV{VTKM_SETTINGS}")
set(site_name "$ENV{CI_JOB_NAME}")
string(REPLACE "docs:" "docs_" site_name "${site_name}")
string(REPLACE "build" "" site_name "${site_name}")
string(REPLACE "test" "" site_name "${site_name}")
string(REPLACE ":" "" site_name "${site_name}")
set(CTEST_SITE ${site_name})
# Default to using Ninja.
if (NOT "$ENV{CMAKE_GENERATOR}" STREQUAL "")
set(CTEST_CMAKE_GENERATOR "$ENV{CMAKE_GENERATOR}")
endif ()
if (NOT CTEST_CMAKE_GENERATOR)
set(CTEST_CMAKE_GENERATOR "Ninja")
endif ()
# Determine the track to submit to.
set(CTEST_TRACK "merge-requests")
if("$ENV{CI_COMMIT_REF_NAME}" STREQUAL "master")
set(CTEST_TRACK "master")
elseif("$ENV{CI_COMMIT_REF_NAME}" STREQUAL "release")
set(CTEST_TRACK "release")
endif()
if("$ENV{VTKM_CI_NIGHTLY}" STREQUAL "TRUE")
set(CTEST_TRACK "Nightly")
endif()
# In Make, default parallelism to number of cores.
if(CTEST_CMAKE_GENERATOR STREQUAL "Unix Makefiles")
include(ProcessorCount)
ProcessorCount(nproc)
if(DEFINED ENV{CTEST_MAX_PARALLELISM})
if(nproc GREATER $ENV{CTEST_MAX_PARALLELISM})
set(nproc $ENV{CTEST_MAX_PARALLELISM})
endif()
endif()
set(CTEST_BUILD_FLAGS "-j${nproc}")
endif()
# In Ninja, we do not need to specify parallelism unless we need to restrict
# the number of threads.
if(CTEST_CMAKE_GENERATOR STREQUAL "Ninja" AND DEFINED ENV{CTEST_MAX_PARALLELISM})
set(CTEST_BUILD_FLAGS "-j$ENV{CTEST_MAX_PARALLELISM}")
endif()
if(DEFINED ENV{CTEST_MEMORYCHECK_TYPE})
set(env_value "$ENV{CTEST_MEMORYCHECK_TYPE}")
list(APPEND optional_variables "set(CTEST_MEMORYCHECK_TYPE ${env_value})")
endif()
if(DEFINED ENV{CTEST_MEMORYCHECK_SANITIZER_OPTIONS})
set(env_value "$ENV{CTEST_MEMORYCHECK_SANITIZER_OPTIONS}")
list(APPEND optional_variables "set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS ${env_value})")
endif()
# Override revision (Git Commit) if ORIGINAL_COMMIT_SHA is found in source code
if (EXISTS "ORIGINAL_COMMIT_SHA")
file(READ "ORIGINAL_COMMIT_SHA" commit_sha)
list(APPEND optional_variables "set(CTEST_UPDATE_VERSION_OVERRIDE ${commit_sha})")
endif()
#We need to do write this information out to a file in the build directory
file(TO_CMAKE_PATH "${CTEST_SOURCE_DIRECTORY}" src_path) #converted so we can run on windows
file(TO_CMAKE_PATH "${CTEST_BINARY_DIRECTORY}" bin_path) #converted so we can run on windows
set(state
"
set(CTEST_SOURCE_DIRECTORY \"${src_path}\")
set(CTEST_BINARY_DIRECTORY \"${bin_path}\")
set(CTEST_BUILD_NAME ${CTEST_BUILD_NAME})
set(CTEST_SITE ${CTEST_SITE})
set(CTEST_CMAKE_GENERATOR \"${CTEST_CMAKE_GENERATOR}\")
set(CTEST_BUILD_CONFIGURATION ${CTEST_BUILD_CONFIGURATION})
set(CTEST_BUILD_FLAGS \"${CTEST_BUILD_FLAGS}\")
set(CTEST_TRACK ${CTEST_TRACK})
${optional_variables}
"
)
file(WRITE ${CTEST_BINARY_DIRECTORY}/CIState.cmake "${state}")
#!/bin/bash
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
set -xe
readonly version="v1.6.1"
readonly tarball="$version.tar.gz"
readonly url="https://github.com/google/benchmark/archive/$tarball"
readonly sha256sum="6132883bc8c9b0df5375b16ab520fac1a85dc9e4cf5be59480448ece74b278d4"
readonly install_dir="$HOME/gbench"
if ! [[ "$VTKM_SETTINGS" =~ "benchmarks" ]]; then
exit 0
fi
cd "$HOME"
echo "$sha256sum $tarball" > gbenchs.sha256sum
curl --insecure -OL "$url"
sha256sum --check gbenchs.sha256sum
tar xf "$tarball"
mkdir build
mkdir "$install_dir"
cmake -GNinja -S benchmark* -B build \
-DBENCHMARK_DOWNLOAD_DEPENDENCIES=ON \
-DCMAKE_BUILD_TYPE="Release"
cmake --build build
cmake --install build --prefix "$install_dir"
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
# Default to Release builds.
if ("$ENV{CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
else ()
set(CMAKE_BUILD_TYPE "$ENV{CMAKE_BUILD_TYPE}" CACHE STRING "")
endif ()
string(REPLACE "+" ";" options "$ENV{VTKM_SETTINGS}")
foreach(option IN LISTS options)
if(static STREQUAL option)
set(BUILD_SHARED_LIBS "OFF" CACHE STRING "")
elseif(shared STREQUAL option)
set(BUILD_SHARED_LIBS "ON" CACHE STRING "")
elseif(vtk_types STREQUAL option)
set(VTKm_USE_DEFAULT_TYPES_FOR_VTK "ON" CACHE STRING "")
elseif(ascent_types STREQUAL option)
# Note: ascent_types also requires 32bit_ids and 64bit_floats
set(VTKm_USE_DEFAULT_TYPES_FOR_ASCENT "ON" CACHE STRING "")
elseif(32bit_ids STREQUAL option)
set(VTKm_USE_64BIT_IDS "OFF" CACHE STRING "")
elseif(64bit_floats STREQUAL option)
set(VTKm_USE_DOUBLE_PRECISION "ON" CACHE STRING "")
elseif(asan STREQUAL option)
set(VTKm_ENABLE_SANITIZER "ON" CACHE STRING "")
list(APPEND sanitizers "address")
elseif(leak STREQUAL option)
set(VTKm_ENABLE_SANITIZER "ON" CACHE STRING "")
list(APPEND sanitizers "leak")
elseif(rendering STREQUAL option)
set(VTKm_ENABLE_RENDERING "ON" CACHE STRING "")
elseif(no_rendering STREQUAL option)
set(VTKm_ENABLE_RENDERING "OFF" CACHE STRING "")
elseif(anari STREQUAL option)
set(VTKm_ENABLE_ANARI "ON" CACHE STRING "")
elseif(no_testing STREQUAL option)
set(VTKm_ENABLE_TESTING "OFF" CACHE STRING "")
set(VTKm_ENABLE_TESTING_LIBRARY "OFF" CACHE STRING "")
elseif(examples STREQUAL option)
set(VTKm_ENABLE_EXAMPLES "ON" CACHE STRING "")
set(VTKm_INSTALL_EXAMPLES "ON" CACHE STRING "")
elseif(docs STREQUAL option)
set(VTKm_ENABLE_DOCUMENTATION "ON" CACHE STRING "")
set(VTKm_USERS_GUIDE_INCLUDE_TODOS "OFF" CACHE STRING "")
elseif(benchmarks STREQUAL option)
set(VTKm_ENABLE_BENCHMARKS "ON" CACHE STRING "")
set(ENV{CMAKE_PREFIX_PATH} "$ENV{CMAKE_PREFIX_PATH}:$ENV{HOME}/gbench")
elseif(min_build STREQUAL option)
set(VTKm_BUILD_ALL_LIBRARIES "OFF" CACHE STRING "")
set(VTKm_VERBOSE_MODULES "ON" CACHE STRING "")
elseif(mpi STREQUAL option)
set(VTKm_ENABLE_MPI "ON" CACHE STRING "")
elseif(tbb STREQUAL option)
set(VTKm_ENABLE_TBB "ON" CACHE STRING "")
elseif(openmp STREQUAL option)
set(VTKm_ENABLE_OPENMP "ON" CACHE STRING "")
elseif(cuda STREQUAL option)
set(VTKm_ENABLE_CUDA "ON" CACHE STRING "")
elseif(kokkos STREQUAL option)
set(VTKm_ENABLE_KOKKOS "ON" CACHE STRING "")
elseif(hdf5 STREQUAL option)
set(VTKm_ENABLE_HDF5_IO "ON" CACHE STRING "")
elseif(maxwell STREQUAL option)
set(vtkm_cuda_arch "maxwell")
elseif(pascal STREQUAL option)
set(vtkm_cuda_arch "pascal")
elseif(volta STREQUAL option)
set(vtkm_cuda_arch "volta")
elseif(turing STREQUAL option)
set(vtkm_cuda_arch "turing")
elseif(ampere STREQUAL option)
set(vtkm_cuda_arch "ampere")
elseif(hip STREQUAL option)
if(CMAKE_VERSION VERSION_LESS_EQUAL 3.20)
message(FATAL_ERROR "VTK-m requires cmake > 3.20 to enable HIP support")
endif()
set(VTKm_ENABLE_KOKKOS_HIP ON CACHE STRING "")
# -O1 and -O2 results in ridiculous build times in ROCm < 5.3
set(CMAKE_HIP_FLAGS "-O0 " CACHE STRING "")
set(CMAKE_HIP_FLAGS_RELWITHDEBINFO "-g" CACHE STRING "")
elseif(ccache STREQUAL option)
find_program(CCACHE_COMMAND NAMES ccache REQUIRED)
set(CCACHE_VERSION "NotFound")
execute_process(
COMMAND ${CCACHE_COMMAND} "--version"
OUTPUT_VARIABLE CCACHE_VERSION
ECHO_ERROR_VARIABLE
)
string(REGEX REPLACE "\n" " " CCACHE_VERSION ${CCACHE_VERSION})
string(REGEX REPLACE "^.*ccache version ([.0-9]*).*$" "\\1"
CCACHE_VERSION ${CCACHE_VERSION})
# We need a recent version of ccache in order to ignore -isystem while
# hashing keys for the building cache.
if(${CCACHE_VERSION} VERSION_GREATER_EQUAL 4)
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_COMMAND}" CACHE STRING "")
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_COMMAND}" CACHE STRING "")
if(VTKm_ENABLE_CUDA)
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_COMMAND}" CACHE STRING "")
endif()
if(VTKm_ENABLE_KOKKOS_HIP)
set(CMAKE_HIP_COMPILER_LAUNCHER "${CCACHE_COMMAND}" CACHE STRING "")
endif()
else()
message(FATAL_ERROR "CCACHE version [${CCACHE_VERSION}] is <= 4")
endif()
elseif(perftest STREQUAL option)
set(VTKm_ENABLE_PERFORMANCE_TESTING "ON" CACHE STRING "")
endif()
endforeach()
# We need to use VTKm_CUDA_Architecture for older CMake versions
if(vtkm_cuda_arch)
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.18)
if(vtkm_cuda_arch STREQUAL "maxwell")
set(CMAKE_CUDA_ARCHITECTURES "50" CACHE STRING "")
elseif(vtkm_cuda_arch STREQUAL "pascal")
set(CMAKE_CUDA_ARCHITECTURES "60" CACHE STRING "")
elseif(vtkm_cuda_arch STREQUAL "volta")
set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "")
elseif(vtkm_cuda_arch STREQUAL "turing")
set(CMAKE_CUDA_ARCHITECTURES "75" CACHE STRING "")
elseif(vtkm_cuda_arch STREQUAL "ampere")
set(CMAKE_CUDA_ARCHITECTURES "80" CACHE STRING "")
endif()
else()
set(VTKm_CUDA_Architecture "${vtkm_cuda_arch}" CACHE STRING "")
endif()
endif()
# Compile tutorials on all builders. The code is small and basic. And since
# it is the tutorial, it should work really well.
set(VTKm_ENABLE_TUTORIALS "ON" CACHE STRING "")
set(CTEST_USE_LAUNCHERS "ON" CACHE STRING "")
# We need to store the absolute path so that
# the launcher still work even when sccache isn't
# on our path.
find_program(SCCACHE_COMMAND NAMES sccache)
if(SCCACHE_COMMAND)
set(CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_COMMAND}" CACHE STRING "")
set(CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_COMMAND}" CACHE STRING "")
# Use VTKm_CUDA_Architecture to determine if we need CUDA sccache setup
# since this will also capture when kokkos is being used with CUDA backing
if(DEFINED VTKm_CUDA_Architecture OR DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_COMPILER_LAUNCHER "${SCCACHE_COMMAND}" CACHE STRING "")
endif()
endif()
# Setup all the sanitizers as a list
if(sanitizers)
set(VTKm_USE_SANITIZER "${sanitizers}" CACHE STRING "" FORCE)
endif()
#!/usr/bin/env bash
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
set -x
WORKDIR="$1"
VERSION="$2"
shift 2
if [ ! -d "$WORKDIR" ] || [ -z "$VERSION" ]
then
echo "[E] missing args: Invoke as .gitlab/ci/config/kokkos.sh <WORKDIR> <VERSION> [extra_args]"
exit 1
fi
# Build and install Kokkos
curl -L "https://github.com/kokkos/kokkos/archive/refs/tags/$VERSION.tar.gz" \
| tar -C "$WORKDIR" -xzf -
cmake -S "$WORKDIR/kokkos-$VERSION" -B "$WORKDIR/kokkos_build" \
"-DCMAKE_BUILD_TYPE:STRING=release" \
"-DCMAKE_CXX_COMPILER_LAUNCHER=ccache" \
"-DCMAKE_CXX_STANDARD:STRING=17" \
"-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON" \
"-DKokkos_ENABLE_HIP:BOOL=ON" \
"-DKokkos_ENABLE_HIP_RELOCATABLE_DEVICE_CODE:BOOL=OFF" \
"-DKokkos_ENABLE_SERIAL:BOOL=ON" \
$*
cmake --build "$WORKDIR/kokkos_build"
cmake --install "$WORKDIR/kokkos_build"
##============================================================================
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##============================================================================
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
set(version 1.11.0)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
set(sha256sum 9726e730d5b8599f82654dc80265e64a10a8a817552c34153361ed0c017f9f02)
set(platform linux)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
set(sha256sum 21915277db59756bfc61f6f281c1f5e3897760b63776fd3d360f77dd7364137f)
set(platform mac)
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
set(sha256sum d0ee3da143211aa447e750085876c9b9d7bcdd637ab5b2c5b41349c617f22f3b)
set(platform win)
else()
message(FATAL_ERROR "Unrecognized platform ${CMAKE_HOST_SYSTEM_NAME}")
endif()
set(tarball "ninja-${platform}.zip")
file(DOWNLOAD
"https://github.com/ninja-build/ninja/releases/download/v${version}/${tarball}" .gitlab/${tarball}
EXPECTED_HASH SHA256=${sha256sum}
SHOW_PROGRESS
)
execute_process(
COMMAND ${CMAKE_COMMAND} -E tar xf ${tarball}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/.gitlab
RESULT_VARIABLE extract_results
)
if(extract_results)
message(FATAL_ERROR "Extracting `${tarball}` failed: ${extract_results}.")
endif()
#!/bin/sh
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
set -e
readonly version="nvcc_v4"
readonly sha256sum="260779b4a740fe8373d251d1e318541a98dd5cd2f8051eedd55227a5a852fdf7"
readonly filename="sccache-0.2.14-$version-x86_64-unknown-linux-musl"
readonly tarball="$filename.tar.gz"
cd .gitlab
echo "$sha256sum $tarball" > sccache.sha256sum
curl --insecure -OL "https://github.com/robertmaynard/sccache/releases/download/$version/$tarball"
sha256sum --check sccache.sha256sum
tar xf "$tarball"
#mv "$filename/sccache" .
##=============================================================================
##
## Copyright (c) Kitware, Inc.
## All rights reserved.
## See LICENSE.txt for details.
##
## This software is distributed WITHOUT ANY WARRANTY; without even
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
## PURPOSE. See the above copyright notice for more information.
##
##=============================================================================
$erroractionpreference = "stop"
cmd /c "`"$env:VCVARSALL`" $VCVARSPLATFORM -vcvars_ver=$VCVARSVERSION & set" |
foreach {
if ($_ -match "=") {
$v = $_.split("=")
[Environment]::SetEnvironmentVariable($v[0], $v[1])
}
}