diff --git a/.github/actions/apply-style/Dockerfile b/.github/actions/apply-style/Dockerfile new file mode 100644 index 0000000000..830265778e --- /dev/null +++ b/.github/actions/apply-style/Dockerfile @@ -0,0 +1,7 @@ +FROM ghcr.io/llnl/radiuss:clang-14-ubuntu-22.04 + +COPY entrypoint.sh /entrypoint.sh + +USER root + +ENTRYPOINT ["/entrypoint.sh"] diff --git a/.github/actions/apply-style/entrypoint.sh b/.github/actions/apply-style/entrypoint.sh new file mode 100755 index 0000000000..2116f23d9f --- /dev/null +++ b/.github/actions/apply-style/entrypoint.sh @@ -0,0 +1,68 @@ +#!/bin/bash + +# This is a bare minimum of options needed to create the `style` build target. +CMAKE_ARGS=-DCMAKE_CXX_COMPILER=clang++ +CMAKE_ARGS="$CMAKE_ARGS -DENABLE_CLANGFORMAT=ON" +CMAKE_ARGS="$CMAKE_ARGS -DCLANGFORMAT_EXECUTABLE=/usr/bin/clang-format" +CMAKE_ARGS="$CMAKE_ARGS -DAXOM_ENABLE_ALL_COMPONENTS=OFF" + +# Avoid error "fatal: detected dubious ownership in repository at '/github/workspace'" +REPO_PATH=/github/workspace +git config --global --add safe.directory "$REPO_PATH" +find "$REPO_PATH" -type d | while read -r dir; do + git config --global --add safe.directory "$dir" +done + +git fetch + +### +# Attempt to find the branch of the PR from the detached head state +## + +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" +echo "Attempting to find branch that matches commit..." + +# Get the current commit SHA +current_commit_sha=$(git rev-parse HEAD) +# List all branches containing the current commit SHA +branches=$(git branch -r --contains $current_commit_sha) + +# Loop over the string split by whitespace +branch="" +num_branches_found=0 +for _possible_branch in $branches; do + # Skip items that start with "pull/" + if [[ $_possible_branch == pull/* ]]; then + continue + fi + if [[ $_possible_branch == origin/* ]]; then + _possible_branch=$(echo "$_possible_branch" | sed 's/origin\///') + fi + echo "Possible Branch: $_possible_branch" + branch=$_possible_branch + num_branches_found=$((num_branches_found+1)) +done + +if [ "$num_branches_found" -ne 1 ]; then + echo "Error: Unable to find a single branch that matched git sha $current_commit_sha" + exit 1 +fi + +echo "Found branch: $branch" +echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + +git checkout $branch + +git submodule update --init --recursive + +mkdir build && cd build +cmake $CMAKE_ARGS ../src +make style +cd .. + +git config user.name "format-robot" +git config user.email "no-reply@llnl.gov" +if [ -n "$(git status --porcelain)" ]; then + git commit -am 'Apply style updates' + git push +fi diff --git a/.github/workflows/apply-style.yml b/.github/workflows/apply-style.yml new file mode 100644 index 0000000000..77c36f4fce --- /dev/null +++ b/.github/workflows/apply-style.yml @@ -0,0 +1,28 @@ +name: Apply Style + +on: + issue_comment: + types: [created] + +jobs: + apply-style: + if: startsWith(github.event.comment.body, '/style') + name: Apply Style to Source + runs-on: ubuntu-latest + + steps: + # Checkout the GitHub created reference for the PR. + # The only way to do this is by using the "issue" number + # but that is really the PR number in this context. + # This is due to using an `issue_comment` event which + # is due to the GitHub Actions API that does not have + # a `pull_request_comment` event or something similar. + # This leaves us in a detached head state which is corrected + # in `apply-style/entrypoint.sh` + - name: Checkout pull request + uses: actions/checkout@v3 + with: + ref: refs/pull/${{ github.event.issue.number }}/head + + - name: Apply style updates + uses: ./.github/actions/apply-style diff --git a/.github/workflows/docker_build_tpls.yml b/.github/workflows/docker_build_tpls.yml index 11f0250098..5a61c08723 100644 --- a/.github/workflows/docker_build_tpls.yml +++ b/.github/workflows/docker_build_tpls.yml @@ -11,7 +11,7 @@ jobs: name: Builds a docker image and extracts generated hostconfigs strategy: matrix: - compiler: [clang-10, gcc-11] + compiler: [clang-14, gcc-13] env: REPO: axom/tpls HOSTCONFIG_LOC: /home/axom/export_hostconfig @@ -19,35 +19,38 @@ jobs: steps: - name: Extract branch name shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + run: | + echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT id: extract_branch - name: Get dockerfile name shell: bash - run: echo "##[set-output name=filename;]$(echo ${DOCKERFILE_PREFIX}${{ matrix.compiler }})" + run: | + echo "filename=$(echo ${DOCKERFILE_PREFIX}${{ matrix.compiler }})" >> $GITHUB_OUTPUT id: dockerfile_name - name: Get dockerhub repo name shell: bash run: | - echo ${REPO}:${{ matrix.compiler }}_`date "+%m-%d-%y_%Hh-%Mm"` - echo "##[set-output name=repo_plus_tag;]$(echo ${REPO}:${{ matrix.compiler }}_`date "+%m-%d-%y_%Hh-%Mm"`)" - echo "##[set-output name=repo_plus_latest;]$(echo ${REPO}:${{ matrix.compiler }}_latest)" + repo_plus_tag=$(echo ${REPO}:${{ matrix.compiler }}_`date "+%m-%d-%y_%Hh-%Mm"`) && export repo_plus_tag + echo $repo_plus_tag + echo "repo_plus_tag=$repo_plus_tag" >> $GITHUB_OUTPUT + echo "repo_plus_latest=$(echo ${REPO}:${{ matrix.compiler }}_latest)" >> $GITHUB_OUTPUT id: repo_name - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push id: docker_build - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: push: true tags: ${{ steps.repo_name.outputs.repo_plus_tag }},${{ steps.repo_name.outputs.repo_plus_latest }} @@ -66,7 +69,7 @@ jobs: docker rm extract_hc - name: Upload hostconfig - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ matrix.compiler }}_hostconfigs path: ./extracted_hc/export_hostconfig/* diff --git a/.github/workflows/test_windows_tpls.yml b/.github/workflows/test_windows_tpls.yml index b38b2aed0e..4ac42495d9 100644 --- a/.github/workflows/test_windows_tpls.yml +++ b/.github/workflows/test_windows_tpls.yml @@ -29,21 +29,21 @@ jobs: steps: - name: Checkout repo w/ submodules - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive - name: Set up python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: '3.7' + python-version: '3.10' - name: List path and files run: ls - name: Run uberenv (${{ matrix.triplet }}) run: python3 ./scripts/uberenv/uberenv.py --triplet ${{ matrix.triplet }} - name: Save Uberenv logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: uberenv_artifacts_${{ matrix.triplet }}_${{ matrix.cfg }}.zip @@ -73,7 +73,7 @@ jobs: ls ctest -C ${{ matrix.cfg }} --no-compress-output -T Test - name: Save CTest logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: ctest_artifacts_${{ matrix.triplet }}_${{ matrix.cfg }}.zip diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2eaf2c8d66..4c9e1f0254 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,16 +6,10 @@ variables: LLNL_SERVICE_USER: atk GIT_SUBMODULE_STRATEGY: recursive - PROJECT_ALLOC_NAME: ${CI_PROJECT_NAME}_ci_${CI_PIPELINE_ID} BUILD_ROOT: ${CI_PROJECT_DIR} FULL_BUILD_ROOT: ${CI_BUILDS_DIR}/axom/${CI_JOB_NAME} SLURM_OVERLAP: 1 -stages: - - allocate - - build - - release - .src_workflow: rules: - if: '$FULL_BUILD != "ON"' @@ -28,12 +22,8 @@ stages: # Template .src_build_script: script: - # Use pre-existing allocation if any - - export JOBID=$(if [[ "$SYS_TYPE" == "toss_4_x86_64_ib" ]]; then squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A; fi) - - ASSIGN_ID=$(if [[ -n "${JOBID}" ]]; then echo "--jobid=${JOBID}"; fi) - # BUILD + TEST - echo -e "\e[0Ksection_start:$(date +%s):src_build_and_test\r\e[0KSource Build and Test ${CI_PROJECT_NAME}" - - ${ALLOC_COMMAND} ${ASSIGN_ID} python3 scripts/llnl_scripts/build_src.py -v --host-config ${HOST_CONFIG} --extra-cmake-options '-DENABLE_DOCS=OFF ${EXTRA_CMAKE_OPTIONS}' --build-type ${BUILD_TYPE:-Debug} ${EXTRA_OPTIONS} + - ${ALLOC_COMMAND} python3 scripts/llnl_scripts/build_src.py -v --host-config ${HOST_CONFIG} --extra-cmake-options '-DENABLE_DOCS=OFF ${EXTRA_CMAKE_OPTIONS}' --build-type ${BUILD_TYPE:-Debug} ${EXTRA_OPTIONS} - echo -e "\e[0Ksection_end:$(date +%s):src_build_and_test\r\e[0K" artifacts: expire_in: 2 weeks @@ -58,6 +48,9 @@ stages: # This is where jobs are included include: - - local: .gitlab/build_quartz.yml + - local: .gitlab/build_ruby.yml - local: .gitlab/build_lassen.yml - local: .gitlab/build_tioga.yml + # ID token requirement for Gitlab 17.0+ + - project: 'lc-templates/id_tokens' + file: 'id_tokens.yml' diff --git a/.gitlab/build_lassen.yml b/.gitlab/build_lassen.yml index e2d22eba23..21f870faa1 100644 --- a/.gitlab/build_lassen.yml +++ b/.gitlab/build_lassen.yml @@ -6,8 +6,10 @@ #### # This is the share configuration of jobs for lassen .on_lassen: + variables: + SCHEDULER_PARAMETERS: "-nnodes 1 -W ${ALLOC_TIME} -q pci -alloc_flags atsdisable" tags: - - shell + - batch - lassen rules: - if: '$CI_COMMIT_BRANCH =~ /_lnone/ || $ON_LASSEN == "OFF"' #run except if ... @@ -20,16 +22,14 @@ #### # Template .src_build_on_lassen: - stage: build variables: - ALLOC_COMMAND: "lalloc 1 -W 25 -q pci -alloc_flags atsdisable" + ALLOC_TIME: "25" extends: [.src_build_script, .on_lassen, .src_workflow] needs: [] .full_build_on_lassen: - stage: build variables: - ALLOC_COMMAND: "lalloc 1 -W 45 -q pci -alloc_flags atsdisable" + ALLOC_TIME: "45" extends: [.full_build_script, .on_lassen, .full_workflow] needs: [] @@ -59,18 +59,6 @@ lassen-gcc_8_3_1_cuda-src: HOST_CONFIG: "lassen-blueos_3_ppc64le_ib_p9-${COMPILER}.cmake" extends: [.src_build_on_lassen] -lassen-xl_16_1_1-src: - variables: - COMPILER: "xl@16.1.1.1" - HOST_CONFIG: "lassen-blueos_3_ppc64le_ib_p9-${COMPILER}.cmake" - extends: [.src_build_on_lassen] - -lassen-xl_16_1_1_cuda-src: - variables: - COMPILER: "xl@16.1.1.2_cuda" - HOST_CONFIG: "lassen-blueos_3_ppc64le_ib_p9-${COMPILER}.cmake" - extends: [.src_build_on_lassen] - #### # Full Build jobs lassen-clang_10_0_1-full: @@ -98,16 +86,3 @@ lassen-gcc_8_3_1_cuda-full: SPEC: "%${COMPILER}~mfem+cuda" EXTRA_SPEC: "cuda_arch=70" extends: [.full_build_on_lassen] - -lassen-xl_16_1_1-full: - variables: - COMPILER: "xl@16.1.1.1" - SPEC: "%${COMPILER}+mfem~openmp~cpp14" - extends: [.full_build_on_lassen] - -lassen-xl_16_1_1_cuda-full: - variables: - COMPILER: "xl@16.1.1.2" - SPEC: "%${COMPILER}+mfem+cuda~openmp~cpp14" - EXTRA_SPEC: "cuda_arch=70" - extends: [.full_build_on_lassen] diff --git a/.gitlab/build_quartz.yml b/.gitlab/build_quartz.yml deleted file mode 100644 index c5a4e3d1d8..0000000000 --- a/.gitlab/build_quartz.yml +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -# other Axom Project Developers. See the top-level LICENSE file for details. -# -# SPDX-License-Identifier: (BSD-3-Clause) - -#### -# This is the shared configuration of jobs for quartz -.on_quartz: - tags: - - shell - - quartz - rules: - - if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_QUARTZ == "OFF"' #run except if ... - when: never - - if: '$CI_JOB_NAME =~ /quartz_release/' - when: always - - when: on_success - before_script: - - module load cmake/3.19.2 - -#### -# In pre-build phase, allocate a node for builds -quartz_allocate: - variables: - GIT_STRATEGY: none - extends: [.on_quartz, .src_workflow] - stage: allocate - script: - - salloc -N 1 -c 36 -t 60 --res=ci --no-shell --job-name=${PROJECT_ALLOC_NAME} - needs: [] - -#### -# In post-build phase, deallocate resources -# Note : make sure this is run even on build phase failure -quartz_release: - variables: - GIT_STRATEGY: none - extends: [.on_quartz, .src_workflow] - stage: release - script: - - export JOBID=$(squeue -h --name=${PROJECT_ALLOC_NAME} --format=%A) - - if [[ -n "${JOBID}" ]]; then scancel ${JOBID}; fi - -#### -# Template -.src_build_on_quartz: - stage: build - variables: - ALLOC_COMMAND: "srun -t 60 -N 1 -p pdebug" - extends: [.src_build_script, .on_quartz, .src_workflow] - needs: [quartz_allocate] - -.full_build_on_quartz: - stage: build - variables: - ALLOC_COMMAND: "srun -t 60 -N 1 -p pdebug" - extends: [.full_build_script, .on_quartz, .full_workflow] - needs: [] - -#### -# PR Build jobs -quartz-clang_14_0_6-debug-src: - variables: - COMPILER: "clang@14.0.6" - HOST_CONFIG: "quartz-toss_4_x86_64_ib-${COMPILER}.cmake" - extends: .src_build_on_quartz - -quartz-clang_14_0_6-release-src: - variables: - COMPILER: "clang@14.0.6" - HOST_CONFIG: "quartz-toss_4_x86_64_ib-${COMPILER}.cmake" - BUILD_TYPE: "Release" - EXTRA_CMAKE_OPTIONS: "-DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON" - extends: .src_build_on_quartz - -quartz-gcc_10_3_1-src: - variables: - COMPILER: "gcc@10.3.1" - HOST_CONFIG: "quartz-toss_4_x86_64_ib-${COMPILER}.cmake" - extends: .src_build_on_quartz - -# TODO: turn back on -#quartz-gcc_10_3_1_no_fortran-src: -# variables: -# COMPILER: "gcc@10.3.1" -# HOST_CONFIG: "quartz-toss_4_x86_64_ib-${COMPILER}_nofortran.cmake" -# extends: .src_build_on_quartz - -# disabled due to not actually having a host-config yet -# quartz-intel_19_0_4-src: -# variables: -# COMPILER: "intel@19.0.4" -# HOST_CONFIG: "quartz-toss_4_x86_64_ib-${COMPILER}.cmake" -# extends: .src_build_on_quartz - - -#### -# Full Build jobs -quartz-clang_14_0_6-full: - variables: - COMPILER: "clang@14.0.6" - SPEC: "%${COMPILER}+mfem" - extends: .full_build_on_quartz - -quartz-gcc_10_3_1-full: - variables: - COMPILER: "gcc@8.3.1" - SPEC: "%${COMPILER}+mfem" - extends: .full_build_on_quartz - -quartz-gcc_10_3_1_no_fortran-full: - variables: - COMPILER: "gcc@10.3.1" - SPEC: "%${COMPILER}~fortran+mfem" - extends: .full_build_on_quartz - -# disabled due to not actually having a host-config yet -#quartz-intel_19_0_4-full: -# variables: -# COMPILER: "intel@19.0.4" -# SPEC: "%${COMPILER}+mfem~cpp14" -# extends: .full_build_on_quartz diff --git a/.gitlab/build_ruby.yml b/.gitlab/build_ruby.yml new file mode 100644 index 0000000000..50f23a68d8 --- /dev/null +++ b/.gitlab/build_ruby.yml @@ -0,0 +1,99 @@ +# Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +# other Axom Project Developers. See the top-level LICENSE file for details. +# +# SPDX-License-Identifier: (BSD-3-Clause) + +#### +# This is the shared configuration of jobs for ruby +.on_ruby: + variables: + SCHEDULER_PARAMETERS: "--res=ci --exclusive=user --deadline=now+1hour -N1 -t ${ALLOC_TIME}" + tags: + - batch + - ruby + rules: + - if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_RUBY == "OFF"' #run except if ... + when: never + - if: '$CI_JOB_NAME =~ /ruby_release/' + when: always + - when: on_success + before_script: + - module load cmake/3.19.2 + +#### +# Template +.src_build_on_ruby: + variables: + ALLOC_TIME: "30" + extends: [.src_build_script, .on_ruby, .src_workflow] + needs: [] + +.full_build_on_ruby: + variables: + ALLOC_TIME: "60" + extends: [.full_build_script, .on_ruby, .full_workflow] + needs: [] + +#### +# PR Build jobs +ruby-clang_14_0_6-debug-src: + variables: + COMPILER: "clang@14.0.6" + HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}.cmake" + extends: .src_build_on_ruby + +ruby-clang_14_0_6-release-src: + variables: + COMPILER: "clang@14.0.6" + HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}.cmake" + BUILD_TYPE: "Release" + EXTRA_CMAKE_OPTIONS: "-DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON" + extends: .src_build_on_ruby + +ruby-gcc_10_3_1-src: + variables: + COMPILER: "gcc@10.3.1" + HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}.cmake" + extends: .src_build_on_ruby + +# TODO: turn back on +#ruby-gcc_10_3_1_no_fortran-src: +# variables: +# COMPILER: "gcc@10.3.1" +# HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}_nofortran.cmake" +# extends: .src_build_on_ruby + +# disabled due to not actually having a host-config yet +# ruby-intel_19_0_4-src: +# variables: +# COMPILER: "intel@19.0.4" +# HOST_CONFIG: "ruby-toss_4_x86_64_ib-${COMPILER}.cmake" +# extends: .src_build_on_ruby + + +#### +# Full Build jobs +ruby-clang_14_0_6-full: + variables: + COMPILER: "clang@14.0.6" + SPEC: "%${COMPILER}+mfem" + extends: .full_build_on_ruby + +ruby-gcc_10_3_1-full: + variables: + COMPILER: "gcc@8.3.1" + SPEC: "%${COMPILER}+mfem" + extends: .full_build_on_ruby + +ruby-gcc_10_3_1_no_fortran-full: + variables: + COMPILER: "gcc@10.3.1" + SPEC: "%${COMPILER}~fortran+mfem" + extends: .full_build_on_ruby + +# disabled due to not actually having a host-config yet +#ruby-intel_19_0_4-full: +# variables: +# COMPILER: "intel@19.0.4" +# SPEC: "%${COMPILER}+mfem~cpp14" +# extends: .full_build_on_ruby diff --git a/.gitlab/build_rzansel.yml b/.gitlab/build_rzansel.yml index 390c387dbe..8c9594b7ed 100644 --- a/.gitlab/build_rzansel.yml +++ b/.gitlab/build_rzansel.yml @@ -6,10 +6,11 @@ #### # This is the share configuration of jobs for rzansel .on_rzansel: - variables: tags: - - shell + - batch - rzansel + variables: + SCHEDULER_PARAMETERS: "-nnodes 1 -W ${ALLOC_TIME} -alloc_flags atsdisable" before_script: - module load cuda/11.2.0 - module load cmake/3.21.1 @@ -17,16 +18,14 @@ #### # Template .src_build_on_rzansel: - stage: build variables: - ALLOC_COMMAND: "lalloc 1 -W 25 -q pdebug" + ALLOC_TIME: "25" extends: [.src_build_script, .on_rzansel, .src_workflow] needs: [] .full_build_on_rzansel: - stage: build variables: - ALLOC_COMMAND: "lalloc 1 -W 45 -q pdebug" + ALLOC_TIME: "45" extends: [.full_build_script, .on_rzansel, .full_workflow] needs: [] diff --git a/.gitlab/build_rzgenie.yml b/.gitlab/build_rzgenie.yml index 2e0300bb04..39c668fe00 100644 --- a/.gitlab/build_rzgenie.yml +++ b/.gitlab/build_rzgenie.yml @@ -6,26 +6,25 @@ #### # This is the shared configuration of jobs for rzgenie .on_rzgenie: + variables: + SCHEDULER_PARAMETERS: "--deadline=now+1hour -N1 -t ${ALLOC_TIME}" tags: - - shell + - batch - rzgenie before_script: - module load cmake/3.18.0 - #### # Template .src_build_on_rzgenie: - stage: build variables: - ALLOC_COMMAND: "salloc -p pdebug -t 30 -N 1 -n36 srun --interactive -n1" + ALLOC_TIME: "30" extends: [.src_build_script, .on_rzgenie, .src_workflow] needs: [] .full_build_on_rzgenie: - stage: build variables: - ALLOC_COMMAND: "srun -p pdebug -t 60 -N 1 -n 1" + ALLOC_TIME: "60" extends: [.full_build_script, .on_rzgenie, .full_workflow] needs: [] diff --git a/.gitlab/build_tioga.yml b/.gitlab/build_tioga.yml index d1ec502610..bf7182f835 100644 --- a/.gitlab/build_tioga.yml +++ b/.gitlab/build_tioga.yml @@ -6,8 +6,10 @@ #### # This is the shared configuration of jobs for tioga .on_tioga: + variables: + SCHEDULER_PARAMETERS: "--queue pci --exclusive --time-limit=${ALLOC_TIME}m --nodes=1" tags: - - shell + - batch - tioga rules: - if: '$CI_COMMIT_BRANCH =~ /_qnone/ || $ON_TIOGA == "OFF"' #run except if ... @@ -19,16 +21,14 @@ #### # Template .src_build_on_tioga: - stage: build variables: - ALLOC_COMMAND: "flux run --queue pci --exclusive --time-limit=30m --nodes=1" + ALLOC_TIME: "30" extends: [.src_build_script, .on_tioga, .src_workflow] needs: [] .full_build_on_tioga: - stage: build variables: - ALLOC_COMMAND: "flux run --queue pci --exclusive --time-limit=60m --nodes=1" + ALLOC_TIME: "60" extends: [.full_build_script, .on_tioga, .full_workflow] needs: [] diff --git a/.mailmap b/.mailmap index e366e891f9..18ba1fc677 100644 --- a/.mailmap +++ b/.mailmap @@ -25,6 +25,7 @@ Cyrus D. Harrison Cyrus Daniel Taller Danny Taller <66029857+dtaller@users.noreply.github.com> Esteban Pauli Esteban Pauli <40901502+estebanpauli@users.noreply.github.com> Evan Taylor Desantola Evan Taylor DeSantola +format-robot format-robot George Zagaris George Zagaris Jacob Spainhour jcs15c Jacob Spainhour Jacob Spainhour diff --git a/.uberenv_config.json b/.uberenv_config.json index 7bad086557..e20d3fd25d 100644 --- a/.uberenv_config.json +++ b/.uberenv_config.json @@ -4,12 +4,12 @@ "package_final_phase": "initconfig", "package_source_dir": "../..", "spack_url": "https://github.com/spack/spack.git", -"spack_commit": "0d92b07dbd30b41bc6f50a61f26bc0056dca5e44", +"spack_commit": "cade66d842a894075938bc5528475d9fcd8bd559", "spack_configs_path": "scripts/spack/configs", "spack_packages_path": ["scripts/spack/radiuss-spack-configs/packages", "scripts/spack/packages"], "spack_concretizer": "clingo", "vcpkg_url": "https://github.com/microsoft/vcpkg", -"vcpkg_commit": "c8696863d371ab7f46e213d8f5ca923c4aef2a00", +"vcpkg_commit": "898b728edc5e0d12b50015f9cd18247c4257a3eb", "vcpkg_triplet": "x64-windows", "vcpkg_ports_path": "scripts/vcpkg_ports" } diff --git a/CITATION.cff b/CITATION.cff index 6a2c3818a4..b291511e96 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -24,6 +24,7 @@ authors: given-names: Cyrus - family-names: Hornung given-names: Richard + orcid: "https://orcid.org/0000-0002-9495-6972" - family-names: Larsen given-names: Matthew - family-names: Moody diff --git a/RELEASE b/RELEASE index ec1babb39d..bc5d27be0f 100644 --- a/RELEASE +++ b/RELEASE @@ -1,6 +1,6 @@ ******************************************************************************* -Axom: ................................, version 0.9.0 +Axom: ................................, version 0.10.0 Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC. Produced at the Lawrence Livermore National Laboratory. diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 8e6d1f08ab..602f2e1f41 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -17,7 +17,75 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com The Axom project release numbers follow [Semantic Versioning](http://semver.org/spec/v2.0.0.html). -## [Unreleased] - Release date yyyy-mm-dd +## [Version 0.10.0] - Release date 2024-09-27 + +### Added +- Added SLIC constructors that take in a `std::string` for the stream. If string is + interpreted as a file name, the file is not opened until SLIC flushes and the + stream has at least one message logged. +- Primal: Adds a `clip()` operator overload for clipping a 2D polygon against + another 2D polygon. +- Primal: Adds `Polygon::reverseOrientation()` to reverse orientation of + a polygon in-place. +- Adds `StaticArray`, a wrapper for `StackArray` with a size member variable. +- Multidimenional `core::Array` supports column-major and arbitrary stride ordering, + in addition to the default row-major ordering. +- Adds new `PolygonArray` and `MAX_VERTS` template parameters to `primal::Polygon` for dynamic + or static allocation. +- Adds support for the optional `caliper` and `adiak` dependencies to axom. + These dependencies are added through axom's `spack` package via the new `+profiling` variant, + and are enabled in axom's build system via the `CALIPER_DIR` and `ADIAK_DIR` configuration paths. +- Adds new annotation macros to axom: `AXOM_ANNOTATE_{BEGIN,END,SCOPE,METADATA}`. These replace + the previous annotation macros `AXOM_PERF_MARK_{FUNCTION,SECTION}`. +- Adds a RAII-based `MPIWrapper` utility class to axom's core component. This can help setup/teardown + MPI in axom's examples. It can also be used in configurations with MPI. +- Primal: Adds a `closest_point` operator for finding the closest point on a `Segment` +- Primal: Adds a `reflectPoint` method to the `Plane` primitive +- Primal: Makes several primitive methods available in device code +- Improves support for `axom::Array` allocated in unified and pinned memory on GPU platforms. + Use of GPU-based operations for Arrays allocated in a unified memory space is controlled with + a new method, `Array::setDevicePreference()`. +- Adds `svg2contours` script to convert paths in an SVG file to an MFEM NURBS mesh +- Quest: Adds an example to query winding numbers on an MFEM NURBS mesh + +### Changed +- Updates to [Conduit version 0.9.2][https://github.com/LLNL/conduit/releases/tag/v0.9.2] +- Updates to [RAJA version 2024.07.0][https://github.com/LLNL/RAJA/releases/tag/v2024.07.0] +- Updates to [camp version 2024.07.0][https://github.com/LLNL/camp/releases/tag/v2024.07.0] +- Updates to [Umpire version 2024.07.0][https://github.com/LLNL/Umpire/releases/tag/v2024.07.0] +- `axom::CLI::ExitCodes::Success` has been changed to `axom::CLI::ExitCodes::CLI11_Success` + to avoid conflict when X11 `#define`s `Success`. +- `MarchingCubes` masking now uses the mask field's integer values instead of + converting them to booleans. The new behavior lets you select a value to mask for. + If you want to continue the boolean behavior, use only 0 or 1 in your mask field. +- Primal: `Polyhedron::centroid()` function changed to return center of mass + of the polyhedron. `Polyhedron::vertexMean()` added to return average of + polyhedron's vertices. `Polyhedron::moments()` returns the volume and centroid + of the polyhedron, the 0th and 1st moments respectively. +- `quest::ArrayIndexer` is now `axom::MDMapping`, adopting conventional terminology + and moving out of `quest`. +- `mint::structured_exec` is now `axom::nested_for_exec`, to support nested for loops + for all of Axom. See `src/axom/core/execution/nested_for_exec.hpp`. +- Set default Umpire allocator id to device instead of unified for CUDA and HIP execution policies. +- Upgrades `vcpkg` usage for axom's automated Windows builds to its + [2024.03.19 release](https://github.com/microsoft/vcpkg/releases/tag/2024.03.19). + Also updates vcpkg port versions for axom dependencies. Temporarily removes `umpire` + from axom's default dependencies on Windows due to incompatibility between umpire's + external `fmt` and axom's vendored copy. +- Turn off CMake finding dependencies on system paths. +- `axom::Array`: trivially-copyable types with a non-trivial constructor are now initialized on the GPU. +- SLIC no longer outputs the rank count in the `RANK` format string in parallel loggers. You can access + the rank count via new format option `RANK_COUNT`. + +### Removed +- Removes config option `AXOM_ENABLE_ANNOTATIONS`. Annotations are now provided by `caliper` + (and `adiak` for metadata) and are available when axom is configured with `CALIPER_DIR` and `ADIAK_DIR` + config variables. +- Removes caching of `{PACKAGE}_FOUND` variables in `SetupAxomThirdParty.cmake` +- We no longer test Axom with the XL compiler. So users should consider XL unsupported. + +### Fixed +- `numerics::eigen_solve()` has been corrected to avoid an early return with error state. ## [Version 0.9.0] - Release date 2024-03-19 @@ -1031,20 +1099,21 @@ fractions for the associated materials must be supplied before shaping. - Use this section in case of vulnerabilities -[Unreleased]: https://github.com/LLNL/axom/compare/v0.9.0...develop -[Version 0.9.0]: https://github.com/LLNL/axom/compare/v0.8.1...v0.9.0 -[Version 0.8.1]: https://github.com/LLNL/axom/compare/v0.8.0...v0.8.1 -[Version 0.8.0]: https://github.com/LLNL/axom/compare/v0.7.0...v0.8.0 -[Version 0.7.0]: https://github.com/LLNL/axom/compare/v0.6.1...v0.7.0 -[Version 0.6.1]: https://github.com/LLNL/axom/compare/v0.6.0...v0.6.1 -[Version 0.6.0]: https://github.com/LLNL/axom/compare/v0.5.0...v0.6.0 -[Version 0.5.0]: https://github.com/LLNL/axom/compare/v0.4.0...v0.5.0 -[Version 0.4.0]: https://github.com/LLNL/axom/compare/v0.3.3...v0.4.0 -[Version 0.3.3]: https://github.com/LLNL/axom/compare/v0.3.2...v0.3.3 -[Version 0.3.2]: https://github.com/LLNL/axom/compare/v0.3.1...v0.3.2 -[Version 0.3.1]: https://github.com/LLNL/axom/compare/v0.3.0...v0.3.1 -[Version 0.3.0]: https://github.com/LLNL/axom/compare/v0.2.9...v0.3.0 -[Version 0.2.9]: https://github.com/LLNL/axom/compare/v0.2.8...v0.2.9 +[Unreleased]: https://github.com/LLNL/axom/compare/v0.10.0...develop +[Version 0.10.0]: https://github.com/LLNL/axom/compare/v0.9.0...v0.10.0 +[Version 0.9.0]: https://github.com/LLNL/axom/compare/v0.8.1...v0.9.0 +[Version 0.8.1]: https://github.com/LLNL/axom/compare/v0.8.0...v0.8.1 +[Version 0.8.0]: https://github.com/LLNL/axom/compare/v0.7.0...v0.8.0 +[Version 0.7.0]: https://github.com/LLNL/axom/compare/v0.6.1...v0.7.0 +[Version 0.6.1]: https://github.com/LLNL/axom/compare/v0.6.0...v0.6.1 +[Version 0.6.0]: https://github.com/LLNL/axom/compare/v0.5.0...v0.6.0 +[Version 0.5.0]: https://github.com/LLNL/axom/compare/v0.4.0...v0.5.0 +[Version 0.4.0]: https://github.com/LLNL/axom/compare/v0.3.3...v0.4.0 +[Version 0.3.3]: https://github.com/LLNL/axom/compare/v0.3.2...v0.3.3 +[Version 0.3.2]: https://github.com/LLNL/axom/compare/v0.3.1...v0.3.2 +[Version 0.3.1]: https://github.com/LLNL/axom/compare/v0.3.0...v0.3.1 +[Version 0.3.0]: https://github.com/LLNL/axom/compare/v0.2.9...v0.3.0 +[Version 0.2.9]: https://github.com/LLNL/axom/compare/v0.2.8...v0.2.9 [clang-format]: https://releases.llvm.org/10.0.0/tools/clang/docs/ClangFormatStyleOptions.html [MFEM]: https://mfem.org diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 77b746ff19..b5cdc6bfb8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -9,8 +9,8 @@ variables: DO_BUILD: 'yes' DO_TEST: 'yes' DO_CLEAN: 'no' - CLANG10_IMAGENAME: 'axom/tpls:clang-10_03-07-24_19h-20m' - GCC11_IMAGENAME: 'axom/tpls:gcc-11_03-07-24_19h-20m' + CLANG14_IMAGENAME: 'axom/tpls:clang-14_09-23-24_17h-07m' + GCC13_IMAGENAME: 'axom/tpls:gcc-13_09-23-24_17h-07m' system.debug: false jobs: @@ -18,54 +18,62 @@ jobs: strategy: matrix: - linux_gcc11: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(GCC11_IMAGENAME)' + linux_gcc13: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(GCC13_IMAGENAME)' CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_ENABLE_MFEM_SIDRE_DATACOLLECTION:BOOL=ON' COMPILER: 'g++' - TEST_TARGET: 'linux_gcc11' - HOST_CONFIG: 'gcc@11.1.0' - linux_gcc11_64bit: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(GCC11_IMAGENAME)' + TEST_TARGET: 'linux_gcc13' + HOST_CONFIG: 'gcc@13.1.0' + linux_gcc13_64bit: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(GCC13_IMAGENAME)' CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_USE_64BIT_INDEXTYPE:BOOL=ON' COMPILER: 'g++' - TEST_TARGET: 'linux_gcc11' - HOST_CONFIG: 'gcc@11.1.0' - linux_clang10: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(CLANG10_IMAGENAME)' + TEST_TARGET: 'linux_gcc13' + HOST_CONFIG: 'gcc@13.1.0' + linux_clang14: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(CLANG14_IMAGENAME)' CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON' BUILD_TYPE: 'Release' COMPILER: 'clang++' - TEST_TARGET: 'linux_clang10' - HOST_CONFIG: 'clang@10.0.0' - linux_clang10_noraja: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(CLANG10_IMAGENAME)' + TEST_TARGET: 'linux_clang14' + HOST_CONFIG: 'clang@14.0.0' + linux_clang14_noraja: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(CLANG14_IMAGENAME)' CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON -U RAJA_DIR' BUILD_TYPE: 'Debug' COMPILER: 'clang++' - TEST_TARGET: 'linux_clang10' - HOST_CONFIG: 'clang@10.0.0' - linux_clang10_noumpire: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(CLANG10_IMAGENAME)' + TEST_TARGET: 'linux_clang14' + HOST_CONFIG: 'clang@14.0.0' + linux_clang14_noumpire: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(CLANG14_IMAGENAME)' CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON -U UMPIRE_DIR' BUILD_TYPE: 'Debug' COMPILER: 'clang++' - TEST_TARGET: 'linux_clang10' - HOST_CONFIG: 'clang@10.0.0' - linux_clang10_noraja_noumpire: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(CLANG10_IMAGENAME)' + TEST_TARGET: 'linux_clang14' + HOST_CONFIG: 'clang@14.0.0' + linux_clang14_noraja_noumpire: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(CLANG14_IMAGENAME)' CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON -U RAJA_DIR -U UMPIRE_DIR' BUILD_TYPE: 'Debug' COMPILER: 'clang++' - TEST_TARGET: 'linux_clang10' - HOST_CONFIG: 'clang@10.0.0' + TEST_TARGET: 'linux_clang14' + HOST_CONFIG: 'clang@14.0.0' + linux_clang14_noprofiling: + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(CLANG14_IMAGENAME)' + CMAKE_EXTRA_FLAGS: '-DBUILD_SHARED_LIBS=ON -DAXOM_QUEST_ENABLE_EXTRA_REGRESSION_TESTS:BOOL=ON -U CALIPER_DIR -U ADIAK_DIR' + BUILD_TYPE: 'Debug' + COMPILER: 'clang++' + TEST_TARGET: 'linux_clang14' + HOST_CONFIG: 'clang@14.0.0' osx_gcc: - VM_ImageName: 'macos-11' + VM_ImageName: 'macos-12' CMAKE_EXTRA_FLAGS: '-DAXOM_ENABLE_SIDRE:BOOL=OFF -DAXOM_ENABLE_INLET:BOOL=OFF -DAXOM_ENABLE_KLEE:BOOL=OFF' TEST_TARGET: 'osx_gcc' windows: @@ -122,10 +130,10 @@ jobs: - job: Check_Style variables: - VM_ImageName: 'ubuntu-20.04' - Compiler_ImageName: '$(CLANG10_IMAGENAME)' - TEST_TARGET: 'linux_clang10' - HOST_CONFIG: 'clang@10.0.0' + VM_ImageName: 'ubuntu-22.04' + Compiler_ImageName: '$(CLANG14_IMAGENAME)' + TEST_TARGET: 'linux_clang14' + HOST_CONFIG: 'clang@14.0.0' CMAKE_EXTRA_FLAGS: '-DENABLE_CLANGFORMAT=ON' pool: vmImage: $(VM_ImageName) diff --git a/data b/data index 400c4e5066..c0c33018bd 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 400c4e5066620c653b770bd84b77c326da588567 +Subproject commit c0c33018bd6796cfe2ff64e46bb2a16402f00f9c diff --git a/host-configs/docker/clang@10.0.0.cmake b/host-configs/docker/clang@10.0.0.cmake deleted file mode 100644 index 1cbb7a5753..0000000000 --- a/host-configs/docker/clang@10.0.0.cmake +++ /dev/null @@ -1,110 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/home/axom/axom_tpls/clang-10.0.0/umpire-2024.02.0-lhbuzui3h5a2qwqpogpsemqq5web7nai;/home/axom/axom_tpls/clang-10.0.0/raja-2024.02.0-jlkwrlbhqvm5z32lc3snswvia4ubmtzp;/home/axom/axom_tpls/clang-10.0.0/mfem-4.6.0-ftusbr7mglftqsxy32nmjzgau2ptdrsp;/home/axom/axom_tpls/clang-10.0.0/hypre-2.24.0-fzucmiugxgaiuljssnzc453bwuagxp6o;/home/axom/axom_tpls/clang-10.0.0/lua-5.4.4-c7monkarzpznammmzte52w57k4tul7rq;/home/axom/axom_tpls/clang-10.0.0/readline-8.2-pd6al5egorkcypr7h46odukuef5v6wea;/home/axom/axom_tpls/clang-10.0.0/conduit-0.9.1-ilr73n4bdpnhpsvwfc725alcwve2ubtp;/home/axom/axom_tpls/clang-10.0.0/parmetis-4.0.3-aq6l5hu42jvpds2zb7hc7in4pfgermvu;/home/axom/axom_tpls/clang-10.0.0/hdf5-1.8.23-vodh4tlps5o4frqcm37r7udmywen3viq;/home/axom/axom_tpls/clang-10.0.0/blt-0.6.1.4-fuytsx6iavxnc5gwfhb56i4ftfqfulnx;/home/axom/axom_tpls/clang-10.0.0/fmt-10.2.1-d2ptxbacnuhzfpxrdoxrj225apoeb7pb;/home/axom/axom_tpls/clang-10.0.0/camp-2024.02.0-bf47c6jhvwog6hnusaduhggzmfm46d24;/home/axom/axom_tpls/clang-10.0.0/zlib-ng-2.1.5-abmvhf2ybobwqltpe6zlskjxvxxtxcxq;/home/axom/axom_tpls/clang-10.0.0/metis-5.1.0-xjk3ehggqmdb7rbmht5l5el5wfau6vso;/home/axom/axom_tpls/clang-10.0.0/ncurses-6.4-y3oisa6sfw3llb5nsvrzh7efh6zn5unh;/home/axom/axom_tpls/clang-10.0.0/gmake-4.4.1-gzcsdny44nh45v3qhvshhpvvubmhc3jm" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/home/axom/axom_tpls/clang-10.0.0/axom-develop-tt2s343kb7b22xx46ufv5rkhhlkattnm/lib;/home/axom/axom_tpls/clang-10.0.0/axom-develop-tt2s343kb7b22xx46ufv5rkhhlkattnm/lib64;/home/axom/axom_tpls/clang-10.0.0/conduit-0.9.1-ilr73n4bdpnhpsvwfc725alcwve2ubtp/lib;/home/axom/axom_tpls/clang-10.0.0/hdf5-1.8.23-vodh4tlps5o4frqcm37r7udmywen3viq/lib;/home/axom/axom_tpls/clang-10.0.0/zlib-ng-2.1.5-abmvhf2ybobwqltpe6zlskjxvxxtxcxq/lib;/home/axom/axom_tpls/clang-10.0.0/metis-5.1.0-xjk3ehggqmdb7rbmht5l5el5wfau6vso/lib;/home/axom/axom_tpls/clang-10.0.0/parmetis-4.0.3-aq6l5hu42jvpds2zb7hc7in4pfgermvu/lib;/home/axom/axom_tpls/clang-10.0.0/lua-5.4.4-c7monkarzpznammmzte52w57k4tul7rq/lib;/home/axom/axom_tpls/clang-10.0.0/ncurses-6.4-y3oisa6sfw3llb5nsvrzh7efh6zn5unh/lib;/home/axom/axom_tpls/clang-10.0.0/readline-8.2-pd6al5egorkcypr7h46odukuef5v6wea/lib;/home/axom/axom_tpls/clang-10.0.0/mfem-4.6.0-ftusbr7mglftqsxy32nmjzgau2ptdrsp/lib;/home/axom/axom_tpls/clang-10.0.0/hypre-2.24.0-fzucmiugxgaiuljssnzc453bwuagxp6o/lib;/home/axom/axom_tpls/clang-10.0.0/raja-2024.02.0-jlkwrlbhqvm5z32lc3snswvia4ubmtzp/lib;/home/axom/axom_tpls/clang-10.0.0/camp-2024.02.0-bf47c6jhvwog6hnusaduhggzmfm46d24/lib;/home/axom/axom_tpls/clang-10.0.0/umpire-2024.02.0-lhbuzui3h5a2qwqpogpsemqq5web7nai/lib;/home/axom/axom_tpls/clang-10.0.0/fmt-10.2.1-d2ptxbacnuhzfpxrdoxrj225apoeb7pb/lib" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/home/axom/axom_tpls/clang-10.0.0/axom-develop-tt2s343kb7b22xx46ufv5rkhhlkattnm/lib;/home/axom/axom_tpls/clang-10.0.0/axom-develop-tt2s343kb7b22xx46ufv5rkhhlkattnm/lib64;/home/axom/axom_tpls/clang-10.0.0/conduit-0.9.1-ilr73n4bdpnhpsvwfc725alcwve2ubtp/lib;/home/axom/axom_tpls/clang-10.0.0/hdf5-1.8.23-vodh4tlps5o4frqcm37r7udmywen3viq/lib;/home/axom/axom_tpls/clang-10.0.0/zlib-ng-2.1.5-abmvhf2ybobwqltpe6zlskjxvxxtxcxq/lib;/home/axom/axom_tpls/clang-10.0.0/metis-5.1.0-xjk3ehggqmdb7rbmht5l5el5wfau6vso/lib;/home/axom/axom_tpls/clang-10.0.0/parmetis-4.0.3-aq6l5hu42jvpds2zb7hc7in4pfgermvu/lib;/home/axom/axom_tpls/clang-10.0.0/lua-5.4.4-c7monkarzpznammmzte52w57k4tul7rq/lib;/home/axom/axom_tpls/clang-10.0.0/ncurses-6.4-y3oisa6sfw3llb5nsvrzh7efh6zn5unh/lib;/home/axom/axom_tpls/clang-10.0.0/readline-8.2-pd6al5egorkcypr7h46odukuef5v6wea/lib;/home/axom/axom_tpls/clang-10.0.0/mfem-4.6.0-ftusbr7mglftqsxy32nmjzgau2ptdrsp/lib;/home/axom/axom_tpls/clang-10.0.0/hypre-2.24.0-fzucmiugxgaiuljssnzc453bwuagxp6o/lib;/home/axom/axom_tpls/clang-10.0.0/raja-2024.02.0-jlkwrlbhqvm5z32lc3snswvia4ubmtzp/lib;/home/axom/axom_tpls/clang-10.0.0/camp-2024.02.0-bf47c6jhvwog6hnusaduhggzmfm46d24/lib;/home/axom/axom_tpls/clang-10.0.0/umpire-2024.02.0-lhbuzui3h5a2qwqpogpsemqq5web7nai/lib;/home/axom/axom_tpls/clang-10.0.0/fmt-10.2.1-d2ptxbacnuhzfpxrdoxrj225apoeb7pb/lib" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: clang@=10.0.0 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/clang/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/clang/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/clang/gfortran" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/bin/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/bin/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran" CACHE PATH "") - -endif() - -set(CMAKE_C_FLAGS "-pthread" CACHE STRING "") - -set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS " -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib64" CACHE STRING "Adds a missing libstdc++ rpath") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/bin/mpic++" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/mpirun" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/home/axom/axom_tpls/clang-10.0.0" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-ilr73n4bdpnhpsvwfc725alcwve2ubtp" CACHE PATH "") - -# C2C not built - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-ftusbr7mglftqsxy32nmjzgau2ptdrsp" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-vodh4tlps5o4frqcm37r7udmywen3viq" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-c7monkarzpznammmzte52w57k4tul7rq" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-jlkwrlbhqvm5z32lc3snswvia4ubmtzp" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-lhbuzui3h5a2qwqpogpsemqq5web7nai" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-bf47c6jhvwog6hnusaduhggzmfm46d24" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -# ClangFormat disabled due to llvm and devtools not in spec - -set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") - -set(ENABLE_DOCS OFF CACHE BOOL "") - - diff --git a/host-configs/docker/clang@14.0.0.cmake b/host-configs/docker/clang@14.0.0.cmake new file mode 100644 index 0000000000..b10bf5239b --- /dev/null +++ b/host-configs/docker/clang@14.0.0.cmake @@ -0,0 +1,114 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/local/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/home/axom/axom_tpls/clang-14.0.0/umpire-2024.07.0-sm47io5l4xfgy3enimczrmiijsw4pdol;/home/axom/axom_tpls/clang-14.0.0/fmt-11.0.2-zxzr5ejl2icv2wkxrmytysohcwa56dym;/home/axom/axom_tpls/clang-14.0.0/raja-2024.07.0-wvpmv7ubnzad5frbffxkco37c4zwdh66;/home/axom/axom_tpls/clang-14.0.0/camp-2024.07.0-drhul62p64d42qwqnc6sbazwxudcgtzo;/home/axom/axom_tpls/clang-14.0.0/mfem-4.6.0-4khgoizhebqald4wsjiriiep2nsuqrj2;/home/axom/axom_tpls/clang-14.0.0/hypre-2.24.0-gmgla43c3i2sasbyvrzvvynfheah5dki;/home/axom/axom_tpls/clang-14.0.0/gmake-4.4.1-z6rav4bbtoxhlimk3lo3zuhcobg2p5l6;/home/axom/axom_tpls/clang-14.0.0/conduit-0.9.2-am5eywgjadrfdslkbm2iiukrgony25jx;/home/axom/axom_tpls/clang-14.0.0/parmetis-4.0.3-totaqsyyaqqne76f3h3utf6he5hnfj3i;/home/axom/axom_tpls/clang-14.0.0/metis-5.1.0-vstqxoisaqzmauseelggw2ipkjxpxyb2;/home/axom/axom_tpls/clang-14.0.0/hdf5-1.8.23-pd77dfbbqmoujqh64homnougp5stx4mr;/home/axom/axom_tpls/clang-14.0.0/caliper-2.10.0-oirvdfkyevzclrrtc4d4fkoiccw7oshp;/home/axom/axom_tpls/clang-14.0.0/libunwind-1.6.2-yovgajxilzs4khvufv73arjcgya5tr25;/home/axom/axom_tpls/clang-14.0.0/elfutils-0.191-jzxk7dbbigew6uulryjbu3p3zmjobpa7;/home/axom/axom_tpls/clang-14.0.0/zstd-1.5.6-jdvede5e5ftsojui6ghblyl7u2znbnu3;/home/axom/axom_tpls/clang-14.0.0/zlib-ng-2.2.1-oevfc4jn574mzjvfakgsrsso5g7vc3uj;/home/axom/axom_tpls/clang-14.0.0/xz-5.4.6-zovyngtilewkrzialvu453oy3usgahmu;/home/axom/axom_tpls/clang-14.0.0/pkgconf-2.2.0-fs63yvwfbbvxaxmqdhh5jhtn6ch6slbg;/home/axom/axom_tpls/clang-14.0.0/libiconv-1.17-ejpqqyvgaa3bcjowgoxdtknuwbtja3bz;/home/axom/axom_tpls/clang-14.0.0/blt-0.6.2-i23yaxmyycvounaz4wfduk5vvaurliye;/home/axom/axom_tpls/clang-14.0.0/adiak-0.4.0-axvlay3g64yralqxz6tet3dg2ilxsd2z" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/home/axom/axom_tpls/clang-14.0.0/axom-develop-77bsfofkeh2hi2ff7fstp2qsg2fzimak/lib;/home/axom/axom_tpls/clang-14.0.0/axom-develop-77bsfofkeh2hi2ff7fstp2qsg2fzimak/lib64;/home/axom/axom_tpls/clang-14.0.0/adiak-0.4.0-axvlay3g64yralqxz6tet3dg2ilxsd2z/lib;/home/axom/axom_tpls/clang-14.0.0/caliper-2.10.0-oirvdfkyevzclrrtc4d4fkoiccw7oshp/lib;/home/axom/axom_tpls/clang-14.0.0/elfutils-0.191-jzxk7dbbigew6uulryjbu3p3zmjobpa7/lib;/home/axom/axom_tpls/clang-14.0.0/libiconv-1.17-ejpqqyvgaa3bcjowgoxdtknuwbtja3bz/lib;/home/axom/axom_tpls/clang-14.0.0/pkgconf-2.2.0-fs63yvwfbbvxaxmqdhh5jhtn6ch6slbg/lib;/home/axom/axom_tpls/clang-14.0.0/xz-5.4.6-zovyngtilewkrzialvu453oy3usgahmu/lib;/home/axom/axom_tpls/clang-14.0.0/zlib-ng-2.2.1-oevfc4jn574mzjvfakgsrsso5g7vc3uj/lib;/home/axom/axom_tpls/clang-14.0.0/zstd-1.5.6-jdvede5e5ftsojui6ghblyl7u2znbnu3/lib;/home/axom/axom_tpls/clang-14.0.0/libunwind-1.6.2-yovgajxilzs4khvufv73arjcgya5tr25/lib;/home/axom/axom_tpls/clang-14.0.0/conduit-0.9.2-am5eywgjadrfdslkbm2iiukrgony25jx/lib;/home/axom/axom_tpls/clang-14.0.0/hdf5-1.8.23-pd77dfbbqmoujqh64homnougp5stx4mr/lib;/home/axom/axom_tpls/clang-14.0.0/metis-5.1.0-vstqxoisaqzmauseelggw2ipkjxpxyb2/lib;/home/axom/axom_tpls/clang-14.0.0/parmetis-4.0.3-totaqsyyaqqne76f3h3utf6he5hnfj3i/lib;/home/axom/axom_tpls/clang-14.0.0/mfem-4.6.0-4khgoizhebqald4wsjiriiep2nsuqrj2/lib;/home/axom/axom_tpls/clang-14.0.0/hypre-2.24.0-gmgla43c3i2sasbyvrzvvynfheah5dki/lib;/home/axom/axom_tpls/clang-14.0.0/raja-2024.07.0-wvpmv7ubnzad5frbffxkco37c4zwdh66/lib;/home/axom/axom_tpls/clang-14.0.0/camp-2024.07.0-drhul62p64d42qwqnc6sbazwxudcgtzo/lib;/home/axom/axom_tpls/clang-14.0.0/umpire-2024.07.0-sm47io5l4xfgy3enimczrmiijsw4pdol/lib;/home/axom/axom_tpls/clang-14.0.0/fmt-11.0.2-zxzr5ejl2icv2wkxrmytysohcwa56dym/lib" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/home/axom/axom_tpls/clang-14.0.0/axom-develop-77bsfofkeh2hi2ff7fstp2qsg2fzimak/lib;/home/axom/axom_tpls/clang-14.0.0/axom-develop-77bsfofkeh2hi2ff7fstp2qsg2fzimak/lib64;/home/axom/axom_tpls/clang-14.0.0/adiak-0.4.0-axvlay3g64yralqxz6tet3dg2ilxsd2z/lib;/home/axom/axom_tpls/clang-14.0.0/caliper-2.10.0-oirvdfkyevzclrrtc4d4fkoiccw7oshp/lib;/home/axom/axom_tpls/clang-14.0.0/elfutils-0.191-jzxk7dbbigew6uulryjbu3p3zmjobpa7/lib;/home/axom/axom_tpls/clang-14.0.0/libiconv-1.17-ejpqqyvgaa3bcjowgoxdtknuwbtja3bz/lib;/home/axom/axom_tpls/clang-14.0.0/pkgconf-2.2.0-fs63yvwfbbvxaxmqdhh5jhtn6ch6slbg/lib;/home/axom/axom_tpls/clang-14.0.0/xz-5.4.6-zovyngtilewkrzialvu453oy3usgahmu/lib;/home/axom/axom_tpls/clang-14.0.0/zlib-ng-2.2.1-oevfc4jn574mzjvfakgsrsso5g7vc3uj/lib;/home/axom/axom_tpls/clang-14.0.0/zstd-1.5.6-jdvede5e5ftsojui6ghblyl7u2znbnu3/lib;/home/axom/axom_tpls/clang-14.0.0/libunwind-1.6.2-yovgajxilzs4khvufv73arjcgya5tr25/lib;/home/axom/axom_tpls/clang-14.0.0/conduit-0.9.2-am5eywgjadrfdslkbm2iiukrgony25jx/lib;/home/axom/axom_tpls/clang-14.0.0/hdf5-1.8.23-pd77dfbbqmoujqh64homnougp5stx4mr/lib;/home/axom/axom_tpls/clang-14.0.0/metis-5.1.0-vstqxoisaqzmauseelggw2ipkjxpxyb2/lib;/home/axom/axom_tpls/clang-14.0.0/parmetis-4.0.3-totaqsyyaqqne76f3h3utf6he5hnfj3i/lib;/home/axom/axom_tpls/clang-14.0.0/mfem-4.6.0-4khgoizhebqald4wsjiriiep2nsuqrj2/lib;/home/axom/axom_tpls/clang-14.0.0/hypre-2.24.0-gmgla43c3i2sasbyvrzvvynfheah5dki/lib;/home/axom/axom_tpls/clang-14.0.0/raja-2024.07.0-wvpmv7ubnzad5frbffxkco37c4zwdh66/lib;/home/axom/axom_tpls/clang-14.0.0/camp-2024.07.0-drhul62p64d42qwqnc6sbazwxudcgtzo/lib;/home/axom/axom_tpls/clang-14.0.0/umpire-2024.07.0-sm47io5l4xfgy3enimczrmiijsw4pdol/lib;/home/axom/axom_tpls/clang-14.0.0/fmt-11.0.2-zxzr5ejl2icv2wkxrmytysohcwa56dym/lib" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: clang@=14.0.0 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/clang/clang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/clang/clang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/usr/bin/clang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/bin/clang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran-11" CACHE PATH "") + +endif() + +set(CMAKE_C_FLAGS "-fPIC -pthread" CACHE STRING "") + +set(CMAKE_CXX_FLAGS "-fPIC -pthread" CACHE STRING "") + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +set(BLT_EXE_LINKER_FLAGS " -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/lib64" CACHE STRING "Adds a missing libstdc++ rpath") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/bin/mpic++" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_EXECUTABLE "/usr/bin/mpirun" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP ON CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/home/axom/axom_tpls/clang-14.0.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-am5eywgjadrfdslkbm2iiukrgony25jx" CACHE PATH "") + +# C2C not built + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-4khgoizhebqald4wsjiriiep2nsuqrj2" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-pd77dfbbqmoujqh64homnougp5stx4mr" CACHE PATH "") + +set(LUA_DIR "/usr" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-wvpmv7ubnzad5frbffxkco37c4zwdh66" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-sm47io5l4xfgy3enimczrmiijsw4pdol" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-axvlay3g64yralqxz6tet3dg2ilxsd2z" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-oirvdfkyevzclrrtc4d4fkoiccw7oshp" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-drhul62p64d42qwqnc6sbazwxudcgtzo" CACHE PATH "") + +# scr not built + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +# ClangFormat disabled due to llvm and devtools not in spec + +set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") + +set(ENABLE_DOCS OFF CACHE BOOL "") + + diff --git a/host-configs/docker/gcc@11.1.0.cmake b/host-configs/docker/gcc@11.1.0.cmake deleted file mode 100644 index a7d9e80e4a..0000000000 --- a/host-configs/docker/gcc@11.1.0.cmake +++ /dev/null @@ -1,108 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/home/axom/axom_tpls/gcc-11.1.0/umpire-2024.02.0-enni4yeviruk7h5zfbmkroiox3xg3if3;/home/axom/axom_tpls/gcc-11.1.0/fmt-10.2.1-qvyqa6m3lunl3mt642hhztl3tbkze4sy;/home/axom/axom_tpls/gcc-11.1.0/raja-2024.02.0-gwrqm6xvkr3upgmhd77ie7rnzw6mtdts;/home/axom/axom_tpls/gcc-11.1.0/camp-2024.02.0-jzv34cutypmwj5drk65diases5ngmfq2;/home/axom/axom_tpls/gcc-11.1.0/mfem-4.6.0-x4tzg3vnrkck26vlduf2e2ayis2dfsr7;/home/axom/axom_tpls/gcc-11.1.0/hypre-2.24.0-w22uojfq5lainzap3vqxxbqjnhdynuhd;/home/axom/axom_tpls/gcc-11.1.0/lua-5.4.4-oxlydb36zseusohbrkaj34db5sz6jwad;/home/axom/axom_tpls/gcc-11.1.0/readline-8.2-ujrbpdblmke4uvalui3g242eounq56jf;/home/axom/axom_tpls/gcc-11.1.0/ncurses-6.4-biefcjrdgewfl6hygtwhakrjxiqpovbb;/home/axom/axom_tpls/gcc-11.1.0/gmake-4.4.1-657kbqwor2lcjpqz3clrhqam6khfzm2g;/home/axom/axom_tpls/gcc-11.1.0/conduit-0.9.1-uffsgbtewmhjj4utevbbpanarb5mahtl;/home/axom/axom_tpls/gcc-11.1.0/parmetis-4.0.3-pqylj3fddaoytfuej3ynedyz6pnitner;/home/axom/axom_tpls/gcc-11.1.0/metis-5.1.0-6zaty2e2as4n3b2lb5eaee7nxdkzfk2a;/home/axom/axom_tpls/gcc-11.1.0/hdf5-1.8.23-jikkc6tqhuwlhy42zrfmsvw55yrk63en;/home/axom/axom_tpls/gcc-11.1.0/zlib-ng-2.1.5-lxz6tnypfmbtf6xlp6wws3fcsvqxu5ug;/home/axom/axom_tpls/gcc-11.1.0/blt-0.6.1.4-uttgpnnmvo2rofs2lgoetd7zu4xnt3uu;/home/axom/axom_tpls/gcc-11.1.0/gcc-runtime-11.1.0-usjxs3hhp7yzd26bafjrzaqwqi43qleg" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/home/axom/axom_tpls/gcc-11.1.0/axom-develop-oddjd3i56sfj5qsy6r32mzyhr5fohopm/lib;/home/axom/axom_tpls/gcc-11.1.0/axom-develop-oddjd3i56sfj5qsy6r32mzyhr5fohopm/lib64;/home/axom/axom_tpls/gcc-11.1.0/conduit-0.9.1-uffsgbtewmhjj4utevbbpanarb5mahtl/lib;/home/axom/axom_tpls/gcc-11.1.0/gcc-runtime-11.1.0-usjxs3hhp7yzd26bafjrzaqwqi43qleg/lib;/home/axom/axom_tpls/gcc-11.1.0/hdf5-1.8.23-jikkc6tqhuwlhy42zrfmsvw55yrk63en/lib;/home/axom/axom_tpls/gcc-11.1.0/zlib-ng-2.1.5-lxz6tnypfmbtf6xlp6wws3fcsvqxu5ug/lib;/home/axom/axom_tpls/gcc-11.1.0/metis-5.1.0-6zaty2e2as4n3b2lb5eaee7nxdkzfk2a/lib;/home/axom/axom_tpls/gcc-11.1.0/parmetis-4.0.3-pqylj3fddaoytfuej3ynedyz6pnitner/lib;/home/axom/axom_tpls/gcc-11.1.0/lua-5.4.4-oxlydb36zseusohbrkaj34db5sz6jwad/lib;/home/axom/axom_tpls/gcc-11.1.0/ncurses-6.4-biefcjrdgewfl6hygtwhakrjxiqpovbb/lib;/home/axom/axom_tpls/gcc-11.1.0/readline-8.2-ujrbpdblmke4uvalui3g242eounq56jf/lib;/home/axom/axom_tpls/gcc-11.1.0/mfem-4.6.0-x4tzg3vnrkck26vlduf2e2ayis2dfsr7/lib;/home/axom/axom_tpls/gcc-11.1.0/hypre-2.24.0-w22uojfq5lainzap3vqxxbqjnhdynuhd/lib;/home/axom/axom_tpls/gcc-11.1.0/raja-2024.02.0-gwrqm6xvkr3upgmhd77ie7rnzw6mtdts/lib;/home/axom/axom_tpls/gcc-11.1.0/camp-2024.02.0-jzv34cutypmwj5drk65diases5ngmfq2/lib;/home/axom/axom_tpls/gcc-11.1.0/umpire-2024.02.0-enni4yeviruk7h5zfbmkroiox3xg3if3/lib;/home/axom/axom_tpls/gcc-11.1.0/fmt-10.2.1-qvyqa6m3lunl3mt642hhztl3tbkze4sy/lib" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/home/axom/axom_tpls/gcc-11.1.0/axom-develop-oddjd3i56sfj5qsy6r32mzyhr5fohopm/lib;/home/axom/axom_tpls/gcc-11.1.0/axom-develop-oddjd3i56sfj5qsy6r32mzyhr5fohopm/lib64;/home/axom/axom_tpls/gcc-11.1.0/conduit-0.9.1-uffsgbtewmhjj4utevbbpanarb5mahtl/lib;/home/axom/axom_tpls/gcc-11.1.0/gcc-runtime-11.1.0-usjxs3hhp7yzd26bafjrzaqwqi43qleg/lib;/home/axom/axom_tpls/gcc-11.1.0/hdf5-1.8.23-jikkc6tqhuwlhy42zrfmsvw55yrk63en/lib;/home/axom/axom_tpls/gcc-11.1.0/zlib-ng-2.1.5-lxz6tnypfmbtf6xlp6wws3fcsvqxu5ug/lib;/home/axom/axom_tpls/gcc-11.1.0/metis-5.1.0-6zaty2e2as4n3b2lb5eaee7nxdkzfk2a/lib;/home/axom/axom_tpls/gcc-11.1.0/parmetis-4.0.3-pqylj3fddaoytfuej3ynedyz6pnitner/lib;/home/axom/axom_tpls/gcc-11.1.0/lua-5.4.4-oxlydb36zseusohbrkaj34db5sz6jwad/lib;/home/axom/axom_tpls/gcc-11.1.0/ncurses-6.4-biefcjrdgewfl6hygtwhakrjxiqpovbb/lib;/home/axom/axom_tpls/gcc-11.1.0/readline-8.2-ujrbpdblmke4uvalui3g242eounq56jf/lib;/home/axom/axom_tpls/gcc-11.1.0/mfem-4.6.0-x4tzg3vnrkck26vlduf2e2ayis2dfsr7/lib;/home/axom/axom_tpls/gcc-11.1.0/hypre-2.24.0-w22uojfq5lainzap3vqxxbqjnhdynuhd/lib;/home/axom/axom_tpls/gcc-11.1.0/raja-2024.02.0-gwrqm6xvkr3upgmhd77ie7rnzw6mtdts/lib;/home/axom/axom_tpls/gcc-11.1.0/camp-2024.02.0-jzv34cutypmwj5drk65diases5ngmfq2/lib;/home/axom/axom_tpls/gcc-11.1.0/umpire-2024.02.0-enni4yeviruk7h5zfbmkroiox3xg3if3/lib;/home/axom/axom_tpls/gcc-11.1.0/fmt-10.2.1-qvyqa6m3lunl3mt642hhztl3tbkze4sy/lib" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: gcc@=11.1.0 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/gcc/g++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/bin/gcc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/bin/g++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran" CACHE PATH "") - -endif() - -set(CMAKE_C_FLAGS "-pthread" CACHE STRING "") - -set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/bin/mpic++" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/mpirun" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/home/axom/axom_tpls/gcc-11.1.0" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-uffsgbtewmhjj4utevbbpanarb5mahtl" CACHE PATH "") - -# C2C not built - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-x4tzg3vnrkck26vlduf2e2ayis2dfsr7" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-jikkc6tqhuwlhy42zrfmsvw55yrk63en" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-oxlydb36zseusohbrkaj34db5sz6jwad" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-gwrqm6xvkr3upgmhd77ie7rnzw6mtdts" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-enni4yeviruk7h5zfbmkroiox3xg3if3" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-jzv34cutypmwj5drk65diases5ngmfq2" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -# ClangFormat disabled due to llvm and devtools not in spec - -set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") - -set(ENABLE_DOCS OFF CACHE BOOL "") - - diff --git a/host-configs/docker/gcc@13.1.0.cmake b/host-configs/docker/gcc@13.1.0.cmake new file mode 100644 index 0000000000..9903e02b9e --- /dev/null +++ b/host-configs/docker/gcc@13.1.0.cmake @@ -0,0 +1,112 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/local/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/home/axom/axom_tpls/gcc-13.1.0/umpire-2024.07.0-k3g2kkrgg3xm7gd4wk77muqugnot6fft;/home/axom/axom_tpls/gcc-13.1.0/fmt-11.0.2-hsbwcggb37md6wtz4tjbh3z2paokho4y;/home/axom/axom_tpls/gcc-13.1.0/raja-2024.07.0-rymjdaxurpykwax25lwylyiv772poffj;/home/axom/axom_tpls/gcc-13.1.0/camp-2024.07.0-wneowcxzurhqrmg42ogjv63gyfhr2lnd;/home/axom/axom_tpls/gcc-13.1.0/mfem-4.6.0-5fjoim3uxggiliuc44wui67rbjmgh7hq;/home/axom/axom_tpls/gcc-13.1.0/hypre-2.24.0-7pacjj7ewndpjzazjwbp6qghas4ws3ip;/home/axom/axom_tpls/gcc-13.1.0/gmake-4.4.1-vwzrx2oqjvswmqwdo626x45tfykgu3ng;/home/axom/axom_tpls/gcc-13.1.0/conduit-0.9.2-lcdtevgkh5bbpklklnvsowc3vdditqpo;/home/axom/axom_tpls/gcc-13.1.0/parmetis-4.0.3-utygb5gonzx3cgj4woxncetbsw2zi2tm;/home/axom/axom_tpls/gcc-13.1.0/metis-5.1.0-rjlnybcmutwgdsb27z42ijaoe7wds5o5;/home/axom/axom_tpls/gcc-13.1.0/hdf5-1.8.23-oi5ufdr27irz6rnjdj656eou2od3zfrc;/home/axom/axom_tpls/gcc-13.1.0/caliper-2.10.0-tdr37n7gay6uoqmdw2oj4wwaxdghgtn5;/home/axom/axom_tpls/gcc-13.1.0/libunwind-1.6.2-uirmjkjmcnqqt6xth2bptu5eoeqzu4nn;/home/axom/axom_tpls/gcc-13.1.0/elfutils-0.191-kptewlijpd6x3ft3hroikmkc6qjfncpu;/home/axom/axom_tpls/gcc-13.1.0/zstd-1.5.6-7csff4jw5wtgljbl4y5j7hvjghuqrni2;/home/axom/axom_tpls/gcc-13.1.0/zlib-ng-2.2.1-adq5uevpd2ikujgb33j7beigfmchh25t;/home/axom/axom_tpls/gcc-13.1.0/xz-5.4.6-rosh6ypotokoprccdmjiemlg7ne5bmyq;/home/axom/axom_tpls/gcc-13.1.0/pkgconf-2.2.0-po553barjadpcxi66bmnkzhpornl7ei2;/home/axom/axom_tpls/gcc-13.1.0/libiconv-1.17-g5wxbxpkhhpcimbmmstmwv4qg366swp4;/home/axom/axom_tpls/gcc-13.1.0/blt-0.6.2-mexdu2wzpzpihalohypnx3uuco4mh3wa;/home/axom/axom_tpls/gcc-13.1.0/adiak-0.4.0-a5snac3dmnvrdevxvs6g3fgswpl6rwk3;/home/axom/axom_tpls/gcc-13.1.0/gcc-runtime-13.1.0-hxyekq6c3ihrn66ro3b6ypzq6kg5awrm" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/home/axom/axom_tpls/gcc-13.1.0/axom-develop-tjhs7ewcprnj2cmd7fdnvzjxm6qanrdr/lib;/home/axom/axom_tpls/gcc-13.1.0/axom-develop-tjhs7ewcprnj2cmd7fdnvzjxm6qanrdr/lib64;/home/axom/axom_tpls/gcc-13.1.0/adiak-0.4.0-a5snac3dmnvrdevxvs6g3fgswpl6rwk3/lib;/home/axom/axom_tpls/gcc-13.1.0/gcc-runtime-13.1.0-hxyekq6c3ihrn66ro3b6ypzq6kg5awrm/lib;/home/axom/axom_tpls/gcc-13.1.0/caliper-2.10.0-tdr37n7gay6uoqmdw2oj4wwaxdghgtn5/lib;/home/axom/axom_tpls/gcc-13.1.0/elfutils-0.191-kptewlijpd6x3ft3hroikmkc6qjfncpu/lib;/home/axom/axom_tpls/gcc-13.1.0/libiconv-1.17-g5wxbxpkhhpcimbmmstmwv4qg366swp4/lib;/home/axom/axom_tpls/gcc-13.1.0/pkgconf-2.2.0-po553barjadpcxi66bmnkzhpornl7ei2/lib;/home/axom/axom_tpls/gcc-13.1.0/xz-5.4.6-rosh6ypotokoprccdmjiemlg7ne5bmyq/lib;/home/axom/axom_tpls/gcc-13.1.0/zlib-ng-2.2.1-adq5uevpd2ikujgb33j7beigfmchh25t/lib;/home/axom/axom_tpls/gcc-13.1.0/zstd-1.5.6-7csff4jw5wtgljbl4y5j7hvjghuqrni2/lib;/home/axom/axom_tpls/gcc-13.1.0/libunwind-1.6.2-uirmjkjmcnqqt6xth2bptu5eoeqzu4nn/lib;/home/axom/axom_tpls/gcc-13.1.0/conduit-0.9.2-lcdtevgkh5bbpklklnvsowc3vdditqpo/lib;/home/axom/axom_tpls/gcc-13.1.0/hdf5-1.8.23-oi5ufdr27irz6rnjdj656eou2od3zfrc/lib;/home/axom/axom_tpls/gcc-13.1.0/metis-5.1.0-rjlnybcmutwgdsb27z42ijaoe7wds5o5/lib;/home/axom/axom_tpls/gcc-13.1.0/parmetis-4.0.3-utygb5gonzx3cgj4woxncetbsw2zi2tm/lib;/home/axom/axom_tpls/gcc-13.1.0/mfem-4.6.0-5fjoim3uxggiliuc44wui67rbjmgh7hq/lib;/home/axom/axom_tpls/gcc-13.1.0/hypre-2.24.0-7pacjj7ewndpjzazjwbp6qghas4ws3ip/lib;/home/axom/axom_tpls/gcc-13.1.0/raja-2024.07.0-rymjdaxurpykwax25lwylyiv772poffj/lib;/home/axom/axom_tpls/gcc-13.1.0/camp-2024.07.0-wneowcxzurhqrmg42ogjv63gyfhr2lnd/lib;/home/axom/axom_tpls/gcc-13.1.0/umpire-2024.07.0-k3g2kkrgg3xm7gd4wk77muqugnot6fft/lib;/home/axom/axom_tpls/gcc-13.1.0/fmt-11.0.2-hsbwcggb37md6wtz4tjbh3z2paokho4y/lib" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/home/axom/axom_tpls/gcc-13.1.0/axom-develop-tjhs7ewcprnj2cmd7fdnvzjxm6qanrdr/lib;/home/axom/axom_tpls/gcc-13.1.0/axom-develop-tjhs7ewcprnj2cmd7fdnvzjxm6qanrdr/lib64;/home/axom/axom_tpls/gcc-13.1.0/adiak-0.4.0-a5snac3dmnvrdevxvs6g3fgswpl6rwk3/lib;/home/axom/axom_tpls/gcc-13.1.0/gcc-runtime-13.1.0-hxyekq6c3ihrn66ro3b6ypzq6kg5awrm/lib;/home/axom/axom_tpls/gcc-13.1.0/caliper-2.10.0-tdr37n7gay6uoqmdw2oj4wwaxdghgtn5/lib;/home/axom/axom_tpls/gcc-13.1.0/elfutils-0.191-kptewlijpd6x3ft3hroikmkc6qjfncpu/lib;/home/axom/axom_tpls/gcc-13.1.0/libiconv-1.17-g5wxbxpkhhpcimbmmstmwv4qg366swp4/lib;/home/axom/axom_tpls/gcc-13.1.0/pkgconf-2.2.0-po553barjadpcxi66bmnkzhpornl7ei2/lib;/home/axom/axom_tpls/gcc-13.1.0/xz-5.4.6-rosh6ypotokoprccdmjiemlg7ne5bmyq/lib;/home/axom/axom_tpls/gcc-13.1.0/zlib-ng-2.2.1-adq5uevpd2ikujgb33j7beigfmchh25t/lib;/home/axom/axom_tpls/gcc-13.1.0/zstd-1.5.6-7csff4jw5wtgljbl4y5j7hvjghuqrni2/lib;/home/axom/axom_tpls/gcc-13.1.0/libunwind-1.6.2-uirmjkjmcnqqt6xth2bptu5eoeqzu4nn/lib;/home/axom/axom_tpls/gcc-13.1.0/conduit-0.9.2-lcdtevgkh5bbpklklnvsowc3vdditqpo/lib;/home/axom/axom_tpls/gcc-13.1.0/hdf5-1.8.23-oi5ufdr27irz6rnjdj656eou2od3zfrc/lib;/home/axom/axom_tpls/gcc-13.1.0/metis-5.1.0-rjlnybcmutwgdsb27z42ijaoe7wds5o5/lib;/home/axom/axom_tpls/gcc-13.1.0/parmetis-4.0.3-utygb5gonzx3cgj4woxncetbsw2zi2tm/lib;/home/axom/axom_tpls/gcc-13.1.0/mfem-4.6.0-5fjoim3uxggiliuc44wui67rbjmgh7hq/lib;/home/axom/axom_tpls/gcc-13.1.0/hypre-2.24.0-7pacjj7ewndpjzazjwbp6qghas4ws3ip/lib;/home/axom/axom_tpls/gcc-13.1.0/raja-2024.07.0-rymjdaxurpykwax25lwylyiv772poffj/lib;/home/axom/axom_tpls/gcc-13.1.0/camp-2024.07.0-wneowcxzurhqrmg42ogjv63gyfhr2lnd/lib;/home/axom/axom_tpls/gcc-13.1.0/umpire-2024.07.0-k3g2kkrgg3xm7gd4wk77muqugnot6fft/lib;/home/axom/axom_tpls/gcc-13.1.0/fmt-11.0.2-hsbwcggb37md6wtz4tjbh3z2paokho4y/lib" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: gcc@=13.1.0 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/gcc/g++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/home/axom/axom_tpls/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/usr/bin/gcc" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/bin/g++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/bin/gfortran-13" CACHE PATH "") + +endif() + +set(CMAKE_C_FLAGS "-pthread" CACHE STRING "") + +set(CMAKE_CXX_FLAGS "-pthread" CACHE STRING "") + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/bin/mpic++" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_EXECUTABLE "/usr/bin/mpirun" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP ON CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/home/axom/axom_tpls/gcc-13.1.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-lcdtevgkh5bbpklklnvsowc3vdditqpo" CACHE PATH "") + +# C2C not built + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-5fjoim3uxggiliuc44wui67rbjmgh7hq" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-oi5ufdr27irz6rnjdj656eou2od3zfrc" CACHE PATH "") + +set(LUA_DIR "/usr" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-rymjdaxurpykwax25lwylyiv772poffj" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-k3g2kkrgg3xm7gd4wk77muqugnot6fft" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-a5snac3dmnvrdevxvs6g3fgswpl6rwk3" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-tdr37n7gay6uoqmdw2oj4wwaxdghgtn5" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-wneowcxzurhqrmg42ogjv63gyfhr2lnd" CACHE PATH "") + +# scr not built + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +# ClangFormat disabled due to llvm and devtools not in spec + +set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") + +set(ENABLE_DOCS OFF CACHE BOOL "") + + diff --git a/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake b/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake index ac2f466390..def5457942 100644 --- a/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake +++ b/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/hypre-2.24.0-euib2ua4oleljrkszmkexls4kw5cvrr7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/parmetis-4.0.3-djitip36l7hy2ubwbvrnqmfeodhnjtpk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/blt-0.6.1.4-7qqqx4bcdk5wy7ycpymq6engsddxn4y2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/fmt-10.2.1-sscbhyiiak2butrj6656mn7nfx37rpr6;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/metis-5.1.0-e5ov7trmcxxc4pa6cbysd525iyiswtkn;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/fmt-11.0.2-4qsfcbhehfixzsduttatiuomfwdvc54z;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/hypre-2.24.0-ntod2ewsq3zzbj4ndtoofhj3qio76g75;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/parmetis-4.0.3-lmasfa5fmgwk7i5sqmihzf55f6ntehdf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/metis-5.1.0-obt4c7svigtwpud2434q6yadtanpgsdq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/blt-0.6.2-6ppd4luilwwokre2edgcyzcxo4z24yr2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/metis-5.1.0-e5ov7trmcxxc4pa6cbysd525iyiswtkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/parmetis-4.0.3-djitip36l7hy2ubwbvrnqmfeodhnjtpk/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/hypre-2.24.0-euib2ua4oleljrkszmkexls4kw5cvrr7/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/fmt-10.2.1-sscbhyiiak2butrj6656mn7nfx37rpr6/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/metis-5.1.0-obt4c7svigtwpud2434q6yadtanpgsdq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/parmetis-4.0.3-lmasfa5fmgwk7i5sqmihzf55f6ntehdf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/hypre-2.24.0-ntod2ewsq3zzbj4ndtoofhj3qio76g75/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/fmt-11.0.2-4qsfcbhehfixzsduttatiuomfwdvc54z/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/metis-5.1.0-e5ov7trmcxxc4pa6cbysd525iyiswtkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/parmetis-4.0.3-djitip36l7hy2ubwbvrnqmfeodhnjtpk/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/hypre-2.24.0-euib2ua4oleljrkszmkexls4kw5cvrr7/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1/fmt-10.2.1-sscbhyiiak2butrj6656mn7nfx37rpr6/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/metis-5.1.0-obt4c7svigtwpud2434q6yadtanpgsdq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/parmetis-4.0.3-lmasfa5fmgwk7i5sqmihzf55f6ntehdf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/hypre-2.24.0-ntod2ewsq3zzbj4ndtoofhj3qio76g75/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1/fmt-11.0.2-4qsfcbhehfixzsduttatiuomfwdvc54z/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/clang/gfortran" CACHE PATH "") else() @@ -83,23 +83,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.1" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.1" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz" CACHE PATH "") # scr not built @@ -109,11 +113,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake b/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake index 8da84005d4..0e151934d5 100644 --- a/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake +++ b/host-configs/lassen-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/hypre-2.24.0-olonyxmliyqz7gjwd5jkenyxuphjff2d;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/parmetis-4.0.3-gxoxo6iesczbj7ltl3he3vxlv2xb6bdo;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/blt-0.6.1.4-niyj5uvj7qaxuceaoycpenida5z56ied;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/fmt-10.2.1-rvh2rhnae6757hi6saunbnnicoowhtns;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/cub-2.1.0-ib4hkd2iic3p7ni4lhz5bqd5yivtxo7r;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/metis-5.1.0-5t5rx3oakpli3ywkum4kfhzdiacrdkso;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/fmt-11.0.2-p4ojp6vwek46hv6i7zyrj3e77244xdr7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/cub-2.1.0-njusrm5hauwax4k6jfr5klnmyfn7zddl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/hypre-2.24.0-bdugfaghbzdfczfjp3d4rzesdlryiwzh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/parmetis-4.0.3-a3z63kvlkwkuhzwbd5ovf7dm7ecztsfq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/metis-5.1.0-n5hdbp6fuftzvqdzojxpwviw6rku4iuk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/blt-0.6.2-qxwuvi3dxchupahxk7ktljvmiuoaliea;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/metis-5.1.0-5t5rx3oakpli3ywkum4kfhzdiacrdkso/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/parmetis-4.0.3-gxoxo6iesczbj7ltl3he3vxlv2xb6bdo/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/hypre-2.24.0-olonyxmliyqz7gjwd5jkenyxuphjff2d/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/fmt-10.2.1-rvh2rhnae6757hi6saunbnnicoowhtns/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/metis-5.1.0-n5hdbp6fuftzvqdzojxpwviw6rku4iuk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/parmetis-4.0.3-a3z63kvlkwkuhzwbd5ovf7dm7ecztsfq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/hypre-2.24.0-bdugfaghbzdfczfjp3d4rzesdlryiwzh/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/fmt-11.0.2-p4ojp6vwek46hv6i7zyrj3e77244xdr7/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/metis-5.1.0-5t5rx3oakpli3ywkum4kfhzdiacrdkso/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/parmetis-4.0.3-gxoxo6iesczbj7ltl3he3vxlv2xb6bdo/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/hypre-2.24.0-olonyxmliyqz7gjwd5jkenyxuphjff2d/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2/fmt-10.2.1-rvh2rhnae6757hi6saunbnnicoowhtns/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/metis-5.1.0-n5hdbp6fuftzvqdzojxpwviw6rku4iuk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/parmetis-4.0.3-a3z63kvlkwkuhzwbd5ovf7dm7ecztsfq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/hypre-2.24.0-bdugfaghbzdfczfjp3d4rzesdlryiwzh/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2/fmt-11.0.2-p4ojp6vwek46hv6i7zyrj3e77244xdr7/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/clang/gfortran" CACHE PATH "") else() @@ -83,15 +83,13 @@ set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") +set(CMAKE_CUDA_FLAGS "" CACHE STRING "") + set(ENABLE_CUDA ON CACHE BOOL "") set(CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "") -set(AXOM_ENABLE_ANNOTATIONS ON CACHE BOOL "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda " CACHE STRING "") +set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda " CACHE STRING "" FORCE) # nvcc does not like gtest's 'pthreads' flag @@ -111,23 +109,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/clang-10.0.1.2" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/clang-10.0.1.2" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa" CACHE PATH "") # scr not built @@ -137,11 +139,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake b/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake index 2a1c2d905f..310cccd43a 100644 --- a/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake +++ b/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/fmt-10.2.1-2vqr6w6s2qq7bt4iq7mdrfiqgfiw6f5l;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/parmetis-4.0.3-p5pmp73u6nshwemscw43atzgaerk4ulu;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/metis-5.1.0-devoja547pbzdundjnarm3hug2hhay2l;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/blt-0.6.1.4-6lng5thw5prsyymfu2yzy7xdwtwij6ij;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/gcc-runtime-8.3.1.1-pykxuo3lctv7fu6i325szadkdcwrrkim;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/fmt-11.0.2-zumrzylrrolm33dtos556mq5f3zok4r5;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/parmetis-4.0.3-gljjzywrjx7cbdwesrxcatbbf7gxx77i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/metis-5.1.0-doc3c77v32y2ezjyp34txiekkh4aw7df;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/blt-0.6.2-3vhtues34jsypp5iidapr4gwjbbeiih3;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/gcc-runtime-8.3.1.1-7ub3pkbn5avszjqnhgm7625f4estye7s;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/gcc-runtime-8.3.1.1-pykxuo3lctv7fu6i325szadkdcwrrkim/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/metis-5.1.0-devoja547pbzdundjnarm3hug2hhay2l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/parmetis-4.0.3-p5pmp73u6nshwemscw43atzgaerk4ulu/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/fmt-10.2.1-2vqr6w6s2qq7bt4iq7mdrfiqgfiw6f5l/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/gcc-runtime-8.3.1.1-7ub3pkbn5avszjqnhgm7625f4estye7s/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/metis-5.1.0-doc3c77v32y2ezjyp34txiekkh4aw7df/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/parmetis-4.0.3-gljjzywrjx7cbdwesrxcatbbf7gxx77i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/fmt-11.0.2-zumrzylrrolm33dtos556mq5f3zok4r5/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/gcc-runtime-8.3.1.1-pykxuo3lctv7fu6i325szadkdcwrrkim/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/metis-5.1.0-devoja547pbzdundjnarm3hug2hhay2l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/parmetis-4.0.3-p5pmp73u6nshwemscw43atzgaerk4ulu/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1/fmt-10.2.1-2vqr6w6s2qq7bt4iq7mdrfiqgfiw6f5l/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/gcc-runtime-8.3.1.1-7ub3pkbn5avszjqnhgm7625f4estye7s/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/metis-5.1.0-doc3c77v32y2ezjyp34txiekkh4aw7df/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/parmetis-4.0.3-gljjzywrjx7cbdwesrxcatbbf7gxx77i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1/fmt-11.0.2-zumrzylrrolm33dtos556mq5f3zok4r5/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/gcc/g++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/gcc/g++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") else() @@ -75,23 +75,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.1" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.1" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h" CACHE PATH "") # MFEM not built -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj" CACHE PATH "") # scr not built @@ -101,11 +105,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake b/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake index 1b51e8b4dd..79f8f89260 100644 --- a/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake +++ b/host-configs/lassen-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/fmt-10.2.1-zv6ntw5mnzrvvm2mfyyjjly7cmixmgqr;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/cub-2.1.0-i64fir4ytcl7w527jny2bj67irxva2pu;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/parmetis-4.0.3-2h2xjxkc3qwi237ui476jgsqi2e4kpkh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/metis-5.1.0-3de4wffnqmwqslyiizuoheny6abmfkkn;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/blt-0.6.1.4-ldmftyubptq3py7xr6wirrg2eorm357z;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/gcc-runtime-8.3.1.2-7lxa2lyos6dnjfydj2ewpv4wlnnvp2hh;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/fmt-11.0.2-m3k6g4kw4garsbkhoku4irc2v7j4qfgl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/cub-2.1.0-o6s3spglv3zqsaianfeenktd7ius46w2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/parmetis-4.0.3-s425jnrfkcjs3pr6pv2w3kynrasbmpmf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/metis-5.1.0-5h3y4iipnbanartgsoxf2xwzzdehgwrx;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/blt-0.6.2-cbq4uohkstplznwiapjbxrgab4x2amww;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/gcc-runtime-8.3.1.2-hhgknzvw3jhyj4xuwmrth6lqdozld2ui;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/gcc-runtime-8.3.1.2-7lxa2lyos6dnjfydj2ewpv4wlnnvp2hh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/metis-5.1.0-3de4wffnqmwqslyiizuoheny6abmfkkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/parmetis-4.0.3-2h2xjxkc3qwi237ui476jgsqi2e4kpkh/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/fmt-10.2.1-zv6ntw5mnzrvvm2mfyyjjly7cmixmgqr/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/gcc-runtime-8.3.1.2-hhgknzvw3jhyj4xuwmrth6lqdozld2ui/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/metis-5.1.0-5h3y4iipnbanartgsoxf2xwzzdehgwrx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/parmetis-4.0.3-s425jnrfkcjs3pr6pv2w3kynrasbmpmf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/fmt-11.0.2-m3k6g4kw4garsbkhoku4irc2v7j4qfgl/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/gcc-runtime-8.3.1.2-7lxa2lyos6dnjfydj2ewpv4wlnnvp2hh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/metis-5.1.0-3de4wffnqmwqslyiizuoheny6abmfkkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/parmetis-4.0.3-2h2xjxkc3qwi237ui476jgsqi2e4kpkh/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2/fmt-10.2.1-zv6ntw5mnzrvvm2mfyyjjly7cmixmgqr/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/gcc-runtime-8.3.1.2-hhgknzvw3jhyj4xuwmrth6lqdozld2ui/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/metis-5.1.0-5h3y4iipnbanartgsoxf2xwzzdehgwrx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/parmetis-4.0.3-s425jnrfkcjs3pr6pv2w3kynrasbmpmf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2/fmt-11.0.2-m3k6g4kw4garsbkhoku4irc2v7j4qfgl/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/gcc/g++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/gcc/g++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") else() @@ -75,15 +75,13 @@ set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") +set(CMAKE_CUDA_FLAGS "" CACHE STRING "") + set(ENABLE_CUDA ON CACHE BOOL "") set(CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "") -set(AXOM_ENABLE_ANNOTATIONS ON CACHE BOOL "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda " CACHE STRING "") +set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda " CACHE STRING "" FORCE) # nvcc does not like gtest's 'pthreads' flag @@ -103,23 +101,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/gcc-8.3.1.2" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_12_08_37/gcc-8.3.1.2" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d" CACHE PATH "") # MFEM not built -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf" CACHE PATH "") + +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip" CACHE PATH "") # scr not built @@ -129,11 +131,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/lassen-blueos_3_ppc64le_ib_p9-xl@16.1.1.1.cmake b/host-configs/lassen-blueos_3_ppc64le_ib_p9-xl@16.1.1.1.cmake deleted file mode 100644 index aacc63f587..0000000000 --- a/host-configs/lassen-blueos_3_ppc64le_ib_p9-xl@16.1.1.1.cmake +++ /dev/null @@ -1,132 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/hypre-2.24.0-scxx626pb345r4bpsmn4idus6dt42jcs;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/parmetis-4.0.3-unks4pi2gc6heogvv2m3cvjvgc2etfp4;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/blt-0.6.1.4-neovqnvk3tazh7clai422vfazmbjeaqp;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/fmt-10.2.1-iknryrusj34wtt4nk4pn2ybgwa77grms;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/metis-5.1.0-qww4ax3mkehdlf7akdbjzokbf4wxws5m;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/metis-5.1.0-qww4ax3mkehdlf7akdbjzokbf4wxws5m/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/parmetis-4.0.3-unks4pi2gc6heogvv2m3cvjvgc2etfp4/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/hypre-2.24.0-scxx626pb345r4bpsmn4idus6dt42jcs/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/fmt-10.2.1-iknryrusj34wtt4nk4pn2ybgwa77grms/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/metis-5.1.0-qww4ax3mkehdlf7akdbjzokbf4wxws5m/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/parmetis-4.0.3-unks4pi2gc6heogvv2m3cvjvgc2etfp4/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/hypre-2.24.0-scxx626pb345r4bpsmn4idus6dt42jcs/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1/fmt-10.2.1-iknryrusj34wtt4nk4pn2ybgwa77grms/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: xl@=16.1.1.1 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/xl/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/xl/xlc++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/xl/xlf90" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/xl/xl-2022.08.19/bin/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/xl/xl-2022.08.19/bin/xlC" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/xl/xl-2022.08.19/bin/xlf2003" CACHE PATH "") - -endif() - -set(CMAKE_C_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_CXX_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_Fortran_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpixlc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpixlC" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpixlf" CACHE PATH "") - -set(MPIEXEC_EXECUTABLE "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpirun" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(BLT_MPI_COMMAND_APPEND "mpibind" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(BLT_FORTRAN_FLAGS "-WF,-C! -qxlf2003=polymorphic" CACHE STRING "Converts C-style comments to Fortran style in preprocessed files") - -set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3/lib64;/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3" CACHE STRING "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.1" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/lassen-blueos_3_ppc64le_ib_p9-xl@16.1.1.2_cuda.cmake b/host-configs/lassen-blueos_3_ppc64le_ib_p9-xl@16.1.1.2_cuda.cmake deleted file mode 100644 index 2c16ebf051..0000000000 --- a/host-configs/lassen-blueos_3_ppc64le_ib_p9-xl@16.1.1.2_cuda.cmake +++ /dev/null @@ -1,160 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/hypre-2.24.0-njvlsye4yxx7gzho7hpvfaiyugfztlef;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/parmetis-4.0.3-buyj5iliasgoeiauw335rdrvht4l46ut;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/blt-0.6.1.4-lhkhl33mqna6lfzkqz5fbwzy6by5effo;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/fmt-10.2.1-fl5fgyfjfnworql33rfi4oufl2fyx2ec;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/cub-2.1.0-gk54nvuh77yqhzft2rlourfzd7aqvs6i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/metis-5.1.0-wzyd4pwtce4c22uw3tq3dljdjpfjrd3z;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/metis-5.1.0-wzyd4pwtce4c22uw3tq3dljdjpfjrd3z/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/parmetis-4.0.3-buyj5iliasgoeiauw335rdrvht4l46ut/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/hypre-2.24.0-njvlsye4yxx7gzho7hpvfaiyugfztlef/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/fmt-10.2.1-fl5fgyfjfnworql33rfi4oufl2fyx2ec/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/metis-5.1.0-wzyd4pwtce4c22uw3tq3dljdjpfjrd3z/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/parmetis-4.0.3-buyj5iliasgoeiauw335rdrvht4l46ut/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/hypre-2.24.0-njvlsye4yxx7gzho7hpvfaiyugfztlef/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2/fmt-10.2.1-fl5fgyfjfnworql33rfi4oufl2fyx2ec/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: xl@=16.1.1.2 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/xl/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/xl/xlc++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/spack/lib/spack/env/xl/xlf90" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlC" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlf2003" CACHE PATH "") - -endif() - -set(CMAKE_C_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_CXX_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_Fortran_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpixlc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpixlC" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpixlf" CACHE PATH "") - -set(MPIEXEC_EXECUTABLE "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpirun" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(BLT_MPI_COMMAND_APPEND "mpibind" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Cuda -#------------------------------------------------ - -set(CUDAToolkit_ROOT "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") - -set(CMAKE_CUDA_COMPILER "${CUDAToolkit_ROOT}/bin/nvcc" CACHE PATH "") - -set(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}" CACHE PATH "") - -set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(ENABLE_CUDA ON CACHE BOOL "") - -set(CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "") - -set(AXOM_ENABLE_ANNOTATIONS ON CACHE BOOL "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda -Xcompiler=--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1 " CACHE STRING "") - -# nvcc does not like gtest's 'pthreads' flag - -set(gtest_disable_pthreads ON CACHE BOOL "") - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS OFF CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(BLT_FORTRAN_FLAGS "-WF,-C! -qxlf2003=polymorphic" CACHE STRING "Converts C-style comments to Fortran style in preprocessed files") - -set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3/lib64;/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3" CACHE STRING "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_06_20_19_26/xl-16.1.1.2" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/quartz-toss_4_x86_64_ib-clang@14.0.6.cmake b/host-configs/quartz-toss_4_x86_64_ib-clang@14.0.6.cmake deleted file mode 100644 index db22ed82db..0000000000 --- a/host-configs/quartz-toss_4_x86_64_ib-clang@14.0.6.cmake +++ /dev/null @@ -1,138 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/mfem-4.6.0-2sgpgtnhas5crnwvexabyzuzouxgblc5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/hypre-2.24.0-jonmheld2iyk5vpkxjps3wvk6ojyvkm5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/parmetis-4.0.3-de7rslbjz6xchwd4jlec2iswp6yf4yt7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/blt-0.6.1.4-oouarzy7h3sj5quygkhjaduigaxbj4at;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/fmt-10.2.1-lfndxhuits6wwazxaoj5dxl3ix3hw2cc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/zlib-ng-2.1.5-lkg7eg7nky6w74eujzgmp6hnhkaf2w7p;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/metis-5.1.0-ggcpxjmhkbi3nwtqmgu7dal2rsedyza5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/gmake-4.4.1-jimcbwsnakmlfui3jg7a4e6327ry222f;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-clang-14.0.6;/usr/tce/packages/clang/clang-14.0.6" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axom-develop-e3jrpv4mb36q3jxxcbz2ubhcdd75zs2a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axom-develop-e3jrpv4mb36q3jxxcbz2ubhcdd75zs2a/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/zlib-ng-2.1.5-lkg7eg7nky6w74eujzgmp6hnhkaf2w7p/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/metis-5.1.0-ggcpxjmhkbi3nwtqmgu7dal2rsedyza5/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/parmetis-4.0.3-de7rslbjz6xchwd4jlec2iswp6yf4yt7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/mfem-4.6.0-2sgpgtnhas5crnwvexabyzuzouxgblc5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/hypre-2.24.0-jonmheld2iyk5vpkxjps3wvk6ojyvkm5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/fmt-10.2.1-lfndxhuits6wwazxaoj5dxl3ix3hw2cc/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axom-develop-e3jrpv4mb36q3jxxcbz2ubhcdd75zs2a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axom-develop-e3jrpv4mb36q3jxxcbz2ubhcdd75zs2a/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/zlib-ng-2.1.5-lkg7eg7nky6w74eujzgmp6hnhkaf2w7p/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/metis-5.1.0-ggcpxjmhkbi3nwtqmgu7dal2rsedyza5/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/parmetis-4.0.3-de7rslbjz6xchwd4jlec2iswp6yf4yt7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/mfem-4.6.0-2sgpgtnhas5crnwvexabyzuzouxgblc5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/hypre-2.24.0-jonmheld2iyk5vpkxjps3wvk6ojyvkm5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6/fmt-10.2.1-lfndxhuits6wwazxaoj5dxl3ix3hw2cc/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: clang@=14.0.6 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/clang/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/clang/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/clang/gfortran" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/clang/clang-14.0.6/bin/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/clang/clang-14.0.6/bin/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran" CACHE PATH "") - -endif() - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS " -Wl,-rpath,/usr/tce/packages/clang/clang-14.0.6/lib" CACHE STRING "Adds a missing libstdc++ rpath") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/clang-14.0.6" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-2sgpgtnhas5crnwvexabyzuzouxgblc5" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4" CACHE PATH "") - -set(LUA_DIR "/usr" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip" CACHE PATH "") - -set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6" CACHE PATH "") - -set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw" CACHE PATH "") - -set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj" CACHE PATH "") - -set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix" CACHE PATH "") - -set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3" CACHE PATH "") - -set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q" CACHE PATH "") - -set(ER_DIR "${TPL_ROOT}/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo" CACHE PATH "") - -set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz" CACHE PATH "") - -set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu" CACHE PATH "") - -set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb" CACHE PATH "") - -set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/quartz-toss_4_x86_64_ib-gcc@10.3.1.cmake b/host-configs/quartz-toss_4_x86_64_ib-gcc@10.3.1.cmake deleted file mode 100644 index a228744ea6..0000000000 --- a/host-configs/quartz-toss_4_x86_64_ib-gcc@10.3.1.cmake +++ /dev/null @@ -1,136 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/fmt-10.2.1-vsppemwn4lv42jffltnu2m5wk7pa4mh4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/scr-3.0.1-nimozblni7qmgxh7m4lpclv4ducbwmd7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/hypre-2.24.0-fqukfipx623hwcdtl44ul6m7gf436bea;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/gmake-4.4.1-hnowwppvujezizfysc64xc2myqqulzcn;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/parmetis-4.0.3-olkucdyohy6nglxyp6yqvflfxhhtjji4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/metis-5.1.0-au7rbsfu6yv7cazug6635jzvb2gwy7st;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/zlib-ng-2.1.5-shzp76r665h2g3lnqspfmluapd7jxtrt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/blt-0.6.1.4-ee4ftwhz24yhie53n4ximxniibs3wair;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/gcc-runtime-10.3.1-yxmwjg76ccmk3rbqtfni7b56ykrldyrb;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-10.3.1" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axom-develop-xiuioy7dxvykmlob3vudqstogdvorl4v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axom-develop-xiuioy7dxvykmlob3vudqstogdvorl4v/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/gcc-runtime-10.3.1-yxmwjg76ccmk3rbqtfni7b56ykrldyrb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/zlib-ng-2.1.5-shzp76r665h2g3lnqspfmluapd7jxtrt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/metis-5.1.0-au7rbsfu6yv7cazug6635jzvb2gwy7st/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/parmetis-4.0.3-olkucdyohy6nglxyp6yqvflfxhhtjji4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/hypre-2.24.0-fqukfipx623hwcdtl44ul6m7gf436bea/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/scr-3.0.1-nimozblni7qmgxh7m4lpclv4ducbwmd7/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/fmt-10.2.1-vsppemwn4lv42jffltnu2m5wk7pa4mh4/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axom-develop-xiuioy7dxvykmlob3vudqstogdvorl4v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axom-develop-xiuioy7dxvykmlob3vudqstogdvorl4v/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/gcc-runtime-10.3.1-yxmwjg76ccmk3rbqtfni7b56ykrldyrb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/zlib-ng-2.1.5-shzp76r665h2g3lnqspfmluapd7jxtrt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/metis-5.1.0-au7rbsfu6yv7cazug6635jzvb2gwy7st/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/parmetis-4.0.3-olkucdyohy6nglxyp6yqvflfxhhtjji4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/hypre-2.24.0-fqukfipx623hwcdtl44ul6m7gf436bea/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/scr-3.0.1-nimozblni7qmgxh7m4lpclv4ducbwmd7/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1/fmt-10.2.1-vsppemwn4lv42jffltnu2m5wk7pa4mh4/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: gcc@=10.3.1 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/gcc/g++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gcc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/g++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran" CACHE PATH "") - -endif() - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/gcc-10.3.1" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn" CACHE PATH "") - -set(LUA_DIR "/usr" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms" CACHE PATH "") - -set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-nimozblni7qmgxh7m4lpclv4ducbwmd7" CACHE PATH "") - -set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k" CACHE PATH "") - -set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux" CACHE PATH "") - -set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl" CACHE PATH "") - -set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3" CACHE PATH "") - -set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4" CACHE PATH "") - -set(ER_DIR "${TPL_ROOT}/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs" CACHE PATH "") - -set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe" CACHE PATH "") - -set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4" CACHE PATH "") - -set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns" CACHE PATH "") - -set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/quartz-toss_4_x86_64_ib-intel@2022.1.0.cmake b/host-configs/quartz-toss_4_x86_64_ib-intel@2022.1.0.cmake deleted file mode 100644 index 653b0e59b0..0000000000 --- a/host-configs/quartz-toss_4_x86_64_ib-intel@2022.1.0.cmake +++ /dev/null @@ -1,116 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/hypre-2.24.0-czbxd2tmdjbl7v4nwommsh7xgw7ewgla;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/parmetis-4.0.3-hattuaxqypmcfeqr3nvedmojwbgiora2;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/blt-0.6.1.4-3p2ecutmo7drpwwvvsgtcqxakxjoy573;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/fmt-10.2.1-jltnp6nb3minlrrafmdenoakubdzom57;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/zlib-ng-2.1.5-jtmqc4b5fqadcqbwagtun6kwe6geexbw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/metis-5.1.0-hk6ipui6fnixwdyloqmqbsixqhtv5hxw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/gmake-4.4.1-giduhrefimvdwblsuh6cmqipc474toi5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/zlib-ng-2.1.5-jtmqc4b5fqadcqbwagtun6kwe6geexbw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/metis-5.1.0-hk6ipui6fnixwdyloqmqbsixqhtv5hxw/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/parmetis-4.0.3-hattuaxqypmcfeqr3nvedmojwbgiora2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/hypre-2.24.0-czbxd2tmdjbl7v4nwommsh7xgw7ewgla/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/fmt-10.2.1-jltnp6nb3minlrrafmdenoakubdzom57/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/zlib-ng-2.1.5-jtmqc4b5fqadcqbwagtun6kwe6geexbw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/metis-5.1.0-hk6ipui6fnixwdyloqmqbsixqhtv5hxw/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/parmetis-4.0.3-hattuaxqypmcfeqr3nvedmojwbgiora2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/hypre-2.24.0-czbxd2tmdjbl7v4nwommsh7xgw7ewgla/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0/fmt-10.2.1-jltnp6nb3minlrrafmdenoakubdzom57/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: intel@=2022.1.0 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/intel/icc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/intel/icpc" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/spack/lib/spack/env/intel/ifort" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/icx" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/icpx" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/ifx" CACHE PATH "") - -endif() - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_06_16_55_14/intel-2022.1.0" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of" CACHE PATH "") - -set(LUA_DIR "/usr" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/ruby-toss_4_x86_64_ib-clang@14.0.6.cmake b/host-configs/ruby-toss_4_x86_64_ib-clang@14.0.6.cmake new file mode 100644 index 0000000000..60de37c8ad --- /dev/null +++ b/host-configs/ruby-toss_4_x86_64_ib-clang@14.0.6.cmake @@ -0,0 +1,142 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/tce/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/fmt-11.0.0-u4itycxepszflvei6gqqug5nc3qj32f3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/slurm-23-11-1-1-yrhaubaa64eana62fadhgcsvgwk7zx2s;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/munge-0.5.15-izx4b65jkqdcdwjh3bxd527qcesp3li6;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libgcrypt-1.11.0-jy3ortzbqox5scave4vigseoyiq3udcz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libgpg-error-1.50-i6iwm3vp5mjusd2lht5jaybulcwjxcbk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/lz4-1.9.4-kxmhievlskn5onhsjtpppdxsmcckedli;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/json-c-0.16-bauishuxzql52jbwj3lkfaawdaobmulj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/glib-2.78.3-ofscc2odstpiyamtvrpwdxzsp5l7qaod;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/pcre2-10.43-v3mknh3hzmzwmctcfihlmsonpl3kt3os;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libiconv-1.17-kgsyhark3r7am23bat6iym37khu3lgpl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libffi-3.4.6-52cxk7pdje3jwujxitv22xdzru4bvznw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/hypre-2.24.0-qyjyfy535h2hhpcy4old7fhwoudwiz7i;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/parmetis-4.0.3-i7tyhdrxjogji6aycsiwt2thqac4wfcg;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/metis-5.1.0-gapvtpbqjmjirvpjhryir22owsiredwt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libunwind-1.6.2-525xjhdzj3byebl6hpv7soeqkd5orlhz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/blt-0.6.2-6egvdl5yu56kx2eztpgcsyxx4iiwvqwo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-clang-14.0.6;/usr/tce/packages/clang/clang-14.0.6" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libunwind-1.6.2-525xjhdzj3byebl6hpv7soeqkd5orlhz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/metis-5.1.0-gapvtpbqjmjirvpjhryir22owsiredwt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/parmetis-4.0.3-i7tyhdrxjogji6aycsiwt2thqac4wfcg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/hypre-2.24.0-qyjyfy535h2hhpcy4old7fhwoudwiz7i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/slurm-23-11-1-1-yrhaubaa64eana62fadhgcsvgwk7zx2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/glib-2.78.3-ofscc2odstpiyamtvrpwdxzsp5l7qaod/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libffi-3.4.6-52cxk7pdje3jwujxitv22xdzru4bvznw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libiconv-1.17-kgsyhark3r7am23bat6iym37khu3lgpl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/pcre2-10.43-v3mknh3hzmzwmctcfihlmsonpl3kt3os/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/lz4-1.9.4-kxmhievlskn5onhsjtpppdxsmcckedli/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/munge-0.5.15-izx4b65jkqdcdwjh3bxd527qcesp3li6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libgcrypt-1.11.0-jy3ortzbqox5scave4vigseoyiq3udcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libgpg-error-1.50-i6iwm3vp5mjusd2lht5jaybulcwjxcbk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/json-c-0.16-bauishuxzql52jbwj3lkfaawdaobmulj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/fmt-11.0.0-u4itycxepszflvei6gqqug5nc3qj32f3/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libunwind-1.6.2-525xjhdzj3byebl6hpv7soeqkd5orlhz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/metis-5.1.0-gapvtpbqjmjirvpjhryir22owsiredwt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/parmetis-4.0.3-i7tyhdrxjogji6aycsiwt2thqac4wfcg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/hypre-2.24.0-qyjyfy535h2hhpcy4old7fhwoudwiz7i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/slurm-23-11-1-1-yrhaubaa64eana62fadhgcsvgwk7zx2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/glib-2.78.3-ofscc2odstpiyamtvrpwdxzsp5l7qaod/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libffi-3.4.6-52cxk7pdje3jwujxitv22xdzru4bvznw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libiconv-1.17-kgsyhark3r7am23bat6iym37khu3lgpl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/pcre2-10.43-v3mknh3hzmzwmctcfihlmsonpl3kt3os/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/lz4-1.9.4-kxmhievlskn5onhsjtpppdxsmcckedli/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/munge-0.5.15-izx4b65jkqdcdwjh3bxd527qcesp3li6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libgcrypt-1.11.0-jy3ortzbqox5scave4vigseoyiq3udcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/libgpg-error-1.50-i6iwm3vp5mjusd2lht5jaybulcwjxcbk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/json-c-0.16-bauishuxzql52jbwj3lkfaawdaobmulj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6/fmt-11.0.0-u4itycxepszflvei6gqqug5nc3qj32f3/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: clang@=14.0.6 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/clang/clang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/clang/clang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/usr/tce/packages/clang/clang-14.0.6/bin/clang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/tce/packages/clang/clang-14.0.6/bin/clang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran" CACHE PATH "") + +endif() + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +set(BLT_EXE_LINKER_FLAGS " -Wl,-rpath,/usr/tce/packages/clang/clang-14.0.6/lib" CACHE STRING "Adds a missing libstdc++ rpath") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpicxx" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP ON CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/clang-14.0.6" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq" CACHE PATH "") + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp" CACHE PATH "") + +set(LUA_DIR "/usr" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv" CACHE PATH "") + +set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk" CACHE PATH "") + +set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio" CACHE PATH "") + +set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq" CACHE PATH "") + +set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2" CACHE PATH "") + +set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs" CACHE PATH "") + +set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy" CACHE PATH "") + +set(ER_DIR "${TPL_ROOT}/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf" CACHE PATH "") + +set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe" CACHE PATH "") + +set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz" CACHE PATH "") + +set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr" CACHE PATH "") + +set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") + +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.6/bin/clang-format" CACHE PATH "") + +set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") + +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr/bin/jsonschema" CACHE PATH "") + +set(ENABLE_DOCS ON CACHE BOOL "") + +set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") + +set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") + +set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") + +set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") + + diff --git a/host-configs/ruby-toss_4_x86_64_ib-gcc@10.3.1.cmake b/host-configs/ruby-toss_4_x86_64_ib-gcc@10.3.1.cmake new file mode 100644 index 0000000000..91f7399212 --- /dev/null +++ b/host-configs/ruby-toss_4_x86_64_ib-gcc@10.3.1.cmake @@ -0,0 +1,140 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/tce/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/fmt-11.0.0-zt5s2lpq6zhbwua27n34vsqssdhlyqkb;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/slurm-23-11-1-1-pia7yc34zfjbauttb3mz7ryehiahl7wl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/munge-0.5.15-ohlpc2han7eccwhcc5e7mjxu6qpnxyvw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libgcrypt-1.11.0-w3yyh3cqjbmoowwxbp7xfxipmcy3deqv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libgpg-error-1.50-6lmnhkuvlhyuhqwlg7z4ieeol27y5jf2;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/lz4-1.9.4-pmcvlik6dz22xjsg7v2bz4wc6ee6a2t5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/json-c-0.16-skedagszkyils45rrj7q3csquls3uvm4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/glib-2.78.3-ooz7c4wlv2ah6rweaicrejwdeevkk2cm;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/pcre2-10.43-pasxvasfmrhl4vxjfj2jo235tmyf6vd5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libiconv-1.17-x5uwl3dkj3sktet5drfcdbrr45rehocj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/hypre-2.24.0-frilc4peb7bzvyj2kl22pr3nqm5c2sir;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/parmetis-4.0.3-peskkkrkee56jdeaubpu3qdpviqhwy6c;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/metis-5.1.0-qq66hohai22jo6hcdrfpxhb6lvvrrsxf;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libunwind-1.6.2-4oj53vuwb5fmd5uj4cndlfmykhap74tl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/blt-0.6.2-rpepypkljinu26w75fe2oa2f4j5jraio;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/gcc-runtime-10.3.1-vepcviwswfbeo6z6pdmxek2hr3q5ui33;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-10.3.1" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/gcc-runtime-10.3.1-vepcviwswfbeo6z6pdmxek2hr3q5ui33/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libunwind-1.6.2-4oj53vuwb5fmd5uj4cndlfmykhap74tl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/metis-5.1.0-qq66hohai22jo6hcdrfpxhb6lvvrrsxf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/parmetis-4.0.3-peskkkrkee56jdeaubpu3qdpviqhwy6c/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/hypre-2.24.0-frilc4peb7bzvyj2kl22pr3nqm5c2sir/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/slurm-23-11-1-1-pia7yc34zfjbauttb3mz7ryehiahl7wl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/glib-2.78.3-ooz7c4wlv2ah6rweaicrejwdeevkk2cm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libiconv-1.17-x5uwl3dkj3sktet5drfcdbrr45rehocj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/pcre2-10.43-pasxvasfmrhl4vxjfj2jo235tmyf6vd5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/lz4-1.9.4-pmcvlik6dz22xjsg7v2bz4wc6ee6a2t5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/munge-0.5.15-ohlpc2han7eccwhcc5e7mjxu6qpnxyvw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libgcrypt-1.11.0-w3yyh3cqjbmoowwxbp7xfxipmcy3deqv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libgpg-error-1.50-6lmnhkuvlhyuhqwlg7z4ieeol27y5jf2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/json-c-0.16-skedagszkyils45rrj7q3csquls3uvm4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/fmt-11.0.0-zt5s2lpq6zhbwua27n34vsqssdhlyqkb/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/gcc-runtime-10.3.1-vepcviwswfbeo6z6pdmxek2hr3q5ui33/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libunwind-1.6.2-4oj53vuwb5fmd5uj4cndlfmykhap74tl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/metis-5.1.0-qq66hohai22jo6hcdrfpxhb6lvvrrsxf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/parmetis-4.0.3-peskkkrkee56jdeaubpu3qdpviqhwy6c/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/hypre-2.24.0-frilc4peb7bzvyj2kl22pr3nqm5c2sir/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/slurm-23-11-1-1-pia7yc34zfjbauttb3mz7ryehiahl7wl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/glib-2.78.3-ooz7c4wlv2ah6rweaicrejwdeevkk2cm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libiconv-1.17-x5uwl3dkj3sktet5drfcdbrr45rehocj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/pcre2-10.43-pasxvasfmrhl4vxjfj2jo235tmyf6vd5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/lz4-1.9.4-pmcvlik6dz22xjsg7v2bz4wc6ee6a2t5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/munge-0.5.15-ohlpc2han7eccwhcc5e7mjxu6qpnxyvw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libgcrypt-1.11.0-w3yyh3cqjbmoowwxbp7xfxipmcy3deqv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libgpg-error-1.50-6lmnhkuvlhyuhqwlg7z4ieeol27y5jf2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/json-c-0.16-skedagszkyils45rrj7q3csquls3uvm4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1/fmt-11.0.0-zt5s2lpq6zhbwua27n34vsqssdhlyqkb/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: gcc@=10.3.1 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/gcc/g++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gcc" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/g++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran" CACHE PATH "") + +endif() + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpicxx" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP ON CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/gcc-10.3.1" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo" CACHE PATH "") + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh" CACHE PATH "") + +set(LUA_DIR "/usr" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r" CACHE PATH "") + +set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj" CACHE PATH "") + +set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e" CACHE PATH "") + +set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef" CACHE PATH "") + +set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6" CACHE PATH "") + +set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh" CACHE PATH "") + +set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f" CACHE PATH "") + +set(ER_DIR "${TPL_ROOT}/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar" CACHE PATH "") + +set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy" CACHE PATH "") + +set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz" CACHE PATH "") + +set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d" CACHE PATH "") + +set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") + +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.6/bin/clang-format" CACHE PATH "") + +set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") + +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw/bin/jsonschema" CACHE PATH "") + +set(ENABLE_DOCS ON CACHE BOOL "") + +set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") + +set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") + +set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") + +set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") + + diff --git a/host-configs/ruby-toss_4_x86_64_ib-intel@2022.1.0.cmake b/host-configs/ruby-toss_4_x86_64_ib-intel@2022.1.0.cmake new file mode 100644 index 0000000000..8d651b1095 --- /dev/null +++ b/host-configs/ruby-toss_4_x86_64_ib-intel@2022.1.0.cmake @@ -0,0 +1,120 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/tce/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/fmt-11.0.0-e5wcmnxgm7jazymbnkqedufcwmwi5zyk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/hypre-2.24.0-aqcxsv56sazlpol6bztlrn2ippdt2vvk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/parmetis-4.0.3-qak3zsoasplo53n24xnjgtr5hp2pwsas;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/metis-5.1.0-t27xnm5ddxbozxuumry3wtpr2z4wddlg;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/libunwind-1.6.2-522til4ndbs6qxvs63qfsrc3bbzlc52k;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/blt-0.6.2-ulkpjni3wpwn5epn6poziknumnqpu67q;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0;/usr/tce/packages/clang/clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/libunwind-1.6.2-522til4ndbs6qxvs63qfsrc3bbzlc52k/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/metis-5.1.0-t27xnm5ddxbozxuumry3wtpr2z4wddlg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/parmetis-4.0.3-qak3zsoasplo53n24xnjgtr5hp2pwsas/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/hypre-2.24.0-aqcxsv56sazlpol6bztlrn2ippdt2vvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/fmt-11.0.0-e5wcmnxgm7jazymbnkqedufcwmwi5zyk/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/libunwind-1.6.2-522til4ndbs6qxvs63qfsrc3bbzlc52k/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/metis-5.1.0-t27xnm5ddxbozxuumry3wtpr2z4wddlg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/parmetis-4.0.3-qak3zsoasplo53n24xnjgtr5hp2pwsas/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/hypre-2.24.0-aqcxsv56sazlpol6bztlrn2ippdt2vvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0/fmt-11.0.0-e5wcmnxgm7jazymbnkqedufcwmwi5zyk/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: intel@=2022.1.0 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/intel/icc" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/intel/icpc" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/spack/lib/spack/env/intel/ifort" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/icx" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/icpx" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/ifx" CACHE PATH "") + +endif() + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpicxx" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP ON CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_20_09_04_15/intel-2022.1.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w" CACHE PATH "") + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm" CACHE PATH "") + +set(LUA_DIR "/usr" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h" CACHE PATH "") + +# scr not built + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") + +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.6/bin/clang-format" CACHE PATH "") + +set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") + +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm/bin/jsonschema" CACHE PATH "") + +set(ENABLE_DOCS ON CACHE BOOL "") + +set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") + +set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") + +set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") + +set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") + + diff --git a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake index 1186b7b47d..c2fa362169 100644 --- a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake +++ b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.1.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/hypre-2.24.0-euib2ua4oleljrkszmkexls4kw5cvrr7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/parmetis-4.0.3-djitip36l7hy2ubwbvrnqmfeodhnjtpk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/blt-0.6.1.4-7qqqx4bcdk5wy7ycpymq6engsddxn4y2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/fmt-10.2.1-sscbhyiiak2butrj6656mn7nfx37rpr6;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/metis-5.1.0-e5ov7trmcxxc4pa6cbysd525iyiswtkn;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/fmt-11.0.2-4qsfcbhehfixzsduttatiuomfwdvc54z;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/hypre-2.24.0-ntod2ewsq3zzbj4ndtoofhj3qio76g75;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/parmetis-4.0.3-lmasfa5fmgwk7i5sqmihzf55f6ntehdf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/metis-5.1.0-obt4c7svigtwpud2434q6yadtanpgsdq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/blt-0.6.2-6ppd4luilwwokre2edgcyzcxo4z24yr2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/metis-5.1.0-e5ov7trmcxxc4pa6cbysd525iyiswtkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/parmetis-4.0.3-djitip36l7hy2ubwbvrnqmfeodhnjtpk/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/hypre-2.24.0-euib2ua4oleljrkszmkexls4kw5cvrr7/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/fmt-10.2.1-sscbhyiiak2butrj6656mn7nfx37rpr6/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/metis-5.1.0-obt4c7svigtwpud2434q6yadtanpgsdq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/parmetis-4.0.3-lmasfa5fmgwk7i5sqmihzf55f6ntehdf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/hypre-2.24.0-ntod2ewsq3zzbj4ndtoofhj3qio76g75/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/fmt-11.0.2-4qsfcbhehfixzsduttatiuomfwdvc54z/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/axom-develop-wpre5jwym4gwxknegvw5mdlqmnqxgv3b/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/metis-5.1.0-e5ov7trmcxxc4pa6cbysd525iyiswtkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/parmetis-4.0.3-djitip36l7hy2ubwbvrnqmfeodhnjtpk/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/hypre-2.24.0-euib2ua4oleljrkszmkexls4kw5cvrr7/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1/fmt-10.2.1-sscbhyiiak2butrj6656mn7nfx37rpr6/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/axom-develop-lssib2qe7u2o3zxjoz3fd3csokax5s6l/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/metis-5.1.0-obt4c7svigtwpud2434q6yadtanpgsdq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/parmetis-4.0.3-lmasfa5fmgwk7i5sqmihzf55f6ntehdf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/hypre-2.24.0-ntod2ewsq3zzbj4ndtoofhj3qio76g75/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1/fmt-11.0.2-4qsfcbhehfixzsduttatiuomfwdvc54z/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/clang/gfortran" CACHE PATH "") else() @@ -83,23 +83,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.1" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.1" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-dfi65iel4lwlrvhi2i7n2hbvxuzlf3fv" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-ens4rgdgdajilvi3c55iytz23xn5glmj" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-vlmxcctikvg2swezpvdqweczpsueuyrl" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-rgjmyonou62nflsbgfdm3u4remw34r4n" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-izljwvlcbrcbcueewxc74qbs7l3vy3rk" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-jxhxmzp7gdcqhbobo45dxufmxcntnwr2" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ifirj3a475sf7jrliip2tj7laqyidak6" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-aczjq5qi2jukowvggky77o65uzpqekon" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-aovjhut3d6o67vxccjkyhfbrxc2eg4de" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-s6rq2f63siahgk3fdrqhj5znoryyvxof" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-btiwe3jepovgjlxdtuqm4xssselzimcx" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-t7ugyy6v73kxhyv3xdy5qc4arq4hxnpm" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-3fzuqd3tqb3kh2lai5yqmgom24mlcior" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-n6y27zlhzvoijl4xun6u6lbkfup5jusv" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-m7mafehgzcfksk2fzvkhx4snhutws5lz" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-6rqvljka5ovotmnhp66f2p3cjh5dbooe" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-3gaddmuz46hdqorhfpraut67lbds3riz" CACHE PATH "") # scr not built @@ -109,11 +113,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-zxgjohy7qy2v3nqg4eaba3azthsqhcga" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-szvkvnsgmp3mys5qwxkzidfljbrx2lc4/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-ykpqwsbk437l6cyducmxnvgfvqimit6n/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake index 62f8d9ee4e..ef7e4aad40 100644 --- a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake +++ b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-clang@10.0.1.2_cuda.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/hypre-2.24.0-olonyxmliyqz7gjwd5jkenyxuphjff2d;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/parmetis-4.0.3-gxoxo6iesczbj7ltl3he3vxlv2xb6bdo;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/blt-0.6.1.4-niyj5uvj7qaxuceaoycpenida5z56ied;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/fmt-10.2.1-rvh2rhnae6757hi6saunbnnicoowhtns;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/cub-2.1.0-ib4hkd2iic3p7ni4lhz5bqd5yivtxo7r;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/metis-5.1.0-5t5rx3oakpli3ywkum4kfhzdiacrdkso;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/fmt-11.0.2-p4ojp6vwek46hv6i7zyrj3e77244xdr7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/cub-2.1.0-njusrm5hauwax4k6jfr5klnmyfn7zddl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/hypre-2.24.0-bdugfaghbzdfczfjp3d4rzesdlryiwzh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/parmetis-4.0.3-a3z63kvlkwkuhzwbd5ovf7dm7ecztsfq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/metis-5.1.0-n5hdbp6fuftzvqdzojxpwviw6rku4iuk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/blt-0.6.2-qxwuvi3dxchupahxk7ktljvmiuoaliea;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/metis-5.1.0-5t5rx3oakpli3ywkum4kfhzdiacrdkso/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/parmetis-4.0.3-gxoxo6iesczbj7ltl3he3vxlv2xb6bdo/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/hypre-2.24.0-olonyxmliyqz7gjwd5jkenyxuphjff2d/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/fmt-10.2.1-rvh2rhnae6757hi6saunbnnicoowhtns/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/metis-5.1.0-n5hdbp6fuftzvqdzojxpwviw6rku4iuk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/parmetis-4.0.3-a3z63kvlkwkuhzwbd5ovf7dm7ecztsfq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/hypre-2.24.0-bdugfaghbzdfczfjp3d4rzesdlryiwzh/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/fmt-11.0.2-p4ojp6vwek46hv6i7zyrj3e77244xdr7/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/axom-develop-ndiry4fjmug7ogvh36noblti67rdegj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/metis-5.1.0-5t5rx3oakpli3ywkum4kfhzdiacrdkso/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/parmetis-4.0.3-gxoxo6iesczbj7ltl3he3vxlv2xb6bdo/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/hypre-2.24.0-olonyxmliyqz7gjwd5jkenyxuphjff2d/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2/fmt-10.2.1-rvh2rhnae6757hi6saunbnnicoowhtns/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/axom-develop-7jbtl225pl4opivy3npezivet7t3ecoe/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-clang-10.0.1-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/metis-5.1.0-n5hdbp6fuftzvqdzojxpwviw6rku4iuk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/parmetis-4.0.3-a3z63kvlkwkuhzwbd5ovf7dm7ecztsfq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/hypre-2.24.0-bdugfaghbzdfczfjp3d4rzesdlryiwzh/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-gcc-7.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2/fmt-11.0.2-p4ojp6vwek46hv6i7zyrj3e77244xdr7/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8;/usr/tce/packages/clang/clang-ibm-10.0.1/release/lib;/usr/tce/packages/clang/clang-ibm-10.0.1-gcc-8.3.1/release/lib" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/clang/gfortran" CACHE PATH "") else() @@ -83,15 +83,13 @@ set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") +set(CMAKE_CUDA_FLAGS "" CACHE STRING "") + set(ENABLE_CUDA ON CACHE BOOL "") set(CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "") -set(AXOM_ENABLE_ANNOTATIONS ON CACHE BOOL "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda " CACHE STRING "") +set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda " CACHE STRING "" FORCE) # nvcc does not like gtest's 'pthreads' flag @@ -111,23 +109,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/clang-10.0.1.2" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/clang-10.0.1.2" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-cq2gcolkcddelmtiev7f3ub3hiw42toz" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-dbscjyecliggi7tvwjihiwxh6d4urelk" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-mypcbb7eqvp4oqjftdvw53oql5f5wemd" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-4fqpdnmw56dkmacei6ibcwy74vbff2k3" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-ouuns7euqd3fbobccnfh2zcfgxo2nsss" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ps7pmwbmsppxkddukigamjqcs5xkrhzf" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-63jbjowv2dojriwkpag6ws3tbm4erk7v" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-d6a3m45cpgowhu6cggin2qfwf5lud4kq" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-5n6b7og6vcevg2pkbjjrhf54ta4fhl2i" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-brhtohreyc2qs6nsxkvjbrg6gmxbpwdm" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-5okbr3yhq4vyonc2yt22lich6jkdgp3i" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-nnazcdnvv4lqfb26uz4c4pisrslclpx6" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-o7rjribikrvq6wydxxz22wdo544ai4z2" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-gbdvdlth3xz5bko5lkvlo4rbv5sh5acc" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-gdid6sheotanplgeox4xo25w6gqqsztl" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-jfileou3v24oapr563nst6jtbeeztn2r" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-tw7gf2jdowvigrvy5pnnh7mafej4czxa" CACHE PATH "") # scr not built @@ -137,11 +139,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-2jxkuw2qyj7egsho3lshh2ceoa6n3srm" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-jzezi7fphud2hpmaepsb5s456tz2dqol/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-dpoft7igdftimo5omyzikaugdn2n6bcl/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake index 40c54cf48b..22804c91ae 100644 --- a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake +++ b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.1.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/fmt-10.2.1-2vqr6w6s2qq7bt4iq7mdrfiqgfiw6f5l;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/parmetis-4.0.3-p5pmp73u6nshwemscw43atzgaerk4ulu;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/metis-5.1.0-devoja547pbzdundjnarm3hug2hhay2l;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/blt-0.6.1.4-6lng5thw5prsyymfu2yzy7xdwtwij6ij;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/gcc-runtime-8.3.1.1-pykxuo3lctv7fu6i325szadkdcwrrkim;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/fmt-11.0.2-zumrzylrrolm33dtos556mq5f3zok4r5;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/parmetis-4.0.3-gljjzywrjx7cbdwesrxcatbbf7gxx77i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/metis-5.1.0-doc3c77v32y2ezjyp34txiekkh4aw7df;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/blt-0.6.2-3vhtues34jsypp5iidapr4gwjbbeiih3;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/gcc-runtime-8.3.1.1-7ub3pkbn5avszjqnhgm7625f4estye7s;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/gcc-runtime-8.3.1.1-pykxuo3lctv7fu6i325szadkdcwrrkim/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/metis-5.1.0-devoja547pbzdundjnarm3hug2hhay2l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/parmetis-4.0.3-p5pmp73u6nshwemscw43atzgaerk4ulu/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/fmt-10.2.1-2vqr6w6s2qq7bt4iq7mdrfiqgfiw6f5l/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/gcc-runtime-8.3.1.1-7ub3pkbn5avszjqnhgm7625f4estye7s/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/metis-5.1.0-doc3c77v32y2ezjyp34txiekkh4aw7df/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/parmetis-4.0.3-gljjzywrjx7cbdwesrxcatbbf7gxx77i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/fmt-11.0.2-zumrzylrrolm33dtos556mq5f3zok4r5/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/axom-develop-mrrvgirrsjrtdsyltswvulji3his36xi/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/gcc-runtime-8.3.1.1-pykxuo3lctv7fu6i325szadkdcwrrkim/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/metis-5.1.0-devoja547pbzdundjnarm3hug2hhay2l/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/parmetis-4.0.3-p5pmp73u6nshwemscw43atzgaerk4ulu/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1/fmt-10.2.1-2vqr6w6s2qq7bt4iq7mdrfiqgfiw6f5l/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/axom-develop-zaplz5onl46zayaa4ct6jy67jju2ymft/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/gcc-runtime-8.3.1.1-7ub3pkbn5avszjqnhgm7625f4estye7s/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/metis-5.1.0-doc3c77v32y2ezjyp34txiekkh4aw7df/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/parmetis-4.0.3-gljjzywrjx7cbdwesrxcatbbf7gxx77i/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1/fmt-11.0.2-zumrzylrrolm33dtos556mq5f3zok4r5/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/gcc/g++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/gcc/g++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") else() @@ -75,23 +75,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.1" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.1" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-7fwf4minhh6ymveutjnb4zetvxwurm66" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-xko66o26xogtrkhx6fup7fxbran4cxsr" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-vj22dsxnnfc6hx73lfgpdmlhithbd5bq" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fhz7neofq7onv64sz5ng4jrjhexq737h" CACHE PATH "") # MFEM not built -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-7cjtcdwjrtfgcnqoiyfrufybdw5g6i6h" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-neg57xjlirvook5q6jfbfsdqlzgg22kt" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-v5n5ab5npmyxguqaja6xdmyl6r3gsc5a" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-jzxxu3fdouzimeobsoi4fxagniz2ifqm" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-e6tn6qcf3j2hqkz5ht3xrmlbddp3ngnn" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-tacuivcrlzzixfalvj6pxtczpknktvva" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-3fyzeztrclnysexhwf75pm2nxel77776" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-bb5l75qqckeltddcxw4ocscrisjikg4k" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-o226evmovhe324pehwnwirspkftw5ruw" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-igdj2aqvbvpw6lfmukkqy6rgyft63iys" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-tsuutmbufqwy7befezinmjkchmyhxixj" CACHE PATH "") # scr not built @@ -101,11 +105,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-avtdwxn6q374o2nqe4rqkjzasuvmudta" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-me5qygs6iauo7miussleiado3nbnw5ot/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-utexjihktg3mk6wkcid6ibkbazkp2uzj/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake index 67dab0234b..2c0c4103ca 100644 --- a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake +++ b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-gcc@8.3.1.2_cuda.cmake @@ -1,16 +1,16 @@ #------------------------------------------------------------------------------ # !!!! This is a generated file, edit at own risk !!!! #------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake +# CMake executable path: /usr/tce/packages/cmake/cmake-3.23.1/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/fmt-10.2.1-zv6ntw5mnzrvvm2mfyyjjly7cmixmgqr;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/cub-2.1.0-i64fir4ytcl7w527jny2bj67irxva2pu;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/parmetis-4.0.3-2h2xjxkc3qwi237ui476jgsqi2e4kpkh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/metis-5.1.0-3de4wffnqmwqslyiizuoheny6abmfkkn;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/blt-0.6.1.4-ldmftyubptq3py7xr6wirrg2eorm357z;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/gcc-runtime-8.3.1.2-7lxa2lyos6dnjfydj2ewpv4wlnnvp2hh;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/fmt-11.0.2-m3k6g4kw4garsbkhoku4irc2v7j4qfgl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/cub-2.1.0-o6s3spglv3zqsaianfeenktd7ius46w2;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/parmetis-4.0.3-s425jnrfkcjs3pr6pv2w3kynrasbmpmf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/metis-5.1.0-5h3y4iipnbanartgsoxf2xwzzdehgwrx;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/blt-0.6.2-cbq4uohkstplznwiapjbxrgab4x2amww;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/gcc-runtime-8.3.1.2-hhgknzvw3jhyj4xuwmrth6lqdozld2ui;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.5;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.23.1" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/gcc-runtime-8.3.1.2-7lxa2lyos6dnjfydj2ewpv4wlnnvp2hh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/metis-5.1.0-3de4wffnqmwqslyiizuoheny6abmfkkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/parmetis-4.0.3-2h2xjxkc3qwi237ui476jgsqi2e4kpkh/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/fmt-10.2.1-zv6ntw5mnzrvvm2mfyyjjly7cmixmgqr/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/gcc-runtime-8.3.1.2-hhgknzvw3jhyj4xuwmrth6lqdozld2ui/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/metis-5.1.0-5h3y4iipnbanartgsoxf2xwzzdehgwrx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/parmetis-4.0.3-s425jnrfkcjs3pr6pv2w3kynrasbmpmf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/fmt-11.0.2-m3k6g4kw4garsbkhoku4irc2v7j4qfgl/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/axom-develop-qewlj77x5de57xeii6pfarnsgahvapao/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/gcc-runtime-8.3.1.2-7lxa2lyos6dnjfydj2ewpv4wlnnvp2hh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/metis-5.1.0-3de4wffnqmwqslyiizuoheny6abmfkkn/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/parmetis-4.0.3-2h2xjxkc3qwi237ui476jgsqi2e4kpkh/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2/fmt-10.2.1-zv6ntw5mnzrvvm2mfyyjjly7cmixmgqr/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/axom-develop-7ro27wnmmoruwafpyvkr6z56pwwqcpif/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/gcc-runtime-8.3.1.2-hhgknzvw3jhyj4xuwmrth6lqdozld2ui/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-gcc-8.3.1/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/metis-5.1.0-5h3y4iipnbanartgsoxf2xwzzdehgwrx/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/parmetis-4.0.3-s425jnrfkcjs3pr6pv2w3kynrasbmpmf/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f/lib64;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2/fmt-11.0.2-m3k6g4kw4garsbkhoku4irc2v7j4qfgl/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/gcc/g++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/gcc/g++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") else() @@ -75,15 +75,13 @@ set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") +set(CMAKE_CUDA_FLAGS "" CACHE STRING "") + set(ENABLE_CUDA ON CACHE BOOL "") set(CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "") -set(AXOM_ENABLE_ANNOTATIONS ON CACHE BOOL "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda " CACHE STRING "") +set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda " CACHE STRING "" FORCE) # nvcc does not like gtest's 'pthreads' flag @@ -103,23 +101,27 @@ set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3 # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/gcc-8.3.1.2" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_09_20_10_38_34/gcc-8.3.1.2" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-66pob6ova32wkqvnbdbskk5zk44tjbnk" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-lpxucas2inowafnybsynioedgefp5hat" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-c76hxrgyy2igrclt6cnsvydrkd77ufvm" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-lzutypczagwoia6i3no5b7ultlwlfk2d" CACHE PATH "") # MFEM not built -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ada6dnl7e76lppixolnsjy7gmi4adfoh" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-z4eikslhnkmfk5zgii42qdzge3kad2pf" CACHE PATH "") + +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-p4jxnpewmedoswsbzkyoxkiqi6wfmw6c" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-xjr3v2x6vjtgpov7qv3kcewhhczxa476" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-saqxtlwqxhm5xszi6ohoalufvorkont7" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-gewshapnzceyrwrq47jrmq4whicbn7gd" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-qz732p5cbhzuecyyn47d67h55wir7owh" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-libudcuo2476lopipmj6nbbo64hrrfrv" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-ax6j3jggtgph2kx53njdclhij5457lnr" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-cpx3bnudfnfpzr4vpstkt4qbdxfokz4f" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-pgzto3ewwjaos2djedcrgis3odobq6ip" CACHE PATH "") # scr not built @@ -129,11 +131,11 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-drrgkykr3onmqdkoc2jg6hzxzszakj35" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.5/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-5rwlawwpfl75pzasnxiulrkcxmznmijx/bin/jsonschema" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-cxdbzzin4uuhuvgnj3wzkiko5jobwswb/bin/jsonschema" CACHE PATH "") set(ENABLE_DOCS ON CACHE BOOL "") diff --git a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-xl@16.1.1.1.cmake b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-xl@16.1.1.1.cmake deleted file mode 100644 index 0d74d794e8..0000000000 --- a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-xl@16.1.1.1.cmake +++ /dev/null @@ -1,132 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/hypre-2.24.0-scxx626pb345r4bpsmn4idus6dt42jcs;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/parmetis-4.0.3-unks4pi2gc6heogvv2m3cvjvgc2etfp4;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/blt-0.6.1.4-neovqnvk3tazh7clai422vfazmbjeaqp;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/fmt-10.2.1-iknryrusj34wtt4nk4pn2ybgwa77grms;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/metis-5.1.0-qww4ax3mkehdlf7akdbjzokbf4wxws5m;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/metis-5.1.0-qww4ax3mkehdlf7akdbjzokbf4wxws5m/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/parmetis-4.0.3-unks4pi2gc6heogvv2m3cvjvgc2etfp4/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/hypre-2.24.0-scxx626pb345r4bpsmn4idus6dt42jcs/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/fmt-10.2.1-iknryrusj34wtt4nk4pn2ybgwa77grms/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/axom-develop-mwe36w3aijwdbfu4ckdjv2wksrvqbsj2/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/metis-5.1.0-qww4ax3mkehdlf7akdbjzokbf4wxws5m/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/parmetis-4.0.3-unks4pi2gc6heogvv2m3cvjvgc2etfp4/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/hypre-2.24.0-scxx626pb345r4bpsmn4idus6dt42jcs/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1/fmt-10.2.1-iknryrusj34wtt4nk4pn2ybgwa77grms/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: xl@=16.1.1.1 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/xl/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/xl/xlc++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/xl/xlf90" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/xl/xl-2022.08.19/bin/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/xl/xl-2022.08.19/bin/xlC" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/xl/xl-2022.08.19/bin/xlf2003" CACHE PATH "") - -endif() - -set(CMAKE_C_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_CXX_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_Fortran_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpixlc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpixlC" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpixlf" CACHE PATH "") - -set(MPIEXEC_EXECUTABLE "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19/bin/mpirun" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(BLT_MPI_COMMAND_APPEND "mpibind" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(BLT_FORTRAN_FLAGS "-WF,-C! -qxlf2003=polymorphic" CACHE STRING "Converts C-style comments to Fortran style in preprocessed files") - -set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3/lib64;/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3" CACHE STRING "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.1" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-gds2atmvlsftghczkaxrbdi4fotbl2a3" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-bbzy4skytx3akdcm2fvslpxn44vhsq2y" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-2qilfn4m5dmpxjm2evip6nusosmiqrsz" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ur6rpcf7qqngwf25ezjwei6en7rcsnxq" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-b43zhs5fpjqoog4hrtfrtxuetq7pwd4b" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-kimeva5su2xhbqpy54xx5lnmvypbavab" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-kglsalrxtcw2bh4hnsnc5gq5jevvv7bl" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-a2mltgoskoemplkmkkup5cs4pmfn64j7" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-7skzmrvuuo6gtwscj6b6fbdyo7sioz5h/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-xl@16.1.1.2_cuda.cmake b/host-configs/rzansel-blueos_3_ppc64le_ib_p9-xl@16.1.1.2_cuda.cmake deleted file mode 100644 index 38742862c5..0000000000 --- a/host-configs/rzansel-blueos_3_ppc64le_ib_p9-xl@16.1.1.2_cuda.cmake +++ /dev/null @@ -1,160 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/packages/cmake/cmake-3.21.1/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/hypre-2.24.0-njvlsye4yxx7gzho7hpvfaiyugfztlef;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/parmetis-4.0.3-buyj5iliasgoeiauw335rdrvht4l46ut;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/blt-0.6.1.4-lhkhl33mqna6lfzkqz5fbwzy6by5effo;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/fmt-10.2.1-fl5fgyfjfnworql33rfi4oufl2fyx2ec;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/cub-2.1.0-gk54nvuh77yqhzft2rlourfzd7aqvs6i;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/metis-5.1.0-wzyd4pwtce4c22uw3tq3dljdjpfjrd3z;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0;/usr/tce/packages/cuda/cuda-11.2.0;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12;/usr/tce/packages/clang/clang-10.0.0;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0;/usr/tcetmp;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/cppcheck-2.9;/usr/tce/packages/cmake/cmake-3.21.1" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/metis-5.1.0-wzyd4pwtce4c22uw3tq3dljdjpfjrd3z/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/parmetis-4.0.3-buyj5iliasgoeiauw335rdrvht4l46ut/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/hypre-2.24.0-njvlsye4yxx7gzho7hpvfaiyugfztlef/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/fmt-10.2.1-fl5fgyfjfnworql33rfi4oufl2fyx2ec/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/axom-develop-woz7ol2eqtmsmfz3sckoddilap5hixzq/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/metis-5.1.0-wzyd4pwtce4c22uw3tq3dljdjpfjrd3z/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/parmetis-4.0.3-buyj5iliasgoeiauw335rdrvht4l46ut/lib;/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/hypre-2.24.0-njvlsye4yxx7gzho7hpvfaiyugfztlef/lib;/usr/tcetmp/packages/lapack/lapack-3.9.0-P9-xl-2020.11.12/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo/lib;/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/python-3.10.10/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c/lib;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7/lib;/usr/tce/packages/cuda/cuda-11.2.0/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt/lib64;/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2/fmt-10.2.1-fl5fgyfjfnworql33rfi4oufl2fyx2ec/lib64;/usr/tce/packages/gcc/gcc-8.3.1/rh/usr/lib/gcc/ppc64le-redhat-linux/8" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: xl@=16.1.1.2 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/xl/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/xl/xlc++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/spack/lib/spack/env/xl/xlf90" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlC" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/bin/xlf2003" CACHE PATH "") - -endif() - -set(CMAKE_C_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_CXX_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(CMAKE_Fortran_FLAGS "--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpixlc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpixlC" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpixlf" CACHE PATH "") - -set(MPIEXEC_EXECUTABLE "/usr/tce/packages/spectrum-mpi/spectrum-mpi-rolling-release-xl-2022.08.19-cuda-11.2.0/bin/mpirun" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-np" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(BLT_MPI_COMMAND_APPEND "mpibind" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Cuda -#------------------------------------------------ - -set(CUDAToolkit_ROOT "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") - -set(CMAKE_CUDA_COMPILER "${CUDAToolkit_ROOT}/bin/nvcc" CACHE PATH "") - -set(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}" CACHE PATH "") - -set(CUDA_TOOLKIT_ROOT_DIR "/usr/tce/packages/cuda/cuda-11.2.0" CACHE PATH "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(ENABLE_CUDA ON CACHE BOOL "") - -set(CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "") - -set(AXOM_ENABLE_ANNOTATIONS ON CACHE BOOL "") - -set(CMAKE_CUDA_ARCHITECTURES "70" CACHE STRING "") - -set(CMAKE_CUDA_FLAGS "-restrict --expt-extended-lambda -Xcompiler=--gcc-toolchain=/usr/tce/packages/gcc/gcc-8.3.1 " CACHE STRING "") - -# nvcc does not like gtest's 'pthreads' flag - -set(gtest_disable_pthreads ON CACHE BOOL "") - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS OFF CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS "${BLT_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-rpath,/usr/tce/packages/xl/xl-2022.08.19-cuda-11.2.0/lib" CACHE STRING "Adds a missing rpath for libraries associated with the fortran compiler") - -set(BLT_FORTRAN_FLAGS "-WF,-C! -qxlf2003=polymorphic" CACHE STRING "Converts C-style comments to Fortran style in preprocessed files") - -set(BLT_CMAKE_IMPLICIT_LINK_DIRECTORIES_EXCLUDE "/usr/tce/packages/gcc/gcc-4.9.3/lib64;/usr/tce/packages/gcc/gcc-4.9.3/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64;/usr/tce/packages/gcc/gcc-4.9.3/gnu/lib64/gcc/powerpc64le-unknown-linux-gnu/4.9.3" CACHE STRING "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/blueos_3_ppc64le_ib_p9/2024_03_07_00_02_23/xl-16.1.1.2" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-wh6qi5s3jncyggsy6w4dxdlcg3n3feag" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-jklapw7gpgw7rftjwecmk22p7wz4qpc2" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-giwvzuwtccsd4dt3y6co4ul3x2lkgmpw" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-vlybikhncayldwo36udsi225qyan7dos" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-6jtix4lxlnmvpkuahs62qqbjk5yubmux" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-kghzomlpcrlcri3dky476kdizqatfe5c" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-57lf4jwgiqrgzpeaj7uerwej3ht4wgyt" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-ppwilytkx2rffmtiroong3ucsojgc2o7" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/2023_10_17_10_41_04/._view/5gug4et2qymmckk7yvtub4qcapp3figm" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-qpksngigqtckjhj62aeckyiptsyrquwo/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/blueos_3_ppc64le_ib_p9/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/rzgenie-toss_4_x86_64_ib-clang@14.0.6.cmake b/host-configs/rzgenie-toss_4_x86_64_ib-clang@14.0.6.cmake deleted file mode 100644 index 31da21925c..0000000000 --- a/host-configs/rzgenie-toss_4_x86_64_ib-clang@14.0.6.cmake +++ /dev/null @@ -1,138 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/mfem-4.6.0-2o3e3zv4evsmrgwpwroyhpmj2pot7fgj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/hypre-2.24.0-k33flgav4be3pqx5hlzmgxqsege5er4p;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/parmetis-4.0.3-de7rslbjz6xchwd4jlec2iswp6yf4yt7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/blt-0.6.1.4-oouarzy7h3sj5quygkhjaduigaxbj4at;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/fmt-10.2.1-lfndxhuits6wwazxaoj5dxl3ix3hw2cc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/zlib-ng-2.1.5-lkg7eg7nky6w74eujzgmp6hnhkaf2w7p;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/metis-5.1.0-ggcpxjmhkbi3nwtqmgu7dal2rsedyza5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/gmake-4.4.1-jimcbwsnakmlfui3jg7a4e6327ry222f;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-clang-14.0.6;/usr/tce/packages/clang/clang-14.0.6" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axom-develop-5hpzhtmywppnpol3crmlzn4oxctfyukn/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axom-develop-5hpzhtmywppnpol3crmlzn4oxctfyukn/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/zlib-ng-2.1.5-lkg7eg7nky6w74eujzgmp6hnhkaf2w7p/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/metis-5.1.0-ggcpxjmhkbi3nwtqmgu7dal2rsedyza5/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/parmetis-4.0.3-de7rslbjz6xchwd4jlec2iswp6yf4yt7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/mfem-4.6.0-2o3e3zv4evsmrgwpwroyhpmj2pot7fgj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/hypre-2.24.0-k33flgav4be3pqx5hlzmgxqsege5er4p/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/fmt-10.2.1-lfndxhuits6wwazxaoj5dxl3ix3hw2cc/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axom-develop-5hpzhtmywppnpol3crmlzn4oxctfyukn/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axom-develop-5hpzhtmywppnpol3crmlzn4oxctfyukn/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/zlib-ng-2.1.5-lkg7eg7nky6w74eujzgmp6hnhkaf2w7p/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/metis-5.1.0-ggcpxjmhkbi3nwtqmgu7dal2rsedyza5/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/parmetis-4.0.3-de7rslbjz6xchwd4jlec2iswp6yf4yt7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/mfem-4.6.0-2o3e3zv4evsmrgwpwroyhpmj2pot7fgj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/hypre-2.24.0-k33flgav4be3pqx5hlzmgxqsege5er4p/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6/fmt-10.2.1-lfndxhuits6wwazxaoj5dxl3ix3hw2cc/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: clang@=14.0.6 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/clang/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/clang/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/clang/gfortran" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/clang/clang-14.0.6/bin/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/clang/clang-14.0.6/bin/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran" CACHE PATH "") - -endif() - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -set(BLT_EXE_LINKER_FLAGS " -Wl,-rpath,/usr/tce/packages/clang/clang-14.0.6/lib" CACHE STRING "Adds a missing libstdc++ rpath") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/clang-14.0.6" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-sioyszp7ze6fzubtdslxlpkxzojic7hq" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-eojdjy4bkke6p7mtj47tsbk35f3ag3us" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-2o3e3zv4evsmrgwpwroyhpmj2pot7fgj" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-j75364eqyn3yxqzod7t4v3hpbaw3zqg4" CACHE PATH "") - -set(LUA_DIR "/usr" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-i7u43vvuic25rvjjhkeblvxeitkvzjwy" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-jhuql5fc2vhya4sdl7g4nlcrzaoycqai" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-ejjy6cua3jj5bnwbk3r6x46ffgqe6tip" CACHE PATH "") - -set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-t7t35dyvwswfrk3lp2k4tcjpiyyylgr6" CACHE PATH "") - -set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-3lkpy2ktv66bhbyxtg7r6xca2shap6sw" CACHE PATH "") - -set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-scoxi2onj4nu3g5em5dgc4imwzihgfjj" CACHE PATH "") - -set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-5ypljdbn6yf6ab3jabzpeeuxxvbm6vix" CACHE PATH "") - -set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-dvovqn3v6stb27lftz5c2jv7ykyt74o3" CACHE PATH "") - -set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-rdvuqikm56okeru5jkroem5tpaybke3q" CACHE PATH "") - -set(ER_DIR "${TPL_ROOT}/er-0.2.0-pfk7tzcycgqnc73twpnleapauynyrmuo" CACHE PATH "") - -set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-t7qtfe3uihx4s2ia5gft2rvwmbfsaqcz" CACHE PATH "") - -set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-yg22aoerdpabedvtormddcankg4lkitu" CACHE PATH "") - -set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-lcyevsv6yv4cwtahb3kt5h4emqtfwwvb" CACHE PATH "") - -set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-z45arsyuiqgmqeo3vnzdiosnbyksfypl" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-6j5dc4xbppedseqpxhmnvdsvfm5nohqz/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/rzgenie-toss_4_x86_64_ib-gcc@10.3.1.cmake b/host-configs/rzgenie-toss_4_x86_64_ib-gcc@10.3.1.cmake deleted file mode 100644 index 090c2f62dc..0000000000 --- a/host-configs/rzgenie-toss_4_x86_64_ib-gcc@10.3.1.cmake +++ /dev/null @@ -1,136 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/fmt-10.2.1-vsppemwn4lv42jffltnu2m5wk7pa4mh4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/scr-3.0.1-53wid77fnqp54as4ssxj6yln3ebatfqc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/hypre-2.24.0-fqukfipx623hwcdtl44ul6m7gf436bea;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/gmake-4.4.1-hnowwppvujezizfysc64xc2myqqulzcn;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/parmetis-4.0.3-olkucdyohy6nglxyp6yqvflfxhhtjji4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/metis-5.1.0-au7rbsfu6yv7cazug6635jzvb2gwy7st;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/zlib-ng-2.1.5-shzp76r665h2g3lnqspfmluapd7jxtrt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/blt-0.6.1.4-ee4ftwhz24yhie53n4ximxniibs3wair;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/gcc-runtime-10.3.1-yxmwjg76ccmk3rbqtfni7b56ykrldyrb;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-10.3.1" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axom-develop-7y7edht7m7fpp3mt27ogvq6ymbcldzmq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axom-develop-7y7edht7m7fpp3mt27ogvq6ymbcldzmq/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/gcc-runtime-10.3.1-yxmwjg76ccmk3rbqtfni7b56ykrldyrb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/zlib-ng-2.1.5-shzp76r665h2g3lnqspfmluapd7jxtrt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/metis-5.1.0-au7rbsfu6yv7cazug6635jzvb2gwy7st/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/parmetis-4.0.3-olkucdyohy6nglxyp6yqvflfxhhtjji4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/hypre-2.24.0-fqukfipx623hwcdtl44ul6m7gf436bea/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/scr-3.0.1-53wid77fnqp54as4ssxj6yln3ebatfqc/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/fmt-10.2.1-vsppemwn4lv42jffltnu2m5wk7pa4mh4/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axom-develop-7y7edht7m7fpp3mt27ogvq6ymbcldzmq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axom-develop-7y7edht7m7fpp3mt27ogvq6ymbcldzmq/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/gcc-runtime-10.3.1-yxmwjg76ccmk3rbqtfni7b56ykrldyrb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/zlib-ng-2.1.5-shzp76r665h2g3lnqspfmluapd7jxtrt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/metis-5.1.0-au7rbsfu6yv7cazug6635jzvb2gwy7st/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/parmetis-4.0.3-olkucdyohy6nglxyp6yqvflfxhhtjji4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/hypre-2.24.0-fqukfipx623hwcdtl44ul6m7gf436bea/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/scr-3.0.1-53wid77fnqp54as4ssxj6yln3ebatfqc/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1/fmt-10.2.1-vsppemwn4lv42jffltnu2m5wk7pa4mh4/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: gcc@=10.3.1 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/gcc/g++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gcc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/g++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/gcc/gcc-10.3.1/bin/gfortran" CACHE PATH "") - -endif() - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/gcc-10.3.1" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-2gxyktbxfdki7l62knbd2gcv2po5mnnz" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fahftlekwziw2ls4bezzaviuke4kvqyz" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-72vdexr6wsfxessfqnjamz4yw7bbimzv" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-qdwxt3e3mv7bjt3xqcybad7beymgxcsn" CACHE PATH "") - -set(LUA_DIR "/usr" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-lgda75dl72dsc3fpkaboonrastlb533i" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-2edi7papg24dx6cmzuu4cvli6gn5ula4" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-54ph6bxcskqc6vyj2yumw2c453rdw3ms" CACHE PATH "") - -set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-53wid77fnqp54as4ssxj6yln3ebatfqc" CACHE PATH "") - -set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-ox6ll5w2vlux2gncxlxp6f7sduc5we3k" CACHE PATH "") - -set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-fhlas27vbqequpdrt7hs4z5y7fu6fcux" CACHE PATH "") - -set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-vy4oatc22e4yhneh564uexojguzk64hl" CACHE PATH "") - -set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-it2ovw5easrshsv2ii3y7ui7sykejtl3" CACHE PATH "") - -set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-xy2pfakxxt737yqixkijiopg5aqe6qy4" CACHE PATH "") - -set(ER_DIR "${TPL_ROOT}/er-0.2.0-ssi5sg74fzuszg64bx4w36k74aylefbs" CACHE PATH "") - -set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-rtae4hecutfnw3p2c3pw2r23wel57wxe" CACHE PATH "") - -set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-26dcmicvi4gl3n7bezyvvt6tzxgfhyt4" CACHE PATH "") - -set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-2dqga6mipogmwwnegz6ruroxjjpuydns" CACHE PATH "") - -set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-5ylxltz7yzkytfwjqsdy7alvfpvblpfa" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-lxk3nz6n2wxarwsyghge5l6jio4pze63/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/rzgenie-toss_4_x86_64_ib-intel@2022.1.0.cmake b/host-configs/rzgenie-toss_4_x86_64_ib-intel@2022.1.0.cmake deleted file mode 100644 index 69fe3de6c4..0000000000 --- a/host-configs/rzgenie-toss_4_x86_64_ib-intel@2022.1.0.cmake +++ /dev/null @@ -1,116 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/hypre-2.24.0-czbxd2tmdjbl7v4nwommsh7xgw7ewgla;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/parmetis-4.0.3-hattuaxqypmcfeqr3nvedmojwbgiora2;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/blt-0.6.1.4-3p2ecutmo7drpwwvvsgtcqxakxjoy573;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/fmt-10.2.1-jltnp6nb3minlrrafmdenoakubdzom57;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/zlib-ng-2.1.5-jtmqc4b5fqadcqbwagtun6kwe6geexbw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/metis-5.1.0-hk6ipui6fnixwdyloqmqbsixqhtv5hxw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/gmake-4.4.1-giduhrefimvdwblsuh6cmqipc474toi5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") - -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/zlib-ng-2.1.5-jtmqc4b5fqadcqbwagtun6kwe6geexbw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/metis-5.1.0-hk6ipui6fnixwdyloqmqbsixqhtv5hxw/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/parmetis-4.0.3-hattuaxqypmcfeqr3nvedmojwbgiora2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/hypre-2.24.0-czbxd2tmdjbl7v4nwommsh7xgw7ewgla/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/fmt-10.2.1-jltnp6nb3minlrrafmdenoakubdzom57/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/axom-develop-ma6pw2s3obh5afi3kvbgksqemjcs3ty7/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/zlib-ng-2.1.5-jtmqc4b5fqadcqbwagtun6kwe6geexbw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/metis-5.1.0-hk6ipui6fnixwdyloqmqbsixqhtv5hxw/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/parmetis-4.0.3-hattuaxqypmcfeqr3nvedmojwbgiora2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/hypre-2.24.0-czbxd2tmdjbl7v4nwommsh7xgw7ewgla/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0/fmt-10.2.1-jltnp6nb3minlrrafmdenoakubdzom57/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: intel@=2022.1.0 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/intel/icc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/intel/icpc" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/spack/lib/spack/env/intel/ifort" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/icx" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/icpx" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/intel/intel-2022.1.0/compiler/2022.1.0/linux/bin/ifx" CACHE PATH "") - -endif() - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP ON CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_03_07_00_00_58/intel-2022.1.0" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-t745zbwmn5ffzo7whgwxmz5p5w2ym37z" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-ovky3pniupirnys6mtf24ke5sb64mkbr" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-hma2wvr5tv3fkry6kdqfxmtsnqg6fv4d" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-2l37bduu2kjsgmhjxbfdgchsha2di2of" CACHE PATH "") - -set(LUA_DIR "/usr" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-v5ckygwjzmo7e2rts5qxwgfswhhpeqta" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-4nxnup6vxwkwkinxdzzinkxul6vk2lsj" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-xyur27wnppnansskdldrlqyzormhcr4e" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") - -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") - -set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") - -set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-2.6.0-scktpdojmezaljg2bxfbzmf5lx3nmwvc/bin/jsonschema" CACHE PATH "") - -set(ENABLE_DOCS ON CACHE BOOL "") - -set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") - -set(SHROUD_EXECUTABLE "/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0/bin/shroud" CACHE PATH "") - -set(CPPCHECK_EXECUTABLE "${DEVTOOLS_ROOT}/cppcheck-2.9/bin/cppcheck" CACHE PATH "") - -set(DOXYGEN_EXECUTABLE "${DEVTOOLS_ROOT}/doxygen-1.9.6/bin/doxygen" CACHE PATH "") - - diff --git a/host-configs/rzvernal-toss_4_x86_64_ib_cray-cce@15.0.1_hip.cmake b/host-configs/rzvernal-toss_4_x86_64_ib_cray-cce@15.0.1_hip.cmake deleted file mode 100644 index 5d6731bb92..0000000000 --- a/host-configs/rzvernal-toss_4_x86_64_ib_cray-cce@15.0.1_hip.cmake +++ /dev/null @@ -1,133 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/umpire-2023.06.0-znpux7jjwwb3gb2hr4vi6nbhyrkfo5mo;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/raja-2023.06.0-ovzqujoxykloaaitzbtkg6egqp6qjr2v;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/camp-2023.06.0-nsepimnez7uuv3dxqiji2twih3swa6cr;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/mfem-4.5.2-7rrla6up5iou2fic4riu776n4isvt4wf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/hypre-2.24.0-ci2qpkdifjovd7ki22dscgl6goyjefai;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/lua-5.4.4-gduannh2dcxphs7odrtkrpnmabgcikom;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/ncurses-6.4-cnq7lljngizvsdryq3csevc3tbh4k7vh;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/conduit-0.8.8-w5ybmdn2qvfbkooexazuzxnmvyc4zfyl;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/parmetis-4.0.3-u2udk5n4552zcftdccg5ol33mtulfq2i;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/metis-5.1.0-lssxpp454fp6c4fbcl2d6rwugzcrpgvm;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/hdf5-1.8.22-uvl6nsaahk6vl3mvoq6a432lontoo6zv;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/c2c-1.8.0-drh2lcdrfn627tcfkocetim7snaakicw;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1/blt-0.5.3-xxkf276amm4zj5wm5dx44clspivj42vx;/opt/rocm-5.4.3;/opt/rocm-5.4.3/llvm;/opt/rocm-5.4.3;/opt/rocm-5.4.3/hip;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3-cce-15.0.1;/usr/tce" CACHE PATH "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: cce@=15.0.1 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/cce/craycc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/cce/case-insensitive/crayCC" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/cce/crayftn" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/usr/tce/packages/cce-tce/cce-15.0.1/bin/craycc" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/tce/packages/cce-tce/cce-15.0.1/bin/crayCC" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/tce/packages/cce-tce/cce-15.0.1/bin/crayftn" CACHE PATH "") - -endif() - -set(CMAKE_Fortran_FLAGS "-ef" CACHE STRING "") - -set(CMAKE_GENERATOR "Unix Makefiles" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -set(CMAKE_CXX_FLAGS_DEBUG "-O1 -g -DNDEBUG" CACHE STRING "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3-cce-15.0.1/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3-cce-15.0.1/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3-cce-15.0.1/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# ROCm -#------------------------------------------------ - -set(HIP_ROOT_DIR "/opt/rocm-5.4.3/hip" CACHE PATH "") - -set(HIP_CXX_COMPILER "/opt/rocm-5.4.3/hip/bin/hipcc" CACHE PATH "") - -set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") - -set(AMDGPU_TARGETS "gfx90a" CACHE STRING "") - -set(GPU_TARGETS "gfx90a" CACHE STRING "") - -#------------------------------------------------------------------------------ - -# Axom ROCm specifics - -#------------------------------------------------------------------------------ - - -set(ENABLE_HIP ON CACHE BOOL "") - -set(HIP_CLANG_INCLUDE_PATH "/opt/rocm-5.4.3/hip/../llvm/lib/clang/15.0.0/include" CACHE PATH "") - -set(BLT_CMAKE_IMPLICIT_LINK_LIBRARIES_EXCLUDE "unwind" CACHE STRING "") - -set(CMAKE_EXE_LINKER_FLAGS " -L/opt/rocm-5.4.3/hip/../lib64 -Wl,-rpath,/opt/rocm-5.4.3/hip/../lib64 -L/opt/rocm-5.4.3/hip/../lib -Wl,-rpath,/opt/rocm-5.4.3/hip/../lib -lamd_comgr -lhsa-runtime64 " CACHE STRING "") - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/cce-15.0.1" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.8.8-w5ybmdn2qvfbkooexazuzxnmvyc4zfyl" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-drh2lcdrfn627tcfkocetim7snaakicw" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.5.2-7rrla6up5iou2fic4riu776n4isvt4wf" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.22-uvl6nsaahk6vl3mvoq6a432lontoo6zv" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-gduannh2dcxphs7odrtkrpnmabgcikom" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2023.06.0-ovzqujoxykloaaitzbtkg6egqp6qjr2v" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2023.06.0-znpux7jjwwb3gb2hr4vi6nbhyrkfo5mo" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-nsepimnez7uuv3dxqiji2twih3swa6cr" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -# ClangFormat disabled due to llvm and devtools not in spec - -set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") - -set(ENABLE_DOCS OFF CACHE BOOL "") - - diff --git a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@14.0.0_hip.cmake b/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@14.0.0_hip.cmake deleted file mode 100644 index 94e0774f85..0000000000 --- a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@14.0.0_hip.cmake +++ /dev/null @@ -1,129 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/umpire-2023.06.0-5shsoyik6cl37unfukgypuy5wq3xrf5d;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/raja-2023.06.0-mihlyyxgy5ksjvblaztoa7lernlfuq5c;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/camp-2023.06.0-kjnl6w2c7g7373mmyy6z2kmnvwqcjiat;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/mfem-4.5.2-z5scxsmafi5skftjzrszn2cgfg5smgxr;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/hypre-2.24.0-kirtgmu2tqj5qeewzcgwxekiw2mjjvnq;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/lua-5.4.4-s6rzmz2h2k53z53grnpe237uwwzr4nz3;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/ncurses-6.4-wwijdtdjzvmf4224vzbzcntupmetijri;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/conduit-0.8.8-2kuebxwabtkkcikcqclqytfllwm3qwhg;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/parmetis-4.0.3-g4rtt7uakthoyf32g4ug6nntsxsh3im3;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/metis-5.1.0-bhi2eebvzv5maenn2vbmxsr2ftlqqv5n;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/hdf5-1.8.22-fo5wthv72ys3e263kvxykonmixg2sxun;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/c2c-1.8.0-56n4sm5x4ecvwmdazemuqvikg5ngwdwf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0/blt-0.5.3-2z65cg5imrjg7ktgft4ob5tgxg2cvn4f;/opt/rocm-5.2.3;/opt/rocm-5.2.3/llvm;/opt/rocm-5.2.3;/opt/rocm-5.2.3/hip;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.16-rocmcc-5.2.3;/usr/tce" CACHE PATH "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: clang@=14.0.0 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/clang/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/clang/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/clang/flang" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/opt/rocm-5.2.3/llvm/bin/amdclang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/opt/rocm-5.2.3/llvm/bin/amdclang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/opt/rocm-5.2.3/llvm/bin/amdflang" CACHE PATH "") - -endif() - -set(CMAKE_Fortran_FLAGS "-Mfreeform" CACHE STRING "") - -set(CMAKE_GENERATOR "Unix Makefiles" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.16-rocmcc-5.2.3/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.16-rocmcc-5.2.3/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.16-rocmcc-5.2.3/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# ROCm -#------------------------------------------------ - -set(HIP_ROOT_DIR "/opt/rocm-5.2.3/hip" CACHE PATH "") - -set(HIP_CXX_COMPILER "/opt/rocm-5.2.3/hip/bin/hipcc" CACHE PATH "") - -set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") - -set(AMDGPU_TARGETS "gfx90a" CACHE STRING "") - -set(GPU_TARGETS "gfx90a" CACHE STRING "") - -#------------------------------------------------------------------------------ - -# Axom ROCm specifics - -#------------------------------------------------------------------------------ - - -set(ENABLE_HIP ON CACHE BOOL "") - -set(HIP_CLANG_INCLUDE_PATH "/opt/rocm-5.2.3/hip/../llvm/lib/clang/14.0.0/include" CACHE PATH "") - -set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags -L/opt/rocm-5.2.3/hip/../llvm/lib -L/opt/rocm-5.2.3/hip/lib -Wl,-rpath,/opt/rocm-5.2.3/hip/../llvm/lib:/opt/rocm-5.2.3/hip/lib -lpgmath -lflang -lflangrti -lompstub -lamdhip64 -L/opt/rocm-5.2.3/hip/../lib64 -Wl,-rpath,/opt/rocm-5.2.3/hip/../lib64 -L/opt/rocm-5.2.3/hip/../lib -Wl,-rpath,/opt/rocm-5.2.3/hip/../lib -lamd_comgr -lhsa-runtime64 " CACHE STRING "") - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-14.0.0" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.8.8-2kuebxwabtkkcikcqclqytfllwm3qwhg" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-56n4sm5x4ecvwmdazemuqvikg5ngwdwf" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.5.2-z5scxsmafi5skftjzrszn2cgfg5smgxr" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.22-fo5wthv72ys3e263kvxykonmixg2sxun" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-s6rzmz2h2k53z53grnpe237uwwzr4nz3" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2023.06.0-mihlyyxgy5ksjvblaztoa7lernlfuq5c" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2023.06.0-5shsoyik6cl37unfukgypuy5wq3xrf5d" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-kjnl6w2c7g7373mmyy6z2kmnvwqcjiat" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -# ClangFormat disabled due to llvm and devtools not in spec - -set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") - -set(ENABLE_DOCS OFF CACHE BOOL "") - - diff --git a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@15.0.0_hip.cmake b/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@15.0.0_hip.cmake deleted file mode 100644 index 6419897db9..0000000000 --- a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@15.0.0_hip.cmake +++ /dev/null @@ -1,129 +0,0 @@ -#------------------------------------------------------------------------------ -# !!!! This is a generated file, edit at own risk !!!! -#------------------------------------------------------------------------------ -# CMake executable path: /usr/tce/bin/cmake -#------------------------------------------------------------------------------ - -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/umpire-2023.06.0-qlza5hxkti4qhuvnywz6js5xwouogfq5;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/raja-2023.06.0-vcdxhm5vuta43rgiuayko2slnfksxf7f;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/camp-2023.06.0-lhl3jkmzbdahxa633diszo6r4drszuy6;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/mfem-4.5.2-qu3gj4kd7xsetoefz23bofifgyufllhi;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/hypre-2.24.0-qbm2npjkwsp4vryixh65wbi2vohvpvbv;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/lua-5.4.4-nciboohbuioaqb35wwibitzc3ypfjbvp;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/ncurses-6.4-aqfvdlf2fuogw7pvfsg33qvvsdskwxn3;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/conduit-0.8.8-hqffdgfu3fhgmjlctcuywp66hp5ldg7e;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/parmetis-4.0.3-22wxjkvf6g6l74z2ztuk3imydnmpi7gq;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/metis-5.1.0-i4fcjmmgu4qquorg5pjbuipwd7m3viy6;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/hdf5-1.8.22-eoxieadxuddhem2eot4dqfdj47xngqpj;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/c2c-1.8.0-da5avt3ikppaabh4do3vgximikvvsjhy;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0/blt-0.5.3-57fuyfjl4ksfli3zskcbvykyrwtrwfne;/opt/rocm-5.4.3;/opt/rocm-5.4.3/llvm;/opt/rocm-5.4.3;/opt/rocm-5.4.3/hip;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3;/usr/tce" CACHE PATH "") - -set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") - -#------------------------------------------------------------------------------ -# Compilers -#------------------------------------------------------------------------------ -# Compiler Spec: clang@=15.0.0 -#------------------------------------------------------------------------------ -if(DEFINED ENV{SPACK_CC}) - - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/clang/clang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/clang/clang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/spack/lib/spack/env/clang/flang" CACHE PATH "") - -else() - - set(CMAKE_C_COMPILER "/opt/rocm-5.4.3/llvm/bin/amdclang" CACHE PATH "") - - set(CMAKE_CXX_COMPILER "/opt/rocm-5.4.3/llvm/bin/amdclang++" CACHE PATH "") - - set(CMAKE_Fortran_COMPILER "/opt/rocm-5.4.3/llvm/bin/amdflang" CACHE PATH "") - -endif() - -set(CMAKE_Fortran_FLAGS "-Mfreeform" CACHE STRING "") - -set(CMAKE_GENERATOR "Unix Makefiles" CACHE STRING "") - -set(ENABLE_FORTRAN ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# MPI -#------------------------------------------------------------------------------ - -set(MPI_C_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3/bin/mpicc" CACHE PATH "") - -set(MPI_CXX_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3/bin/mpicxx" CACHE PATH "") - -set(MPI_Fortran_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3/bin/mpif90" CACHE PATH "") - -set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") - -set(ENABLE_MPI ON CACHE BOOL "") - -set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") - -#------------------------------------------------------------------------------ -# Hardware -#------------------------------------------------------------------------------ - -#------------------------------------------------ -# ROCm -#------------------------------------------------ - -set(HIP_ROOT_DIR "/opt/rocm-5.4.3/hip" CACHE PATH "") - -set(HIP_CXX_COMPILER "/opt/rocm-5.4.3/hip/bin/hipcc" CACHE PATH "") - -set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") - -set(AMDGPU_TARGETS "gfx90a" CACHE STRING "") - -set(GPU_TARGETS "gfx90a" CACHE STRING "") - -#------------------------------------------------------------------------------ - -# Axom ROCm specifics - -#------------------------------------------------------------------------------ - - -set(ENABLE_HIP ON CACHE BOOL "") - -set(HIP_CLANG_INCLUDE_PATH "/opt/rocm-5.4.3/hip/../llvm/lib/clang/15.0.0/include" CACHE PATH "") - -set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags -L/opt/rocm-5.4.3/hip/../llvm/lib -L/opt/rocm-5.4.3/hip/lib -Wl,-rpath,/opt/rocm-5.4.3/hip/../llvm/lib:/opt/rocm-5.4.3/hip/lib -lpgmath -lflang -lflangrti -lompstub -lamdhip64 -L/opt/rocm-5.4.3/hip/../lib64 -Wl,-rpath,/opt/rocm-5.4.3/hip/../lib64 -L/opt/rocm-5.4.3/hip/../lib -Wl,-rpath,/opt/rocm-5.4.3/hip/../lib -lamd_comgr -lhsa-runtime64 " CACHE STRING "") - -#------------------------------------------------ -# Hardware Specifics -#------------------------------------------------ - -set(ENABLE_OPENMP OFF CACHE BOOL "") - -set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") - -#------------------------------------------------------------------------------ -# TPLs -#------------------------------------------------------------------------------ - -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2023_07_26_18_12_45/clang-15.0.0" CACHE PATH "") - -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.8.8-hqffdgfu3fhgmjlctcuywp66hp5ldg7e" CACHE PATH "") - -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-da5avt3ikppaabh4do3vgximikvvsjhy" CACHE PATH "") - -set(MFEM_DIR "${TPL_ROOT}/mfem-4.5.2-qu3gj4kd7xsetoefz23bofifgyufllhi" CACHE PATH "") - -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.22-eoxieadxuddhem2eot4dqfdj47xngqpj" CACHE PATH "") - -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-nciboohbuioaqb35wwibitzc3ypfjbvp" CACHE PATH "") - -set(RAJA_DIR "${TPL_ROOT}/raja-2023.06.0-vcdxhm5vuta43rgiuayko2slnfksxf7f" CACHE PATH "") - -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2023.06.0-qlza5hxkti4qhuvnywz6js5xwouogfq5" CACHE PATH "") - -set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-lhl3jkmzbdahxa633diszo6r4drszuy6" CACHE PATH "") - -# scr not built - -#------------------------------------------------------------------------------ -# Devtools -#------------------------------------------------------------------------------ - -# ClangFormat disabled due to llvm and devtools not in spec - -set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") - -set(ENABLE_DOCS OFF CACHE BOOL "") - - diff --git a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake b/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake index 2feecca36c..484af3af3b 100644 --- a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake +++ b/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake @@ -4,13 +4,13 @@ # CMake executable path: /usr/tce/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/hypre-2.24.0-ki5iqwndtm6rvb4nrb7ebbvl3x24q3vt;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/parmetis-4.0.3-ll2czqc5pmp3olgjpu47krq4jgxksmdt;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/blt-0.6.1.4-rsolo2redxjrxxepfboqczt24wsewi2r;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/fmt-10.2.1-nr2acfkfdgyihxps6ekcgfn4fk56v5rb;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/zlib-ng-2.1.5-c4toe533t23gocizsqebzf4s662hyxlt;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/metis-5.1.0-rjek5dokihv3f6afzrhphjgg6xcjrfvk;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/ncurses-6.4-ezqmnqki7vits7vrigam3pwcidzycnny;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb;/opt/rocm-5.6.0/llvm;/opt/rocm-5.6.0;/opt/rocm-5.6.0/hip;/opt/rocm-5.6.0;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0;/usr/tce" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/fmt-11.0.0-c6zfb4nysq2a5z37usggcx7fn2m6g5s7;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/hypre-2.24.0-hbqzzswfh6422kizd7b5d3p5tj5doizo;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/ncurses-6.5-zeoxskjirdjchpakkc5wxv4y6pnaijke;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/parmetis-4.0.3-uyk5ryduuuftravriddna4hynygens2s;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/metis-5.1.0-o3b6chclwh557m5lr4exhdlq6pvhbss3;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/zlib-ng-2.2.1-pynv24fdz7gqlx4wm2dj6x6el6fu42zm;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/blt-0.6.2-dyarpxoltcw2fxeb3t34223i45hyoutj;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm;/opt/rocm-5.6.0/llvm;/opt/rocm-5.6.0;/opt/rocm-5.6.0/hip;/opt/rocm-5.6.0;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0;/usr/tce" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/zlib-ng-2.1.5-c4toe533t23gocizsqebzf4s662hyxlt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/metis-5.1.0-rjek5dokihv3f6afzrhphjgg6xcjrfvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/parmetis-4.0.3-ll2czqc5pmp3olgjpu47krq4jgxksmdt/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/ncurses-6.4-ezqmnqki7vits7vrigam3pwcidzycnny/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/hypre-2.24.0-ki5iqwndtm6rvb4nrb7ebbvl3x24q3vt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/fmt-10.2.1-nr2acfkfdgyihxps6ekcgfn4fk56v5rb/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/zlib-ng-2.2.1-pynv24fdz7gqlx4wm2dj6x6el6fu42zm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/metis-5.1.0-o3b6chclwh557m5lr4exhdlq6pvhbss3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/parmetis-4.0.3-uyk5ryduuuftravriddna4hynygens2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/ncurses-6.5-zeoxskjirdjchpakkc5wxv4y6pnaijke/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/hypre-2.24.0-hbqzzswfh6422kizd7b5d3p5tj5doizo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/fmt-11.0.0-c6zfb4nysq2a5z37usggcx7fn2m6g5s7/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/zlib-ng-2.1.5-c4toe533t23gocizsqebzf4s662hyxlt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/metis-5.1.0-rjek5dokihv3f6afzrhphjgg6xcjrfvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/parmetis-4.0.3-ll2czqc5pmp3olgjpu47krq4jgxksmdt/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/ncurses-6.4-ezqmnqki7vits7vrigam3pwcidzycnny/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/hypre-2.24.0-ki5iqwndtm6rvb4nrb7ebbvl3x24q3vt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0/fmt-10.2.1-nr2acfkfdgyihxps6ekcgfn4fk56v5rb/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/zlib-ng-2.2.1-pynv24fdz7gqlx4wm2dj6x6el6fu42zm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/metis-5.1.0-o3b6chclwh557m5lr4exhdlq6pvhbss3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/parmetis-4.0.3-uyk5ryduuuftravriddna4hynygens2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/ncurses-6.5-zeoxskjirdjchpakkc5wxv4y6pnaijke/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/hypre-2.24.0-hbqzzswfh6422kizd7b5d3p5tj5doizo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0/fmt-11.0.0-c6zfb4nysq2a5z37usggcx7fn2m6g5s7/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/spack/lib/spack/env/clang/flang" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/spack/lib/spack/env/clang/flang" CACHE PATH "") else() @@ -69,8 +69,6 @@ set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") set(HIP_ROOT_DIR "/opt/rocm-5.6.0/hip" CACHE PATH "") -set(HIP_CXX_COMPILER "/opt/rocm-5.6.0/hip/bin/hipcc" CACHE PATH "") - set(CMAKE_HIP_COMPILER "/opt/rocm-5.6.0/llvm/bin/clang++" CACHE FILEPATH "") set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") @@ -104,23 +102,27 @@ set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_07_00_03_21/clang-16.0.0" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-16.0.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip" CACHE PATH "") # scr not built diff --git a/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@17.0.0_hip.cmake b/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@17.0.0_hip.cmake new file mode 100644 index 0000000000..8ac7462fc3 --- /dev/null +++ b/host-configs/rzvernal-toss_4_x86_64_ib_cray-clang@17.0.0_hip.cmake @@ -0,0 +1,139 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/tce/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/fmt-11.0.0-rhl2umjy2nni3c22frv5p44ms4t6ry4z;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/hypre-2.24.0-h67v4lbiwbqe3ftc6vsufrkkayr6zk6v;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/ncurses-6.5-zqj73d65x5y7pkg2qrz7e6fkf4jfvefw;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/parmetis-4.0.3-or2fqrw6hbqkhyh7k5fo6opifcga4yle;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/metis-5.1.0-7wqk5rlknhxqo6tdg5do5xlyfvj6glsq;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/zlib-ng-2.2.1-qsmhahovhgpvjtebp63ciya3cft3t6ln;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/blt-0.6.2-xnjxcxij26ycbcqqzcxukg6qahgk7joy;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw;/opt/rocm-5.7.1/llvm;/opt/rocm-5.7.1;/opt/rocm-5.7.1/hip;/opt/rocm-5.7.1;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1;/usr/tce" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf/lib;/opt/rocm-5.7.1/hip/lib;/opt/rocm-5.7.1/lib;/opt/rocm-5.7.1/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/zlib-ng-2.2.1-qsmhahovhgpvjtebp63ciya3cft3t6ln/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/metis-5.1.0-7wqk5rlknhxqo6tdg5do5xlyfvj6glsq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/parmetis-4.0.3-or2fqrw6hbqkhyh7k5fo6opifcga4yle/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/ncurses-6.5-zqj73d65x5y7pkg2qrz7e6fkf4jfvefw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/hypre-2.24.0-h67v4lbiwbqe3ftc6vsufrkkayr6zk6v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/fmt-11.0.0-rhl2umjy2nni3c22frv5p44ms4t6ry4z/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf/lib;/opt/rocm-5.7.1/hip/lib;/opt/rocm-5.7.1/lib;/opt/rocm-5.7.1/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/zlib-ng-2.2.1-qsmhahovhgpvjtebp63ciya3cft3t6ln/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/metis-5.1.0-7wqk5rlknhxqo6tdg5do5xlyfvj6glsq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/parmetis-4.0.3-or2fqrw6hbqkhyh7k5fo6opifcga4yle/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/ncurses-6.5-zqj73d65x5y7pkg2qrz7e6fkf4jfvefw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/hypre-2.24.0-h67v4lbiwbqe3ftc6vsufrkkayr6zk6v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0/fmt-11.0.0-rhl2umjy2nni3c22frv5p44ms4t6ry4z/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: clang@=17.0.0 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/spack/lib/spack/env/clang/clang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/spack/lib/spack/env/clang/clang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/spack/lib/spack/env/clang/flang" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/opt/rocm-5.7.1/llvm/bin/amdclang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/opt/rocm-5.7.1/llvm/bin/amdclang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/opt/rocm-5.7.1/llvm/bin/amdflang" CACHE PATH "") + +endif() + +set(CMAKE_Fortran_FLAGS "-Mfreeform" CACHE STRING "") + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +set(CMAKE_CXX_FLAGS_DEBUG "-O1 -g -DNDEBUG" CACHE STRING "") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/bin/mpicxx" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# ROCm +#------------------------------------------------ + +set(HIP_ROOT_DIR "/opt/rocm-5.7.1/hip" CACHE PATH "") + +set(CMAKE_HIP_COMPILER "/opt/rocm-5.7.1/llvm/bin/clang++" CACHE FILEPATH "") + +set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") + +set(AMDGPU_TARGETS "gfx90a" CACHE STRING "") + +set(GPU_TARGETS "gfx90a" CACHE STRING "") + +#------------------------------------------------------------------------------ + +# Axom ROCm specifics + +#------------------------------------------------------------------------------ + + +set(ENABLE_HIP ON CACHE BOOL "") + +set(HIP_CLANG_INCLUDE_PATH "/opt/rocm-5.7.1/hip/../llvm/lib/clang/17.0.0/include" CACHE PATH "") + +set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags -L/opt/rocm-5.7.1/hip/../llvm/lib -L/opt/rocm-5.7.1/hip/lib -Wl,-rpath,/opt/rocm-5.7.1/hip/../llvm/lib:/opt/rocm-5.7.1/hip/lib -lpgmath -lflang -lflangrti -lompstub -lamdhip64 -L/opt/rocm-5.7.1/hip/../lib64 -Wl,-rpath,/opt/rocm-5.7.1/hip/../lib64 -L/opt/rocm-5.7.1/hip/../lib -Wl,-rpath,/opt/rocm-5.7.1/hip/../lib -lamd_comgr -lhsa-runtime64 " CACHE STRING "") + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP OFF CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_13_35_23/clang-17.0.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf" CACHE PATH "") + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq" CACHE PATH "") + +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2" CACHE PATH "") + +# scr not built + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +# ClangFormat disabled due to llvm and devtools not in spec + +set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") + +set(ENABLE_DOCS OFF CACHE BOOL "") + + diff --git a/host-configs/rzwhippet-toss_4_x86_64_ib-clang@14.0.6.cmake b/host-configs/rzwhippet-toss_4_x86_64_ib-clang@14.0.6.cmake index fe5c49492b..5be1e55663 100644 --- a/host-configs/rzwhippet-toss_4_x86_64_ib-clang@14.0.6.cmake +++ b/host-configs/rzwhippet-toss_4_x86_64_ib-clang@14.0.6.cmake @@ -4,7 +4,13 @@ # CMake executable path: /usr/tce/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/umpire-2023.06.0-ubadmsj3l2zavunhkkt7nxevkpmssdvy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/scr-3.0.1-5edtc4k2wstti2dh4kp2tno7rmwr3lyd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/spath-0.2.0-gvlnzegcdph7ien3w4tjcxevblf2xe4r;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/libyogrt-1.33-3joihut3xh67qmtalrqadzujfzxwpodj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/er-0.2.0-befo66qsdjjulpnhaxvhk4uil45ynd6u;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/shuffile-0.2.0-j5blkpa2h3keb562qb5pdnfiuzyaecfd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/redset-0.2.0-tllpyzklkik7oa32us3tigl7vdvil42o;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/rankstr-0.1.0-jkgwo3kyvegaapdtm67mg4aknu44foyn;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/dtcmp-1.1.4-u376uqcnt3y7ebu5ocfvk7bovkr2febv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/lwgrp-1.0.5-am6sfml4trdhzlds365vbepezgdvdocz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/axl-0.7.1-t7yboywzjziqb3hbgidynhbk5vd33jc7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/kvtree-1.3.0-4zcbvvaqpbkdt7xc4pbu7urlkdywjjd7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/raja-2023.06.0-55ypap77cpmjgq24vaquanhsshjm3gqh;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/camp-2023.06.0-e6mknahsrmbbifbfv3umemetvqzoh3he;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/mfem-4.5.2-lwet4c3edrdvipij3r4itukmse2jklvy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/hypre-2.24.0-bwh42bebp4hiuwzlwcthpgkawape6dp3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/conduit-0.8.8-inqrhwboacvngevqbvavhpisx4aeqpvy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/parmetis-4.0.3-jthqwflsj5bpe6onwsb5r2zi5wbx6pq4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/metis-5.1.0-imzig3eih3itpztvvk4yildzgq6aeelo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/hdf5-1.8.22-5mfm2r7fo5krpj7vvmayz24qksnluryl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/c2c-1.8.0-5smd5ktj7yjc2egeyum4t5vlwmw3jktt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/gmake-4.4.1-6lgy76r7dbvqm6mbwb2jkpcuycf7tb27;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6/blt-0.5.3-xa3bmu75nkolqiewb5ftk5tp2jpzw57n;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-clang-14.0.6;/usr/tce/packages/clang/clang-14.0.6" CACHE PATH "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/fmt-11.0.0-u4itycxepszflvei6gqqug5nc3qj32f3;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/slurm-23-11-1-1-yrhaubaa64eana62fadhgcsvgwk7zx2s;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/munge-0.5.15-izx4b65jkqdcdwjh3bxd527qcesp3li6;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libgcrypt-1.11.0-jy3ortzbqox5scave4vigseoyiq3udcz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libgpg-error-1.50-i6iwm3vp5mjusd2lht5jaybulcwjxcbk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/lz4-1.9.4-kxmhievlskn5onhsjtpppdxsmcckedli;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/json-c-0.16-bauishuxzql52jbwj3lkfaawdaobmulj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/glib-2.78.3-ofscc2odstpiyamtvrpwdxzsp5l7qaod;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/pcre2-10.43-v3mknh3hzmzwmctcfihlmsonpl3kt3os;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libiconv-1.17-kgsyhark3r7am23bat6iym37khu3lgpl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libffi-3.4.6-52cxk7pdje3jwujxitv22xdzru4bvznw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/hypre-2.24.0-qyjyfy535h2hhpcy4old7fhwoudwiz7i;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/parmetis-4.0.3-i7tyhdrxjogji6aycsiwt2thqac4wfcg;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/metis-5.1.0-gapvtpbqjmjirvpjhryir22owsiredwt;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libunwind-1.6.2-525xjhdzj3byebl6hpv7soeqkd5orlhz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/blt-0.6.2-6egvdl5yu56kx2eztpgcsyxx4iiwvqwo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-clang-14.0.6;/usr/tce/packages/clang/clang-14.0.6" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libunwind-1.6.2-525xjhdzj3byebl6hpv7soeqkd5orlhz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/metis-5.1.0-gapvtpbqjmjirvpjhryir22owsiredwt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/parmetis-4.0.3-i7tyhdrxjogji6aycsiwt2thqac4wfcg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/hypre-2.24.0-qyjyfy535h2hhpcy4old7fhwoudwiz7i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/slurm-23-11-1-1-yrhaubaa64eana62fadhgcsvgwk7zx2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/glib-2.78.3-ofscc2odstpiyamtvrpwdxzsp5l7qaod/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libffi-3.4.6-52cxk7pdje3jwujxitv22xdzru4bvznw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libiconv-1.17-kgsyhark3r7am23bat6iym37khu3lgpl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/pcre2-10.43-v3mknh3hzmzwmctcfihlmsonpl3kt3os/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/lz4-1.9.4-kxmhievlskn5onhsjtpppdxsmcckedli/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/munge-0.5.15-izx4b65jkqdcdwjh3bxd527qcesp3li6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libgcrypt-1.11.0-jy3ortzbqox5scave4vigseoyiq3udcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libgpg-error-1.50-i6iwm3vp5mjusd2lht5jaybulcwjxcbk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/json-c-0.16-bauishuxzql52jbwj3lkfaawdaobmulj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/fmt-11.0.0-u4itycxepszflvei6gqqug5nc3qj32f3/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axom-develop-hpgzgkdsnapjjqf7w5qqqsfuesgstlf3/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-clang-14.0.6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libunwind-1.6.2-525xjhdzj3byebl6hpv7soeqkd5orlhz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/metis-5.1.0-gapvtpbqjmjirvpjhryir22owsiredwt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/parmetis-4.0.3-i7tyhdrxjogji6aycsiwt2thqac4wfcg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/hypre-2.24.0-qyjyfy535h2hhpcy4old7fhwoudwiz7i/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/slurm-23-11-1-1-yrhaubaa64eana62fadhgcsvgwk7zx2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/glib-2.78.3-ofscc2odstpiyamtvrpwdxzsp5l7qaod/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libffi-3.4.6-52cxk7pdje3jwujxitv22xdzru4bvznw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libiconv-1.17-kgsyhark3r7am23bat6iym37khu3lgpl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/pcre2-10.43-v3mknh3hzmzwmctcfihlmsonpl3kt3os/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/lz4-1.9.4-kxmhievlskn5onhsjtpppdxsmcckedli/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/munge-0.5.15-izx4b65jkqdcdwjh3bxd527qcesp3li6/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libgcrypt-1.11.0-jy3ortzbqox5scave4vigseoyiq3udcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/libgpg-error-1.50-i6iwm3vp5mjusd2lht5jaybulcwjxcbk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/json-c-0.16-bauishuxzql52jbwj3lkfaawdaobmulj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6/fmt-11.0.0-u4itycxepszflvei6gqqug5nc3qj32f3/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -15,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/clang/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/clang/gfortran" CACHE PATH "") else() @@ -31,8 +37,6 @@ else() endif() -set(CMAKE_GENERATOR "Unix Makefiles" CACHE STRING "") - set(ENABLE_FORTRAN ON CACHE BOOL "") set(BLT_EXE_LINKER_FLAGS " -Wl,-rpath,/usr/tce/packages/clang/clang-14.0.6/lib" CACHE STRING "Adds a missing libstdc++ rpath") @@ -69,45 +73,49 @@ set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/clang-14.0.6" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/clang-14.0.6" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.8.8-inqrhwboacvngevqbvavhpisx4aeqpvy" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-kcenhmuhxqdlvj2n6uhpliv45tijtyk4" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-5smd5ktj7yjc2egeyum4t5vlwmw3jktt" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-yupefezc4ftah23oxdds4wuu7r4r65wq" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.5.2-lwet4c3edrdvipij3r4itukmse2jklvy" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-wmks2nlnxusjwroscgliqqux765udbbd" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.22-5mfm2r7fo5krpj7vvmayz24qksnluryl" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-hcrkmapza245iusfl4tva6a66vlynnwp" CACHE PATH "") set(LUA_DIR "/usr" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2023.06.0-55ypap77cpmjgq24vaquanhsshjm3gqh" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-hmdop6drvljlgj4433by42d4ugesd4zt" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2023.06.0-ubadmsj3l2zavunhkkt7nxevkpmssdvy" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-4bdhkgxmckkcfnhfv76gutbzn7gzrcum" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-e6mknahsrmbbifbfv3umemetvqzoh3he" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-bek7ts3sihyiuaawom6rbc56vyupxm3e" CACHE PATH "") -set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-5edtc4k2wstti2dh4kp2tno7rmwr3lyd" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-l4d4p64oldktpmomi43pmd7xm5xx3nhv" CACHE PATH "") -set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-4zcbvvaqpbkdt7xc4pbu7urlkdywjjd7" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-2jy7w3hmenvwhduryks2phyjtw7wullv" CACHE PATH "") -set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-u376uqcnt3y7ebu5ocfvk7bovkr2febv" CACHE PATH "") +set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-2lywpjpbxoiwsodv57rwqnrizbll3hbk" CACHE PATH "") -set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-gvlnzegcdph7ien3w4tjcxevblf2xe4r" CACHE PATH "") +set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-6v42jp3dun3u5awd2akjabd3tek4tmio" CACHE PATH "") -set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-t7yboywzjziqb3hbgidynhbk5vd33jc7" CACHE PATH "") +set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-cagojlapj74hja6lgo5oeljds75r3zqq" CACHE PATH "") -set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-am6sfml4trdhzlds365vbepezgdvdocz" CACHE PATH "") +set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-5ljpy4772xcg2q2s27in7xsvkxwoo6t2" CACHE PATH "") -set(ER_DIR "${TPL_ROOT}/er-0.2.0-befo66qsdjjulpnhaxvhk4uil45ynd6u" CACHE PATH "") +set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-x6q2bpq3woav77vl5atiftwkbb2yqvvs" CACHE PATH "") -set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-jkgwo3kyvegaapdtm67mg4aknu44foyn" CACHE PATH "") +set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-y6qfbee4xuov6bjuyjts3d5ih6j5wqgy" CACHE PATH "") -set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-tllpyzklkik7oa32us3tigl7vdvil42o" CACHE PATH "") +set(ER_DIR "${TPL_ROOT}/er-0.2.0-5ifplkolbsra2gsyn2wthtu5kkv7o5gf" CACHE PATH "") -set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-j5blkpa2h3keb562qb5pdnfiuzyaecfd" CACHE PATH "") +set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-klwz6e5mwydepxhhxquvldotx2dskyqe" CACHE PATH "") -set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-3joihut3xh67qmtalrqadzujfzxwpodj" CACHE PATH "") +set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-f7e5lcgf4il5yrqac72nlsajceyvytzz" CACHE PATH "") + +set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-2kfyhnw3ljzjhx7motuduilqancrmvjr" CACHE PATH "") + +set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.35-63v5s4vmwkhgcs7wbjttblzkvkhbqgcd" CACHE PATH "") #------------------------------------------------------------------------------ # Devtools @@ -115,10 +123,12 @@ set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-3joihut3xh67qmtalrqadzujfzxwpodj" CA set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.6/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-awy7wkvpykvpvya3x73v7ba6tzgwowkr/bin/jsonschema" CACHE PATH "") + set(ENABLE_DOCS ON CACHE BOOL "") set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") diff --git a/host-configs/rzwhippet-toss_4_x86_64_ib-gcc@10.3.1.cmake b/host-configs/rzwhippet-toss_4_x86_64_ib-gcc@10.3.1.cmake index 9a90dd375b..eb5ed41047 100644 --- a/host-configs/rzwhippet-toss_4_x86_64_ib-gcc@10.3.1.cmake +++ b/host-configs/rzwhippet-toss_4_x86_64_ib-gcc@10.3.1.cmake @@ -4,7 +4,13 @@ # CMake executable path: /usr/tce/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/umpire-2023.06.0-z2ts74flz56i67azbbp5zyiwvwgwucrr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/scr-3.0.1-znr5hvdmrpg2wwtcrepv3bzh32visddj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/spath-0.2.0-scp7lun3jtdgorfmd4mzhtieqkjko57q;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/libyogrt-1.33-riegwpsbfjywz6pumvit2eadroiosowy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/er-0.2.0-m7mypt2brwrodmfun3ya2cwpkuwpccnv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/shuffile-0.2.0-74ysb2qi6xkrx7u5vsa2jnmcqof3q4je;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/redset-0.2.0-7bhg5tua2jns5ob7r6stbgitzlfggdax;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/rankstr-0.1.0-yuunbkeetjd4y563p4dzxp23rsdcc6tr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/dtcmp-1.1.4-bk55ioptacxzxnpxcgu27vwk2nacb35s;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/lwgrp-1.0.5-zhpxnopjtpr5cchaqufivi2sn4crkgwn;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/axl-0.7.1-b3zz33f7lmeal5thbfyuc6cmbdfek2vv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/kvtree-1.3.0-oeqjobwdjxemywgc77pfuv4nnpxk6buj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/raja-2023.06.0-ca64lzglcihqwwjcmxuzfdvg7bhsd5rq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/camp-2023.06.0-k4v6kc3zhnika36o2jvhncwiwcaifxqp;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/mfem-4.5.2-uyempb4k6nefxh36lxnbfb2dynpyaezr;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/hypre-2.24.0-lof7hdy7wsyuei436d6uhilprsgmr3ik;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/conduit-0.8.8-wngwwhpllk2gjewlizsk4plakvdu4beu;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/parmetis-4.0.3-lq6aryhur6qn3trc2qxizvz4nae5ngzf;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/metis-5.1.0-pyrzcrzqvl6q27kk637o2nwi3j7ibseb;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/hdf5-1.8.22-wikz2sxdo4zf76fdfl5do4mekkixf4yv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/c2c-1.8.0-bsohtsh5a73tmmxlndgjuhzz6lzoif5j;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/gmake-4.4.1-y2kaxrqjbg3dcwo7dzfphztusfjqoowq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1/blt-0.5.3-iljv7wrfi4r5i4drs4yf65rgsuunaxjn;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-10.3.1" CACHE PATH "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/fmt-11.0.0-zt5s2lpq6zhbwua27n34vsqssdhlyqkb;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/slurm-23-11-1-1-pia7yc34zfjbauttb3mz7ryehiahl7wl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/munge-0.5.15-ohlpc2han7eccwhcc5e7mjxu6qpnxyvw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libgcrypt-1.11.0-w3yyh3cqjbmoowwxbp7xfxipmcy3deqv;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libgpg-error-1.50-6lmnhkuvlhyuhqwlg7z4ieeol27y5jf2;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/lz4-1.9.4-pmcvlik6dz22xjsg7v2bz4wc6ee6a2t5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/json-c-0.16-skedagszkyils45rrj7q3csquls3uvm4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/glib-2.78.3-ooz7c4wlv2ah6rweaicrejwdeevkk2cm;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/pcre2-10.43-pasxvasfmrhl4vxjfj2jo235tmyf6vd5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libiconv-1.17-x5uwl3dkj3sktet5drfcdbrr45rehocj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/hypre-2.24.0-frilc4peb7bzvyj2kl22pr3nqm5c2sir;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/parmetis-4.0.3-peskkkrkee56jdeaubpu3qdpviqhwy6c;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/metis-5.1.0-qq66hohai22jo6hcdrfpxhb6lvvrrsxf;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libunwind-1.6.2-4oj53vuwb5fmd5uj4cndlfmykhap74tl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/blt-0.6.2-rpepypkljinu26w75fe2oa2f4j5jraio;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/gcc-runtime-10.3.1-vepcviwswfbeo6z6pdmxek2hr3q5ui33;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/clang/clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce;/usr/tce/packages/mvapich2/mvapich2-2.3.7-gcc-10.3.1" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/gcc-runtime-10.3.1-vepcviwswfbeo6z6pdmxek2hr3q5ui33/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libunwind-1.6.2-4oj53vuwb5fmd5uj4cndlfmykhap74tl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/metis-5.1.0-qq66hohai22jo6hcdrfpxhb6lvvrrsxf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/parmetis-4.0.3-peskkkrkee56jdeaubpu3qdpviqhwy6c/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/hypre-2.24.0-frilc4peb7bzvyj2kl22pr3nqm5c2sir/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/slurm-23-11-1-1-pia7yc34zfjbauttb3mz7ryehiahl7wl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/glib-2.78.3-ooz7c4wlv2ah6rweaicrejwdeevkk2cm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libiconv-1.17-x5uwl3dkj3sktet5drfcdbrr45rehocj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/pcre2-10.43-pasxvasfmrhl4vxjfj2jo235tmyf6vd5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/lz4-1.9.4-pmcvlik6dz22xjsg7v2bz4wc6ee6a2t5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/munge-0.5.15-ohlpc2han7eccwhcc5e7mjxu6qpnxyvw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libgcrypt-1.11.0-w3yyh3cqjbmoowwxbp7xfxipmcy3deqv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libgpg-error-1.50-6lmnhkuvlhyuhqwlg7z4ieeol27y5jf2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/json-c-0.16-skedagszkyils45rrj7q3csquls3uvm4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/fmt-11.0.0-zt5s2lpq6zhbwua27n34vsqssdhlyqkb/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axom-develop-ghju4t2waaxzwaf4nw2ui4oqxe2j2v4y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/gcc-runtime-10.3.1-vepcviwswfbeo6z6pdmxek2hr3q5ui33/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-gcc-10.3.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libunwind-1.6.2-4oj53vuwb5fmd5uj4cndlfmykhap74tl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/metis-5.1.0-qq66hohai22jo6hcdrfpxhb6lvvrrsxf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/parmetis-4.0.3-peskkkrkee56jdeaubpu3qdpviqhwy6c/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/hypre-2.24.0-frilc4peb7bzvyj2kl22pr3nqm5c2sir/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/slurm-23-11-1-1-pia7yc34zfjbauttb3mz7ryehiahl7wl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/glib-2.78.3-ooz7c4wlv2ah6rweaicrejwdeevkk2cm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libiconv-1.17-x5uwl3dkj3sktet5drfcdbrr45rehocj/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/pcre2-10.43-pasxvasfmrhl4vxjfj2jo235tmyf6vd5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/lz4-1.9.4-pmcvlik6dz22xjsg7v2bz4wc6ee6a2t5/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/munge-0.5.15-ohlpc2han7eccwhcc5e7mjxu6qpnxyvw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libgcrypt-1.11.0-w3yyh3cqjbmoowwxbp7xfxipmcy3deqv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libgpg-error-1.50-6lmnhkuvlhyuhqwlg7z4ieeol27y5jf2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/libffi-3.4.6-ifsgrwxvcup2wasuxvm2dqz4zn5yktmx/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/json-c-0.16-skedagszkyils45rrj7q3csquls3uvm4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1/fmt-11.0.0-zt5s2lpq6zhbwua27n34vsqssdhlyqkb/lib64;/collab/usr/global/tools/tce4/packages/gcc/gcc-10.3.1/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -15,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/gcc/gcc" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/gcc/gcc" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/gcc/g++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/gcc/g++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/gcc/gfortran" CACHE PATH "") else() @@ -31,8 +37,6 @@ else() endif() -set(CMAKE_GENERATOR "Unix Makefiles" CACHE STRING "") - set(ENABLE_FORTRAN ON CACHE BOOL "") #------------------------------------------------------------------------------ @@ -67,45 +71,49 @@ set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/gcc-10.3.1" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/gcc-10.3.1" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.8.8-wngwwhpllk2gjewlizsk4plakvdu4beu" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-ewhte6pd6v4vbmimjwtyg7i7222rvezj" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-bsohtsh5a73tmmxlndgjuhzz6lzoif5j" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-vr262s2ygp4yq4u2bp753esghfv4zblo" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.5.2-uyempb4k6nefxh36lxnbfb2dynpyaezr" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-mv7gkzf6ickzbvtoxtfxxyu4dbxj25dd" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.22-wikz2sxdo4zf76fdfl5do4mekkixf4yv" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-b2u6hn6l3tejjpixar67hdmhkfpbvbmh" CACHE PATH "") set(LUA_DIR "/usr" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2023.06.0-ca64lzglcihqwwjcmxuzfdvg7bhsd5rq" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-lg5u26qwd5ylnqhorljpho3ofj7w5y6a" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2023.06.0-z2ts74flz56i67azbbp5zyiwvwgwucrr" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-gbqcofwcxjhjxmqvh35nuwmykkwqtfyq" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-k4v6kc3zhnika36o2jvhncwiwcaifxqp" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-tslzt7yztdfe7emjzdigotyvcs2zzzut" CACHE PATH "") -set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-znr5hvdmrpg2wwtcrepv3bzh32visddj" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-pmbgwad37tgdvaiuosyru2fjhdnbm6oy" CACHE PATH "") -set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-oeqjobwdjxemywgc77pfuv4nnpxk6buj" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-6gleyrqbjyfrlpvlm4rlo7wgqa46cc5r" CACHE PATH "") -set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-bk55ioptacxzxnpxcgu27vwk2nacb35s" CACHE PATH "") +set(SCR_DIR "${TPL_ROOT}/scr-3.0.1-ofj74mqvznjixir5vadqt6fxhm2neyvj" CACHE PATH "") -set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-scp7lun3jtdgorfmd4mzhtieqkjko57q" CACHE PATH "") +set(KVTREE_DIR "${TPL_ROOT}/kvtree-1.3.0-hcz2qlct3r4u5ipbz75qrmjielmqkq5e" CACHE PATH "") -set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-b3zz33f7lmeal5thbfyuc6cmbdfek2vv" CACHE PATH "") +set(DTCMP_DIR "${TPL_ROOT}/dtcmp-1.1.4-6v4agevpuoq5orfflsmsdcwucn5qcyef" CACHE PATH "") -set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-zhpxnopjtpr5cchaqufivi2sn4crkgwn" CACHE PATH "") +set(SPATH_DIR "${TPL_ROOT}/spath-0.2.0-j4nignxjxq23bcfl5etf36oconq3knc6" CACHE PATH "") -set(ER_DIR "${TPL_ROOT}/er-0.2.0-m7mypt2brwrodmfun3ya2cwpkuwpccnv" CACHE PATH "") +set(AXL_DIR "${TPL_ROOT}/axl-0.7.1-eaynk3feukqzypulcdx6ci2y7eau4slh" CACHE PATH "") -set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-yuunbkeetjd4y563p4dzxp23rsdcc6tr" CACHE PATH "") +set(LWGRP_DIR "${TPL_ROOT}/lwgrp-1.0.5-k46qz6uw4j7k4765v3joqlc6uze5xb5f" CACHE PATH "") -set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-7bhg5tua2jns5ob7r6stbgitzlfggdax" CACHE PATH "") +set(ER_DIR "${TPL_ROOT}/er-0.2.0-6wbtcfwv37djpmvriqpqkwoguqlbjqar" CACHE PATH "") -set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-74ysb2qi6xkrx7u5vsa2jnmcqof3q4je" CACHE PATH "") +set(RANKSTR_DIR "${TPL_ROOT}/rankstr-0.1.0-irpv22elzofhipkevd4wkdy4ab5cy3hy" CACHE PATH "") -set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-riegwpsbfjywz6pumvit2eadroiosowy" CACHE PATH "") +set(REDSET_DIR "${TPL_ROOT}/redset-0.2.0-shjuqaruv4i2rj75apj5bzbmntyh6vkz" CACHE PATH "") + +set(SHUFFILE_DIR "${TPL_ROOT}/shuffile-0.2.0-tula5gudi7mrdqldqh3twgwjqccqvo4d" CACHE PATH "") + +set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.35-sa4a2a6wcaapg6dizidyx5peqw5zyeup" CACHE PATH "") #------------------------------------------------------------------------------ # Devtools @@ -113,10 +121,12 @@ set(LIBYOGRT_DIR "${TPL_ROOT}/libyogrt-1.33-riegwpsbfjywz6pumvit2eadroiosowy" CA set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.6/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-fyqyn7t7oemy65ddzzvijg6r4wbicpiw/bin/jsonschema" CACHE PATH "") + set(ENABLE_DOCS ON CACHE BOOL "") set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") diff --git a/host-configs/rzwhippet-toss_4_x86_64_ib-intel@2022.1.0.cmake b/host-configs/rzwhippet-toss_4_x86_64_ib-intel@2022.1.0.cmake index c492e852d9..4de4fd6df8 100644 --- a/host-configs/rzwhippet-toss_4_x86_64_ib-intel@2022.1.0.cmake +++ b/host-configs/rzwhippet-toss_4_x86_64_ib-intel@2022.1.0.cmake @@ -4,7 +4,13 @@ # CMake executable path: /usr/tce/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/umpire-2023.06.0-6wmifjy5c2er4kkfqw7m5s4in7esiln5;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/raja-2023.06.0-urtfojwbjummyvyev7k4zn2oix53f4up;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/camp-2023.06.0-ovewmmz43udq34jrdlokh2zuzgkzrum4;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/mfem-4.5.2-dbvjel6jhwnwf6wzm76w6ghbjpy3v4gj;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/hypre-2.24.0-qdjyl5ibcpl4nxb6t5godfgvi5bb6hac;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/conduit-0.8.8-22refnw4twba4zznewcuczky2udimj7i;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/parmetis-4.0.3-nqxoj5gqogj32hfo5ognkcb6vg24zdlc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/metis-5.1.0-tb5bijmooj2d6d2npjpajcj4fyu4yd4y;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/hdf5-1.8.22-6oeginq7kyyix35utjgsfxeghcnujtpg;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/c2c-1.8.0-gvlftgplgmtput3k4fy2nssecldmmlsa;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/gmake-4.4.1-e3r4ry6vgi7zp4mbwfokypkutqwpctek;/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0/blt-0.5.3-i7qltms7ksyz4xltznzbtsafywrykq7b;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0;/usr/tce" CACHE PATH "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/fmt-11.0.0-e5wcmnxgm7jazymbnkqedufcwmwi5zyk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/hypre-2.24.0-aqcxsv56sazlpol6bztlrn2ippdt2vvk;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/parmetis-4.0.3-qak3zsoasplo53n24xnjgtr5hp2pwsas;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/metis-5.1.0-t27xnm5ddxbozxuumry3wtpr2z4wddlg;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/libunwind-1.6.2-522til4ndbs6qxvs63qfsrc3bbzlc52k;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/blt-0.6.2-ulkpjni3wpwn5epn6poziknumnqpu67q;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/collab/usr/gapps/shroud/public/toss_4_x86_64_ib/shroud-0.13.0;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0;/usr/tce/packages/clang/clang-14.0.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/cppcheck-2.9;/usr/tce" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/libunwind-1.6.2-522til4ndbs6qxvs63qfsrc3bbzlc52k/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/metis-5.1.0-t27xnm5ddxbozxuumry3wtpr2z4wddlg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/parmetis-4.0.3-qak3zsoasplo53n24xnjgtr5hp2pwsas/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/hypre-2.24.0-aqcxsv56sazlpol6bztlrn2ippdt2vvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/fmt-11.0.0-e5wcmnxgm7jazymbnkqedufcwmwi5zyk/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/axom-develop-ps5chwac3pj5fbcc7oofnv2px7wwtcyy/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46/lib;/usr/tce/packages/mvapich2/mvapich2-2.3.6-intel-2022.1.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/libunwind-1.6.2-522til4ndbs6qxvs63qfsrc3bbzlc52k/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/metis-5.1.0-t27xnm5ddxbozxuumry3wtpr2z4wddlg/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/parmetis-4.0.3-qak3zsoasplo53n24xnjgtr5hp2pwsas/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/hypre-2.24.0-aqcxsv56sazlpol6bztlrn2ippdt2vvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm/lib;/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/python-3.10.10/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0/fmt-11.0.0-e5wcmnxgm7jazymbnkqedufcwmwi5zyk/lib64;/usr/tce/backend/installations/linux-rhel8-x86_64/gcc-10.3.1/intel-oneapi-compilers-2022.1.0-43xp3r52jx2q2rkf3ctzvskqu572xbky/compiler/2022.1.0/linux/compiler/lib/intel64_lin;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -15,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/intel/icc" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/intel/icc" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/intel/icpc" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/intel/icpc" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/spack/lib/spack/env/intel/ifort" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/spack/lib/spack/env/intel/ifort" CACHE PATH "") else() @@ -31,8 +37,6 @@ else() endif() -set(CMAKE_GENERATOR "Unix Makefiles" CACHE STRING "") - set(ENABLE_FORTRAN ON CACHE BOOL "") #------------------------------------------------------------------------------ @@ -67,23 +71,27 @@ set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2023_10_30_15_05_41/intel-2022.1.0" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib/2024_09_19_12_50_19/intel-2022.1.0" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.8.8-22refnw4twba4zznewcuczky2udimj7i" CACHE PATH "") +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-454ekac72iqjrk6zkvm4e4niklhp3mk7" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-gvlftgplgmtput3k4fy2nssecldmmlsa" CACHE PATH "") +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-umzvapdnzek6wnr5psgiu654uwgx537w" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.5.2-dbvjel6jhwnwf6wzm76w6ghbjpy3v4gj" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-77cqpidypkw64y7it7knei5jfwaeuesl" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.22-6oeginq7kyyix35utjgsfxeghcnujtpg" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-t6yo76hrjifoth45n4rychsunjyeshgm" CACHE PATH "") set(LUA_DIR "/usr" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2023.06.0-urtfojwbjummyvyev7k4zn2oix53f4up" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-b46ye6hhsihekw2n25zntjrqhjf3cezo" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2023.06.0-6wmifjy5c2er4kkfqw7m5s4in7esiln5" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-62aeklophmedyrazpsoamjn7ujzpblcc" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-ovewmmz43udq34jrdlokh2zuzgkzrum4" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-bpxzzlisqd2czt3y2jwy3nznzfpsig46" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-vcf7f5yrxjsne3fdi5tssmlh67fkhhim" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-ay2aqdobcs6fbc7aefb4hywloe6n3a3h" CACHE PATH "") # scr not built @@ -93,10 +101,12 @@ set(CAMP_DIR "${TPL_ROOT}/camp-2023.06.0-ovewmmz43udq34jrdlokh2zuzgkzrum4" CACHE set(DEVTOOLS_ROOT "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/2023_10_17_16_15_32/._view/ypfidjpdm7fhkqcpekza67w5xgiaw7yg" CACHE PATH "") -set(CLANGFORMAT_EXECUTABLE "/collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0/bin/clang-format" CACHE PATH "") +set(CLANGFORMAT_EXECUTABLE "/usr/tce/packages/clang/clang-14.0.6/bin/clang-format" CACHE PATH "") set(PYTHON_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/python3.10" CACHE PATH "") +set(JSONSCHEMA_EXECUTABLE "${TPL_ROOT}/py-jsonschema-4.17.3-6ccwlmvec43r3tfun56muyoj2y6ihvzm/bin/jsonschema" CACHE PATH "") + set(ENABLE_DOCS ON CACHE BOOL "") set(SPHINX_EXECUTABLE "${DEVTOOLS_ROOT}/python-3.10.10/bin/sphinx-build" CACHE PATH "") diff --git a/host-configs/tioga-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake b/host-configs/tioga-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake index c64236a377..88dd146d00 100644 --- a/host-configs/tioga-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake +++ b/host-configs/tioga-toss_4_x86_64_ib_cray-clang@16.0.0_hip.cmake @@ -4,13 +4,13 @@ # CMake executable path: /usr/tce/bin/cmake #------------------------------------------------------------------------------ -set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/hypre-2.24.0-ki5iqwndtm6rvb4nrb7ebbvl3x24q3vt;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/parmetis-4.0.3-ll2czqc5pmp3olgjpu47krq4jgxksmdt;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/blt-0.6.1.4-rsolo2redxjrxxepfboqczt24wsewi2r;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/fmt-10.2.1-nr2acfkfdgyihxps6ekcgfn4fk56v5rb;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/zlib-ng-2.1.5-c4toe533t23gocizsqebzf4s662hyxlt;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/metis-5.1.0-rjek5dokihv3f6afzrhphjgg6xcjrfvk;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/ncurses-6.4-ezqmnqki7vits7vrigam3pwcidzycnny;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb;/opt/rocm-5.6.0/llvm;/opt/rocm-5.6.0;/opt/rocm-5.6.0/hip;/opt/rocm-5.6.0;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0;/usr/tce" CACHE STRING "") +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/fmt-11.0.0-c6zfb4nysq2a5z37usggcx7fn2m6g5s7;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/hypre-2.24.0-hbqzzswfh6422kizd7b5d3p5tj5doizo;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/ncurses-6.5-zeoxskjirdjchpakkc5wxv4y6pnaijke;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/parmetis-4.0.3-uyk5ryduuuftravriddna4hynygens2s;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/metis-5.1.0-o3b6chclwh557m5lr4exhdlq6pvhbss3;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/zlib-ng-2.2.1-pynv24fdz7gqlx4wm2dj6x6el6fu42zm;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/blt-0.6.2-dyarpxoltcw2fxeb3t34223i45hyoutj;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm;/opt/rocm-5.6.0/llvm;/opt/rocm-5.6.0;/opt/rocm-5.6.0/hip;/opt/rocm-5.6.0;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0;/usr/tce" CACHE STRING "") set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") -set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/zlib-ng-2.1.5-c4toe533t23gocizsqebzf4s662hyxlt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/metis-5.1.0-rjek5dokihv3f6afzrhphjgg6xcjrfvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/parmetis-4.0.3-ll2czqc5pmp3olgjpu47krq4jgxksmdt/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/ncurses-6.4-ezqmnqki7vits7vrigam3pwcidzycnny/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/hypre-2.24.0-ki5iqwndtm6rvb4nrb7ebbvl3x24q3vt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/fmt-10.2.1-nr2acfkfdgyihxps6ekcgfn4fk56v5rb/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/zlib-ng-2.2.1-pynv24fdz7gqlx4wm2dj6x6el6fu42zm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/metis-5.1.0-o3b6chclwh557m5lr4exhdlq6pvhbss3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/parmetis-4.0.3-uyk5ryduuuftravriddna4hynygens2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/ncurses-6.5-zeoxskjirdjchpakkc5wxv4y6pnaijke/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/hypre-2.24.0-hbqzzswfh6422kizd7b5d3p5tj5doizo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/fmt-11.0.0-c6zfb4nysq2a5z37usggcx7fn2m6g5s7/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") -set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/axom-develop-uidv2vofjqx7373o6tz53up2jxpgkev4/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/zlib-ng-2.1.5-c4toe533t23gocizsqebzf4s662hyxlt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/metis-5.1.0-rjek5dokihv3f6afzrhphjgg6xcjrfvk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/parmetis-4.0.3-ll2czqc5pmp3olgjpu47krq4jgxksmdt/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/ncurses-6.4-ezqmnqki7vits7vrigam3pwcidzycnny/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/hypre-2.24.0-ki5iqwndtm6rvb4nrb7ebbvl3x24q3vt/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0/fmt-10.2.1-nr2acfkfdgyihxps6ekcgfn4fk56v5rb/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/axom-develop-3b47b2wk7jfoemcg3l77r77wjvn5omni/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l/lib;/opt/rocm-5.6.0/hip/lib;/opt/rocm-5.6.0/lib;/opt/rocm-5.6.0/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/zlib-ng-2.2.1-pynv24fdz7gqlx4wm2dj6x6el6fu42zm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/metis-5.1.0-o3b6chclwh557m5lr4exhdlq6pvhbss3/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/parmetis-4.0.3-uyk5ryduuuftravriddna4hynygens2s/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/ncurses-6.5-zeoxskjirdjchpakkc5wxv4y6pnaijke/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/hypre-2.24.0-hbqzzswfh6422kizd7b5d3p5tj5doizo/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0/fmt-11.0.0-c6zfb4nysq2a5z37usggcx7fn2m6g5s7/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") @@ -21,11 +21,11 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") #------------------------------------------------------------------------------ if(DEFINED ENV{SPACK_CC}) - set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/spack/lib/spack/env/clang/clang" CACHE PATH "") + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/spack/lib/spack/env/clang/clang" CACHE PATH "") - set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/spack/lib/spack/env/clang/clang++" CACHE PATH "") + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/spack/lib/spack/env/clang/clang++" CACHE PATH "") - set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/spack/lib/spack/env/clang/flang" CACHE PATH "") + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/spack/lib/spack/env/clang/flang" CACHE PATH "") else() @@ -69,8 +69,6 @@ set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") set(HIP_ROOT_DIR "/opt/rocm-5.6.0/hip" CACHE PATH "") -set(HIP_CXX_COMPILER "/opt/rocm-5.6.0/hip/bin/hipcc" CACHE PATH "") - set(CMAKE_HIP_COMPILER "/opt/rocm-5.6.0/llvm/bin/clang++" CACHE FILEPATH "") set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") @@ -104,23 +102,27 @@ set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") # TPLs #------------------------------------------------------------------------------ -set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_03_06_20_25_59/clang-16.0.0" CACHE PATH "") +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-16.0.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-lndgp7ve73cwzse7savgynm76rk2yamy" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fjossx5teajxopgkqhogkr42psd5hm6l" CACHE PATH "") -set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.1-weyusx6lu3gczfg24vwaji4dy53ekfc5" CACHE PATH "") +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-ttg36gu2kf37iwt347lrcl2iii7ugrcz" CACHE PATH "") -set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-fg73ebtjbsm2kpd5s44vxa6jjsybwbbb" CACHE PATH "") +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-ooqyhbkdumnskvllubl2mnfpgsvuevek" CACHE PATH "") -set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-rqn67zhr6wo6mgcfqjrb3kzzh4neg52v" CACHE PATH "") +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-okjvzxrxfnxm7bzvqqy76vmsrdasgjhf" CACHE PATH "") -set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-iuu6knfssyy4j2uv6qo7oqmm2afqw5jv" CACHE PATH "") +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-juuah6k7gt2wbptaymyuzqbllicmytey" CACHE PATH "") -set(LUA_DIR "${TPL_ROOT}/lua-5.4.4-k44ecokhewutosgyh3v4ifqejiqxxkwk" CACHE PATH "") +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-xw3qgm3islfsa6levkedakwswdl5shde" CACHE PATH "") -set(RAJA_DIR "${TPL_ROOT}/raja-2024.02.0-2i63uxx4gs2hv6bseeo53vnvpqxvq53a" CACHE PATH "") +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-s3p2bbs3n3bprhixwvxja5b6svk64zzm" CACHE PATH "") -set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.02.0-rjjfznegq3beeahbio7h4voasmljpnef" CACHE PATH "") +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-36bghzk6q3ow43vzdkbgfiblggll3zsh" CACHE PATH "") -set(CAMP_DIR "${TPL_ROOT}/camp-2024.02.0-z6vcrbxgnq44voxaiplbkss7xkeuezam" CACHE PATH "") +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-x5y47jmwwktji5vi4p2ui3st3w7uafip" CACHE PATH "") # scr not built diff --git a/host-configs/tioga-toss_4_x86_64_ib_cray-clang@17.0.0_hip.cmake b/host-configs/tioga-toss_4_x86_64_ib_cray-clang@17.0.0_hip.cmake new file mode 100644 index 0000000000..5295e5a94d --- /dev/null +++ b/host-configs/tioga-toss_4_x86_64_ib_cray-clang@17.0.0_hip.cmake @@ -0,0 +1,139 @@ +#------------------------------------------------------------------------------ +# !!!! This is a generated file, edit at own risk !!!! +#------------------------------------------------------------------------------ +# CMake executable path: /usr/tce/bin/cmake +#------------------------------------------------------------------------------ + +set(CMAKE_PREFIX_PATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/fmt-11.0.0-rhl2umjy2nni3c22frv5p44ms4t6ry4z;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/hypre-2.24.0-h67v4lbiwbqe3ftc6vsufrkkayr6zk6v;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/ncurses-6.5-zqj73d65x5y7pkg2qrz7e6fkf4jfvefw;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/parmetis-4.0.3-or2fqrw6hbqkhyh7k5fo6opifcga4yle;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/metis-5.1.0-7wqk5rlknhxqo6tdg5do5xlyfvj6glsq;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/zlib-ng-2.2.1-qsmhahovhgpvjtebp63ciya3cft3t6ln;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/blt-0.6.2-xnjxcxij26ycbcqqzcxukg6qahgk7joy;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw;/opt/rocm-5.7.1/llvm;/opt/rocm-5.7.1;/opt/rocm-5.7.1/hip;/opt/rocm-5.7.1;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1;/usr/tce" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH "ON" CACHE STRING "") + +set(CMAKE_BUILD_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf/lib;/opt/rocm-5.7.1/hip/lib;/opt/rocm-5.7.1/lib;/opt/rocm-5.7.1/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/zlib-ng-2.2.1-qsmhahovhgpvjtebp63ciya3cft3t6ln/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/metis-5.1.0-7wqk5rlknhxqo6tdg5do5xlyfvj6glsq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/parmetis-4.0.3-or2fqrw6hbqkhyh7k5fo6opifcga4yle/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/ncurses-6.5-zqj73d65x5y7pkg2qrz7e6fkf4jfvefw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/hypre-2.24.0-h67v4lbiwbqe3ftc6vsufrkkayr6zk6v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/fmt-11.0.0-rhl2umjy2nni3c22frv5p44ms4t6ry4z/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_INSTALL_RPATH "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/axom-develop-7zchnml34djkckhjr3twm3vbmxdycrik/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw/lib;/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf/lib;/opt/rocm-5.7.1/hip/lib;/opt/rocm-5.7.1/lib;/opt/rocm-5.7.1/llvm/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/zlib-ng-2.2.1-qsmhahovhgpvjtebp63ciya3cft3t6ln/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/metis-5.1.0-7wqk5rlknhxqo6tdg5do5xlyfvj6glsq/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/parmetis-4.0.3-or2fqrw6hbqkhyh7k5fo6opifcga4yle/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/ncurses-6.5-zqj73d65x5y7pkg2qrz7e6fkf4jfvefw/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/hypre-2.24.0-h67v4lbiwbqe3ftc6vsufrkkayr6zk6v/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2/lib;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte/lib64;/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0/fmt-11.0.0-rhl2umjy2nni3c22frv5p44ms4t6ry4z/lib64;/opt/rh/gcc-toolset-10/root/usr/lib/gcc/x86_64-redhat-linux/10" CACHE STRING "") + +set(CMAKE_BUILD_TYPE "Release" CACHE STRING "") + +#------------------------------------------------------------------------------ +# Compilers +#------------------------------------------------------------------------------ +# Compiler Spec: clang@=17.0.0 +#------------------------------------------------------------------------------ +if(DEFINED ENV{SPACK_CC}) + + set(CMAKE_C_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/spack/lib/spack/env/clang/clang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/spack/lib/spack/env/clang/clang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/spack/lib/spack/env/clang/flang" CACHE PATH "") + +else() + + set(CMAKE_C_COMPILER "/opt/rocm-5.7.1/llvm/bin/amdclang" CACHE PATH "") + + set(CMAKE_CXX_COMPILER "/opt/rocm-5.7.1/llvm/bin/amdclang++" CACHE PATH "") + + set(CMAKE_Fortran_COMPILER "/opt/rocm-5.7.1/llvm/bin/amdflang" CACHE PATH "") + +endif() + +set(CMAKE_Fortran_FLAGS "-Mfreeform" CACHE STRING "") + +set(ENABLE_FORTRAN ON CACHE BOOL "") + +set(CMAKE_CXX_FLAGS_DEBUG "-O1 -g -DNDEBUG" CACHE STRING "") + +#------------------------------------------------------------------------------ +# MPI +#------------------------------------------------------------------------------ + +set(MPI_C_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/bin/mpicc" CACHE PATH "") + +set(MPI_CXX_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/bin/mpicxx" CACHE PATH "") + +set(MPI_Fortran_COMPILER "/usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/bin/mpif90" CACHE PATH "") + +set(MPIEXEC_NUMPROC_FLAG "-n" CACHE STRING "") + +set(ENABLE_MPI ON CACHE BOOL "") + +set(MPIEXEC_EXECUTABLE "/usr/global/tools/flux_wrappers/bin/srun" CACHE PATH "") + +#------------------------------------------------------------------------------ +# Hardware +#------------------------------------------------------------------------------ + +#------------------------------------------------ +# ROCm +#------------------------------------------------ + +set(HIP_ROOT_DIR "/opt/rocm-5.7.1/hip" CACHE PATH "") + +set(CMAKE_HIP_COMPILER "/opt/rocm-5.7.1/llvm/bin/clang++" CACHE FILEPATH "") + +set(CMAKE_HIP_ARCHITECTURES "gfx90a" CACHE STRING "") + +set(AMDGPU_TARGETS "gfx90a" CACHE STRING "") + +set(GPU_TARGETS "gfx90a" CACHE STRING "") + +#------------------------------------------------------------------------------ + +# Axom ROCm specifics + +#------------------------------------------------------------------------------ + + +set(ENABLE_HIP ON CACHE BOOL "") + +set(HIP_CLANG_INCLUDE_PATH "/opt/rocm-5.7.1/hip/../llvm/lib/clang/17.0.0/include" CACHE PATH "") + +set(CMAKE_EXE_LINKER_FLAGS "-Wl,--disable-new-dtags -L/opt/rocm-5.7.1/hip/../llvm/lib -L/opt/rocm-5.7.1/hip/lib -Wl,-rpath,/opt/rocm-5.7.1/hip/../llvm/lib:/opt/rocm-5.7.1/hip/lib -lpgmath -lflang -lflangrti -lompstub -lamdhip64 -L/opt/rocm-5.7.1/hip/../lib64 -Wl,-rpath,/opt/rocm-5.7.1/hip/../lib64 -L/opt/rocm-5.7.1/hip/../lib -Wl,-rpath,/opt/rocm-5.7.1/hip/../lib -lamd_comgr -lhsa-runtime64 " CACHE STRING "") + +#------------------------------------------------ +# Hardware Specifics +#------------------------------------------------ + +set(ENABLE_OPENMP OFF CACHE BOOL "") + +set(ENABLE_GTEST_DEATH_TESTS ON CACHE BOOL "") + +#------------------------------------------------------------------------------ +# TPLs +#------------------------------------------------------------------------------ + +set(TPL_ROOT "/usr/WS1/axom/libs/toss_4_x86_64_ib_cray/2024_09_18_15_20_11/clang-17.0.0" CACHE PATH "") + +set(CONDUIT_DIR "${TPL_ROOT}/conduit-0.9.2-tjms4wglixbo45w6hr4fa7xfajql4xnr" CACHE PATH "") + +set(C2C_DIR "${TPL_ROOT}/c2c-1.8.0-ux4kghahksxmzxs5jsqrvk5bkh3oiwmf" CACHE PATH "") + +set(MFEM_DIR "${TPL_ROOT}/mfem-4.6.0-hsjurrdtqeduf7fnwaydeejqtni6475d" CACHE PATH "") + +set(HDF5_DIR "${TPL_ROOT}/hdf5-1.8.23-i5pmiapmep42shvad3lfssxqkbqfhxtq" CACHE PATH "") + +set(LUA_DIR "${TPL_ROOT}/lua-5.4.6-nfq42mc4oigoilicrlwf5fo5evxpjcpf" CACHE PATH "") + +set(RAJA_DIR "${TPL_ROOT}/raja-2024.07.0-d6gfb7btfdps6ftd5rlkzfnsxdyy4efe" CACHE PATH "") + +set(UMPIRE_DIR "${TPL_ROOT}/umpire-2024.07.0-3sjhgtx5lagkemh35bnuwwgkiurmcqte" CACHE PATH "") + +set(ADIAK_DIR "${TPL_ROOT}/adiak-0.4.0-l7apis6v3cqgjvgkkgmzvxmjswaslsrw" CACHE PATH "") + +set(CALIPER_DIR "${TPL_ROOT}/caliper-2.10.0-vcctevwu73sl3juljppsoker47zr7p7y" CACHE PATH "") + +set(CAMP_DIR "${TPL_ROOT}/camp-2024.07.0-3sknbhelous4wu3mgeyejsojq3rcwvj2" CACHE PATH "") + +# scr not built + +#------------------------------------------------------------------------------ +# Devtools +#------------------------------------------------------------------------------ + +# ClangFormat disabled due to llvm and devtools not in spec + +set(ENABLE_CLANGFORMAT OFF CACHE BOOL "") + +set(ENABLE_DOCS OFF CACHE BOOL "") + + diff --git a/scripts/docker/README.md b/scripts/docker/README.md index c4d04ad1d1..5454a115f5 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -1,6 +1,6 @@ **WHAT IS A DOCKERFILE?** -Dockerfiles are used to create Docker images. Docker images are the 'recipes' used to build virtual environments called containers. These dockerfiles all use a base Linux image that has a particular compiler installed. These base images were created by David Beckinsale and are located on Docker Hub at this location: -https://hub.docker.com/r/axom/compilers/tags +Dockerfiles are used to create Docker images. Docker images are the 'recipes' used to build virtual environments called containers. These dockerfiles all use a base Linux image that has a particular compiler installed. These base images were created by David Beckinsale and are created from this GitHub respository: +https://github.com/LLNL/radiuss-docker **EXPLANATION OF DOCKERFILE CONTENTS** The base images are accessed in these dockerfiles by the use of the 'FROM' command: diff --git a/scripts/docker/dockerfile_clang-10 b/scripts/docker/dockerfile_clang-10 deleted file mode 100644 index 020b538d9f..0000000000 --- a/scripts/docker/dockerfile_clang-10 +++ /dev/null @@ -1,27 +0,0 @@ -# This script can be run with the following command: -# docker build --build-arg branch= -t "axom/tpls:clang-10" - < dockerfile_clang-10 - -FROM axom/compilers:ubuntu-20-clang-10_07-10-23_21h-54m -ARG branch=develop - -SHELL ["/bin/bash", "-c"] -RUN sudo apt-get update -y -RUN sudo apt-get install doxygen gfortran graphviz libopenblas-dev libomp-dev mpich python3-sphinx ssh texlive-full -fy - -WORKDIR "/home/axom" -USER axom - -RUN git clone --recursive --branch $branch --single-branch --depth 1 https://github.com/LLNL/axom.git axom_repo - -# Build/install TPLs via spack and then remove the temporary build directory on success -RUN cd axom_repo && python3 ./scripts/uberenv/uberenv.py --spack-env-file=./scripts/spack/configs/docker/ubuntu20/spack.yaml \ - --project-json=.uberenv_config.json \ - --spec=%clang@10.0.0+mfem+raja+umpire --prefix=/home/axom/axom_tpls -k \ - && rm -rf /home/axom/axom_tpls/builds - -RUN mkdir -p /home/axom/export_hostconfig -RUN cp ./axom_repo/*.cmake /home/axom/export_hostconfig - -# Make sure the new hostconfig worked -# Note: having high job slots causes build log to disappear and job to fail -RUN cd axom_repo && python3 config-build.py -hc *.cmake -bp build && cd build && make -j4 && make -j4 test && cd /home/axom && rm -rf axom_repo diff --git a/scripts/docker/dockerfile_clang-14 b/scripts/docker/dockerfile_clang-14 new file mode 100644 index 0000000000..9664118c40 --- /dev/null +++ b/scripts/docker/dockerfile_clang-14 @@ -0,0 +1,44 @@ +# This script can be run with the following command: +# docker build --build-arg branch= -t "axom/tpls:clang-14" - < dockerfile_clang-14 + +FROM ghcr.io/llnl/radiuss:clang-14-ubuntu-22.04 +ARG branch=develop + +SHELL ["/bin/bash", "-c"] +RUN sudo apt-get update -y +RUN sudo apt-get install gettext gfortran-$(gcc -dumpversion) graphviz libomp-14-dev libopenblas-dev \ + lsb-release lua5.2 lua5.2-dev mpich python3-sphinx ssh texlive-full -fy +RUN sudo useradd -m -s /bin/bash -G sudo axom + +# Install proper doxygen version (should match version in LC host configs) +RUN sudo wget https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.linux.bin.tar.gz +RUN sudo tar -xf doxygen-1.9.8.linux.bin.tar.gz +RUN cd doxygen-1.9.8 && sudo make && sudo make install && doxygen --version + +# Remove flags from mpich +RUN sudo sed -i "s/ -flto=auto//g" /usr/bin/mpicxx.mpich +RUN sudo sed -i "s/ -flto=auto//g" /usr/bin/mpicc.mpich +RUN sudo sed -i "s/ -flto=auto//g" /usr/bin/mpifort.mpich +RUN sudo sed -i "s/ -ffat-lto-objects//g" /usr/bin/mpicxx.mpich +RUN sudo sed -i "s/ -ffat-lto-objects//g" /usr/bin/mpicc.mpich +RUN sudo sed -i "s/ -ffat-lto-objects//g" /usr/bin/mpifort.mpich +RUN sudo sed -i "s/ -fallow-invalid-boz//g" /usr/bin/mpifort.mpich +RUN sudo sed -i "s/ -fallow-argument-mismatch//g" /usr/bin/mpifort.mpich + +WORKDIR "/home/axom" +USER axom + +RUN git clone --recursive --branch $branch --single-branch --depth 1 https://github.com/LLNL/axom.git axom_repo + +# Build/install TPLs via spack and then remove the temporary build directory on success +RUN cd axom_repo && python3 ./scripts/uberenv/uberenv.py --spack-env-file=./scripts/spack/configs/docker/ubuntu22/spack.yaml \ + --project-json=.uberenv_config.json \ + --spec=%clang@14.0.0+mfem+raja+umpire+profiling --prefix=/home/axom/axom_tpls -k \ + && rm -rf /home/axom/axom_tpls/build_stage /home/axom/axom_tpls/spack + +RUN mkdir -p /home/axom/export_hostconfig +RUN cp ./axom_repo/*.cmake /home/axom/export_hostconfig + +# Make sure the new hostconfig worked +# Note: having high job slots causes build log to disappear and job to fail +RUN cd axom_repo && python3 config-build.py -hc *.cmake -bp build && cd build && make -j4 VERBOSE=1 && make -j4 test && cd /home/axom && rm -rf axom_repo diff --git a/scripts/docker/dockerfile_gcc-11 b/scripts/docker/dockerfile_gcc-11 deleted file mode 100644 index 8289c9ad2c..0000000000 --- a/scripts/docker/dockerfile_gcc-11 +++ /dev/null @@ -1,27 +0,0 @@ -# This script can be run with the following command: -# docker build --build-arg branch= -t "axom/tpls:gcc-11" - < dockerfile_gcc-11 - -FROM axom/compilers:ubuntu-20-gcc-11_07-10-23_21h-57m -ARG branch=develop - -SHELL ["/bin/bash", "-c"] -RUN sudo apt-get update -y -RUN sudo apt-get install doxygen gfortran graphviz libopenblas-dev libomp-dev mpich python3-sphinx ssh texlive-full -fy - -WORKDIR "/home/axom" -USER axom - -RUN git clone --recursive --branch $branch --single-branch --depth 1 https://github.com/LLNL/axom.git axom_repo - -# Build/install TPLs via spack and then remove the temporary build directory on success -RUN cd axom_repo && python3 ./scripts/uberenv/uberenv.py --spack-env-file=./scripts/spack/configs/docker/ubuntu20/spack.yaml \ - --project-json=.uberenv_config.json \ - --spec=%gcc@11.1.0+mfem+raja+umpire --prefix=/home/axom/axom_tpls -k \ - && rm -rf /home/axom/axom_tpls/builds - -RUN mkdir -p /home/axom/export_hostconfig -RUN cp ./axom_repo/*.cmake /home/axom/export_hostconfig - -# Make sure the new hostconfig worked -# Note: having high job slots causes build log to disappear and job to fail -RUN cd axom_repo && python3 config-build.py -hc *.cmake -bp build && cd build && make -j4 && make -j4 test && cd /home/axom && rm -rf axom_repo diff --git a/scripts/docker/dockerfile_gcc-13 b/scripts/docker/dockerfile_gcc-13 new file mode 100644 index 0000000000..8dbf17a458 --- /dev/null +++ b/scripts/docker/dockerfile_gcc-13 @@ -0,0 +1,44 @@ +# This script can be run with the following command: +# docker build --build-arg branch= -t "axom/tpls:gcc-13" - < dockerfile_gcc-13 + +FROM ghcr.io/llnl/radiuss:gcc-13-ubuntu-22.04 +ARG branch=develop + +SHELL ["/bin/bash", "-c"] +RUN sudo apt-get update -y +RUN sudo apt-get install gettext gfortran-$(gcc -dumpversion) graphviz libomp-13-dev libopenblas-dev \ + lsb-release lua5.2 lua5.2-dev mpich python3-sphinx ssh texlive-full -fy +RUN sudo useradd -m -s /bin/bash -G sudo axom + +# Install proper doxygen version (should match version in LC host configs) +RUN sudo wget https://github.com/doxygen/doxygen/releases/download/Release_1_9_8/doxygen-1.9.8.linux.bin.tar.gz +RUN sudo tar -xf doxygen-1.9.8.linux.bin.tar.gz +RUN cd doxygen-1.9.8 && sudo make && sudo make install && doxygen --version + +# Remove flags from mpich +RUN sudo sed -i "s/ -flto=auto//g" /usr/bin/mpicxx.mpich +RUN sudo sed -i "s/ -flto=auto//g" /usr/bin/mpicc.mpich +RUN sudo sed -i "s/ -flto=auto//g" /usr/bin/mpifort.mpich +RUN sudo sed -i "s/ -ffat-lto-objects//g" /usr/bin/mpicxx.mpich +RUN sudo sed -i "s/ -ffat-lto-objects//g" /usr/bin/mpicc.mpich +RUN sudo sed -i "s/ -ffat-lto-objects//g" /usr/bin/mpifort.mpich +RUN sudo sed -i "s/ -fallow-invalid-boz//g" /usr/bin/mpifort.mpich +RUN sudo sed -i "s/ -fallow-argument-mismatch//g" /usr/bin/mpifort.mpich + +WORKDIR "/home/axom" +USER axom + +RUN git clone --recursive --branch $branch --single-branch --depth 1 https://github.com/LLNL/axom.git axom_repo + +# Build/install TPLs via spack and then remove the temporary build directory on success +RUN cd axom_repo && python3 ./scripts/uberenv/uberenv.py --spack-env-file=./scripts/spack/configs/docker/ubuntu22/spack.yaml \ + --project-json=.uberenv_config.json \ + --spec=%gcc@13.1.0+mfem+raja+umpire+profiling --prefix=/home/axom/axom_tpls -k \ + && rm -rf /home/axom/axom_tpls/build_stage /home/axom/axom_tpls/spack + +RUN mkdir -p /home/axom/export_hostconfig +RUN cp ./axom_repo/*.cmake /home/axom/export_hostconfig + +# Make sure the new hostconfig worked +# Note: having high job slots causes build log to disappear and job to fail +RUN cd axom_repo && python3 config-build.py -hc *.cmake -bp build && cd build && make -j4 VERBOSE=1 && make -j4 test && cd /home/axom && rm -rf axom_repo diff --git a/scripts/docker/dockerfile_gcc-9_cuda-11 b/scripts/docker/dockerfile_gcc-9_cuda-11 index ca77c8e23f..8ac006f24b 100644 --- a/scripts/docker/dockerfile_gcc-9_cuda-11 +++ b/scripts/docker/dockerfile_gcc-9_cuda-11 @@ -19,7 +19,15 @@ SHELL ["/bin/bash", "-c"] RUN sudo apt-get update -y RUN sudo apt-get install -y supervisor RUN sudo useradd --create-home --shell /bin/bash ${USER} -RUN sudo apt-get install doxygen gfortran graphviz language-pack-en-base less libopenblas-dev libomp-dev mpich python3-sphinx ssh texlive-full tree -fy +RUN sudo apt-get install doxygen elfutils gfortran graphviz language-pack-en-base less libopenblas-dev libomp-dev mpich python3-sphinx ssh texlive-full tree -fy + +# Install CMake +RUN wget -q --no-check-certificate https://cmake.org/files/v3.21/cmake-3.21.7-linux-x86_64.tar.gz && \ + tar -xzf cmake-3.21.7-linux-x86_64.tar.gz && \ + rm -r cmake-3.21.7-linux-x86_64/share/vim/vimfiles && \ + cp -fR cmake-3.21.7-linux-x86_64/* /usr && \ + rm -rf cmake-3.21.7-linux-x86_64 && \ + rm cmake-3.21.7-linux-x86_64.tar.gz WORKDIR /opt/archives RUN curl -L https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.69.1/openvscode-server-v1.69.1-linux-x64.tar.gz > \ @@ -35,9 +43,9 @@ RUN git clone --recursive --branch $branch https://github.com/LLNL/axom.git axom # Build/install TPLs via spack and then remove the temporary build directory on success RUN cd ${HOME}/axom_repo && python3 ./scripts/uberenv/uberenv.py --spack-env-file=./scripts/spack/configs/docker/ubuntu20_cuda/spack.yaml \ --project-json=.uberenv_config.json \ - --spec="%gcc@9.3.0+mfem+cuda cuda_arch=70" \ + --spec="%gcc@9.3.0+mfem+profiling+cuda cuda_arch=70" \ --prefix=${HOME}/axom_tpls -k \ - && rm -rf ${HOME}/axom_tpls/builds + && rm -rf ${HOME}/axom_tpls/build_stage ${HOME}/axom_tpls/spack # Make sure the new hostconfig works with a release build # Note: having high job slots causes build log to disappear and job to fail diff --git a/scripts/llnl_scripts/archive_job.py b/scripts/llnl_scripts/archive_job.py index df915be5c9..b105730b8f 100755 --- a/scripts/llnl_scripts/archive_job.py +++ b/scripts/llnl_scripts/archive_job.py @@ -1,5 +1,5 @@ #!/bin/sh -"exec" "python" "-u" "-B" "$0" "$@" +"exec" "python3" "-u" "-B" "$0" "$@" # Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and # other Axom Project Developers. See the top-level LICENSE file for details. @@ -26,35 +26,35 @@ import sys from llnl_lc_build_tools import * -from optparse import OptionParser +from argparse import ArgumentParser def parse_args(): "Parses args from command line" - parser = OptionParser() + parser = ArgumentParser() - parser.add_option("-e", "--exitcode", - type="int", - dest="exitcode", - default="0", - help="Exit code to be returned from this script (Defaults to 0)") - - parser.add_option("-n", "--name", - dest="name", - default="", - help="Archive build results under given name") - - parser.add_option("-f", "--files", - dest="files", - default="", - help="Files to be archived (comma delimited)") + parser.add_argument("-e", "--exitcode", + type=int, + dest="exitcode", + default="0", + help="Exit code to be returned from this script (Defaults to 0)") + + parser.add_argument("-n", "--name", + dest="name", + default="", + help="Archive build results under given name") + + parser.add_argument("-f", "--files", + dest="files", + default="", + help="Files to be archived (comma delimited)") ############### # parse args ############### - opts, extras = parser.parse_args() + opts = parser.parse_args() # we want a dict b/c the values could - # be passed without using optparse + # be passed without using argparse opts = vars(opts) return opts @@ -68,9 +68,9 @@ def main(): cwd = os.getcwd() - print "[Starting Archiving]" - print "[ Archive Dir: %s]" % archive_dir - print "[ Job Dir: %s]" % cwd + print("[Starting Archiving]") + print(f"[ Archive Dir: {archive_dir}]") + print(f"[ Job Dir: {cwd}]") # Create a success/failure file if not already created by the job if (opts["exitcode"] != 0) and not os.path.exists("failed.json"): diff --git a/scripts/llnl_scripts/build_devtools.py b/scripts/llnl_scripts/build_devtools.py index d1300e0c16..0cbca47015 100755 --- a/scripts/llnl_scripts/build_devtools.py +++ b/scripts/llnl_scripts/build_devtools.py @@ -16,7 +16,7 @@ from llnl_lc_build_tools import * -from optparse import OptionParser +from argparse import ArgumentParser import getpass import os @@ -24,19 +24,19 @@ def parse_args(): "Parses args from command line" - parser = OptionParser() + parser = ArgumentParser() # Location of source directory to build - parser.add_option("-d", "--directory", - dest="directory", - default="", - help="Location to build all TPL's, timestamp directory will be created (Defaults to shared location)") + parser.add_argument("-d", "--directory", + dest="directory", + default="", + help="Location to build all TPL's, timestamp directory will be created (Defaults to shared location)") ############### # parse args ############### - opts, extras = parser.parse_args() + opts = parser.parse_args() # we want a dict b/c the values could - # be passed without using optparse + # be passed without using argparse opts = vars(opts) return opts diff --git a/scripts/llnl_scripts/build_src.py b/scripts/llnl_scripts/build_src.py index 1054cb7556..0e10e99f8a 100755 --- a/scripts/llnl_scripts/build_src.py +++ b/scripts/llnl_scripts/build_src.py @@ -16,55 +16,55 @@ from llnl_lc_build_tools import * -from optparse import OptionParser +from argparse import ArgumentParser def parse_args(): "Parses args from command line" - parser = OptionParser() + parser = ArgumentParser() # Location of source directory to build - parser.add_option("-d", "--directory", - dest="directory", - default="", - help="Directory of source to be built (Defaults to current)") + parser.add_argument("-d", "--directory", + dest="directory", + default="", + help="Directory of source to be built (Defaults to current)") # Whether to build a specific hostconfig - parser.add_option("--host-config", - dest="hostconfig", - default="", - help="Specific host-config file to build (Tries multiple known paths to locate given file)") + parser.add_argument("--host-config", + dest="hostconfig", + default="", + help="Specific host-config file to build (Tries multiple known paths to locate given file)") # Build type for the configuration - parser.add_option("--build-type", - dest="buildtype", - default="Debug", - choices = ("Debug", "RelWithDebInfo", "Release", "MinSizeRel"), - help="The CMake build type to use") + parser.add_argument("--build-type", + dest="buildtype", + default="Debug", + choices = ("Debug", "RelWithDebInfo", "Release", "MinSizeRel"), + help="The CMake build type to use") # Run unit tests serially (MPI Bug on El Capitan) - parser.add_option("--test-serial", - action="store_true", - dest="testserial", - default=False, - help="Run unit tests serially") + parser.add_argument("--test-serial", + action="store_true", + dest="testserial", + default=False, + help="Run unit tests serially") # Extra cmake options to pass to config build - parser.add_option("--extra-cmake-options", - dest="extra_cmake_options", - default="", - help="Extra cmake options to add to the cmake configure line") - parser.add_option("--automation-mode", - action="store_true", - dest="automation", - default=False, - help="Toggle automation mode which uses env $HOST_CONFIG then $SYS_TYPE/$COMPILER if found") - parser.add_option("-v", "--verbose", - action="store_true", - dest="verbose", - default=False, - help="Output logs to screen as well as to files") + parser.add_argument("--extra-cmake-options", + dest="extra_cmake_options", + default="", + help="Extra cmake options to add to the cmake configure line") + parser.add_argument("--automation-mode", + action="store_true", + dest="automation", + default=False, + help="Toggle automation mode which uses env $HOST_CONFIG then $SYS_TYPE/$COMPILER if found") + parser.add_argument("-v", "--verbose", + action="store_true", + dest="verbose", + default=False, + help="Output logs to screen as well as to files") ############### # parse args ############### - opts, extras = parser.parse_args() + opts = parser.parse_args() # we want a dict b/c the values could - # be passed without using optparse + # be passed without using argparse opts = vars(opts) # Ensure correctness diff --git a/scripts/llnl_scripts/build_tpls.py b/scripts/llnl_scripts/build_tpls.py index 245e330209..8cbbb7ebad 100755 --- a/scripts/llnl_scripts/build_tpls.py +++ b/scripts/llnl_scripts/build_tpls.py @@ -17,40 +17,40 @@ from llnl_lc_build_tools import * -from optparse import OptionParser +from argparse import ArgumentParser import os def parse_args(): "Parses args from command line" - parser = OptionParser() + parser = ArgumentParser() # Directory to do all the building - parser.add_option("-d", "--directory", - dest="directory", - default="", - help="Location to build all TPL's, timestamp directory will be created (Defaults to shared location)") + parser.add_argument("-d", "--directory", + dest="directory", + default="", + help="Location to build all TPL's, timestamp directory will be created (Defaults to shared location)") # Spack spec to use for the build - parser.add_option("-s", "--spec", - dest="spec", - default="", - help="Spack spec to build (defaults to all available on SYS_TYPE)") - parser.add_option("-v", "--verbose", - action="store_true", - dest="verbose", - default=False, - help="Output logs to screen as well as to files") - parser.add_option("-m", "--mirror", - dest="mirror", - default="", - help="Mirror location to use (defaults to shared location)") + parser.add_argument("-s", "--spec", + dest="spec", + default="", + help="Spack spec to build (defaults to all available on SYS_TYPE)") + parser.add_argument("-v", "--verbose", + action="store_true", + dest="verbose", + default=False, + help="Output logs to screen as well as to files") + parser.add_argument("-m", "--mirror", + dest="mirror", + default="", + help="Mirror location to use (defaults to shared location)") ############### # parse args ############### - opts, _ = parser.parse_args() + opts = parser.parse_args() # we want a dict b/c the values could - # be passed without using optparse + # be passed without using argparse opts = vars(opts) return opts diff --git a/scripts/llnl_scripts/find_unused_tpl_dirs.py b/scripts/llnl_scripts/find_unused_tpl_dirs.py index dc413d2e1c..67a6f51266 100755 --- a/scripts/llnl_scripts/find_unused_tpl_dirs.py +++ b/scripts/llnl_scripts/find_unused_tpl_dirs.py @@ -1,5 +1,5 @@ #!/bin/sh -"exec" "python" "-u" "-B" "$0" "$@" +"exec" "python3" "-u" "-B" "$0" "$@" # Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and # other Axom Project Developers. See the top-level LICENSE file for details. diff --git a/scripts/llnl_scripts/fix_permissions.py b/scripts/llnl_scripts/fix_permissions.py index 0297cc394d..f5e4833447 100755 --- a/scripts/llnl_scripts/fix_permissions.py +++ b/scripts/llnl_scripts/fix_permissions.py @@ -1,5 +1,5 @@ #!/bin/sh -"exec" "python" "-u" "-B" "$0" "$@" +"exec" "python3" "-u" "-B" "$0" "$@" # Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and # other Axom Project Developers. See the top-level LICENSE file for details. diff --git a/scripts/llnl_scripts/llnl_lc_build_tools.py b/scripts/llnl_scripts/llnl_lc_build_tools.py index dae857189f..d78fd25254 100755 --- a/scripts/llnl_scripts/llnl_lc_build_tools.py +++ b/scripts/llnl_scripts/llnl_lc_build_tools.py @@ -320,6 +320,7 @@ def build_and_test_host_config(test_root, host_config, should_test_installed_cmake_example = True should_test_installed_blt_example = True should_test_installed_make_example = False + should_test_installed_tutorial = True if should_test_installed_cmake_example: install_example_dir = pjoin(install_dir, "examples", "axom", "using-with-cmake") @@ -378,6 +379,34 @@ def build_and_test_host_config(test_root, host_config, print("[ERROR: Installed 'using-with-blt' example for host-config: %s failed]\n\n" % host_config) return res + if should_test_installed_tutorial: + # Notes: Might require loading module for more recent cmake than the system default for some platforms + install_example_dir = pjoin(install_dir, "examples", "axom", "radiuss_tutorial") + install_example_output_file = pjoin(build_dir,"output.log.install_example.radiuss_tutorial.txt") + print("[testing installed 'radiuss_tutorial' example]") + print("[log file: %s]" % install_example_output_file) + + example_commands = [ + "cd {0}".format(install_example_dir), + "rm -rf build", + "mkdir build", + "cd build", + """echo "[Configuring 'radiuss_tutorial']" """, + "cmake -C ../host-config.cmake -DCMAKE_BUILD_TYPE={0} ..".format(build_type), + """echo "[Building 'radiuss_tutorial']" """, + "make -j16", + """echo "[Running lessons for radiuss_tutorial]" """, + "ctest -j16", + """echo "[Done]" """ + ] + + res = sexe(" && ".join(example_commands), + output_file = install_example_output_file, + echo=True) + + if res != 0: + print("[ERROR: Installed 'radiuss_tutorial' for host-config: %s failed]\n\n" % host_config) + return res print("[SUCCESS: Build, test, and install for host-config: %s complete]\n" % host_config) diff --git a/scripts/llnl_scripts/move_unused_tpl_dirs_to_graveyard.py b/scripts/llnl_scripts/move_unused_tpl_dirs_to_graveyard.py index 19280c46a4..44750180cf 100755 --- a/scripts/llnl_scripts/move_unused_tpl_dirs_to_graveyard.py +++ b/scripts/llnl_scripts/move_unused_tpl_dirs_to_graveyard.py @@ -1,5 +1,5 @@ #!/bin/sh -"exec" "python" "-u" "-B" "$0" "$@" +"exec" "python3" "-u" "-B" "$0" "$@" # Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and # other Axom Project Developers. See the top-level LICENSE file for details. @@ -40,23 +40,25 @@ def main(): summary_file ="tpl_dirs_summary.json" if not os.path.exists(summary_file): - print("Error: Summary file from find_unused_tpl_dirs.py did not exist: {0}", summary_file) + print(f"Error: Summary file from find_unused_tpl_dirs.py did not exist: {summary_file}") return False r = json.load(open(summary_file)) - print "" - print "[# of referenced %d ]" % len(r["referenced"]) - print "[# of found %d ]" % len(r["found"]) - print "[# of active %d ]" % len(r["active"]) - print "[# of unused %d ]" % len(r["unused"]) + print("") + print("[# of referenced {}]".format(len(r["referenced"]))) + print("[# of found {}]".format(len(r["found"]))) + print("[# of active {}]".format(len(r["active"]))) + print("[# of unused {}]".format(len(r["unused"]))) success = True for d in r["unused"]: - cmd = "mv %s %s" % (d, graveyard_path(d)) - res = sexe(cmd) - if res != 0: - success = False + if os.path.exists(d): + cmd = "mv %s %s" % (d, graveyard_path(d)) + res = sexe(cmd) + if res != 0: + success = False + return success diff --git a/scripts/llnl_scripts/report.py b/scripts/llnl_scripts/report.py index 8d99bf72b4..3c2021c0b6 100755 --- a/scripts/llnl_scripts/report.py +++ b/scripts/llnl_scripts/report.py @@ -1,5 +1,5 @@ #!/bin/sh -"exec" "python" "-u" "-B" "$0" "$@" +"exec" "python3" "-u" "-B" "$0" "$@" # Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and # other Axom Project Developers. See the top-level LICENSE file for details. @@ -26,9 +26,9 @@ except ImportError: import xml.etree.ElementTree as ET -from optparse import OptionParser +from argparse import ArgumentParser from smtplib import SMTP -from email.MIMEText import MIMEText +from email.mime.text import MIMEText from dateutil.parser import parse from llnl_lc_build_tools import * @@ -61,32 +61,32 @@ def __init__(self): def parse_args(): "Parses args from command line" - parser = OptionParser() + parser = ArgumentParser() - parser.add_option("--clean", - dest="clean", - action="store_true", - default=False, - help="!!DESTRUCTIVE!! This option cleans old archived jobs (leaves 20 jobs)") - - parser.add_option("-e", "--email", - type="string", - dest="email", - default="axom-dev@llnl.gov", - help="Email address to send report (Defaults to 'axom-dev@llnl.gov')") - - parser.add_option("--html", - type="string", - dest="html", - default="status.html", - help="File name for saving generated html status file (Defaults to 'status.html')") + parser.add_argument("--clean", + dest="clean", + action="store_true", + default=False, + help="!!DESTRUCTIVE!! This option cleans old archived jobs (leaves 20 jobs)") + + parser.add_argument("-e", "--email", + type=str, + dest="email", + default="axom-dev@llnl.gov", + help="Email address to send report (Defaults to 'axom-dev@llnl.gov')") + + parser.add_argument("--html", + type=str, + dest="html", + default="status.html", + help="File name for saving generated html status file (Defaults to 'status.html')") ############### # parse args ############### - opts, extras = parser.parse_args() + opts = parser.parse_args() # we want a dict b/c the values could - # be passed without using optparse + # be passed without using argparse opts = vars(opts) return opts @@ -109,17 +109,17 @@ def main(): cleanOldArchives(archive_dir) #Generate build email and send - print "Reading archived job information..." + print("Reading archived job information...") basicJobInfos, srcJobInfos, tplJobInfos = generateJobInfos(archive_dir) - print "Generating email content..." + print("Generating email content...") emailContent = generateEmailContent(basicJobInfos, srcJobInfos, tplJobInfos) - print "Saving html file '{}'".format( opts["html"] ) + print("Saving html file '{}'".format( opts["html"] )) with open(opts["html"], 'w') as f: f.write(emailContent) - print "Sending email to {}...".format(opts["email"]) + print("Sending email to {}...".format(opts["email"])) return sendEmail(emailContent, emailSubject, sender, receiver, emailServer) @@ -128,7 +128,7 @@ def getAllDirectoryNames(path): def cleanOldArchives(archive_dir): - print "Deleting old archive directories..." + print("Deleting old archive directories...") # Remove only the individual jobs not any of the directory structure # Directory structure = /// @@ -147,7 +147,7 @@ def cleanOldArchives(archive_dir): datetime_dir = pjoin(jobName_dir, datetime) shutil.rmtree(datetime_dir) - print "Done deleting." + print("Done deleting.") def determineSuccessState(path): @@ -209,7 +209,7 @@ def generateJobInfos(archive_dir): populateTests(currSpecInfo, spec_dir) if currJobInfo.specInfos.has_key(currSpecInfo.name): - print "Warning: duplicate spec ({0}) found in job: {1}".format(spec, currJobInfo.name) + print("Warning: duplicate spec ({0}) found in job: {1}".format(spec, currJobInfo.name)) currJobInfo.specInfos[spec] = currSpecInfo currJobInfo.success = True @@ -254,14 +254,14 @@ def populateTests(specInfo, path): name = child_elem.text break if name == "": - print "Error: {0}: Unknown to find test name".format(test_xml_path) + print("Error: {0}: Unknown to find test name".format(test_xml_path)) if test_elem.attrib["Status"] == "passed": specInfo.passed.append(name) elif test_elem.attrib["Status"] == "failed": specInfo.failed.append(name) else: - print "Error: {0}: Unknown test status ({1})".format(test_xml_path, test_elem.attrib["Status"]) + print("Error: {0}: Unknown test status ({1})".format(test_xml_path, test_elem.attrib["Status"])) def generateEmailContent(basicJobInfos, srcJobInfos, tplJobInfos): @@ -424,9 +424,9 @@ def sendEmail(content, subject, sender, receiver, emailServer): finally: conn.close() except Exception as e: - print "Failed to send email:\n {0}".format(str(e)) + print("Failed to send email:\n {0}".format(str(e))) return False - print "Sent." + print("Sent.") return True diff --git a/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml b/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml index 166f47abfd..84f04f568a 100644 --- a/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml +++ b/scripts/spack/configs/blueos_3_ppc64le_ib_p9/spack.yaml @@ -303,10 +303,14 @@ spack: prefix: /usr # Globally lock version of third party libraries + adiak: + require: "@0.4.0" + caliper: + require: "@2.10.0~kokkos" camp: - require: "@2024.02.0" + require: "@2024.07.0" conduit: - require: "@0.9.1~shared~test~examples~utilities" + require: "@0.9.2~shared~test~examples~utilities" hdf5: variants: ~shared~mpi hypre: @@ -314,19 +318,19 @@ spack: mfem: require: "@4.6.0" raja: - require: "@2024.02.0~shared~examples~exercises" + require: "@2024.07.0~shared~examples~exercises" scr: require: "@3.0.1~shared~tests~examples" umpire: - require: "@2024.02.0~shared~examples" + require: "@2024.07.0~shared~examples~werror" # Globally lock in versions of Devtools cmake: - version: [3.21.1] + version: [3.23.1] buildable: false externals: - - spec: cmake@3.21.1 - prefix: /usr/tce/packages/cmake/cmake-3.21.1 + - spec: cmake@3.23.1 + prefix: /usr/tce/packages/cmake/cmake-3.23.1 cppcheck: version: [2.9] buildable: false @@ -346,11 +350,11 @@ spack: - spec: graphviz@7.1.0 prefix: /collab/usr/gapps/axom/devtools/blueos_3_ppc64le_ib_p9/latest/graphviz-7.1.0 llvm: - version: [10.0.0] + version: [14.0.5] buildable: false externals: - - spec: llvm@10.0.0+clang - prefix: /usr/tce/packages/clang/clang-10.0.0 + - spec: llvm@14.0.5+clang+python + prefix: /usr/tce/packages/clang/clang-14.0.5 python: version: [3.10.10] buildable: false diff --git a/scripts/spack/configs/docker/ubuntu20_cuda/spack.yaml b/scripts/spack/configs/docker/ubuntu20_cuda/spack.yaml index b7b409bc92..bd2a0670d0 100644 --- a/scripts/spack/configs/docker/ubuntu20_cuda/spack.yaml +++ b/scripts/spack/configs/docker/ubuntu20_cuda/spack.yaml @@ -114,6 +114,11 @@ spack: externals: - spec: cuda@11.1.1 prefix: /usr/local/cuda + elfutils: + buildable: false + externals: + - spec: elfutils@0.187 + prefix: /usr gettext: buildable: false externals: @@ -156,31 +161,35 @@ spack: prefix: /opt/spack/opt/spack/linux-ubuntu20.04-x86_64/gcc-9.3.0/ # Globally lock version of third party libraries + adiak: + require: "@0.4.0" + caliper: + require: "@2.10.0~kokkos" camp: - require: "@2023.06.0" + require: "@2024.07.0" conduit: - require: "@0.8.8~shared~test~examples~utilities" + require: "@0.9.2~shared~test~examples~utilities" hdf5: variants: ~shared~mpi hypre: version: [2.24.0] # do shared mfem to allow PIC flag in mfem mfem: - require: "@4.5.2+shared~static" + require: "@4.6.0" raja: - require: "@2023.06.0~shared~examples~exercises" + require: "@2024.07.0~shared~examples~exercises" scr: - require: "@develop~shared" + require: "@3.0.1~shared~tests~examples" umpire: - require: "@2023.06.0~shared~examples" + require: "@2024.07.0~shared~examples~werror" # Globally lock in version of devtools cmake: - version: [3.20.4] + version: [3.21.7] buildable: false externals: - - spec: cmake@3.20.4 - prefix: /opt/view + - spec: cmake@3.21.7 + prefix: /usr doxygen: version: [1.8.17] buildable: false diff --git a/scripts/spack/configs/docker/ubuntu20/spack.yaml b/scripts/spack/configs/docker/ubuntu22/spack.yaml similarity index 68% rename from scripts/spack/configs/docker/ubuntu20/spack.yaml rename to scripts/spack/configs/docker/ubuntu22/spack.yaml index 8260933ac9..78908269a6 100644 --- a/scripts/spack/configs/docker/ubuntu20/spack.yaml +++ b/scripts/spack/configs/docker/ubuntu22/spack.yaml @@ -14,24 +14,22 @@ spack: build_stage:: - $spack/../build_stage - # Regular TPLs do not need views - view: false - compilers:: - compiler: environment: {} extra_rpaths: [] + # Axom example sidre_shocktube_F_ex doesn't link otherwise flags: - cflags: -pthread - cxxflags: -pthread + cflags: -fPIC -pthread + cxxflags: -fPIC -pthread modules: [] - operating_system: ubuntu20.04 + operating_system: ubuntu22.04 paths: cc: /usr/bin/clang cxx: /usr/bin/clang++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - spec: clang@10.0.0 + f77: /usr/bin/gfortran-11 + fc: /usr/bin/gfortran-11 + spec: clang@14.0.0 target: x86_64 - compiler: environment: {} @@ -40,19 +38,20 @@ spack: cflags: -pthread cxxflags: -pthread modules: [] - operating_system: ubuntu20.04 + operating_system: ubuntu22.04 paths: cc: /usr/bin/gcc cxx: /usr/bin/g++ - f77: /usr/bin/gfortran - fc: /usr/bin/gfortran - spec: gcc@11.1.0 + f77: /usr/bin/gfortran-13 + fc: /usr/bin/gfortran-13 + spec: gcc@13.1.0 target: x86_64 + # Regular TPLs do not need views + view: false + packages: all: - # This defaults us to machine specific flags of ivybridge which allows - # us to run on broadwell as well target: [x86_64] compiler: [gcc, intel, pgi, clang, xl, nag] providers: @@ -80,24 +79,39 @@ spack: buildable: false mpich: externals: - - spec: mpich@3.3 + - spec: mpich@4.0 prefix: /usr # System level packages to not build autotools: buildable: false externals: - - spec: autotools@2.69 + - spec: autotools@20220109.1 prefix: /usr bzip2: buildable: false externals: - - spec: bzip2@1.0.6 + - spec: bzip2@1.0.8 + prefix: /usr + curl: + buildable: false + externals: + - spec: curl@7.81.0 + prefix: /usr + diffutils: + buildable: false + externals: + - spec: diffutils@3.8 prefix: /usr gettext: buildable: false externals: - - spec: gettext@0.19.8.1 + - spec: gettext@0.21 + prefix: /usr + lua: + buildable: false + externals: + - spec: lua@5.2.4 prefix: /usr m4: buildable: false @@ -107,34 +121,38 @@ spack: perl: buildable: false externals: - - spec: perl@5.26.1 + - spec: perl@5.34.0 prefix: /usr pkg-config: buildable: false externals: - - spec: pkg-config@0.29.1 + - spec: pkg-config@0.29.2 prefix: /usr tar: buildable: false externals: - - spec: tar@1.29 + - spec: tar@1.34 prefix: /usr graphviz: buildable: false externals: - - spec: graphviz@2.40.1 + - spec: graphviz@2.42.2 prefix: /usr openblas: buildable: false externals: - - spec: openblas@0.2.20 + - spec: openblas@0.3.20 prefix: /usr # Globally lock version of third party libraries + adiak: + require: "@0.4.0" + caliper: + require: "@2.10.0~kokkos" camp: - require: "@2024.02.0" + require: "@2024.07.0" conduit: - require: "@0.9.1~shared~test~examples~utilities" + require: "@0.9.2~shared~test~examples~utilities" hdf5: variants: ~shared~mpi hypre: @@ -143,34 +161,34 @@ spack: mfem: require: "@4.6.0+shared~static" raja: - require: "@2024.02.0~shared~examples~exercises" + require: "@2024.07.0~shared~examples~exercises" scr: require: "@3.0.1~shared~tests~examples" umpire: - require: "@2024.02.0~shared~examples" + require: "@2024.07.0~shared~examples~werror" # Globally lock in version of devtools cmake: - version: [3.21.7] + version: [3.23.1] buildable: false externals: - - spec: cmake@3.21.7 - prefix: /usr + - spec: cmake@3.23.1 + prefix: /usr/local doxygen: - version: [1.8.17] + version: [1.9.1] buildable: false externals: - - spec: doxygen@1.8.17 + - spec: doxygen@1.9.1 prefix: /usr llvm: - version: [10.0.0] + version: [14.0.0] buildable: false externals: - - spec: llvm@10.0.0+clang + - spec: llvm@14.0.0+clang prefix: /usr py-sphinx: - version: [1.8.5] + version: [4.3.2] buildable: false externals: - - spec: py-sphinx@1.8.5 + - spec: py-sphinx@4.3.2 prefix: /usr diff --git a/scripts/spack/configs/linux_ubuntu_20/spack.yaml b/scripts/spack/configs/linux_ubuntu_20/spack.yaml index 901e514028..2abc35cdf8 100644 --- a/scripts/spack/configs/linux_ubuntu_20/spack.yaml +++ b/scripts/spack/configs/linux_ubuntu_20/spack.yaml @@ -69,6 +69,11 @@ spack: externals: - spec: bzip2@1.0.8 prefix: / + elfutils: + buildable: false + externals: + - spec: elfutils@0.187 + prefix: /usr gettext: buildable: false externals: diff --git a/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml b/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml index bd15768713..cb232f9643 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib/spack.yaml @@ -72,6 +72,7 @@ spack: mpi: [mvapich2] gl: [opengl] glu: [openglu] + zlib-api: [zlib] openblas: buildable: false @@ -179,6 +180,11 @@ spack: externals: - spec: ghostscript@9.27 prefix: /usr + gmake: + buildable: false + externals: + - spec: gmake@4.2.1 + prefix: /usr graphviz: buildable: false externals: @@ -267,10 +273,14 @@ spack: prefix: /usr # Globally lock version of third party libraries + adiak: + require: "@0.4.0" + caliper: + require: "@2.10.0~kokkos" camp: - require: "@2024.02.0" + require: "@2024.07.0" conduit: - require: "@0.9.1~shared~test~examples~utilities" + require: "@0.9.2~shared~test~examples~utilities" hdf5: variants: ~shared~mpi hypre: @@ -278,11 +288,11 @@ spack: mfem: require: "@4.6.0" raja: - require: "@2024.02.0~shared~examples~exercises" + require: "@2024.07.0~shared~examples~exercises" scr: require: "@3.0.1~shared~tests~examples" umpire: - require: "@2024.02.0~shared~examples" + require: "@2024.07.0~shared~examples~werror" # Lock in versions of Devtools cmake: @@ -303,13 +313,12 @@ spack: externals: - spec: doxygen@1.9.6 prefix: /collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/doxygen-1.9.6 - # TODO: make installed clang 14.0.6 work llvm: - version: [10.0.0] + version: [14.0.6] buildable: false externals: - - spec: llvm+clang@10.0.0 - prefix: /collab/usr/gapps/axom/devtools/toss_4_x86_64_ib/latest/llvm-10.0.0 + - spec: llvm@14.0.6+clang+python + prefix: /usr/tce/packages/clang/clang-14.0.6 py-shroud: version: [0.13.0] buildable: false diff --git a/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml b/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml index b6f2a47429..4ae77c737a 100644 --- a/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml +++ b/scripts/spack/configs/toss_4_x86_64_ib_cray/spack.yaml @@ -60,6 +60,20 @@ spack: fc: /opt/rocm-5.6.0/llvm/bin/amdflang spec: clang@16.0.0 target: x86_64 + - compiler: + environment: {} + extra_rpaths: [] + flags: + fflags: -Mfreeform + modules: [] + operating_system: rhel8 + paths: + cc: /opt/rocm-5.7.1/llvm/bin/amdclang + cxx: /opt/rocm-5.7.1/llvm/bin/amdclang++ + f77: /opt/rocm-5.7.1/llvm/bin/amdflang + fc: /opt/rocm-5.7.1/llvm/bin/amdflang + spec: clang@17.0.0 + target: x86_64 - compiler: environment: {} extra_rpaths: [] @@ -85,7 +99,7 @@ spack: mpi: [cray-mpich] hip: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: hip@5.2.3 @@ -94,9 +108,11 @@ spack: prefix: /opt/rocm-5.4.3/hip - spec: hip@5.6.0 prefix: /opt/rocm-5.6.0/hip + - spec: hip@5.7.1 + prefix: /opt/rocm-5.7.1/hip llvm-amdgpu: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: llvm-amdgpu@5.2.3 @@ -105,9 +121,11 @@ spack: prefix: /opt/rocm-5.4.3/llvm - spec: llvm-amdgpu@5.6.0 prefix: /opt/rocm-5.6.0/llvm + - spec: llvm-amdgpu@5.7.1 + prefix: /opt/rocm-5.7.1/llvm hsa-rocr-dev: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: hsa-rocr-dev@5.2.3 @@ -116,9 +134,11 @@ spack: prefix: /opt/rocm-5.4.3/ - spec: hsa-rocr-dev@5.6.0 prefix: /opt/rocm-5.6.0/ + - spec: hsa-rocr-dev@5.7.1 + prefix: /opt/rocm-5.7.1/ rocblas: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: rocblas@5.2.3 @@ -127,9 +147,11 @@ spack: prefix: /opt/rocm-5.4.3/ - spec: rocblas@5.6.0 prefix: /opt/rocm-5.6.0/ + - spec: rocblas@5.7.1 + prefix: /opt/rocm-5.7.1/ rocminfo: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: rocminfo@5.2.3 @@ -138,9 +160,11 @@ spack: prefix: /opt/rocm-5.4.3/ - spec: rocminfo@5.6.0 prefix: /opt/rocm-5.6.0/ + - spec: rocminfo@5.7.1 + prefix: /opt/rocm-5.7.1 rocprim: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: rocprim@5.2.3 @@ -149,9 +173,11 @@ spack: prefix: /opt/rocm-5.4.3/ - spec: rocprim@5.6.0 prefix: /opt/rocm-5.6.0/ + - spec: rocprim@5.7.1 + prefix: /opt/rocm-5.7.1/ rocm-device-libs: - version: [5.2.3, 5.4.3, 5.6.0] + version: [5.2.3, 5.4.3, 5.6.0, 5.7.1] buildable: false externals: - spec: rocm-device-libs@5.2.3 @@ -160,6 +186,8 @@ spack: prefix: /opt/rocm-5.4.3/ - spec: rocm-device-libs@5.6.0 prefix: /opt/rocm-5.6.0/ + - spec: rocm-device-libs@5.7.1 + prefix: /opt/rocm-5.7.1/ # Lock down which MPI we are using mpi: @@ -173,6 +201,8 @@ spack: prefix: /usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3/ - spec: cray-mpich@8.1.25%clang@16.0.0+slurm prefix: /usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.6.0/ + - spec: cray-mpich@8.1.27%clang@17.0.0+slurm + prefix: /usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.27-rocmcc-5.7.1/ - spec: cray-mpich@8.1.25%cce@15.0.1+slurm prefix: /usr/tce/packages/cray-mpich-tce/cray-mpich-8.1.25-rocmcc-5.4.3-cce-15.0.1/ @@ -210,12 +240,6 @@ spack: externals: - spec: curl@7.61.1 prefix: /usr - cmake: - version: [3.24.2] - buildable: false - externals: - - spec: cmake@3.24.2 - prefix: /usr/tce diffutils: buildable: false externals: @@ -336,10 +360,14 @@ spack: prefix: /usr # Globally lock version of third party libraries + adiak: + require: "@0.4.0" + caliper: + require: "@2.10.0~kokkos" camp: - require: "@2024.02.0" + require: "@2024.07.0" conduit: - require: "@0.9.1~shared~test~examples~utilities" + require: "@0.9.2~shared~test~examples~utilities" hdf5: variants: ~shared~mpi hypre: @@ -347,12 +375,19 @@ spack: mfem: require: "@4.6.0" raja: - require: "@2024.02.0~shared~examples~exercises" + require: "@2024.07.0~shared~examples~exercises" scr: require: "@3.0.1~shared~tests~examples" umpire: - require: "@2024.02.0~shared~examples" + require: "@2024.07.0~shared~examples~werror" + # Lock in versions of Devtools + cmake: + version: [3.24.2] + buildable: false + externals: + - spec: cmake@3.24.2 + prefix: /usr/tce py-shroud: version: [0.13.0] buildable: false diff --git a/scripts/spack/devtools_configs/blueos_3_ppc64le_ib_p9/spack.yaml b/scripts/spack/devtools_configs/blueos_3_ppc64le_ib_p9/spack.yaml index f0007bb6a7..adb42dc5c4 100644 --- a/scripts/spack/devtools_configs/blueos_3_ppc64le_ib_p9/spack.yaml +++ b/scripts/spack/devtools_configs/blueos_3_ppc64le_ib_p9/spack.yaml @@ -149,9 +149,9 @@ spack: prefix: /usr/tce/packages/cmake/cmake-3.18.0 buildable: false llvm: - version: [10.0.0] + version: [14.0.5] buildable: false externals: - - spec: llvm@10.0.0+clang - prefix: /usr/tce/packages/clang/clang-10.0.0 + - spec: llvm@14.0.5+clang+python + prefix: /usr/tce/packages/clang/clang-14.0.5 diff --git a/scripts/spack/devtools_configs/toss_4_x86_64_ib/spack.yaml b/scripts/spack/devtools_configs/toss_4_x86_64_ib/spack.yaml index 111e90d628..f16d213051 100644 --- a/scripts/spack/devtools_configs/toss_4_x86_64_ib/spack.yaml +++ b/scripts/spack/devtools_configs/toss_4_x86_64_ib/spack.yaml @@ -246,11 +246,9 @@ spack: externals: - spec: cmake@3.19.2 prefix: /usr/tce/packages/cmake/cmake-3.19.2 - - # FIXME: make installed clang 14.0.6 work - # llvm: - # version: [14.0.6] - # buildable: false - # externals: - # - spec: llvm@14.0.6+clang - # prefix: /usr/tce/packages/clang/clang-14.0.6 + llvm: + version: [14.0.6] + buildable: false + externals: + - spec: llvm@14.0.6+clang+python + prefix: /usr/tce/packages/clang/clang-14.0.6 diff --git a/scripts/spack/packages/axom/package.py b/scripts/spack/packages/axom/package.py index cd85f139a0..481c7a698b 100644 --- a/scripts/spack/packages/axom/package.py +++ b/scripts/spack/packages/axom/package.py @@ -3,7 +3,9 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import glob import os +import shutil import socket from os.path import join as pjoin @@ -43,6 +45,7 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): version("main", branch="main") version("develop", branch="develop") + version("0.9.0", tag="v0.9.0", commit="5f531595d941d16fa3b8583bfc347a845d9feb6d") version("0.8.1", tag="v0.8.1", commit="0da8a5b1be596887158ac2fcd321524ba5259e15") version("0.8.0", tag="v0.8.0", commit="71fab3262eb7e1aa44a04c21d072b77f06362f7b") version("0.7.0", tag="v0.7.0", commit="ea5158191181c137117ae37959879bdc8b107f35") @@ -82,6 +85,13 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): variant("mpi", default=True, description="Build MPI support") variant("openmp", default=True, description="Turn on OpenMP support.") + variant( + "profiling", + default=False, + when="@develop", + description="Build with hooks for Adiak/Caliper performance analysis", + ) + variant("c2c", default=False, description="Build with c2c") variant("mfem", default=False, description="Build with mfem") @@ -104,7 +114,7 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("cmake@3.21:", type="build", when="+rocm") depends_on("blt", type="build") - depends_on("blt@0.5.1:", type="build", when="@0.6.1:") + depends_on("blt@0.5.1:0.5.3", type="build", when="@0.6.1:0.8") depends_on("blt@0.6.2:", type="build", when="@0.9:") depends_on("mpi", when="+mpi") @@ -123,31 +133,49 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("scr~fortran", when="+scr~fortran") with when("+umpire"): + depends_on("umpire") depends_on("umpire@2024.02.0:", when="@0.9:") - depends_on("umpire@2022.03.0:", when="@0.7.0:") + depends_on("umpire@2022.03.0:2023.06", when="@0.7.0:0.8") depends_on("umpire@6.0.0", when="@0.6.0") depends_on("umpire@5:5.0.1", when="@:0.5.0") - depends_on("umpire +openmp", when="+openmp") + depends_on("umpire+openmp", when="+openmp") with when("+raja"): + depends_on("raja") depends_on("raja@2024.02.0:", when="@0.9:") - depends_on("raja@2022.03.0:", when="@0.7.0:") + depends_on("raja@2022.03.0:2023.06", when="@0.7.0:0.8") depends_on("raja@0.14.0", when="@0.6.0") depends_on("raja@:0.13.0", when="@:0.5.0") depends_on("raja~openmp", when="~openmp") depends_on("raja+openmp", when="+openmp") + with when("+profiling"): + depends_on("adiak") + depends_on("caliper+adiak~papi") + + depends_on("caliper+cuda", when="+cuda") + depends_on("caliper~cuda", when="~cuda") + + depends_on("caliper+rocm", when="+rocm") + depends_on("caliper~rocm", when="~rocm") + + for dep in ["adiak", "caliper"]: + depends_on(f"{dep}+mpi", when="+mpi") + depends_on(f"{dep}~mpi", when="~mpi") + depends_on(f"{dep}+shared", when="+shared") + depends_on(f"{dep}~shared", when="~shared") + for val in CudaPackage.cuda_arch_values: - raja_cuda = "raja +cuda cuda_arch={0}".format(val) - umpire_cuda = "umpire +cuda cuda_arch={0}".format(val) - depends_on(raja_cuda, when="+{0}".format(raja_cuda)) - depends_on(umpire_cuda, when="+{0}".format(umpire_cuda)) + ext_cuda_dep = f"+cuda cuda_arch={val}" + depends_on(f"raja {ext_cuda_dep}", when=f"+raja {ext_cuda_dep}") + depends_on(f"umpire {ext_cuda_dep}", when=f"+umpire {ext_cuda_dep}") + depends_on(f"caliper {ext_cuda_dep}", when=f"+profiling {ext_cuda_dep}") for val in ROCmPackage.amdgpu_targets: - raja_rocm = "raja +rocm amdgpu_target={0}".format(val) - umpire_rocm = "umpire +rocm amdgpu_target={0}".format(val) - depends_on(raja_rocm, when="+{0}".format(raja_rocm)) - depends_on(umpire_rocm, when="+{0}".format(umpire_rocm)) + ext_rocm_dep = f"+rocm amdgpu_target={val}" + depends_on(f"raja {ext_rocm_dep}", when=f"+raja {ext_rocm_dep}") + depends_on(f"umpire {ext_rocm_dep}", when=f"+umpire {ext_rocm_dep}") + depends_on(f"caliper {ext_rocm_dep}", when=f"+profiling {ext_rocm_dep}") depends_on("rocprim", when="+rocm") @@ -161,15 +189,19 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): depends_on("python", when="+python") # Devtools - depends_on("cppcheck", when="+devtools") - depends_on("doxygen", when="+devtools") - depends_on("graphviz", when="+devtools") - depends_on("python", when="+devtools") - depends_on("py-sphinx", when="+devtools") - depends_on("py-shroud", when="+devtools") - depends_on("py-jsonschema", when="+devtools") - depends_on("llvm+clang@10.0.0", when="+devtools", type="build") + with when("+devtools"): + depends_on("cppcheck") + depends_on("doxygen") + depends_on("graphviz") + depends_on("python") + depends_on("py-sphinx") + depends_on("py-shroud") + depends_on("py-jsonschema") + depends_on("llvm+clang@14", type="build") + # ----------------------------------------------------------------------- + # Conflicts + # ----------------------------------------------------------------------- # Hard requirement after Axom 0.6.1 conflicts("~cpp14", when="@0.6.2:") @@ -182,6 +214,11 @@ class Axom(CachedCMakePackage, CudaPackage, ROCmPackage): conflicts("+openmp", when="+rocm") conflicts("+cuda", when="+rocm") + conflicts("~raja", when="+cuda") + conflicts("~raja", when="+rocm") + conflicts("~umpire", when="+cuda") + conflicts("~umpire", when="+rocm") + conflicts("^blt@:0.3.6", when="+rocm") def flag_handler(self, name, flags): @@ -249,11 +286,9 @@ def initconfig_compiler_entries(self): if "+cpp14" in spec and spec.satisfies("@:0.6.1"): entries.append(cmake_cache_string("BLT_CXX_STD", "c++14", "")) - # Add optimization flag workaround for Debug builds with - # cray compiler or newer HIP + # Add optimization flag workaround for Debug builds with cray compiler or newer HIP if "+rocm" in spec: - if spec.satisfies("%cce") or spec.satisfies("%clang@16"): - entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG")) + entries.append(cmake_cache_string("CMAKE_CXX_FLAGS_DEBUG", "-O1 -g -DNDEBUG")) return entries @@ -265,28 +300,20 @@ def initconfig_hardware_entries(self): entries.append(cmake_cache_option("ENABLE_CUDA", True)) entries.append(cmake_cache_option("CMAKE_CUDA_SEPARABLE_COMPILATION", True)) - entries.append(cmake_cache_option("AXOM_ENABLE_ANNOTATIONS", True)) - # CUDA_FLAGS - cudaflags = "-restrict --expt-extended-lambda " + cudaflags = "${CMAKE_CUDA_FLAGS} -restrict --expt-extended-lambda " # Pass through any cxxflags to the host compiler via nvcc's Xcompiler flag host_cxx_flags = spec.compiler_flags["cxxflags"] cudaflags += " ".join(["-Xcompiler=%s " % flag for flag in host_cxx_flags]) - if not spec.satisfies("cuda_arch=none"): - cuda_arch = spec.variants["cuda_arch"].value[0] - entries.append(cmake_cache_string("CMAKE_CUDA_ARCHITECTURES", cuda_arch)) - else: - entries.append("# cuda_arch could not be determined\n\n") - if spec.satisfies("^blt@:0.5.1"): # This is handled internally by BLT now if "+cpp14" in spec: cudaflags += " -std=c++14" else: cudaflags += " -std=c++11" - entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags)) + entries.append(cmake_cache_string("CMAKE_CUDA_FLAGS", cudaflags, force=True)) entries.append("# nvcc does not like gtest's 'pthreads' flag\n") entries.append(cmake_cache_option("gtest_disable_pthreads", True)) @@ -474,6 +501,13 @@ def initconfig_package_entries(self): else: entries.append("# %s not built\n" % dep.upper()) + if "+profiling" in spec: + dep_dir = get_spec_path(spec, "adiak", path_replacements) + entries.append(cmake_cache_path("ADIAK_DIR", dep_dir)) + + dep_dir = get_spec_path(spec, "caliper", path_replacements) + entries.append(cmake_cache_path("CALIPER_DIR", dep_dir)) + if "+umpire" in spec and spec.satisfies("^camp"): dep_dir = get_spec_path(spec, "camp", path_replacements) entries.append(cmake_cache_path("CAMP_DIR", dep_dir)) @@ -581,3 +615,44 @@ def patch(self): 'PROPERTIES LINKER_LANGUAGE CXX \n LINK_FLAGS "-fopenmp"', "src/axom/quest/examples/CMakeLists.txt", ) + + @run_after("build") + @on_package_attributes(run_tests=True) + def build_test(self): + with working_dir(self.build_directory): + print("Running Axom Unit Tests...") + make("test") + + @run_after("install") + @on_package_attributes(run_tests=True) + def check_install(self): + """ + Checks the spack install of axom using axom's + using-with-cmake example + """ + + print("Checking Axom installation...") + spec = self.spec + install_prefix = spec.prefix + example_src_dir = join_path(install_prefix, "examples", "axom", "using-with-cmake") + example_build_dir = join_path(example_src_dir, "build") + print("Checking using-with-cmake example...") + with working_dir(example_build_dir, create=True): + cmake_args = ["-C ../host-config.cmake", example_src_dir] + cmake(*cmake_args) + make() + example = Executable("./example") + example() + print("Checking using-with-make example...") + example_src_dir = join_path(install_prefix, "examples", "axom", "using-with-make") + example_build_dir = join_path(example_src_dir, "build") + example_files = glob.glob(join_path(example_src_dir, "*")) + with working_dir(example_build_dir, create=True): + for example_file in example_files: + shutil.copy(example_file, ".") + make("AXOM_DIR={0}".format(install_prefix)) + example = Executable("./example") + example() + + def test_install(self): + self.check_install() diff --git a/scripts/spack/radiuss-spack-configs b/scripts/spack/radiuss-spack-configs index d43946bed0..efe7a45205 160000 --- a/scripts/spack/radiuss-spack-configs +++ b/scripts/spack/radiuss-spack-configs @@ -1 +1 @@ -Subproject commit d43946bed028933a8b8770adca3dde78987f6626 +Subproject commit efe7a45205f0c71563c909e26c2f0a54a4c9427a diff --git a/scripts/spack/specs.json b/scripts/spack/specs.json index fed1c5f3a1..d29a8c0688 100644 --- a/scripts/spack/specs.json +++ b/scripts/spack/specs.json @@ -14,23 +14,22 @@ "__comment__":"##############################################################################", "toss_4_x86_64_ib": - [ "gcc@10.3.1+devtools+hdf5+mfem+c2c+scr", - "clang@14.0.6+devtools+hdf5+mfem+c2c+scr", - "intel@2022.1.0+devtools+hdf5+mfem+c2c" ], + [ "gcc@10.3.1+devtools+hdf5+mfem+c2c+scr+profiling", + "clang@14.0.6+devtools+hdf5+mfem+c2c+scr+profiling", + "intel@2022.1.0+devtools+hdf5+mfem+c2c+profiling" ], "__comment__":"# Use amdgpu_target=gfx90a for tioga/rzvernal; and gfx908 for rznevada", "__comment__":"# -Wno-int-conversion flag needed for building HDF5", "toss_4_x86_64_ib_cray": - [ "clang@16.0.0~openmp+rocm+mfem+c2c amdgpu_target=gfx90a ^hip@5.6.0 ^hsa-rocr-dev@5.6.0 ^llvm-amdgpu@5.6.0 ^rocprim@5.6.0 ^raja~openmp+rocm ^umpire~openmp+rocm ^hdf5 cflags=-Wno-int-conversion" ], + [ "clang@16.0.0~openmp+mfem+c2c+profiling+rocm amdgpu_target=gfx90a ^hip@5.6.0 ^hsa-rocr-dev@5.6.0 ^llvm-amdgpu@5.6.0 ^rocprim@5.6.0 ^raja~openmp+rocm ^umpire~openmp+rocm ^hdf5 cflags=-Wno-int-conversion", + "clang@17.0.0~openmp+mfem+c2c+profiling+rocm amdgpu_target=gfx90a ^hip@5.7.1 ^hsa-rocr-dev@5.7.1 ^llvm-amdgpu@5.7.1 ^rocprim@5.7.1 ^raja~openmp+rocm ^umpire~openmp+rocm ^hdf5 cflags=-Wno-int-conversion" ], "__comment__":"# Note: clang-ibm + raja+openmp causes runtime failures, turning it off until there is an alternative", "blueos_3_ppc64le_ib_p9": - [ "clang@10.0.1.1+devtools+mfem+c2c", - "clang@10.0.1.2+devtools+mfem+c2c+cuda cuda_arch=70", - "gcc@8.3.1.1+devtools~mfem+c2c", - "gcc@8.3.1.2+devtools~mfem+c2c+cuda cuda_arch=70", - "xl@16.1.1.1~openmp+devtools+mfem+c2c", - "xl@16.1.1.2~openmp+devtools+mfem+c2c+cuda cuda_arch=70" ], + [ "clang@10.0.1.1+devtools+mfem+c2c+profiling", + "clang@10.0.1.2+devtools+mfem+c2c+profiling+cuda cuda_arch=70 ^raja+openmp+cuda ^umpire+openmp+cuda", + "gcc@8.3.1.1+devtools~mfem+c2c+profiling", + "gcc@8.3.1.2+devtools~mfem+c2c+profiling+cuda cuda_arch=70 ^raja+openmp+cuda ^umpire+openmp+cuda" ], "darwin-x86_64": [ "clang@9.0.0+devtools+mfem" ] diff --git a/scripts/vcpkg_ports/axom/vcpkg.json b/scripts/vcpkg_ports/axom/vcpkg.json index f3fb50eee5..8d44b31094 100644 --- a/scripts/vcpkg_ports/axom/vcpkg.json +++ b/scripts/vcpkg_ports/axom/vcpkg.json @@ -9,8 +9,7 @@ "lua", "mfem", "openmp", - "raja", - "umpire" + "raja" ], "features": { "conduit": { diff --git a/scripts/vcpkg_ports/blt/portfile.cmake b/scripts/vcpkg_ports/blt/portfile.cmake index 66fa1c217b..5c1db7590f 100644 --- a/scripts/vcpkg_ports/blt/portfile.cmake +++ b/scripts/vcpkg_ports/blt/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llnl/blt - REF v0.5.2 - SHA512 63e06282483985ae056e4a1557f249a9629130a4f5826c33ef3dbb7b8b1fc1760898fa89abd9734c3ab740aaf253e7284bad6aa342b92286ece810afe62350c2 + REF v0.6.2 + SHA512 ca38639dc2bcbd9814e11257ce8d4c8b61e082dcc86ba6ceb339a6e473191b2008158014f06325a1a15b71897d5d42b0f16261dcdd6164081e415b11a06f3ff4 HEAD_REF develop ) diff --git a/scripts/vcpkg_ports/blt/vcpkg.json b/scripts/vcpkg_ports/blt/vcpkg.json index fe1a59a015..6ffd883de4 100644 --- a/scripts/vcpkg_ports/blt/vcpkg.json +++ b/scripts/vcpkg_ports/blt/vcpkg.json @@ -1,6 +1,6 @@ { "name": "blt", - "version": "0.5.2", + "version": "0.6.2", "homepage": "https://github.com/llnl/blt", "description": "A streamlined CMake build system foundation for developing HPC software", "supports": "!uwp" diff --git a/scripts/vcpkg_ports/camp/portfile.cmake b/scripts/vcpkg_ports/camp/portfile.cmake index 05db292362..a11f2d1770 100644 --- a/scripts/vcpkg_ports/camp/portfile.cmake +++ b/scripts/vcpkg_ports/camp/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llnl/camp - REF v2022.03.2 - SHA512 d124c0e933f042525e9b48c21b93e7f4f634dfc0f87742e018a1c7de43ed6e30670d8f8e4ce369018a8e1c884b2b27f4755ee9f07a077820b2a3133546f6d622 + REF v2024.07.0 + SHA512 1055cb122ea12007af3b2b97fad0288eba48d23a9288e7d06516447c7a2b4f8828d0e57b4ec2d3e9612d324b7508fce4fd03b12dd035a601ec494d91b1b67370 HEAD_REF develop ) @@ -82,4 +82,9 @@ else() endif() # Put the license file where vcpkg expects it -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/camp RENAME copyright) +# Note: LICENSE occasionally cannot be found +if(EXISTS "${SOURCE_PATH}/LICENSE") + file(INSTALL ${SOURCE_PATH}/LICENSE + DESTINATION ${CURRENT_PACKAGES_DIR}/share/camp + RENAME copyright) +endif() diff --git a/scripts/vcpkg_ports/camp/vcpkg.json b/scripts/vcpkg_ports/camp/vcpkg.json index 232454316a..08a468594c 100644 --- a/scripts/vcpkg_ports/camp/vcpkg.json +++ b/scripts/vcpkg_ports/camp/vcpkg.json @@ -1,6 +1,6 @@ { "name": "camp", - "version-string": "2022.03.2", + "version-string": "2024.07.0", "homepage": "https://github.com/llnl/camp", "description": "Compiler agnostic metaprogramming library", "dependencies": [ @@ -12,4 +12,4 @@ } }, "supports": "!uwp" -} \ No newline at end of file +} diff --git a/scripts/vcpkg_ports/conduit/portfile.cmake b/scripts/vcpkg_ports/conduit/portfile.cmake index 8ff2f42a23..dfbb88f098 100644 --- a/scripts/vcpkg_ports/conduit/portfile.cmake +++ b/scripts/vcpkg_ports/conduit/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llnl/conduit - REF v0.8.6 - SHA512 b85c15bfa2687ba47f53c1ca269af72a1a31161848047e653bdc722a07f2682623640758cb5e83565ee655eca7cc993921c656208e6084513843927d76c5db66 + REF v0.9.2 + SHA512 f067423373ad542ba26c6331e17f78d10ad790f33b68c4c44dc54839ab1ef7e68bec5580de18ac07d5609a745f5b285822b6061e7c144e5a7d487864a605a874 HEAD_REF develop PATCHES "./setup_deps_vcpkg_triplet.patch" diff --git a/scripts/vcpkg_ports/conduit/vcpkg.json b/scripts/vcpkg_ports/conduit/vcpkg.json index e9b8730591..b51fa9da14 100644 --- a/scripts/vcpkg_ports/conduit/vcpkg.json +++ b/scripts/vcpkg_ports/conduit/vcpkg.json @@ -1,6 +1,6 @@ { "name": "conduit", - "version": "0.8.6", + "version": "0.9.2", "homepage": "https://github.com/llnl/conduit", "description": "Simplified Data Exchange for HPC Simulations", "dependencies": [ diff --git a/scripts/vcpkg_ports/mfem/export-extern-vars.patch b/scripts/vcpkg_ports/mfem/export-extern-vars.patch deleted file mode 100644 index dc20e4bc2c..0000000000 --- a/scripts/vcpkg_ports/mfem/export-extern-vars.patch +++ /dev/null @@ -1,293 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 7b159ff..e178687 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -529,6 +529,12 @@ endif() - set_target_properties(mfem PROPERTIES VERSION "${mfem_VERSION}") - set_target_properties(mfem PROPERTIES SOVERSION "${mfem_VERSION}") - -+# Generate export symbols and add to list of header files -+include(GenerateExportHeader) -+set(_export_header ${CMAKE_CURRENT_SOURCE_DIR}/mfem_export.h) -+generate_export_header(mfem EXPORT_FILE_NAME ${_export_header}) -+list(APPEND ${HEADERS} ${_export_header}) -+ - # If building out-of-source, define MFEM_CONFIG_FILE to point to the config file - # inside the build directory. - if (NOT ("${PROJECT_SOURCE_DIR}" STREQUAL "${PROJECT_BINARY_DIR}")) -@@ -669,7 +675,7 @@ foreach(Header mfem.hpp mfem-performance.hpp) - install(FILES ${PROJECT_BINARY_DIR}/InstallHeaders/${Header} - DESTINATION ${INSTALL_INCLUDE_DIR}) - endforeach() --install(FILES ${MASTER_HEADERS} DESTINATION ${INSTALL_INCLUDE_DIR}/mfem) -+install(FILES ${MASTER_HEADERS} mfem_export.h DESTINATION ${INSTALL_INCLUDE_DIR}/mfem) - - # Install the headers; currently, the miniapps headers are excluded - install(DIRECTORY ${MFEM_SOURCE_DIRS} -diff --git a/fem/fe.hpp b/fem/fe.hpp -index 5de8ee5..3738007 100644 ---- a/fem/fe.hpp -+++ b/fem/fe.hpp -@@ -13,6 +13,7 @@ - #define MFEM_FE - - #include "../config/config.hpp" -+#include "../mfem_export.h" - #include "../general/array.hpp" - #include "../linalg/linalg.hpp" - -diff --git a/fem/fe/fe_base.hpp b/fem/fe/fe_base.hpp -index 0d6d440..1774791 100644 ---- a/fem/fe/fe_base.hpp -+++ b/fem/fe/fe_base.hpp -@@ -1146,7 +1146,7 @@ public: - ~Poly_1D(); - }; - --extern Poly_1D poly1d; -+MFEM_EXPORT extern Poly_1D poly1d; - - - /// An element defined as an ND tensor product of 1D elements on a segment, -diff --git a/fem/geom.hpp b/fem/geom.hpp -index bdcf6cc..599a28c 100644 ---- a/fem/geom.hpp -+++ b/fem/geom.hpp -@@ -13,6 +13,7 @@ - #define MFEM_GEOM - - #include "../config/config.hpp" -+#include "../mfem_export.h" - #include "../linalg/densemat.hpp" - #include "intrules.hpp" - -@@ -126,7 +127,7 @@ public: - int NumBdr(int GeomType) { return NumBdrArray[GeomType]; } - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 0; - static const int NumVert = 1; -@@ -136,7 +137,7 @@ template <> struct Geometry::Constants - static const int InvOrient[NumOrient]; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 1; - static const int NumVert = 2; -@@ -148,7 +149,7 @@ template <> struct Geometry::Constants - static const int InvOrient[NumOrient]; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 2; - static const int NumVert = 3; -@@ -174,7 +175,7 @@ template <> struct Geometry::Constants - static const int InvOrient[NumOrient]; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 2; - static const int NumVert = 4; -@@ -194,7 +195,7 @@ template <> struct Geometry::Constants - static const int InvOrient[NumOrient]; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 3; - static const int NumVert = 4; -@@ -216,7 +217,7 @@ template <> struct Geometry::Constants - static const int InvOrient[NumOrient]; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 3; - static const int NumVert = 8; -@@ -234,7 +235,7 @@ template <> struct Geometry::Constants - }; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 3; - static const int NumVert = 6; -@@ -252,7 +253,7 @@ template <> struct Geometry::Constants - }; - }; - --template <> struct Geometry::Constants -+template <> struct MFEM_EXPORT Geometry::Constants - { - static const int Dimension = 3; - static const int NumVert = 5; -@@ -272,7 +273,7 @@ template <> struct Geometry::Constants - - // Defined in fe.cpp to ensure construction after 'mfem::TriangleFE' and - // `mfem::TetrahedronFE`. --extern Geometry Geometries; -+MFEM_EXPORT extern Geometry Geometries; - - - class RefinedGeometry -@@ -321,7 +322,7 @@ public: - ~GeometryRefiner(); - }; - --extern GeometryRefiner GlobGeometryRefiner; -+MFEM_EXPORT extern GeometryRefiner GlobGeometryRefiner; - - } - -diff --git a/fem/intrules.hpp b/fem/intrules.hpp -index 3545701..fd68a9a 100644 ---- a/fem/intrules.hpp -+++ b/fem/intrules.hpp -@@ -13,6 +13,7 @@ - #define MFEM_INTRULES - - #include "../config/config.hpp" -+#include "../mfem_export.h" - #include "../general/array.hpp" - - namespace mfem -@@ -376,10 +377,10 @@ public: - }; - - /// A global object with all integration rules (defined in intrules.cpp) --extern IntegrationRules IntRules; -+MFEM_EXPORT extern IntegrationRules IntRules; - - /// A global object with all refined integration rules --extern IntegrationRules RefinedIntRules; -+MFEM_EXPORT extern IntegrationRules RefinedIntRules; - - } - -diff --git a/general/device.cpp b/general/device.cpp -index 0f8d607..858473a 100644 ---- a/general/device.cpp -+++ b/general/device.cpp -@@ -61,7 +61,6 @@ static const char *backend_name[Backend::NUM_BACKENDS] = - - - // Initialize the unique global Device variable. --Device Device::device_singleton; - bool Device::device_env = false; - bool Device::mem_host_env = false; - bool Device::mem_device_env = false; -@@ -177,6 +176,12 @@ Device::~Device() - Get().device_mem_class = MemoryClass::HOST; - } - -+Device& Device::Get() -+{ -+ static Device device_singleton; -+ return device_singleton; -+} -+ - void Device::Configure(const std::string &device, const int device_id) - { - // If a device was configured via the environment, skip the configuration, -diff --git a/general/device.hpp b/general/device.hpp -index 456d3cc..e2b75b3 100644 ---- a/general/device.hpp -+++ b/general/device.hpp -@@ -12,6 +12,8 @@ - #ifndef MFEM_DEVICE_HPP - #define MFEM_DEVICE_HPP - -+#include "../config/config.hpp" -+#include "../mfem_export.h" - #include "globals.hpp" - #include "mem_manager.hpp" - -@@ -125,7 +127,6 @@ private: - enum MODES {SEQUENTIAL, ACCELERATED}; - - static bool device_env, mem_host_env, mem_device_env, mem_types_set; -- static Device device_singleton; - - MODES mode = Device::SEQUENTIAL; - int dev = 0; ///< Device ID of the configured device. -@@ -147,7 +148,9 @@ private: - char *device_option = NULL; - Device(Device const&); - void operator=(Device const&); -- static Device& Get() { return device_singleton; } -+ -+ /// Return unique global Device variable -+ static Device& Get(); - - /// Setup switcher based on configuration settings - void Setup(const int device_id = 0); -diff --git a/general/globals.hpp b/general/globals.hpp -index c21b869..d860fbf 100644 ---- a/general/globals.hpp -+++ b/general/globals.hpp -@@ -13,6 +13,7 @@ - #define MFEM_GLOBALS_HPP - - #include "../config/config.hpp" -+#include "../mfem_export.h" - #include - - #ifdef MFEM_USE_MPI -@@ -63,12 +64,12 @@ public: - /** @brief Global stream used by the library for standard output. Initially it - uses the same std::streambuf as std::cout, however that can be changed. - @sa OutStream. */ --extern OutStream out; -+MFEM_EXPORT extern OutStream out; - /** @brief Global stream used by the library for standard error output. - Initially it uses the same std::streambuf as std::cerr, however that can be - changed. - @sa OutStream. */ --extern OutStream err; -+MFEM_EXPORT extern OutStream err; - - - /** @brief Construct a string of the form "" where the -diff --git a/general/mem_manager.hpp b/general/mem_manager.hpp -index d73bb18..7d3337d 100644 ---- a/general/mem_manager.hpp -+++ b/general/mem_manager.hpp -@@ -12,6 +12,8 @@ - #ifndef MFEM_MEM_MANAGER_HPP - #define MFEM_MEM_MANAGER_HPP - -+#include "../config/config.hpp" -+#include "../mfem_export.h" - #include "globals.hpp" - #include "error.hpp" - #include // std::memcpy -@@ -553,7 +555,7 @@ private: - /** The MFEM memory manager class. Host-side pointers are inserted into this - manager which keeps track of the associated device pointer, and where the - data currently resides. */ --class MemoryManager -+class MFEM_EXPORT MemoryManager - { - private: - -@@ -1226,7 +1228,7 @@ inline int Memory::CompareHostAndDevice(int size) const - - - /// The (single) global memory manager object --extern MemoryManager mm; -+extern MFEM_EXPORT MemoryManager mm; - - } // namespace mfem - diff --git a/scripts/vcpkg_ports/mfem/portfile.cmake b/scripts/vcpkg_ports/mfem/portfile.cmake index 4cb2f65506..e42a639d04 100644 --- a/scripts/vcpkg_ports/mfem/portfile.cmake +++ b/scripts/vcpkg_ports/mfem/portfile.cmake @@ -1,10 +1,9 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO mfem/mfem - REF v4.5 - SHA512 86336441b180dde8392c59b82b78cb27073c40f00ebab0e3caefaaf9b0e418b077d43122da0f8b78f93e0e6b3b026d5adc16ecce02f38cdc9362e1dc2760e38a + REF v4.6 + SHA512 8805b4993b6f11abe7ac7dda59d0ddb2e0f5f6b09c2b9c57e665f481cd9bd6b669e63621b38989f70dc8ae38c42a7e8c4e10a1d87a4ac29d53ddd95ce79db0ae HEAD_REF master - PATCHES "./export-extern-vars.patch" ) set(_is_shared TRUE) @@ -45,24 +44,6 @@ file(REMOVE_RECURSE "${_config_dir}/mfem") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) # Note: Not tested file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - # Move dll files from lib to bin directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin ) - - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/mfem.dll - ${CURRENT_PACKAGES_DIR}/bin/mfem.dll) - - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/mfem.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/mfem.dll) - - # Update paths to dlls in CMake config files - foreach(_c debug release) - set(_f ${_config_dir}/MFEMTargets-${_c}.cmake) - file(READ ${_f} _fdata) - string(REPLACE "lib/mfem.dll" "bin/mfem.dll" _fdata "${_fdata}") - file(WRITE ${_f} "${_fdata}") - endforeach() endif() diff --git a/scripts/vcpkg_ports/mfem/vcpkg.json b/scripts/vcpkg_ports/mfem/vcpkg.json index 0cbb831039..9843f2dd7d 100644 --- a/scripts/vcpkg_ports/mfem/vcpkg.json +++ b/scripts/vcpkg_ports/mfem/vcpkg.json @@ -1,6 +1,6 @@ { "name": "mfem", - "version": "4.5", + "version": "4.6", "homepage": "http://mfem.org", "description": "Lightweight, general, scalable C++ library for finite element methods", "supports": "!uwp" diff --git a/scripts/vcpkg_ports/raja/portfile.cmake b/scripts/vcpkg_ports/raja/portfile.cmake index 7d56a4be2b..156a8bc61e 100644 --- a/scripts/vcpkg_ports/raja/portfile.cmake +++ b/scripts/vcpkg_ports/raja/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llnl/raja - REF v2022.03.1 - SHA512 36e2f59e0f4c3e8fcc07a21fc1eeec701c2be147db9395efedad9aa87bcc078e84a5334698c0fb3e2fbd3670c2eaacdebcd63c4caaa3721a3900ff02dfb44ad7 + REF v2024.07.0 + SHA512 7337d21dad05682c87145d23d09ae1c4cf627c21386e65a96f55beb0969cb2ef3cfaa38d5eaf5322ba04724707c6d993509b4ea6c2b679db6a3c4e5ac1d9b441 HEAD_REF develop ) @@ -71,7 +71,7 @@ else() # Update paths to dlls in CMake config files foreach(_c debug release) - set(_f ${_config_dir}/RAJA-${_c}.cmake) + set(_f ${_config_dir}/RAJATargets-${_c}.cmake) file(READ ${_f} _fdata) string(REPLACE "lib/RAJA.dll" "bin/RAJA.dll" _fdata "${_fdata}") file(WRITE ${_f} "${_fdata}") diff --git a/scripts/vcpkg_ports/raja/vcpkg.json b/scripts/vcpkg_ports/raja/vcpkg.json index 0162007b69..4fb005a0ad 100644 --- a/scripts/vcpkg_ports/raja/vcpkg.json +++ b/scripts/vcpkg_ports/raja/vcpkg.json @@ -1,6 +1,6 @@ { "name": "raja", - "version-string": "2022.03.1", + "version-string": "2024.07.0", "homepage": "https://github.com/llnl/raja", "description": "RAJA Performance Portability Layer (C++)", "dependencies": [ diff --git a/scripts/vcpkg_ports/umpire/portfile.cmake b/scripts/vcpkg_ports/umpire/portfile.cmake index 5fffdcccb3..20055a5882 100644 --- a/scripts/vcpkg_ports/umpire/portfile.cmake +++ b/scripts/vcpkg_ports/umpire/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO llnl/umpire - REF v2022.10.0 - SHA512 38bc74c360ee73e8ee04fbb652cff160551597a46af587f8c9da755cef591ae4add66d9af038a0a14722653d135007b01b37d3addf4d64ca0d1ed129e0461428 + REF v2024.07.0 + SHA512 c29c39b74641485e81bfaebc9eb2c36a2404e7866848d50f4dc6c576f03bf0ec3989d21ee0f8c573e40c11ad6c279054feefaf50ff7dcc2eb617c4ac60b8520d HEAD_REF develop ) @@ -25,6 +25,7 @@ vcpkg_configure_cmake( OPTIONS -DBLT_SOURCE_DIR:PATH=${CURRENT_INSTALLED_DIR}/share/blt -Dcamp_DIR:PATH=${CURRENT_INSTALLED_DIR} + -Dfmt_DIR:PATH=${CURRENT_INSTALLED_DIR} -DENABLE_ALL_WARNINGS:BOOL=OFF -DENABLE_WARNINGS_AS_ERRORS:BOOL=OFF -DENABLE_COVERAGE:BOOL=OFF @@ -58,38 +59,6 @@ message(STATUS "CURRENT_PACKAGES_DIR -- ${CURRENT_PACKAGES_DIR}") if(VCPKG_LIBRARY_LINKAGE STREQUAL static) # Note: Not tested file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) -else() - set(_config_dir "${CURRENT_PACKAGES_DIR}/share/umpire") - - # Move dll files from lib to bin directory - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ) - file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/bin ) - - file(RENAME ${CURRENT_PACKAGES_DIR}/lib/umpire.dll - ${CURRENT_PACKAGES_DIR}/bin/umpire.dll) - - file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/umpire.dll - ${CURRENT_PACKAGES_DIR}/debug/bin/umpire.dll) - - # Update paths to dlls in CMake config files - foreach(_c debug release) - set(_f ${_config_dir}/umpire-targets-${_c}.cmake) - file(READ ${_f} _fdata) - string(REPLACE "lib/umpire.dll" "bin/umpire.dll" _fdata "${_fdata}") - file(WRITE ${_f} "${_fdata}") - endforeach() - - # Fix erroneous "include" path appended as system include directories - set(_f ${_config_dir}/umpire-targets.cmake) - set(_pattern "INTERFACE_SYSTEM_INCLUDE_DIRECTORIES \"include.*") - file(STRINGS ${_f} _file_lines) - file(WRITE ${_f} "") - foreach(_line IN LISTS _file_lines) - #message(STATUS "\t\tRegex input: ${_line}") - string(REGEX REPLACE ${_pattern} "" _stripped "${_line}") - #message(STATUS "\t\tRegex output: ${_stripped}") - file(APPEND ${_f} "${_stripped}\n") - endforeach() endif() diff --git a/scripts/vcpkg_ports/umpire/vcpkg.json b/scripts/vcpkg_ports/umpire/vcpkg.json index e1616e17a7..274229bb48 100644 --- a/scripts/vcpkg_ports/umpire/vcpkg.json +++ b/scripts/vcpkg_ports/umpire/vcpkg.json @@ -1,11 +1,12 @@ { "name": "umpire", - "version-string": "2022.10.0", + "version-string": "2024.07.0", "homepage": "https://github.com/llnl/umpire", "description": "An application-focused API for memory management on NUMA and GPU architectures", "dependencies": [ "blt", - "camp" + "camp", + "fmt" ], "features": { "openmp": { diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a217514590..490a7d4ab6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -77,7 +77,7 @@ if (“${PROJECT_SOURCE_DIR}” STREQUAL “${CMAKE_SOURCE_DIR}”) endif() endforeach() - set(BLT_REQUIRED_CLANGFORMAT_VERSION "10" CACHE STRING "") + set(BLT_REQUIRED_CLANGFORMAT_VERSION "14" CACHE STRING "") configure_file(${CMAKE_CURRENT_SOURCE_DIR}/.clang-tidy ${CMAKE_CURRENT_BINARY_DIR}/.clang-tidy COPYONLY) @@ -129,6 +129,8 @@ if(AXOM_ENABLE_CUDA AND ${CMAKE_VERSION} VERSION_LESS 3.18.0) message(FATAL_ERROR "Axom requires CMake version 3.18.0+ when CUDA is enabled.") endif() +axom_add_code_checks() + #------------------------------------------------------------------------------ # Add source directories #------------------------------------------------------------------------------ diff --git a/src/axom/config.hpp.in b/src/axom/config.hpp.in index e2f278e54f..4cbdee0e29 100644 --- a/src/axom/config.hpp.in +++ b/src/axom/config.hpp.in @@ -13,20 +13,18 @@ * since it might be included from a C file */ - /* * Axom Version Information */ #define AXOM_VERSION_MAJOR @AXOM_VERSION_MAJOR@ #define AXOM_VERSION_MINOR @AXOM_VERSION_MINOR@ #define AXOM_VERSION_PATCH @AXOM_VERSION_PATCH@ -#define AXOM_VERSION_FULL "@AXOM_VERSION_FULL@" +#define AXOM_VERSION_FULL "@AXOM_VERSION_FULL@" /*NOTE: Do not add AXOM_GIT_SHA here. This will force * full rebuild on all local changes. It is added in axom::getVersion() * and axom::about(), as well as accessible from axom::gitSha(). */ - /* * Axom source location */ @@ -34,46 +32,44 @@ #define AXOM_BIN_DIR "@AXOM_BIN_DIR@" #cmakedefine AXOM_DATA_DIR "@AXOM_DATA_DIR@" -/* - * Indicates whether Axom is compiled with Annotations that can facilitate - * evaluation of performance with various performance tools. - */ -#cmakedefine AXOM_USE_ANNOTATIONS - /* * Platform specific definitions */ #define AXOM_CXX_STD "@BLT_CXX_STD@" #cmakedefine AXOM_CUDA_ARCH "@AXOM_CUDA_ARCH@" #cmakedefine AXOM_NO_INT64_T -#cmakedefine AXOM_USE_MPI3 #ifndef AXOM_NO_INT64_T #cmakedefine AXOM_USE_64BIT_INDEXTYPE #endif - /* * Compiler tests */ #cmakedefine USE_C_LOC_WITH_ASSUMED_SHAPE +/* + * Compiler defines for programming models + */ +#cmakedefine AXOM_USE_CUDA +#cmakedefine AXOM_USE_HIP +#cmakedefine AXOM_USE_MPI +#cmakedefine AXOM_USE_MPI3 +#cmakedefine AXOM_USE_MPIF_HEADER +#cmakedefine AXOM_USE_OPENMP /* * Compiler defines for libraries (built-in and third party) */ +#cmakedefine AXOM_USE_ADIAK #cmakedefine AXOM_USE_C2C +#cmakedefine AXOM_USE_CALIPER #cmakedefine AXOM_USE_CLI11 #cmakedefine AXOM_USE_CONDUIT -#cmakedefine AXOM_USE_CUDA -#cmakedefine AXOM_USE_HIP #cmakedefine AXOM_USE_FMT #cmakedefine AXOM_USE_HDF5 #cmakedefine AXOM_USE_LUA #cmakedefine AXOM_USE_MFEM -#cmakedefine AXOM_USE_MPI -#cmakedefine AXOM_USE_MPIF_HEADER -#cmakedefine AXOM_USE_OPENMP #cmakedefine AXOM_USE_RAJA #cmakedefine AXOM_USE_SCR #cmakedefine AXOM_USE_SOL @@ -96,14 +92,13 @@ #define NOMINMAX #endif - /* * Compiler defines for Axom components */ #cmakedefine AXOM_USE_INLET #cmakedefine AXOM_USE_KLEE -#cmakedefine AXOM_USE_MINT #cmakedefine AXOM_USE_LUMBERJACK +#cmakedefine AXOM_USE_MINT #cmakedefine AXOM_USE_PRIMAL #cmakedefine AXOM_USE_QUEST #cmakedefine AXOM_USE_SIDRE @@ -119,7 +114,6 @@ */ #cmakedefine AXOM_DEPRECATED_TYPES_N @AXOM_DEPRECATED_TYPES_N@ - /* * Compiler defines to configure the built-in fmt library */ @@ -132,11 +126,9 @@ #cmakedefine SPARSEHASH_HASHFUN_HEADER @SPARSEHASH_HASHFUN_HEADER@ #cmakedefine SPARSEHASH_HASHFUN_NAMESPACE @SPARSEHASH_HASHFUN_NAMESPACE@ - /* * Disable some MSVC warnings related to shared libraries, if applicable */ @AXOM_MSVC_PRAGMAS@ - -#endif /* AXOM_COMMON_CONFIG_HPP */ +#endif /* AXOM_COMMON_CONFIG_HPP */ diff --git a/src/axom/core/AnnotationMacros.hpp b/src/axom/core/AnnotationMacros.hpp new file mode 100644 index 0000000000..33e9d8c085 --- /dev/null +++ b/src/axom/core/AnnotationMacros.hpp @@ -0,0 +1,59 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +#ifndef AXOM_ANNOTATION_MACROS_HPP_ +#define AXOM_ANNOTATION_MACROS_HPP_ + +#include "axom/config.hpp" +#include "axom/core/utilities/Annotations.hpp" + +/*! + * \def AXOM_ANNOTATE_BEGIN( name ) + * + * \brief This macro is used to mark the beginning of an annotated region + * \note \a AXOM_ANNOTATE_BEGIN must be closed with a matching \a AXOM_ANNOTATE_END + */ +#define AXOM_ANNOTATE_BEGIN(name) axom::utilities::annotations::begin(name) + +/*! + * \def AXOM_ANNOTATE_END( name ) + * + * \brief This macro is used to mark the end of an annotated region + * \note \a AXOM_ANNOTATE_END must close a matching \a AXOM_ANNOTATE_BEGIN + */ +#define AXOM_ANNOTATE_END(name) axom::utilities::annotations::end(name) + +/*! + * \def AXOM_ANNOTATE_SCOPE( name ) + * \brief This macro is used to annotate a region within an enclosing scope + * and is automatically closed when its enclosing scope ends + * + * \warning The \a AXOM_ANNOTATE_SCOPE can only be called once within a given scope + * + * \note \a AXOM_ANNOTATE_SCOPE only annotates the portion of the scope following this macro. + * It adds a variable whose constructor begins an annotation region and whose destructor, + * which is called at the end of the scope, ends the annotation region. + */ +#ifdef AXOM_USE_CALIPER + #define AXOM_ANNOTATE_SCOPE(name) \ + cali::Annotation::Guard cali_autogenerated_guard_name( \ + cali::Annotation("region").begin(std::string(name).c_str())) +#else + #define AXOM_ANNOTATE_SCOPE(name) \ + do \ + { \ + } while(false) +#endif + +/*! + * \def AXOM_ANNOTATE_METADATA( name, value, category ) + * \brief This macro is used to add metadata to the run and is added to caliper output + * in modes that generate an output file. + * \see axom::utilities::annotations::declare_metadata + */ +#define AXOM_ANNOTATE_METADATA(name, value, category) \ + axom::utilities::annotations::declare_metadata(name, value, category) + +#endif // AXOM_ANNOTATION_MACROS_HPP_ diff --git a/src/axom/core/Array.hpp b/src/axom/core/Array.hpp index 79ecb009f4..a868787471 100644 --- a/src/axom/core/Array.hpp +++ b/src/axom/core/Array.hpp @@ -7,6 +7,7 @@ #define AXOM_ARRAY_HPP_ #include "axom/config.hpp" +#include "axom/core/MDMapping.hpp" #include "axom/core/Macros.hpp" #include "axom/core/utilities/Utilities.hpp" #include "axom/core/Types.hpp" @@ -60,10 +61,13 @@ struct ArrayTraits> * * The Array class mirrors std::vector, with future support for GPUs * in-development. The class's multidimensional array functionality roughly - mirrors the multidimensional array support provided by numpy's ndarray. - * + * mirrors the multidimensional array support provided by numpy's ndarray. + * * \see https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html - * + * + * Some interfaces accomodate data ordering specifications. + * Unless otherwise specified, data storage defaults to row-major. + * * This class is meant to be a drop-in replacement for std::vector. * However, it differs in its memory management and construction semantics. * Specifically, we do not require axom::Array to initialize/construct @@ -161,6 +165,31 @@ class Array : public ArrayBase> Array(const axom::StackArray& shape, int allocator_id = axom::detail::getAllocatorID()); + /*! + \brief Construct Array with row- or column-major data ordering. + + \pre rowOrColumn must be either ArrayStrideOrder::ROW or + ArrayStrideOrder::COLUMN (or, if DIM is 1, ArrayStrideOrder::BOTH). + */ + Array(const axom::StackArray& shape, + axom::ArrayStrideOrder rowOrColumn, + int allocator_id = axom::detail::getAllocatorID()); + + /*! + \brief Construct Array with data ordering specifications. + + Example of 3D Array where j is slowest and i is fastest: + Array<3, int> ar( + shape, + axom::StackArray{2, 0, 1}); + + \pre slowestDirs must be a permutation of [0 ... DIM-1] + */ + template + Array(const axom::StackArray& shape, + const axom::StackArray& slowestDirs, + int allocator_id = axom::detail::getAllocatorID()); + /*! * \brief Generic constructor for an Array of arbitrary dimension * @@ -268,12 +297,11 @@ class Array : public ArrayBase> { srcSpace = axom::detail::getAllocatorSpace(other.m_allocator_id); } - OpHelper::fill_range(m_data, - 0, - other.size(), - m_allocator_id, - other.data(), - srcSpace); + OpHelper {m_allocator_id, m_executeOnGPU}.fill_range(m_data, + 0, + other.size(), + other.data(), + srcSpace); updateNumElements(other.size()); } @@ -597,13 +625,34 @@ class Array : public ArrayBase> * \param [in] value the value to be added to the back. * * \note Reallocation is done if the new size will exceed the capacity. - * \note If used in a device kernel, the number of push_backs must not exceed - * the capacity, since device-side reallocations aren't supported. - * \note Array must be allocated in unified memory if calling on the device. - * + * * \pre DIM == 1 */ - AXOM_HOST_DEVICE void push_back(const T& value); + void push_back(const T& value); + + /*! + * \brief Push a value to the back of the array. + * + * \param [in] value the value to move to the back. + * + * \note Reallocation is done if the new size will exceed the capacity. + * + * \pre DIM == 1 + */ + void push_back(T&& value); + + /*! + * \brief Inserts new element at the end of the Array. + * + * \param [in] args the arguments to forward to constructor of the element. + * + * \note Reallocation is done if the new size will exceed the capacity. + * \note The size increases by 1. + * + * \pre DIM == 1 + */ + template + void emplace_back(Args&&... args); /*! * \brief Push a value to the back of the array. @@ -614,10 +663,13 @@ class Array : public ArrayBase> * \note If used in a device kernel, the number of push_backs must not exceed * the capacity, since device-side reallocations aren't supported. * \note Array must be allocated in unified memory if calling on the device. - * + * * \pre DIM == 1 */ - AXOM_HOST_DEVICE void push_back(T&& value); + /// @{ + AXOM_HOST_DEVICE void push_back_device(const T& value); + AXOM_HOST_DEVICE void push_back_device(T&& value); + /// @} /*! * \brief Inserts new element at the end of the Array. @@ -629,11 +681,11 @@ class Array : public ArrayBase> * \note If used in a device kernel, the number of push_backs must not exceed * the capacity, since device-side reallocations aren't supported. * \note Array must be allocated in unified memory if calling on the device. - * + * * \pre DIM == 1 */ template - AXOM_HOST_DEVICE void emplace_back(Args&&... args); + AXOM_HOST_DEVICE void emplace_back_device(Args&&... args); /// @} @@ -790,7 +842,17 @@ class Array : public ArrayBase> /*! * \brief Get the ID for the umpire allocator */ - int getAllocatorID() const { return m_allocator_id; } + AXOM_HOST_DEVICE int getAllocatorID() const { return m_allocator_id; } + + /*! + * \brief Sets the preferred space where operations on this array should be + * performed. + * + * This option only has an effect for memory which is both accessible on the + * CPU and the GPU. For CUDA this is the Unified and Pinned memory spaces, + * while for HIP this is the Unified, Pinned, and Device memory spaces. + */ + void setDevicePreference(bool on_device) { m_executeOnGPU = on_device; } /*! * \brief Returns a view of the array @@ -905,6 +967,7 @@ class Array : public ArrayBase> IndexType m_capacity = 0; double m_resize_ratio = DEFAULT_RESIZE_RATIO; int m_allocator_id; + bool m_executeOnGPU; }; /// \brief Helper alias for multi-component arrays @@ -933,6 +996,38 @@ Array::Array(const axom::StackArray& shape, false); } +//------------------------------------------------------------------------------ +template +Array::Array(const axom::StackArray& shape, + axom::ArrayStrideOrder rowOrColumn, + int allocator_id) + : ArrayBase>( + shape, + MDMapping {shape, rowOrColumn, 1}) + , m_allocator_id(allocator_id) +{ + assert(rowOrColumn == axom::ArrayStrideOrder::ROW || + rowOrColumn == axom::ArrayStrideOrder::COLUMN || + (DIM == 1 && rowOrColumn == axom::ArrayStrideOrder::BOTH)); + initialize(detail::packProduct(shape.m_data), + detail::packProduct(shape.m_data), + false); +} + +//------------------------------------------------------------------------------ +template +template +Array::Array(const axom::StackArray& shape, + const axom::StackArray& slowestDirs, + int allocator_id) + : ArrayBase>(shape, {shape, slowestDirs, 1}) + , m_allocator_id(allocator_id) +{ + initialize(detail::packProduct(shape.m_data), + detail::packProduct(shape.m_data), + false); +} + //------------------------------------------------------------------------------ template template @@ -1038,7 +1133,7 @@ AXOM_HOST_DEVICE Array::Array(const Array& other) "Use axom::ArrayView for value captures instead.\n"); #endif #if defined(__CUDA_ARCH__) - __trap(); + assert(false); #endif #else initialize(other.size(), other.capacity()); @@ -1049,12 +1144,11 @@ AXOM_HOST_DEVICE Array::Array(const Array& other) { srcSpace = axom::detail::getAllocatorSpace(other.m_allocator_id); } - OpHelper::fill_range(m_data, - 0, - m_num_elements, - m_allocator_id, - other.data(), - srcSpace); + OpHelper {m_allocator_id, m_executeOnGPU}.fill_range(m_data, + 0, + m_num_elements, + other.data(), + srcSpace); #endif } @@ -1153,8 +1247,8 @@ Array::~Array() template inline void Array::fill(const T& value) { - OpHelper::destroy(m_data, 0, m_num_elements, m_allocator_id); - OpHelper::fill(m_data, 0, m_num_elements, m_allocator_id, value); + OpHelper {m_allocator_id, m_executeOnGPU}.destroy(m_data, 0, m_num_elements); + OpHelper {m_allocator_id, m_executeOnGPU}.fill(m_data, 0, m_num_elements, value); } //------------------------------------------------------------------------------ @@ -1164,8 +1258,8 @@ inline void Array::fill(const T& value, IndexType n, IndexType po assert(pos >= 0); assert(pos + n <= m_num_elements); - OpHelper::destroy(m_data, pos, n, m_allocator_id); - OpHelper::fill(m_data, pos, n, m_allocator_id, value); + OpHelper {m_allocator_id, m_executeOnGPU}.destroy(m_data, pos, n); + OpHelper {m_allocator_id, m_executeOnGPU}.fill(m_data, pos, n, value); } //------------------------------------------------------------------------------ @@ -1176,17 +1270,24 @@ inline void Array::set(const T* elements, IndexType n, IndexType assert(pos >= 0); assert(pos + n <= m_num_elements); - OpHelper::destroy(m_data, pos, n, m_allocator_id); - OpHelper::fill_range(m_data, pos, n, m_allocator_id, elements, MemorySpace::Dynamic); + OpHelper {m_allocator_id, m_executeOnGPU}.destroy(m_data, pos, n); + OpHelper {m_allocator_id, m_executeOnGPU}.fill_range(m_data, + pos, + n, + elements, + MemorySpace::Dynamic); } //------------------------------------------------------------------------------ template inline void Array::clear() { - OpHelper::destroy(m_data, 0, m_num_elements, m_allocator_id); + if(m_num_elements > 0) + { + OpHelper {m_allocator_id, m_executeOnGPU}.destroy(m_data, 0, m_num_elements); - updateNumElements(0); + updateNumElements(0); + } } //------------------------------------------------------------------------------ @@ -1196,7 +1297,7 @@ inline void Array::insert(IndexType pos, const T& value) static_assert(DIM == 1, "Insertion not supported for multidimensional Arrays"); reserveForInsert(1, pos); - OpHelper::emplace(m_data, pos, m_allocator_id, value); + OpHelper {m_allocator_id, m_executeOnGPU}.emplace(m_data, pos, value); } //------------------------------------------------------------------------------ @@ -1217,7 +1318,11 @@ inline void Array::insert(IndexType pos, IndexType n, const T* va { assert(values != nullptr); reserveForInsert(n, pos); - OpHelper::fill_range(m_data, pos, n, m_allocator_id, values, MemorySpace::Dynamic); + OpHelper {m_allocator_id, m_executeOnGPU}.fill_range(m_data, + pos, + n, + values, + MemorySpace::Dynamic); } //------------------------------------------------------------------------------ @@ -1239,7 +1344,7 @@ inline void Array::insert(IndexType pos, IndexType n, const T& va { static_assert(DIM == 1, "Insertion not supported for multidimensional Arrays"); reserveForInsert(n, pos); - OpHelper::fill(m_data, pos, n, m_allocator_id, value); + OpHelper {m_allocator_id, m_executeOnGPU}.fill(m_data, pos, n, value); } //------------------------------------------------------------------------------ @@ -1277,8 +1382,11 @@ inline typename Array::ArrayIterator Array::erase( IndexType posIdx = pos - begin(); // Destroy element at posIdx and shift elements over by 1 - OpHelper::destroy(m_data, posIdx, 1, m_allocator_id); - OpHelper::move(m_data, posIdx + 1, m_num_elements, posIdx, m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.destroy(m_data, posIdx, 1); + OpHelper {m_allocator_id, m_executeOnGPU}.move(m_data, + posIdx + 1, + m_num_elements, + posIdx); updateNumElements(m_num_elements - 1); return ArrayIterator(posIdx, this); @@ -1303,10 +1411,13 @@ inline typename Array::ArrayIterator Array::erase( IndexType firstIdx = first - begin(); IndexType lastIdx = last - begin(); IndexType nelems = last - first; - OpHelper::destroy(m_data, firstIdx, nelems, m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.destroy(m_data, firstIdx, nelems); // Shift [last, end) elements over - OpHelper::move(m_data, lastIdx, m_num_elements, firstIdx, m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.move(m_data, + lastIdx, + m_num_elements, + firstIdx); IndexType count = lastIdx - firstIdx; updateNumElements(m_num_elements - count); @@ -1319,7 +1430,9 @@ template inline void Array::emplace(IndexType pos, Args&&... args) { reserveForInsert(1, pos); - OpHelper::emplace(m_data, pos, m_allocator_id, std::forward(args)...); + OpHelper {m_allocator_id, m_executeOnGPU}.emplace(m_data, + pos, + std::forward(args)...); } //------------------------------------------------------------------------------ @@ -1336,7 +1449,7 @@ inline typename Array::ArrayIterator Array::emplac //------------------------------------------------------------------------------ template -AXOM_HOST_DEVICE inline void Array::push_back(const T& value) +inline void Array::push_back(const T& value) { static_assert(DIM == 1, "push_back is only supported for 1D arrays"); emplace_back(value); @@ -1344,16 +1457,42 @@ AXOM_HOST_DEVICE inline void Array::push_back(const T& value) //------------------------------------------------------------------------------ template -AXOM_HOST_DEVICE inline void Array::push_back(T&& value) +inline void Array::push_back(T&& value) { static_assert(DIM == 1, "push_back is only supported for 1D arrays"); emplace_back(std::move(value)); } +//------------------------------------------------------------------------------ +AXOM_SUPPRESS_HD_WARN +template +AXOM_HOST_DEVICE inline void Array::push_back_device(const T& value) +{ + static_assert(DIM == 1, "push_back_device is only supported for 1D arrays"); + emplace_back_device(value); +} + +//------------------------------------------------------------------------------ +template +AXOM_HOST_DEVICE inline void Array::push_back_device(T&& value) +{ + static_assert(DIM == 1, "push_back_device is only supported for 1D arrays"); + emplace_back_device(std::move(value)); +} + +//------------------------------------------------------------------------------ +template +template +inline void Array::emplace_back(Args&&... args) +{ + static_assert(DIM == 1, "emplace_back is only supported for 1D arrays"); + emplace(size(), std::forward(args)...); +} + //------------------------------------------------------------------------------ template template -AXOM_HOST_DEVICE inline void Array::emplace_back(Args&&... args) +AXOM_HOST_DEVICE inline void Array::emplace_back_device(Args&&... args) { static_assert(DIM == 1, "emplace_back is only supported for 1D arrays"); #ifdef AXOM_DEVICE_CODE @@ -1389,28 +1528,28 @@ inline void Array::resizeImpl(const StackArray& d if(value) { // Copy-construct new elements with value - OpHelper::fill(m_data, - prev_num_elements, - new_num_elements - prev_num_elements, - m_allocator_id, - *value); + OpHelper {m_allocator_id, m_executeOnGPU}.fill( + m_data, + prev_num_elements, + new_num_elements - prev_num_elements, + *value); } else { // Default-initialize the new elements - OpHelper::init(m_data, - prev_num_elements, - new_num_elements - prev_num_elements, - m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.init( + m_data, + prev_num_elements, + new_num_elements - prev_num_elements); } } else if(prev_num_elements > new_num_elements) { // Destroy any elements above new_num_elements - OpHelper::destroy(m_data, - new_num_elements, - prev_num_elements - new_num_elements, - m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.destroy( + m_data, + new_num_elements, + prev_num_elements - new_num_elements); } updateNumElements(new_num_elements); @@ -1449,7 +1588,7 @@ inline void Array::initialize(IndexType num_elements, setCapacity(capacity); if(default_construct) { - OpHelper::init(m_data, 0, num_elements, m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.init(m_data, 0, num_elements); } updateNumElements(num_elements); @@ -1482,13 +1621,13 @@ inline void Array::initialize_from_other( m_allocator_id = axom::detail::getAllocatorID(); } this->setCapacity(num_elements); - // Use fill_range to ensure that copy constructors are invoked for each element - OpHelper::fill_range(m_data, - 0, - num_elements, - m_allocator_id, - other_data, - other_data_space); + // Use fill_range to ensure that copy constructors are invoked for each + // element. + OpHelper {m_allocator_id, m_executeOnGPU}.fill_range(m_data, + 0, + num_elements, + other_data, + other_data_space); this->updateNumElements(num_elements); } @@ -1511,7 +1650,10 @@ inline T* Array::reserveForInsert(IndexType n, IndexType pos) dynamicRealloc(new_size); } - OpHelper::move(m_data, pos, m_num_elements, pos + n, m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.move(m_data, + pos, + m_num_elements, + pos + n); updateNumElements(new_size); return m_data + pos; @@ -1539,7 +1681,7 @@ AXOM_DEVICE inline IndexType Array::reserveForDeviceInsert(IndexT "on the device.\n"); #endif #ifdef AXOM_USE_CUDA - __trap(); + assert(false); #elif defined(AXOM_USE_HIP) abort(); #endif @@ -1573,7 +1715,9 @@ inline void Array::setCapacity(IndexType new_capacity) // Create a new block of memory, and move the elements over. T* new_data = axom::allocate(new_capacity, m_allocator_id); - OpHelper::realloc_move(new_data, m_num_elements, m_data, m_allocator_id); + OpHelper {m_allocator_id, m_executeOnGPU}.realloc_move(new_data, + m_num_elements, + m_data); // Destroy the original array. axom::deallocate(m_data); @@ -1590,7 +1734,12 @@ template inline void Array::dynamicRealloc(IndexType new_num_elements) { assert(m_resize_ratio >= 1.0); - IndexType new_capacity = new_num_elements * m_resize_ratio + 0.5; + + // Using resize strategy from LLVM libc++ (vector::__recommend()): + // new_capacity = max(capacity() * resize_ratio, new_num_elements) + IndexType new_capacity = + axom::utilities::max(this->capacity() * m_resize_ratio + 0.5, + new_num_elements); const IndexType block_size = this->blockSize(); const IndexType remainder = new_capacity % block_size; if(remainder != 0) diff --git a/src/axom/core/ArrayBase.hpp b/src/axom/core/ArrayBase.hpp index 1e54da7a3d..fa9a212dfe 100644 --- a/src/axom/core/ArrayBase.hpp +++ b/src/axom/core/ArrayBase.hpp @@ -8,6 +8,7 @@ #include "axom/config.hpp" // for compile-time defines #include "axom/core/Macros.hpp" // for axom macros +#include "axom/core/MDMapping.hpp" // for index conversion #include "axom/core/memory_management.hpp" // for memory allocation functions #include "axom/core/utilities/Utilities.hpp" // for processAbort() #include "axom/core/Types.hpp" // for IndexType definition @@ -156,9 +157,10 @@ class ArrayBase constexpr static int Dims = DIM; - AXOM_HOST_DEVICE ArrayBase() : m_shape {} + //! @brief Construct row-major, unitnitialized array. + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE ArrayBase() : m_shape(), m_mapping(ArrayStrideOrder::ROW) { - m_strides[DIM - 1] = 1; updateStrides(); } @@ -169,13 +171,32 @@ class ArrayBase * \param [in] min_stride The minimum stride between two consecutive * elements in row-major order. */ + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE ArrayBase(const StackArray& shape, int min_stride = 1) : m_shape {shape} - { - m_strides[DIM - 1] = min_stride; - updateStrides(); - } + , m_mapping(shape, ArrayStrideOrder::ROW, min_stride) + , m_minStride(m_mapping.fastestStrideLength()) + { } + + /*! + * \brief Parameterized constructor that sets up the array shape, + * with an MDMapping to specify data ordering. + * + * \param [in] shape Array size in each direction. + * \param [in] mapping Model mapper, specifying + * the array stride order and minimum stride. + * + * The object is constructed with the given shape, + * not the partial shape information in \c mapping. + */ + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE ArrayBase(const StackArray& shape, + const MDMapping& mapping) + : m_shape {shape} + , m_mapping(shape, mapping.slowestDirs(), mapping.fastestStrideLength()) + , m_minStride(m_mapping.fastestStrideLength()) + { } /*! * \brief Parameterized constructor that sets up the array shape and stride. @@ -186,8 +207,9 @@ class ArrayBase AXOM_HOST_DEVICE ArrayBase(const StackArray& shape, const StackArray& stride) : m_shape {shape} - , m_strides {stride} { + m_mapping.initializeStrides(stride, ArrayStrideOrder::ROW); + m_minStride = m_mapping.fastestStrideLength(); validateShapeAndStride(shape, stride); } @@ -199,18 +221,20 @@ class ArrayBase * memory spaces */ template - ArrayBase( + AXOM_HOST_DEVICE ArrayBase( const ArrayBase::type, DIM, OtherArrayType>& other) : m_shape(other.shape()) - , m_strides(other.strides()) + , m_mapping(other.mapping()) + , m_minStride(m_mapping.fastestStrideLength()) { } /// \overload template - ArrayBase( + AXOM_HOST_DEVICE ArrayBase( const ArrayBase::type, DIM, OtherArrayType>& other) : m_shape(other.shape()) - , m_strides(other.strides()) + , m_mapping(other.mapping()) + , m_minStride(m_mapping.fastestStrideLength()) { } /*! @@ -325,7 +349,8 @@ class ArrayBase void swap(ArrayBase& other) { std::swap(m_shape, other.m_shape); - std::swap(m_strides, other.m_strides); + std::swap(m_mapping, other.m_mapping); + std::swap(m_minStride, other.m_minStride); } /// \brief Returns the dimensions of the Array @@ -334,26 +359,21 @@ class ArrayBase return m_shape; } + /// \brief Returns the multidimensional mapping for the Array + AXOM_HOST_DEVICE const MDMapping& mapping() const { return m_mapping; } + /*! * \brief Returns the memory strides of the Array. */ AXOM_HOST_DEVICE const StackArray& strides() const { - return m_strides; + return m_mapping.strides(); } /*! * \brief Returns the minimum stride between adjacent items. */ - AXOM_HOST_DEVICE IndexType minStride() const - { - IndexType minStride = m_strides[0]; - for(int dim = 1; dim < DIM; dim++) - { - minStride = axom::utilities::min(minStride, m_strides[dim]); - } - return minStride; - } + AXOM_HOST_DEVICE inline IndexType minStride() const { return m_minStride; } protected: /// \brief Set the shape @@ -371,6 +391,7 @@ class ArrayBase } /// \brief Set the shape and stride + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE void setShapeAndStride(const StackArray& shape, const StackArray& stride) { @@ -378,7 +399,8 @@ class ArrayBase validateShapeAndStride(shape, stride); #endif m_shape = shape; - m_strides = stride; + m_mapping.initializeStrides(stride); + m_minStride = m_mapping.fastestStrideLength(); } /*! @@ -387,22 +409,21 @@ class ArrayBase * This is used when resizing/reallocating; it wouldn't make sense to have a * capacity of 3 in the array described above. */ - IndexType blockSize() const { return m_strides[0]; } + IndexType blockSize() const + { + auto slowestDir = m_mapping.slowestDirs()[0]; + return m_mapping.strides()[slowestDir]; + } /*! * \brief Updates the internal striding information to a row-major format * Intended to be called after shape is updated. - * In the future, this class will support different striding schemes (e.g., column-major) - * and/or user-provided striding */ - AXOM_HOST_DEVICE void updateStrides() + AXOM_HOST_DEVICE void updateStrides(int min_stride = 1) { - // Row-major - // Note that the fastest stride is not updated. It's unaffected by shape. - for(int i = static_cast(DIM) - 2; i >= 0; i--) - { - m_strides[i] = m_strides[i + 1] * m_shape[i + 1]; - } + // Update m_mapping strides while preserving stride order. + m_mapping.initializeShape(m_shape, m_mapping.slowestDirs(), min_stride); + m_minStride = m_mapping.fastestStrideLength(); } /*! @@ -439,7 +460,7 @@ class ArrayBase //// \brief Memory offset to get to the given multidimensional index. AXOM_HOST_DEVICE IndexType offset(const StackArray& idx) const { - return numerics::dot_product((const IndexType*)idx, m_strides.begin(), DIM); + return m_mapping.toFlatIndex(idx); } /*! @@ -450,21 +471,24 @@ class ArrayBase */ AXOM_HOST_DEVICE IndexType memorySize() const { - IndexType maxSize = 0; - for(int dim = 0; dim < DIM; dim++) - { - maxSize = axom::utilities::max(maxSize, m_strides[dim] * m_shape[dim]); - } - return maxSize; + auto slowestDir = m_mapping.slowestDirs()[0]; + return m_mapping.strides()[slowestDir] * m_shape[slowestDir]; } - /// \brief Memory offset to a slice at the given lower-dimensional index. + /*! + \brief Memory offset to a slice at the given lower-dimensional index. + + Allowed only for row-major arrays. + + @pre mapping().getStrideOrder() & ArrayStrideOrder::ROW == true + */ template AXOM_HOST_DEVICE IndexType offset(const StackArray& idx) const { static_assert(UDim <= DIM, "Index dimensions cannot be larger than array dimensions"); - return numerics::dot_product(idx.begin(), m_strides.begin(), UDim); + assert(mapping().getStrideOrder() & ArrayStrideOrder::ROW); + return numerics::dot_product(idx.begin(), m_mapping.strides().begin(), UDim); } /// \name Internal bounds-checking routines @@ -547,8 +571,16 @@ class ArrayBase protected: /// \brief The extent in each direction StackArray m_shape; - /// \brief Logical strides in each direction - StackArray m_strides; + /// \brief For converting between multidim indices and offset. + MDMapping m_mapping; + /*! \brief Cached value for optimization. @see minStride() + + For some reason, computing min stride in minStride() slows down + flatIndex() for CUDA and HIP, even though it doesn't seem tricky + to optimize. As a work around, we cache the value in m_minStrides + and update it when m_mapping changes. BTNG, March 2024. + */ + IndexType m_minStride; }; /// \brief Array implementation specific to 1D Arrays @@ -579,14 +611,20 @@ class ArrayBase : m_stride(stride[0]) { } + AXOM_HOST_DEVICE ArrayBase(const StackArray&, + const MDMapping<1>& mapping) + : m_stride(mapping.strides()[0]) + { } + // Empty implementation because no member data template - ArrayBase(const ArrayBase::type, 1, OtherArrayType>&) + AXOM_HOST_DEVICE ArrayBase( + const ArrayBase::type, 1, OtherArrayType>&) { } // Empty implementation because no member data template - ArrayBase( + AXOM_HOST_DEVICE ArrayBase( const ArrayBase::type, 1, OtherArrayType>&) { } @@ -597,6 +635,13 @@ class ArrayBase return {{asDerived().size()}}; } + /// \brief Returns the multidimensional mapping for the Array + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE MDMapping<1> mapping() const + { + return MDMapping<1> {{m_stride}}; + } + /*! * \brief Returns the stride between adjacent items. */ @@ -845,11 +890,18 @@ struct all_types_are_integral static constexpr bool value = all_types_are_integral_impl::value; }; -template +enum class OperationSpace +{ + Host, + Device, + Unified_Device +}; + +template struct ArrayOpsBase; template -struct ArrayOpsBase +struct ArrayOpsBase { using DefaultCtorTag = std::is_default_constructible; @@ -1025,8 +1077,133 @@ struct ArrayOpsBase }; #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) +/*! + * \name Tag types for device initialization + */ +/// @{ + +/*! + * \brief Tag type representing that a type can be initialized on the device. + * + * This only applies to types which are trivially device-constructible. + */ +struct InitTypeOnDevice +{ }; +/*! + * \brief Tag type representing that a type can be initialized on the device. + * + * This applies to types which are not trivially default-constructible, but are + * trivially-copyable; we can construct a default value on the host and copy- + * construct values with it on the device. + */ +struct InitTypeOnDeviceWithCopy +{ }; +/*! + * \brief Tag type representing that a type cannot be initialized on the device. + */ +struct InitTypeOnHost +{ }; + +/*! + * \brief Selector type which matches a type to its corresponding initialization + * tag type. + */ +template +struct DeviceInitTag +{ + using Type = InitTypeOnHost; +}; + +template +struct DeviceInitTag::value>> +{ + using Type = InitTypeOnDevice; +}; + +template +struct DeviceInitTag::value && + std::is_default_constructible::value && + std::is_trivially_copyable::value>> +{ + using Type = InitTypeOnDeviceWithCopy; +}; +/// @} + +template +struct DeviceStagingBuffer; + +template +struct DeviceStagingBuffer +{ + /*! + * \brief Create a staging buffer for a device memory operation. + * + * \param [in] data the array to mirror on the CPU + * \param [in] begin the beginning index of the range to mirror + * \param [in] nelems the number of elements to mirror + * \param [in] read_from_data if true, copies existing data range to the + * staging buffer during construction + */ + DeviceStagingBuffer(T* data, + IndexType begin, + IndexType nelems, + bool read_from_data = false) + : m_data(data) + , m_begin(begin) + , m_num_elems(nelems) + { + int allocator_id = 0; + #ifdef AXOM_USE_UMPIRE + allocator_id = axom::detail::getAllocatorID(); + #endif + m_staging_buf = axom::allocate(nelems, allocator_id); + if(read_from_data) + { + axom::copy(m_staging_buf, m_data + begin, sizeof(T) * nelems); + } + } + + DISABLE_COPY_AND_ASSIGNMENT(DeviceStagingBuffer); + DISABLE_MOVE_AND_ASSIGNMENT(DeviceStagingBuffer); + + ~DeviceStagingBuffer() + { + // Copy back staging data to destination buffer. + axom::copy(m_data + m_begin, m_staging_buf, m_num_elems * sizeof(T)); + axom::deallocate(m_staging_buf); + } + + T* getStagingBuffer() const { return static_cast(m_staging_buf); } + + T* m_staging_buf; + T* m_data; + IndexType m_begin; + IndexType m_num_elems; +}; + template -struct ArrayOpsBase +struct DeviceStagingBuffer +{ + DeviceStagingBuffer(T* data, + IndexType begin, + IndexType nelems, + bool read_from_data = false) + : m_data(data) + , m_begin(begin) + { + AXOM_UNUSED_VAR(nelems); + AXOM_UNUSED_VAR(read_from_data); + } + + T* getStagingBuffer() const { return static_cast(m_data + m_begin); } + + T* m_data; + IndexType m_begin; +}; + +template +struct ArrayOpsBase { #if defined(__CUDACC__) using ExecSpace = axom::CUDA_EXEC<256>; @@ -1034,17 +1211,11 @@ struct ArrayOpsBase using ExecSpace = axom::HIP_EXEC<256>; #endif - static constexpr bool InitOnDevice = - std::is_trivially_default_constructible::value; static constexpr bool DestroyOnHost = !std::is_trivially_destructible::value; static constexpr bool DefaultCtor = std::is_default_constructible::value; - struct TrivialDefaultCtorTag - { }; - struct NontrivialDefaultCtorTag - { }; - struct NoDefaultCtorTag - { }; + using HostOp = ArrayOpsBase; + using StagingBuffer = DeviceStagingBuffer; /*! * \brief Helper for default-initialization of a range of elements. @@ -1052,36 +1223,25 @@ struct ArrayOpsBase * \param [inout] data The data to initialize * \param [in] begin The beginning of the subset of \a data that should be initialized * \param [in] nelems the number of elements to initialize - * \note Specialization for when T is nontrivially default-constructible. + * \note Specialization for when T is only initializable on the host. */ - static void init_impl(T* data, - IndexType begin, - IndexType nelems, - NontrivialDefaultCtorTag) + static void init_impl(T* data, IndexType begin, IndexType nelems, InitTypeOnHost) { - // If we instantiated a fill kernel here it would require - // that T's default ctor is device-annotated which is too - // strict of a requirement, so we copy a buffer instead. - void* tmp_buffer = ::operator new(sizeof(T) * nelems); - T* typed_buffer = static_cast(tmp_buffer); - for(IndexType i = 0; i < nelems; ++i) + if(std::is_default_constructible::value) { - // We use placement-new to avoid calling destructors in the delete - // statement below. - new(typed_buffer + i) T(); + // If we instantiated a fill kernel here it would require + // that T's default ctor is device-annotated which is too + // strict of a requirement, so we copy a buffer instead. + StagingBuffer tmp_buf(data, begin, nelems); + HostOp::init(tmp_buf.getStagingBuffer(), 0, nelems); } - axom::copy(data + begin, tmp_buffer, nelems * sizeof(T)); - ::operator delete(tmp_buffer); } /*! * \overload * \note Specialization for when T is trivially default-constructible. */ - static void init_impl(T* data, - IndexType begin, - IndexType nelems, - TrivialDefaultCtorTag) + static void init_impl(T* data, IndexType begin, IndexType nelems, InitTypeOnDevice) { for_all( begin, @@ -1091,9 +1251,19 @@ struct ArrayOpsBase /*! * \overload - * \note Specialization for when T is not default-constructible. + * \note Specialization for when T is trivially copyable. */ - static void init_impl(T*, IndexType, IndexType, NoDefaultCtorTag) { } + static void init_impl(T* data, + IndexType begin, + IndexType nelems, + InitTypeOnDeviceWithCopy) + { + T object {}; + for_all( + begin, + begin + nelems, + AXOM_LAMBDA(IndexType i) { new(&data[i]) T(object); }); + } /*! * \brief Default-initializes the "new" segment of an array @@ -1104,14 +1274,7 @@ struct ArrayOpsBase */ static void init(T* data, IndexType begin, IndexType nelems) { - using InitSelectTag = - typename std::conditional::type; - using InitTag = - typename std::conditional::type; - - init_impl(data, begin, nelems, InitTag {}); + init_impl(data, begin, nelems, typename DeviceInitTag::Type {}); } /*! @@ -1129,14 +1292,11 @@ struct ArrayOpsBase const T& value, std::false_type) { - void* buffer = ::operator new(sizeof(T) * nelems); - T* typed_buffer = static_cast(buffer); // If we instantiated a fill kernel here it would require // that T's copy ctor is device-annotated which is too // strict of a requirement, so we copy a buffer instead. - std::uninitialized_fill_n(typed_buffer, nelems, value); - axom::copy(array + begin, typed_buffer, sizeof(T) * nelems); - ::operator delete(buffer); + StagingBuffer tmp_buf(array, begin, nelems); + HostOp::fill(tmp_buf.getStagingBuffer(), 0, nelems, value); } /*! @@ -1188,26 +1348,10 @@ struct ArrayOpsBase } else { - void* src_buf = nullptr; - const T* src_host = values; - if(space == MemorySpace::Device) - { - src_buf = ::operator new(sizeof(T) * nelems); - // "Relocate" the device-side values into host memory, before copying - // into uninitialized memory - axom::copy(src_buf, values, sizeof(T) * nelems); - src_host = static_cast(src_buf); - } - void* dst_buf = ::operator new(sizeof(T) * nelems); - T* dst_host = static_cast(dst_buf); - std::uninitialized_copy(src_host, src_host + nelems, dst_host); - if(src_buf) - { - ::operator delete(src_buf); - } - // Relocate our copy-constructed values into the target device array. - axom::copy(array + begin, dst_buf, sizeof(T) * nelems); - ::operator delete(dst_buf); + // HostOp::fill_range will handle the copy to our "staging" host buffer, + // regardless of the source memory space. + StagingBuffer tmp_buf(array, begin, nelems); + HostOp::fill_range(tmp_buf.getStagingBuffer(), 0, nelems, values, space); } } @@ -1221,11 +1365,19 @@ struct ArrayOpsBase template static void emplace(T* array, IndexType i, Args&&... args) { - // Similar to fill(), except we can allocate stack memory and placement-new - // the object with a move constructor. - alignas(T) std::uint8_t host_buf[sizeof(T)]; - T* host_obj = ::new(&host_buf) T(std::forward(args)...); - axom::copy(array + i, host_obj, sizeof(T)); + if(SPACE == OperationSpace::Device) + { + // Similar to fill(), except we can allocate stack memory and placement-new + // the object with a move constructor. + alignas(T) std::uint8_t host_buf[sizeof(T)]; + T* host_obj = ::new(&host_buf) T(std::forward(args)...); + axom::copy(array + i, host_obj, sizeof(T)); + } + else // SPACE == OperationSpace::Unified_Device + { + // Construct directly in unified/pinned memory. + ::new(array + i) T(std::forward(args)...); + } } /*! @@ -1239,15 +1391,8 @@ struct ArrayOpsBase { if(DestroyOnHost) { - void* buffer = ::operator new(sizeof(T) * nelems); - T* typed_buffer = static_cast(buffer); - axom::copy(typed_buffer, array + begin, sizeof(T) * nelems); - for(int i = 0; i < nelems; ++i) - { - typed_buffer[i].~T(); - } - axom::copy(array + begin, typed_buffer, sizeof(T) * nelems); - ::operator delete(buffer); + StagingBuffer tmp_buf(array, begin, nelems, true); + HostOp::destroy(tmp_buf.getStagingBuffer(), 0, nelems); } } @@ -1261,14 +1406,26 @@ struct ArrayOpsBase */ static void move(T* array, IndexType src_begin, IndexType src_end, IndexType dst) { - // Since this memory is on the device-side, we copy it to a temporary buffer - // first. - IndexType nelems = src_end - src_begin; - T* tmp_buf = - axom::allocate(nelems, axom::execution_space::allocatorID()); - axom::copy(tmp_buf, array + src_begin, nelems * sizeof(T)); - axom::copy(array + dst, tmp_buf, nelems * sizeof(T)); - axom::deallocate(tmp_buf); + if(!std::is_trivially_copyable::value && + SPACE == OperationSpace::Unified_Device) + { + // Type might not be trivially-relocatable, move the range on the host. + // Note that we only do this for objects in unified/pinned memory, since + // we assume that objects in device-only memory are trivially-relocatable. + HostOp::move(array, src_begin, src_end, dst); + } + else + { + // Since this memory is on the device-side, we copy it to a temporary buffer + // first. + IndexType nelems = src_end - src_begin; + T* tmp_buf = + axom::allocate(nelems, + axom::execution_space::allocatorID()); + axom::copy(tmp_buf, array + src_begin, nelems * sizeof(T)); + axom::copy(array + dst, tmp_buf, nelems * sizeof(T)); + axom::deallocate(tmp_buf); + } } /*! @@ -1280,57 +1437,108 @@ struct ArrayOpsBase */ static void realloc_move(T* array, IndexType nelems, T* values) { - // NOTE: technically this is incorrect for non-trivially relocatable types, - // but since we only support trivially-relocatable types on the GPU, a - // bitcopy will suffice. - axom::copy(array, values, nelems * sizeof(T)); + if(!std::is_trivially_copyable::value && + SPACE == OperationSpace::Unified_Device) + { + HostOp::realloc_move(array, nelems, values); + } + else + { + // NOTE: technically this is incorrect for non-trivially relocatable types, + // but since we only support trivially-relocatable types in device-only + // memory, a bitcopy will suffice. + axom::copy(array, values, nelems * sizeof(T)); + } } }; #endif -template -struct ArrayOps +template +struct MemSpaceTraits { -private: + static constexpr OperationSpace Space = OperationSpace::Host; + // True if memory is accessible by both the host and device. False otherwise. + static constexpr bool IsUVMAccessible = false; +}; + #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - constexpr static bool IsDevice = (SPACE == MemorySpace::Device); -#else - constexpr static bool IsDevice = false; +template <> +struct MemSpaceTraits +{ + #if defined(AXOM_USE_CUDA) + // On CUDA platforms, device memory allocated with cudaMalloc can only be + // touched from a device kernel. + static constexpr OperationSpace Space = OperationSpace::Device; + static constexpr bool IsUVMAccessible = false; + #elif defined(AXOM_USE_HIP) + // On HIP platforms, device memory allocated with hipMalloc is accessible from + // the host. + static constexpr OperationSpace Space = OperationSpace::Unified_Device; + static constexpr bool IsUVMAccessible = true; + #endif +}; + +template <> +struct MemSpaceTraits +{ + static constexpr OperationSpace Space = OperationSpace::Unified_Device; + static constexpr bool IsUVMAccessible = true; +}; +template <> +struct MemSpaceTraits +{ + static constexpr OperationSpace Space = OperationSpace::Unified_Device; + static constexpr bool IsUVMAccessible = true; +}; + +template <> +struct MemSpaceTraits +{ + static constexpr bool IsUVMAccessible = true; +}; #endif - using Base = ArrayOpsBase; +template ::IsUVMAccessible> +struct ArrayOps; + +template +struct ArrayOps +{ +private: + constexpr static OperationSpace OpSpace = MemSpaceTraits::Space; + + using Base = ArrayOpsBase; public: - static void init(T* array, IndexType begin, IndexType nelems, int allocId) + ArrayOps(int allocId, bool preferDevice) { AXOM_UNUSED_VAR(allocId); + AXOM_UNUSED_VAR(preferDevice); + } + + void init(T* array, IndexType begin, IndexType nelems) + { Base::init(array, begin, nelems); } - static void fill(T* array, - IndexType begin, - IndexType nelems, - int allocId, - const T& value) + void fill(T* array, IndexType begin, IndexType nelems, const T& value) { - AXOM_UNUSED_VAR(allocId); Base::fill(array, begin, nelems, value); } - static void fill_range(T* array, - IndexType begin, - IndexType nelems, - int allocId, - const T* values, - MemorySpace space) + void fill_range(T* array, + IndexType begin, + IndexType nelems, + const T* values, + MemorySpace space) { - AXOM_UNUSED_VAR(allocId); Base::fill_range(array, begin, nelems, values, space); } - static void destroy(T* array, IndexType begin, IndexType nelems, int allocId) + void destroy(T* array, IndexType begin, IndexType nelems) { - AXOM_UNUSED_VAR(allocId); if(nelems == 0) { return; @@ -1338,13 +1546,8 @@ struct ArrayOps Base::destroy(array, begin, nelems); } - static void move(T* array, - IndexType src_begin, - IndexType src_end, - IndexType dst, - int allocId) + void move(T* array, IndexType src_begin, IndexType src_end, IndexType dst) { - AXOM_UNUSED_VAR(allocId); if(src_begin >= src_end) { return; @@ -1352,161 +1555,188 @@ struct ArrayOps Base::move(array, src_begin, src_end, dst); } - static void realloc_move(T* array, IndexType nelems, T* values, int allocId) + void realloc_move(T* array, IndexType nelems, T* values) { - AXOM_UNUSED_VAR(allocId); Base::realloc_move(array, nelems, values); } template - static void emplace(T* array, IndexType dst, IndexType allocId, Args&&... args) + void emplace(T* array, IndexType dst, Args&&... args) { - AXOM_UNUSED_VAR(allocId); Base::emplace(array, dst, std::forward(args)...); } }; -template -struct ArrayOps +template +struct ArrayOps { private: - using Base = ArrayOpsBase; + using Base = ArrayOpsBase; #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - using BaseDevice = ArrayOpsBase; + using BaseDevice = ArrayOpsBase; + // Works with unified and pinned memory. + using BaseUM = ArrayOpsBase; + + MemorySpace space {MemorySpace::Dynamic}; #endif public: - static void init(T* array, IndexType begin, IndexType nelems, int allocId) + ArrayOps(int allocId, bool preferDevice) { #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); + if(SPACE == MemorySpace::Dynamic) + { + space = getAllocatorSpace(allocId); + } + else + { + space = SPACE; + } + bool isUnifiedSpace = false; + isUnifiedSpace = + (space == MemorySpace::Unified || space == MemorySpace::Pinned); + #if defined(AXOM_USE_HIP) + isUnifiedSpace = (isUnifiedSpace || space == MemorySpace::Device); + #endif + if(!preferDevice && isUnifiedSpace) + { + space = MemorySpace::Host; + } +#else + AXOM_UNUSED_VAR(allocId); + AXOM_UNUSED_VAR(preferDevice); +#endif + } + + void init(T* array, IndexType begin, IndexType nelems) + { +#if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) if(space == MemorySpace::Device) { BaseDevice::init(array, begin, nelems); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::init(array, begin, nelems); + return; + } #endif Base::init(array, begin, nelems); } - static void fill(T* array, - IndexType begin, - IndexType nelems, - int allocId, - const T& value) + void fill(T* array, IndexType begin, IndexType nelems, const T& value) { #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); - if(space == MemorySpace::Device) { BaseDevice::fill(array, begin, nelems, value); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::fill(array, begin, nelems, value); + return; + } #endif Base::fill(array, begin, nelems, value); } - static void fill_range(T* array, - IndexType begin, - IndexType nelems, - int allocId, - const T* values, - MemorySpace valueSpace) + void fill_range(T* array, + IndexType begin, + IndexType nelems, + const T* values, + MemorySpace valueSpace) { #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); - if(space == MemorySpace::Device) { BaseDevice::fill_range(array, begin, nelems, values, valueSpace); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::fill_range(array, begin, nelems, values, valueSpace); + return; + } #endif - AXOM_UNUSED_VAR(allocId); Base::fill_range(array, begin, nelems, values, valueSpace); } - static void destroy(T* array, IndexType begin, IndexType nelems, int allocId) + void destroy(T* array, IndexType begin, IndexType nelems) { if(nelems == 0) { return; } #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); - if(space == MemorySpace::Device) { BaseDevice::destroy(array, begin, nelems); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::destroy(array, begin, nelems); + return; + } #endif Base::destroy(array, begin, nelems); } - static void move(T* array, - IndexType src_begin, - IndexType src_end, - IndexType dst, - int allocId) + void move(T* array, IndexType src_begin, IndexType src_end, IndexType dst) { if(src_begin >= src_end) { return; } #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); - if(space == MemorySpace::Device) { BaseDevice::move(array, src_begin, src_end, dst); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::move(array, src_begin, src_end, dst); + return; + } #endif Base::move(array, src_begin, src_end, dst); } - static void realloc_move(T* array, IndexType nelems, T* values, int allocId) + void realloc_move(T* array, IndexType nelems, T* values) { #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); - if(space == MemorySpace::Device) { BaseDevice::realloc_move(array, nelems, values); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::realloc_move(array, nelems, values); + return; + } #endif Base::realloc_move(array, nelems, values); } template - static void emplace(T* array, IndexType dst, IndexType allocId, Args&&... args) + void emplace(T* array, IndexType dst, Args&&... args) { #if defined(AXOM_USE_GPU) && defined(AXOM_GPUCC) && defined(AXOM_USE_UMPIRE) - MemorySpace space = getAllocatorSpace(allocId); - if(space == MemorySpace::Device) { BaseDevice::emplace(array, dst, std::forward(args)...); return; } -#else - AXOM_UNUSED_VAR(allocId); + else if(space == MemorySpace::Unified || space == MemorySpace::Pinned) + { + BaseUM::emplace(array, dst, std::forward(args)...); + return; + } #endif Base::emplace(array, dst, std::forward(args)...); } @@ -1583,7 +1813,10 @@ class ArraySubslice /*! * \brief Get the ID for the umpire allocator */ - int getAllocatorID() const { return m_array->getAllocatorID(); } + AXOM_HOST_DEVICE int getAllocatorID() const + { + return m_array->getAllocatorID(); + } protected: friend BaseClass; diff --git a/src/axom/core/ArrayView.hpp b/src/axom/core/ArrayView.hpp index b98790bf20..ed339ebd70 100644 --- a/src/axom/core/ArrayView.hpp +++ b/src/axom/core/ArrayView.hpp @@ -114,10 +114,10 @@ class ArrayView : public ArrayBase> * space. */ template - ArrayView(ArrayBase& other); + AXOM_HOST_DEVICE ArrayView(ArrayBase& other); /// \overload template - ArrayView( + AXOM_HOST_DEVICE ArrayView( const ArrayBase::type, DIM, OtherArrayType>& other); /*! @@ -156,7 +156,7 @@ class ArrayView : public ArrayBase> /*! * \brief Get the ID for the umpire allocator */ - int getAllocatorID() const { return m_allocator_id; } + AXOM_HOST_DEVICE int getAllocatorID() const { return m_allocator_id; } /*! * \brief Returns an ArrayView that is a subspan of the original range of @@ -341,13 +341,14 @@ AXOM_HOST_DEVICE ArrayView::ArrayView( //------------------------------------------------------------------------------ template template -ArrayView::ArrayView(ArrayBase& other) +AXOM_HOST_DEVICE ArrayView::ArrayView( + ArrayBase& other) : ArrayBase>(other) , m_data(static_cast(other).data()) , m_num_elements(static_cast(other).size()) , m_allocator_id(static_cast(other).getAllocatorID()) { -#ifdef AXOM_DEBUG +#if !defined(AXOM_DEVICE_CODE) && defined(AXOM_DEBUG) // If it's not dynamic, the allocator ID from the argument array has to match the template param. // If that's not the case then things have gone horribly wrong somewhere. if(SPACE != MemorySpace::Dynamic && @@ -363,7 +364,7 @@ ArrayView::ArrayView(ArrayBase& other) //------------------------------------------------------------------------------ template template -ArrayView::ArrayView( +AXOM_HOST_DEVICE ArrayView::ArrayView( const ArrayBase::type, DIM, OtherArrayType>& other) : ArrayBase>(other) , m_data(static_cast(other).data()) @@ -371,9 +372,9 @@ ArrayView::ArrayView( , m_allocator_id(static_cast(other).getAllocatorID()) { static_assert( - std::is_const::value, + std::is_const::value || detail::ArrayTraits::is_view, "Cannot create an ArrayView of non-const type from a const Array"); -#ifdef AXOM_DEBUG +#if !defined(AXOM_DEVICE_CODE) && defined(AXOM_DEBUG) // If it's not dynamic, the allocator ID from the argument array has to match the template param. // If that's not the case then things have gone horribly wrong somewhere. if(SPACE != MemorySpace::Dynamic && @@ -387,6 +388,7 @@ ArrayView::ArrayView( } //------------------------------------------------------------------------------ +AXOM_SUPPRESS_HD_WARN template AXOM_HOST_DEVICE ArrayView ArrayView::subspan( const StackArray& offsets, diff --git a/src/axom/core/CMakeLists.txt b/src/axom/core/CMakeLists.txt index 0d45eccc89..39627d95ac 100644 --- a/src/axom/core/CMakeLists.txt +++ b/src/axom/core/CMakeLists.txt @@ -21,18 +21,16 @@ axom_configure_file( set(core_headers ## utilities - utilities/AnnotationMacros.hpp + utilities/About.hpp + utilities/Annotations.hpp utilities/BitUtilities.hpp + utilities/CommandLineUtilities.hpp utilities/FileUtilities.hpp + utilities/RAII.hpp utilities/StringUtilities.hpp utilities/System.hpp utilities/Timer.hpp utilities/Utilities.hpp - utilities/About.hpp - - utilities/nvtx/interface.hpp - utilities/nvtx/Macros.hpp - utilities/nvtx/Range.hpp ## numerics numerics/internal/matrix_norms.hpp @@ -52,22 +50,28 @@ set(core_headers detail/FlatTable.hpp ## core + AnnotationMacros.hpp Array.hpp ArrayBase.hpp ArrayIteratorBase.hpp ArrayView.hpp + MDMapping.hpp IteratorBase.hpp Macros.hpp Map.hpp FlatMap.hpp + NumericLimits.hpp Path.hpp + RangeAdapter.hpp StackArray.hpp + StaticArray.hpp Types.hpp memory_management.hpp ## execution execution/execution_space.hpp execution/for_all.hpp + execution/nested_for_exec.hpp execution/runtime_policy.hpp execution/synchronize.hpp @@ -79,15 +83,13 @@ set(core_headers ) set(core_sources + utilities/Annotations.cpp utilities/FileUtilities.cpp utilities/StringUtilities.cpp utilities/System.cpp utilities/Utilities.cpp ${PROJECT_BINARY_DIR}/axom/core/utilities/About.cpp - utilities/nvtx/interface.cpp - utilities/nvtx/Range.cpp - numerics/polynomial_solvers.cpp Path.cpp @@ -99,10 +101,11 @@ set(core_sources #------------------------------------------------------------------------------ set( core_depends fmt ) +blt_list_append( TO core_depends ELEMENTS adiak::adiak IF ADIAK_FOUND ) +blt_list_append( TO core_depends ELEMENTS caliper IF CALIPER_FOUND ) blt_list_append( TO core_depends ELEMENTS camp IF CAMP_FOUND ) blt_list_append( TO core_depends ELEMENTS umpire IF UMPIRE_FOUND ) blt_list_append( TO core_depends ELEMENTS RAJA IF RAJA_FOUND ) -blt_list_append( TO core_depends ELEMENTS nvToolsExt IF AXOM_ENABLE_CUDA ) blt_list_append( TO core_depends ELEMENTS mpi IF AXOM_ENABLE_MPI ) # HACK: RAJA's dependencies are not getting added to core due to a bug in @@ -156,8 +159,3 @@ endif() if(AXOM_ENABLE_EXAMPLES) add_subdirectory(examples) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX core) diff --git a/src/axom/core/FlatMap.hpp b/src/axom/core/FlatMap.hpp index db0bb4e345..18938d015d 100644 --- a/src/axom/core/FlatMap.hpp +++ b/src/axom/core/FlatMap.hpp @@ -173,6 +173,7 @@ class FlatMap FlatMap new_map(other); swap(new_map); } + return *this; } /// \brief Destructor for a FlatMap instance. diff --git a/src/axom/core/IteratorBase.hpp b/src/axom/core/IteratorBase.hpp index 6b9df6c912..60c5901001 100644 --- a/src/axom/core/IteratorBase.hpp +++ b/src/axom/core/IteratorBase.hpp @@ -64,6 +64,7 @@ class IteratorBase { AXOM_HOST_DEVICE accessor(const IterType& base) : IterType(base) { } + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE static void adv(IterType& instance, PosType n) { @@ -126,6 +127,7 @@ class IteratorBase /// \{ /// Pre-increment operator + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE IterType& operator++() { @@ -154,6 +156,8 @@ class IteratorBase } /// Addition-assignment operator + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE IterType& operator+=(PosType n) { adv(getIter(), n); @@ -167,6 +171,8 @@ class IteratorBase } /// Addition operator with iterator on left and position on right + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE friend IterType operator+(const IterType& it, PosType n) { IterType ret(it); diff --git a/src/axom/quest/ArrayIndexer.hpp b/src/axom/core/MDMapping.hpp similarity index 64% rename from src/axom/quest/ArrayIndexer.hpp rename to src/axom/core/MDMapping.hpp index fbd53e7681..872ad9996e 100644 --- a/src/axom/quest/ArrayIndexer.hpp +++ b/src/axom/core/MDMapping.hpp @@ -3,24 +3,24 @@ // // SPDX-License-Identifier: (BSD-3-Clause) -#ifndef QUEST_ARRAYINDEXER_HPP_ -#define QUEST_ARRAYINDEXER_HPP_ +#ifndef AXOM_MDMAPPING_HPP_ +#define AXOM_MDMAPPING_HPP_ -#include "axom/slic.hpp" #include "axom/core/StackArray.hpp" #include "axom/core/numerics/matvecops.hpp" #include #include +#include namespace axom { /*! @brief Indicator for stride ordering. - Multidimensional array data can be in row-major order, column-major order, - or some arbitrarily permuted order. Row and column major ordering are the - same thing if the array is 1D. + Multidimensional array data can be in row-major order, column-major + order, or some arbitrarily permuted order. Row- and column-major + ordering are the same if the array is 1D. */ enum class ArrayStrideOrder : int { @@ -31,29 +31,27 @@ enum class ArrayStrideOrder : int }; /*! - @brief Indexing into a multidimensional structured array. + @brief For indexing multidimensional arrays. Supports row-major and column-major ordering and arbitrary permutations of the ordering. */ -template -class ArrayIndexer +template +class MDMapping { - axom::StackArray m_strides; - axom::StackArray m_slowestDirs; - public: /*! @brief Constructor for row- or column-major indexing. @param [in] shape Shape of the array - @param [in] arrayStrideOrder A order indicator from - ArrayStrideOrder. - @param [in] fastestStrideLength Stride in the fastest - direction. + @param [in] arrayStrideOrder An order indicator, + either \c ROW or \c COLUMN or if DIM == 1, + \c BOTH. + @param [in] fastestStrideLength Stride in the + fastest-changing direction. */ - ArrayIndexer(const axom::StackArray& shape, - axom::ArrayStrideOrder arrayStrideOrder, - int fastestStrideLength = 1) + AXOM_HOST_DEVICE MDMapping(const axom::StackArray& shape, + axom::ArrayStrideOrder arrayStrideOrder, + int fastestStrideLength = 1) { initializeShape(shape, arrayStrideOrder, fastestStrideLength); } @@ -64,23 +62,27 @@ class ArrayIndexer @param [in] slowestDirs permutation vector, where slowestDirs[0] is the slowest direction and slowestDirs[DIM-1] is the fastest. + @param [in] fastestStrideLength Stride in the + fastest-changing direction. */ - ArrayIndexer(const axom::StackArray& shape, - const axom::StackArray& slowestDirs) + template + AXOM_HOST_DEVICE MDMapping(const axom::StackArray& shape, + const axom::StackArray& slowestDirs, + int fastestStrideLength = 1) { - initializeShape(shape, slowestDirs); + initializeShape(shape, slowestDirs, fastestStrideLength); } /*! @brief Constructor for a given shape with the ordering of an - existing ArrayIndexer. + existing MDMapping. @param [in] shape Shape of the array @param [in] orderSource ArrayIndex to copy stride order from. */ - ArrayIndexer(const axom::StackArray& shape, - const axom::ArrayIndexer& orderSource) + AXOM_HOST_DEVICE MDMapping(const axom::StackArray& shape, + const axom::MDMapping& orderSource) { initializeShape(shape, orderSource); } @@ -96,7 +98,8 @@ class ArrayIndexer clash with the more prevalent usage of constructing from the array's shape. */ - ArrayIndexer(const axom::StackArray& strides) : m_strides(strides) + AXOM_HOST_DEVICE MDMapping(const axom::StackArray& strides) + : m_strides(strides) { initializeStrides(strides); } @@ -106,23 +109,42 @@ class ArrayIndexer Object must be initialized before use. */ - ArrayIndexer() = default; + MDMapping() = default; + + /*! + @brief Construct mapping for empty shape and the given stride order. + + The expected use case is when a stride order is known but the + shape is to be determined. Initialize the mapping with its own + slowestDirs() to preserve stride order as its shape changes. + */ + AXOM_HOST_DEVICE MDMapping(ArrayStrideOrder arrayStrideOrder) + { + axom::StackArray shape; + for(int d = 0; d < DIM; ++d) + { + shape[d] = 0; + } + initializeShape(shape, arrayStrideOrder); + } /*! @brief Initialize for row- or column-major indexing. @param [in] shape Shape of the array - @param [in] arrayStrideOrder An order indicator from - ArrayStrideOrder. - @param [in] fastestStrideLength Stride in the fastest - direction. + @param [in] arrayStrideOrder An order indicator + other than ArrayStrideOrder::ARBITRARY. + @param [in] fastestStrideLength Stride in the + fastest-changing direction. */ inline AXOM_HOST_DEVICE void initializeShape(const axom::StackArray& shape, ArrayStrideOrder arrayStrideOrder, int fastestStrideLength = 1) { - SLIC_ASSERT(arrayStrideOrder == ArrayStrideOrder::COLUMN || - arrayStrideOrder == ArrayStrideOrder::ROW || - (DIM == 1 && arrayStrideOrder == ArrayStrideOrder::BOTH)); + assert(arrayStrideOrder == ArrayStrideOrder::COLUMN || + arrayStrideOrder == ArrayStrideOrder::ROW || + (DIM == 1 && arrayStrideOrder == ArrayStrideOrder::BOTH)); + assert(fastestStrideLength > 0); + if(arrayStrideOrder == ArrayStrideOrder::COLUMN) { for(int d = 0; d < DIM; ++d) @@ -155,14 +177,21 @@ class ArrayIndexer @param [in] slowestDirs permutation vector, where slowestDirs[0] is the slowest direction and slowestDirs[DIM-1] is the fastest. + @param [in] fastestStrideLength Stride in the + fastest-changing direction. */ + template inline AXOM_HOST_DEVICE void initializeShape( const axom::StackArray& shape, - const axom::StackArray& slowestDirs) + const axom::StackArray& slowestDirs, + int fastestStrideLength = 1) { - SLIC_ASSERT(isPermutation(slowestDirs)); - m_slowestDirs = slowestDirs; - m_strides[m_slowestDirs[DIM - 1]] = 1; + assert(isPermutation(slowestDirs)); + for(int d = 0; d < DIM; ++d) + { + m_slowestDirs[d] = slowestDirs[d]; + } + m_strides[m_slowestDirs[DIM - 1]] = fastestStrideLength; for(int d = DIM - 2; d >= 0; --d) { int dir = m_slowestDirs[d]; @@ -173,7 +202,7 @@ class ArrayIndexer /*! @brief Initialize for a given shape with the ordering of an - existing ArrayIndexer. + existing MDMapping. @param [in] shape Shape of the array @param [in] orderSource ArrayIndex to copy stride order @@ -181,7 +210,7 @@ class ArrayIndexer */ inline AXOM_HOST_DEVICE void initializeShape( const axom::StackArray& shape, - const axom::ArrayIndexer& orderSource) + const axom::MDMapping& orderSource) { initializeShape(shape, orderSource.slowestDirs()); } @@ -189,13 +218,14 @@ class ArrayIndexer /*! @brief Initialize for arbitrary-stride indexing. - @param [i] strides Strides. Must be unique when DIM > 1. - If not satisfied, you must use one of the other initializers. + @param [i] strides Strides. Values must be unique. + If not unique, use one of the other initializers. */ + AXOM_SUPPRESS_HD_WARN inline AXOM_HOST_DEVICE void initializeStrides( const axom::StackArray& strides) { - if(DIM > 1 && !stridesAreUnique(strides)) + if(!stridesAreUnique(strides)) { #if !defined(AXOM_DEVICE_CODE) std::ostringstream os; @@ -205,16 +235,16 @@ class ArrayIndexer os << strides[d] << ","; } os << strides[DIM - 1] << ")"; - std::cerr << "ERROR: ArrayIndexer: Non-unique strides " << os.str() << ".\n" + std::cerr << "ERROR: MDMapping: Non-unique strides " << os.str() << ".\n" << "Likely, multi-dim array shape is 1 in some direction.\n" << "Impossible to compute index ordering.\n" - << "Please use a different ArrayIndexer initializer.\n"; -#endif + << "Please use a different MDMapping initializer.\n"; utilities::processAbort(); +#endif } // 2nd argument doesn't matter because strides are unique. - initializeStrides(strides, axom::ArrayStrideOrder::COLUMN); + initializeStrides(strides, axom::ArrayStrideOrder::ROW); } /*! @@ -222,21 +252,23 @@ class ArrayIndexer with ordering preference for non-unique strides. @param [i] strides Strides. - @param [i] orderPref Ordering preference value - (from ArrayStrideOrder) if strides are non-unique. + @param [i] orderPref ArrayStrideOrder::ROW or + ArrayStrideOrder::COLUMN, to use where strides + are non-unique. */ + AXOM_SUPPRESS_HD_WARN inline AXOM_HOST_DEVICE void initializeStrides( const axom::StackArray& strides, ArrayStrideOrder orderPref) { - SLIC_ASSERT(orderPref == axom::ArrayStrideOrder::COLUMN || - orderPref == axom::ArrayStrideOrder::ROW); + assert(orderPref == axom::ArrayStrideOrder::COLUMN || + orderPref == axom::ArrayStrideOrder::ROW); m_strides = strides; for(int d = 0; d < DIM; ++d) { m_slowestDirs[d] = - orderPref == axom::ArrayStrideOrder::COLUMN ? d : DIM - 1 - d; + orderPref == axom::ArrayStrideOrder::ROW ? d : DIM - 1 - d; } for(int s = 0; s < DIM; ++s) { @@ -244,10 +276,7 @@ class ArrayIndexer { if(m_strides[m_slowestDirs[s]] < m_strides[m_slowestDirs[d]]) { - // Swap values. - auto tmp = m_slowestDirs[s]; - m_slowestDirs[s] = m_slowestDirs[d]; - m_slowestDirs[d] = tmp; + axom::utilities::swap(m_slowestDirs[s], m_slowestDirs[d]); } } } @@ -266,7 +295,7 @@ class ArrayIndexer return !repeats; } - inline AXOM_HOST_DEVICE bool operator==(const ArrayIndexer& other) const + inline AXOM_HOST_DEVICE bool operator==(const MDMapping& other) const { return m_slowestDirs == other.m_slowestDirs && m_strides == other.m_strides; } @@ -283,26 +312,28 @@ class ArrayIndexer return m_strides; } + //!@brief Stride length in fastest direction. + inline AXOM_HOST_DEVICE axom::IndexType fastestStrideLength() const + { + return m_strides[m_slowestDirs[DIM - 1]]; + } + //!@brief Whether a StackArray represents a permutation. - bool isPermutation(const axom::StackArray& v) + template + inline AXOM_HOST_DEVICE bool isPermutation( + const axom::StackArray& v) const { // v is a permutation if all its values are unique and in [0, DIM). - axom::StackArray found; - for(int d = 0; d < DIM; ++d) - { - found[d] = false; - } - for(int d = 0; d < DIM; ++d) + axom::StackArray values_sorted = v; + + // After sorting, the values should be the sequence {0, 1, ... DIM - 1}. + axom::utilities::insertionSort(&values_sorted[0], DIM); + for(int d = 0; d < DIM; d++) { - if(v[d] < 0 || v[d] >= DIM) - { - return false; // Out of range. - } - if(found[v[d]] == true) + if(values_sorted[d] != d) { - return false; // Repeated index. + return false; } - found[v[d]] = true; } return true; } @@ -349,9 +380,9 @@ class ArrayIndexer return multiIndex; } - friend std::ostream& operator<<(std::ostream& os, const ArrayIndexer& a) + friend std::ostream& operator<<(std::ostream& os, const MDMapping& a) { - os << "ArrayIndexer: strides=(" << a.m_strides[0]; + os << "MDMapping: strides=(" << a.m_strides[0]; for(int d = 1; d < DIM; ++d) { os << ',' << a.m_strides[d]; @@ -364,8 +395,12 @@ class ArrayIndexer os << ')'; return os; } + +private: + axom::StackArray m_strides; + axom::StackArray m_slowestDirs; }; } // end namespace axom -#endif // QUEST_ARRAYINDEXER_HPP_ +#endif // AXOM_MDMAPPING_HPP_ diff --git a/src/axom/core/NumericLimits.hpp b/src/axom/core/NumericLimits.hpp new file mode 100644 index 0000000000..8e5642b8fa --- /dev/null +++ b/src/axom/core/NumericLimits.hpp @@ -0,0 +1,41 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +/*! + * + * \file NumericLimits.hpp + * + * \brief Header file containing portability layer for std::numeric_limits + * capabilities + * + */ + +#ifndef AXOM_NUMERICLIMITS_HPP_ +#define AXOM_NUMERICLIMITS_HPP_ + +#include "axom/config.hpp" // for compile-time definitions + +#include + +#if defined(AXOM_USE_CUDA) + #include +#endif + +namespace axom +{ +#if defined(AXOM_USE_CUDA) +// Note: cuda::std types work in host and device code as long as Axom is +// configured with CUDA enabled. No need to rely on two different +// header files in that case. +template +using numeric_limits = cuda::std::numeric_limits; +#else +template +using numeric_limits = std::numeric_limits; +#endif + +} // namespace axom + +#endif // AXOM_NUMERICLIMITS_HPP_ diff --git a/src/axom/core/RangeAdapter.hpp b/src/axom/core/RangeAdapter.hpp new file mode 100644 index 0000000000..0b2025d067 --- /dev/null +++ b/src/axom/core/RangeAdapter.hpp @@ -0,0 +1,37 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +#ifndef Axom_Core_RangeAdapter_HPP +#define Axom_Core_RangeAdapter_HPP + +namespace axom +{ +/*! + * \class RangeAdapter + * + * \brief Simple adapter class that converts a pair of iterators into a range + * that can be iterated over in a range-based for-loop. + */ +template +class RangeAdapter +{ +public: + RangeAdapter(IteratorType begin, IteratorType end) + : m_begin(begin) + , m_end(end) + { } + /// \brief Returns an iterator to the beginning of the range. + IteratorType begin() const { return m_begin; } + /// \brief Returns an iterator to the end of the range. + IteratorType end() const { return m_end; } + +private: + IteratorType m_begin; + IteratorType m_end; +}; + +} // namespace axom + +#endif diff --git a/src/axom/core/StaticArray.hpp b/src/axom/core/StaticArray.hpp new file mode 100644 index 0000000000..6b5ce4e907 --- /dev/null +++ b/src/axom/core/StaticArray.hpp @@ -0,0 +1,75 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +#ifndef AXOM_STATICARRAY_HPP_ +#define AXOM_STATICARRAY_HPP_ + +#include "axom/config.hpp" // for compile-time defines +#include "axom/core/Macros.hpp" // for axom macros +#include "axom/core/StackArray.hpp" // for StackArray + +namespace axom +{ +/*! + * \accelerated + * \class StaticArray + * + * \brief Provides a wrapper for a StackArray with an additional size member. + * + * \tparam T the type of the values to hold. + * \tparam N the number of values in the array. + * + * \note Type \a T must be default-constructible on device for device + * execution. + */ +template +struct StaticArray : public StackArray +{ + /*! + * \brief Returns the size of the static array + * + * \return The size of the static array + */ + AXOM_HOST_DEVICE int size() const { return m_size; } + + /*! + * \brief Pushes an object to the back of the static array + * + * \param [in] obj the object to be added to the back. + * + * \note The number of push_backs must not exceed N, + * the max number of values in the array. + * + * \note If the static array is full, push_back + * will not modify the static array. + */ + AXOM_HOST_DEVICE void push_back(const T& obj) + { + assert(m_size < N); + if(m_size < N) + { + StackArray::m_data[m_size++] = obj; + } + } + + /*! + * \brief Clears the data from the static array + */ + AXOM_HOST_DEVICE void clear() + { + for(T& datum : StackArray::m_data) + { + datum = T(); + } + m_size = 0; + } + +private: + int m_size {0}; +}; + +} /* namespace axom */ + +#endif /* AXOM_STATICARRAY_HPP_ */ diff --git a/src/axom/core/detail/FlatTable.hpp b/src/axom/core/detail/FlatTable.hpp index 490e8d0c9f..3250f8ff48 100644 --- a/src/axom/core/detail/FlatTable.hpp +++ b/src/axom/core/detail/FlatTable.hpp @@ -258,7 +258,6 @@ struct SequentialLookupPolicy : ProbePolicy { // Stop probing if the "overflow" bit is not set. keep_going = false; - curr_group = NO_MATCH; } if(!keep_going) diff --git a/src/axom/core/examples/CMakeLists.txt b/src/axom/core/examples/CMakeLists.txt index adcb21d57c..584ceca350 100644 --- a/src/axom/core/examples/CMakeLists.txt +++ b/src/axom/core/examples/CMakeLists.txt @@ -61,3 +61,38 @@ if(AXOM_ENABLE_TESTS) NAME core_utilities COMMAND core_utilities_ex ${CMAKE_CURRENT_SOURCE_DIR} ) endif() + +axom_add_executable( + NAME core_array_perf_ex + SOURCES core_array_perf.cpp + OUTPUT_DIR ${EXAMPLE_OUTPUT_DIRECTORY} + DEPENDS_ON core + FOLDER axom/core/examples ) + +if(AXOM_ENABLE_TESTS) + # Run the core array performance example on N ranks for each enabled policy + set(_policies "seq") + if(RAJA_FOUND) + blt_list_append(TO _policies ELEMENTS "omp" IF AXOM_ENABLE_OPENMP) + blt_list_append(TO _policies ELEMENTS "cuda" IF AXOM_ENABLE_CUDA) + blt_list_append(TO _policies ELEMENTS "hip" IF AXOM_ENABLE_HIP) + endif() + foreach(_pol ${_policies}) + axom_add_test( + NAME "core_array_perf_1d_${_pol}" + COMMAND core_array_perf_ex --policy ${_pol} --shape 1200000 -r 10) + axom_add_test( + NAME "core_array_perf_2d_${_pol}" + COMMAND core_array_perf_ex --policy ${_pol} --shape 1000 1200 -r 10) + axom_add_test( + NAME "core_array_perf_3d_${_pol}" + COMMAND core_array_perf_ex --policy ${_pol} --shape 100 100 120 -r 10) + if(NOT RAJA_FOUND) + # RAJA provides support for up to 3D tiled nested loops, + # so run 4D test only for non-RAJA builds. + axom_add_test( + NAME "core_array_perf_4d_${_pol}" + COMMAND core_array_perf_ex --policy ${_pol} --shape 50 20 30 6 ) + endif() + endforeach() +endif() diff --git a/src/axom/core/examples/core_acceleration.cpp b/src/axom/core/examples/core_acceleration.cpp index b0345bddb6..c81266a090 100644 --- a/src/axom/core/examples/core_acceleration.cpp +++ b/src/axom/core/examples/core_acceleration.cpp @@ -182,8 +182,7 @@ void demoAxomExecution() //_gpu_atomic_start using atomic_pol = typename axom::execution_space::atomic_policy; - int *sum = - axom::allocate(1, axom::execution_space::allocatorID()); + int *sum = axom::allocate(1, allocator_id); *sum = 0; // Increment sum 100 times @@ -193,6 +192,8 @@ void demoAxomExecution() std::cout << "\nTotal Atomic Sum (" << axom::execution_space::name() << ") :" << sum[0] << std::endl; + + axom::deallocate(sum); //_gpu_atomic_end #endif diff --git a/src/axom/core/examples/core_array_perf.cpp b/src/axom/core/examples/core_array_perf.cpp new file mode 100644 index 0000000000..25e125feb4 --- /dev/null +++ b/src/axom/core/examples/core_array_perf.cpp @@ -0,0 +1,967 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +/*! \file core_array_perf.cpp + * \brief This example illustrates performance of array classes. + */ + +// Axom includes +#include "axom/core/StackArray.hpp" +#include "axom/core/Array.hpp" +#include "axom/core/MDMapping.hpp" +#include "axom/core/execution/for_all.hpp" +#include "axom/core/execution/nested_for_exec.hpp" +#include "axom/core/execution/runtime_policy.hpp" +#include "axom/core/memory_management.hpp" +#include "axom/core/utilities/RAII.hpp" +#include "axom/core/utilities/CommandLineUtilities.hpp" +#include "axom/core/utilities/System.hpp" +#include "axom/core/utilities/Timer.hpp" +#include "axom/core/AnnotationMacros.hpp" + +#include "axom/fmt.hpp" +#include "axom/CLI11.hpp" + +// C/C++ includes +#include +#include + +/////////////////////////////////////////////////////////////// +/// Struct to parse and store the input parameters +struct InputParams +{ +public: + using RuntimePolicy = axom::runtime_policy::Policy; + + // Array shape. + std::vector shape; + axom::IndexType ghostWidth = 1; + std::vector paddedShape; + std::vector idxBegin; + std::vector idxEnd; + axom::IndexType realSize; + axom::IndexType paddedSize; + + // Array stride order (same length as shape) + std::vector dataSlowestDirections; + axom::ArrayStrideOrder dataOrder = axom::ArrayStrideOrder::ARBITRARY; + + RuntimePolicy runtimePolicy = RuntimePolicy::seq; + + axom::IndexType repCount = 10; + + std::string annotationMode {"none"}; + +private: + bool _verboseOutput {false}; + const std::map strideValidator { + {"row", int(axom::ArrayStrideOrder::ROW)}, + {"col", int(axom::ArrayStrideOrder::COLUMN)}}; + +public: + bool isVerbose() const { return _verboseOutput; } + + void parse(int argc, char** argv, axom::CLI::App& app) + { + app.add_option("-p, --policy", runtimePolicy) + ->description("Set runtime policy for test") + ->capture_default_str() + ->transform( + axom::CLI::CheckedTransformer(axom::runtime_policy::s_nameToPolicy)); + + app.add_flag("-v,--verbose,!--no-verbose", _verboseOutput) + ->description("Enable/disable verbose output") + ->capture_default_str(); + + app.add_option("-s, --shape", shape)->description("Array shape")->expected(1, 4); + + app.add_option("-g, --ghost", ghostWidth)->description("Ghost width"); + + app.add_option("-r, --repCount", repCount) + ->description("Number of repetitions to run"); + + auto* dataOrderOption = + app.add_option("--dataOrder", dataOrder) + ->description("Stride order of array data.") + ->transform(axom::CLI::CheckedTransformer(strideValidator)) + ->expected(1, 4); + + app.add_option("--dataSlowestDirections", dataSlowestDirections) + ->description( + "Array data stride directions, from slowest to fastest." + " Must be same length as shape.") + ->excludes(dataOrderOption); + +#ifdef AXOM_USE_CALIPER + app.add_option("--caliper", annotationMode) + ->description( + "caliper annotation mode. Valid options include 'none' and 'report'. " + "Use 'help' to see full list.") + ->capture_default_str() + ->check(axom::utilities::ValidCaliperMode); +#endif + + app.get_formatter()->column_width(60); + + app.parse(argc, argv); + + if(shape.empty()) + { + std::cerr << "You must specify shape (1-4 integers)." << std::endl; + std::abort(); + } + + /* + If dataSlowestDirections is specified, it must match length of shape. + If neither is specified, default to row-major ordering. + */ + if(!dataSlowestDirections.empty()) + { + if(dataSlowestDirections.size() != shape.size()) + { + std::cerr << axom::fmt::format( + "slowestDimension size ({}) must match shape size ({}).", + dataSlowestDirections.size(), + shape.size()) + << std::endl; + std::abort(); + } + } + if(dataSlowestDirections.empty() && + dataOrder == axom::ArrayStrideOrder::ARBITRARY) + { + dataOrder = axom::ArrayStrideOrder::ROW; + } + + // + // Dependent data + // + + paddedShape.resize(shape.size()); + idxBegin.resize(shape.size()); + idxEnd.resize(shape.size()); + for(size_t i = 0; i < shape.size(); ++i) + { + paddedShape[i] = shape[i] + 2 * ghostWidth; + idxBegin[i] = ghostWidth; + idxEnd[i] = idxBegin[i] + shape[i]; + } + + realSize = shape[0]; + paddedSize = paddedShape[0]; + for(size_t i = 1; i < shape.size(); ++i) + { + realSize *= shape[i]; + paddedSize *= paddedShape[i]; + } + } +}; + +InputParams params; + +//!@brief Return allocator id suitable for the given runtime policy. +int allocatorIdFromPolicy(axom::runtime_policy::Policy policy) +{ + AXOM_UNUSED_VAR(policy); +#if defined(AXOM_USE_UMPIRE) + int allocatorID = policy == axom::runtime_policy::Policy::seq + ? axom::detail::getAllocatorID() + : + #if defined(AXOM_RUNTIME_POLICY_USE_OPENMP) + policy == axom::runtime_policy::Policy::omp + ? axom::detail::getAllocatorID() + : + #endif + #if defined(AXOM_RUNTIME_POLICY_USE_CUDA) + policy == axom::runtime_policy::Policy::cuda + ? axom::detail::getAllocatorID() + : + #endif + #if defined(AXOM_RUNTIME_POLICY_USE_HIP) + policy == axom::runtime_policy::Policy::hip + ? axom::detail::getAllocatorID() + : + #endif + axom::INVALID_ALLOCATOR_ID; +#else + int allocatorID = axom::getDefaultAllocatorID(); +#endif + return allocatorID; +} + +template +class MDMappingPerfTester +{ +public: + using Element_t = std::uint64_t; + const Element_t m_baseFactor = 1000000; + Element_t m_testAccumulation = 0; + const Element_t m_flatTestAdd = 1; + const Element_t m_rowTestAdd = 10; + const Element_t m_columnTestAdd = 100; + const Element_t m_dynamicTestAdd = 1000; + + int m_allocatorId; + + MDMappingPerfTester() + { + m_allocatorId = allocatorIdFromPolicy(params.runtimePolicy); +#ifdef AXOM_USE_UMPIRE + umpire::ResourceManager& rm = umpire::ResourceManager::getInstance(); + umpire::Allocator allocator = rm.getAllocator(m_allocatorId); + std::cout << axom::fmt::format("Allocator id: {}, Umpire memory space {}", + m_allocatorId, + allocator.getName()) + << std::endl; +#else + std::cout << axom::fmt::format("Allocator id: {}, default memory space", + m_allocatorId) + << std::endl; +#endif + } + + /*! + @brief Time the pointer access of every element of an array. + + This is the fastest we expect to visit every element. + */ + void runTest_pointerAccess(axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("pointerAccess"); + auto testAdd = m_flatTestAdd; + m_testAccumulation += testAdd; + auto count = array.size(); + auto* ptr = array.data(); +#ifdef AXOM_USE_RAJA + axom::for_all( + 0, + count, + AXOM_LAMBDA(axom::IndexType i) { ptr[i] += testAdd; }); +#else + for(axom::IndexType i = 0; i < count; ++i) + { + ptr[i] += testAdd; + } +#endif + } + + /*! + @brief Time the flat-index access of every element of an array. + + Compared to runtest_flatAccess, this includes the flatIndex overhead. + */ + void runTest_flatAccess(axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("flatAccess"); + auto testAdd = m_flatTestAdd; + m_testAccumulation += testAdd; + auto count = array.size(); +#ifdef AXOM_USE_RAJA + axom::for_all( + 0, + count, + AXOM_LAMBDA(axom::IndexType i) { array.flatIndex(i) += testAdd; }); +#else + for(axom::IndexType i = 0; i < count; ++i) + { + array.flatIndex(i) += testAdd; + } +#endif + } + + /*! + Methods to time the access of every element of an array. + + Multidimensional loops are capable of skipping ghost + layers, but the flat loop used for the baseline + performance doesn't have logic to skip them. +*/ + + // + // Row-major access tests + // + + template + typename std::enable_if::type runTest_rowMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("rowMajorAccess-1D"); + auto testAdd = m_rowTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + axom::for_all( + idxBegin[0], + idxEnd[0], + AXOM_LAMBDA(axom::IndexType i) { array[i] += testAdd; }); +#else + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + array[i] += testAdd; + } +#endif + } + + template + typename std::enable_if::type runTest_rowMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("rowMajorAccess-2D"); + auto testAdd = m_rowTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + using EXEC_POL = + typename axom::internal::nested_for_exec::loop2d_policy; + RAJA::RangeSegment iRange(idxBegin[0], idxEnd[0]); + RAJA::RangeSegment jRange(idxBegin[1], idxEnd[1]); + RAJA::kernel( + RAJA::make_tuple(jRange, iRange), + AXOM_LAMBDA(axom::IndexType j, axom::IndexType i) { + array(i, j) += testAdd; + }); +#else + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + for(axom::IndexType j = idxBegin[1]; j < idxEnd[1]; ++j) + { + array(i, j) += testAdd; + } + } +#endif + } + + template + typename std::enable_if::type runTest_rowMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("rowMajorAccess-3D"); + auto testAdd = m_rowTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + using EXEC_POL = + typename axom::internal::nested_for_exec::loop3d_policy; + RAJA::RangeSegment iRange(idxBegin[0], idxEnd[0]); + RAJA::RangeSegment jRange(idxBegin[1], idxEnd[1]); + RAJA::RangeSegment kRange(idxBegin[2], idxEnd[2]); + RAJA::kernel( + RAJA::make_tuple(kRange, jRange, iRange), + AXOM_LAMBDA(axom::IndexType k, axom::IndexType j, axom::IndexType i) { + array(i, j, k) += testAdd; + }); +#else + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + for(axom::IndexType j = idxBegin[1]; j < idxEnd[1]; ++j) + { + for(axom::IndexType k = idxBegin[2]; k < idxEnd[2]; ++k) + { + array(i, j, k) += testAdd; + } + } + } +#endif + } + + template + typename std::enable_if::type runTest_rowMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("rowMajorAccess-4D"); + auto testAdd = m_rowTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + AXOM_UNUSED_VAR(array); + AXOM_UNUSED_VAR(idxBegin); + AXOM_UNUSED_VAR(idxEnd); + std::cerr << "Cannot run higher than 3D with RAJA." << std::endl; + std::abort(); +#else + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + for(axom::IndexType j = idxBegin[1]; j < idxEnd[1]; ++j) + { + for(axom::IndexType k = idxBegin[2]; k < idxEnd[2]; ++k) + { + for(axom::IndexType l = idxBegin[3]; l < idxEnd[3]; ++l) + { + array(i, j, k, l) += testAdd; + } + } + } + } +#endif + } + + // + // Colunn-major access tests + // + + template + typename std::enable_if::type runTest_columnMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("columnMajorAccess-1D"); + auto testAdd = m_columnTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + axom::for_all( + idxBegin[0], + idxEnd[0], + AXOM_LAMBDA(axom::IndexType i) { array[i] += testAdd; }); +#else + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + array[i] += testAdd; + } +#endif + } + + template + typename std::enable_if::type runTest_columnMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("columnMajorAccess-2D"); + auto testAdd = m_columnTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + using EXEC_POL = + typename axom::internal::nested_for_exec::loop2d_policy; + RAJA::RangeSegment iRange(idxBegin[0], idxEnd[0]); + RAJA::RangeSegment jRange(idxBegin[1], idxEnd[1]); + RAJA::kernel( + RAJA::make_tuple(iRange, jRange), + AXOM_LAMBDA(axom::IndexType i, axom::IndexType j) { + array(i, j) += testAdd; + }); +#else + for(axom::IndexType j = idxBegin[1]; j < idxEnd[1]; ++j) + { + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + array(i, j) += testAdd; + } + } +#endif + } + + template + typename std::enable_if::type runTest_columnMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("columnMajorAccess-3D"); + auto testAdd = m_columnTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + using EXEC_POL = + typename axom::internal::nested_for_exec::loop3d_policy; + RAJA::RangeSegment iRange(idxBegin[0], idxEnd[0]); + RAJA::RangeSegment jRange(idxBegin[1], idxEnd[1]); + RAJA::RangeSegment kRange(idxBegin[2], idxEnd[2]); + RAJA::kernel( + RAJA::make_tuple(iRange, jRange, kRange), + AXOM_LAMBDA(axom::IndexType i, axom::IndexType j, axom::IndexType k) { + array(i, j, k) += testAdd; + }); +#else + for(axom::IndexType k = idxBegin[2]; k < idxEnd[2]; ++k) + { + for(axom::IndexType j = idxBegin[1]; j < idxEnd[1]; ++j) + { + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + array(i, j, k) += testAdd; + } + } + } +#endif + } + + template + typename std::enable_if::type runTest_columnMajorAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("columnMajorAccess-4D"); + auto testAdd = m_columnTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + AXOM_UNUSED_VAR(array); + AXOM_UNUSED_VAR(idxBegin); + AXOM_UNUSED_VAR(idxEnd); + std::cerr << "Cannot run higher than 3D with RAJA." << std::endl; + std::abort(); +#else + for(axom::IndexType l = idxBegin[3]; l < idxEnd[3]; ++l) + { + for(axom::IndexType k = idxBegin[2]; k < idxEnd[2]; ++k) + { + for(axom::IndexType j = idxBegin[1]; j < idxEnd[1]; ++j) + { + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + array(i, j, k, l) += testAdd; + } + } + } + } +#endif + } + + // + // Dynamic ordering access tests + + // The dynamic order should match the optimal order, + // Any performance difference is due to overhead of dynamic + // nesting of the loops. + // + + template + typename std::enable_if::type runTest_dynamicAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("dynamicAccess-1D"); + auto testAdd = m_dynamicTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; +#ifdef AXOM_USE_RAJA + axom::for_all( + idxBegin[0], + idxEnd[0], + AXOM_LAMBDA(axom::IndexType i) { array[i] += testAdd; }); +#else + for(axom::IndexType i = idxBegin[0]; i < idxEnd[0]; ++i) + { + array[i] += testAdd; + } +#endif + } + + template + typename std::enable_if::type runTest_dynamicAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("dynamicAccess-2D"); + auto testAdd = m_dynamicTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; + const auto& mapping = array.mapping(); + const auto& slowestDirs = mapping.slowestDirs(); + axom::StackArray invSlowestDirs; + for(int i = 0; i < DIM; ++i) invSlowestDirs[slowestDirs[i]] = i; + const axom::StackArray begins { + idxBegin[slowestDirs[0]], + idxBegin[slowestDirs[1]]}; + const axom::StackArray ends {idxEnd[slowestDirs[0]], + idxEnd[slowestDirs[1]]}; +#ifdef AXOM_USE_RAJA + using EXEC_POL = + typename axom::internal::nested_for_exec::loop2d_policy; + RAJA::RangeSegment mRange(begins[0], ends[0]); + RAJA::RangeSegment nRange(begins[1], ends[1]); + RAJA::kernel( + RAJA::make_tuple(nRange, mRange), + AXOM_LAMBDA(axom::IndexType n, axom::IndexType m) { + axom::StackArray idx {m, n}; + auto i = idx[invSlowestDirs[0]]; + auto j = idx[invSlowestDirs[1]]; + array(i, j) += testAdd; + }); +#else + axom::StackArray idx; + axom::IndexType& m = idx[slowestDirs[0]]; + axom::IndexType& n = idx[slowestDirs[1]]; + for(m = begins[0]; m < ends[0]; ++m) + { + for(n = begins[1]; n < ends[1]; ++n) + { + array[idx] += testAdd; + } + } +#endif + } + + template + typename std::enable_if::type runTest_dynamicAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("dynamicAccess-3D"); + auto testAdd = m_dynamicTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; + const auto& mapping = array.mapping(); + const auto& slowestDirs = mapping.slowestDirs(); + axom::StackArray invSlowestDirs; + for(int i = 0; i < DIM; ++i) invSlowestDirs[slowestDirs[i]] = i; + const axom::StackArray begins { + idxBegin[slowestDirs[0]], + idxBegin[slowestDirs[1]], + idxBegin[slowestDirs[2]]}; + const axom::StackArray ends {idxEnd[slowestDirs[0]], + idxEnd[slowestDirs[1]], + idxEnd[slowestDirs[2]]}; +#ifdef AXOM_USE_RAJA + using EXEC_POL = + typename axom::internal::nested_for_exec::loop3d_policy; + RAJA::RangeSegment mRange(begins[0], ends[0]); + RAJA::RangeSegment nRange(begins[1], ends[1]); + RAJA::RangeSegment oRange(begins[2], ends[2]); + RAJA::kernel( + RAJA::make_tuple(oRange, nRange, mRange), + AXOM_LAMBDA(axom::IndexType o, axom::IndexType n, axom::IndexType m) { + axom::StackArray idx {m, n, o}; + auto i = idx[invSlowestDirs[0]]; + auto j = idx[invSlowestDirs[1]]; + auto k = idx[invSlowestDirs[2]]; + array(i, j, k) += testAdd; + }); +#else + axom::StackArray idx; + axom::IndexType& m = idx[slowestDirs[0]]; + axom::IndexType& n = idx[slowestDirs[1]]; + axom::IndexType& o = idx[slowestDirs[2]]; + for(m = begins[0]; m < ends[0]; ++m) + { + for(n = begins[1]; n < ends[1]; ++n) + { + for(o = begins[2]; o < ends[2]; ++o) + { + array[idx] += testAdd; + } + } + } +#endif + } + + template + typename std::enable_if::type runTest_dynamicAccess( + axom::ArrayView& array) + { + AXOM_ANNOTATE_SCOPE("dynamicAccess-4D"); + auto testAdd = m_dynamicTestAdd; + m_testAccumulation += testAdd; + + const auto idxBegin = params.idxBegin; + const auto idxEnd = params.idxEnd; + const auto& mapping = array.mapping(); + const auto& slowestDirs = mapping.slowestDirs(); + const axom::StackArray begins { + idxBegin[slowestDirs[0]], + idxBegin[slowestDirs[1]], + idxBegin[slowestDirs[2]], + idxBegin[slowestDirs[3]]}; + const axom::StackArray ends {idxEnd[slowestDirs[0]], + idxEnd[slowestDirs[1]], + idxEnd[slowestDirs[2]], + idxEnd[slowestDirs[3]]}; +#ifdef AXOM_USE_RAJA + AXOM_UNUSED_VAR(array); + AXOM_UNUSED_VAR(begins); + AXOM_UNUSED_VAR(ends); + std::cerr << "Cannot run higher than 3D with RAJA." << std::endl; + std::abort(); +#else + axom::StackArray idx; + axom::IndexType& m = idx[slowestDirs[0]]; + axom::IndexType& n = idx[slowestDirs[1]]; + axom::IndexType& o = idx[slowestDirs[2]]; + axom::IndexType& p = idx[slowestDirs[3]]; + for(m = begins[0]; m < ends[0]; ++m) + { + for(n = begins[1]; n < ends[1]; ++n) + { + for(o = begins[2]; o < ends[2]; ++o) + { + for(p = begins[3]; p < ends[3]; ++p) + { + array[idx] += testAdd; + } + } + } + } +#endif + } + + // + // Make test Array objects. + // + + /*! + @brief Make MDMapping based on command line parameters. + */ + void getPaddedShapeAndIndexer(axom::StackArray& paddedShape, + axom::MDMapping& mapping) + { + for(int d = 0; d < DIM; ++d) + { + paddedShape[d] = params.paddedShape[d]; + } + + if(!params.dataSlowestDirections.empty()) + { + axom::StackArray dataSlowestDirections; + for(int d = 0; d < DIM; ++d) + { + dataSlowestDirections[d] = params.dataSlowestDirections[d]; + } + mapping.initializeShape(paddedShape, dataSlowestDirections); + } + else + { + mapping.initializeShape(paddedShape, params.dataOrder); + } + } + + /*! + @brief Return an array for testing, dimension DIM, + sized and ordered according to params values. + */ + axom::Array makeArray() + { + assert(DIM <= params.shape.size()); + + AXOM_ANNOTATE_SCOPE("makeArray"); + axom::StackArray paddedShape; + axom::MDMapping mapping; + getPaddedShapeAndIndexer(paddedShape, mapping); + + return axom::Array(paddedShape, + mapping.slowestDirs(), + m_allocatorId); + } + + /*! + @brief Run test with array shape of the first DIM values in + params.shape. + */ + void runTest_dim() + { + AXOM_ANNOTATE_SCOPE("MDMappingPerfTester::runTest_dim"); + axom::Array arrayMd = makeArray(); + axom::ArrayView array = arrayMd.view(); + + std::cout << axom::fmt::format("Real-to-padded size: {}/{} = {:.4f}", + params.realSize, + params.paddedSize, + double(params.realSize) / params.paddedSize) + << std::endl; + + auto count = array.size(); + auto baseFactor = m_baseFactor; + axom::for_all( + count, + AXOM_LAMBDA(axom::IndexType i) { + array.flatIndex(i) = Element_t(i * baseFactor); + }); + + /* + Warm-up: The first rep can be a slow outlier. Since we are + generally interested in the steady-state performance, get past + this outlier before timing. + */ + for(int r = 0; r < 1; ++r) + { + runTest_flatAccess(array); + runTest_rowMajorAccess(array); + runTest_columnMajorAccess(array); + runTest_dynamicAccess(array); + } + + axom::utilities::Timer flatTimer(false); + flatTimer.start(); + for(int r = 0; r < params.repCount; ++r) runTest_flatAccess(array); + flatTimer.stop(); + std::cout << axom::fmt::format("Avg flat-index time {:.8f} seconds, base", + flatTimer.elapsedTimeInSec() / params.repCount) + << std::endl; + + auto baseTime = flatTimer.elapsedTimeInSec(); + + axom::utilities::Timer pointerTimer(false); + pointerTimer.start(); + for(int r = 0; r < params.repCount; ++r) runTest_pointerAccess(array); + pointerTimer.stop(); + std::cout << axom::fmt::format( + "Avg pointer time {:.8f} seconds, {:.2f}x", + pointerTimer.elapsedTimeInSec() / params.repCount, + pointerTimer.elapsedTimeInSec() / baseTime) + << std::endl; + + axom::utilities::Timer rowMajorTimer(false); + rowMajorTimer.start(); + for(int r = 0; r < params.repCount; ++r) runTest_rowMajorAccess(array); + rowMajorTimer.stop(); + std::cout << axom::fmt::format( + "Avg row-major time {:.8f} seconds, {:.2f}x", + rowMajorTimer.elapsedTimeInSec() / params.repCount, + rowMajorTimer.elapsedTimeInSec() / baseTime) + << std::endl; + + axom::utilities::Timer columnMajorTimer(false); + columnMajorTimer.start(); + for(int r = 0; r < params.repCount; ++r) runTest_columnMajorAccess(array); + columnMajorTimer.stop(); + std::cout << axom::fmt::format( + "Avg column-major time {:.8f} seconds, {:.2f}x", + columnMajorTimer.elapsedTimeInSec() / params.repCount, + columnMajorTimer.elapsedTimeInSec() / baseTime) + << std::endl; + + axom::utilities::Timer dynamicTimer(false); + dynamicTimer.start(); + for(int r = 0; r < params.repCount; ++r) runTest_dynamicAccess(array); + dynamicTimer.stop(); + std::cout << axom::fmt::format( + "Avg dynamic time {:.8f} seconds, {:.2f}x", + dynamicTimer.elapsedTimeInSec() / params.repCount, + dynamicTimer.elapsedTimeInSec() / baseTime) + << std::endl; + + { + AXOM_ANNOTATE_SCOPE("MDMappingPerfTester::runTest_dim-verify"); + // Verify that the elements are touched the correct number of times. + // (Bring the data to the host so this test doesn't rely on RAJA.) + auto hostAllocatorId = axom::detail::getAllocatorID< + axom::execution_space::memory_space>(); + axom::Array hostArray(array, hostAllocatorId); + axom::IndexType matchCount = 0; + for(axom::IndexType i = 0; i < count; ++i) + { + matchCount += (hostArray.flatIndex(i) == + Element_t(i * m_baseFactor) + m_testAccumulation); + } + if(matchCount != params.realSize) + { + std::cerr + << axom::fmt::format( + "Unexpected error in tests: counted match ({}) != expected ({})", + matchCount, + params.realSize) + << std::endl; + } + } + } + +}; // class MDMappingPerfTester + +/*! + @brief Run test based on dimension specified in params. + + On devices, we skip DIM > 3. We don't have the RAJA set-up for + higher dimensions. +*/ +template +void runTest() +{ + AXOM_ANNOTATE_SCOPE("runTest"); + if(params.shape.size() == 1) + { + MDMappingPerfTester<1, ExecSpace> tester1D; + tester1D.runTest_dim(); + } + else if(params.shape.size() == 2) + { + MDMappingPerfTester<2, ExecSpace> tester2D; + tester2D.runTest_dim(); + } + else if(params.shape.size() == 3) + { + MDMappingPerfTester<3, ExecSpace> tester3D; + tester3D.runTest_dim(); + } + else if(params.shape.size() == 4 && + !axom::execution_space::onDevice()) + { + MDMappingPerfTester<4, ExecSpace> tester4D; + tester4D.runTest_dim(); + } +} + +int main(int argc, char** argv) +{ + axom::CLI::App app {"Driver for array indexing performace tests"}; + + try + { + params.parse(argc, argv, app); + } + catch(const axom::CLI::ParseError& e) + { + auto retval = app.exit(e); + exit(retval); + } + + axom::utilities::raii::AnnotationsWrapper annotation_raii_wrapper( + params.annotationMode); + AXOM_ANNOTATE_SCOPE("core array performance example"); + + auto hostname = axom::utilities::getHostName(); + std::cout << axom::fmt::format("Host: {}", hostname) << std::endl; + + using RuntimePolicy = axom::runtime_policy::Policy; + + std::cout << axom::fmt::format( + "Runtime policy: {}", + axom::runtime_policy::policyToName(params.runtimePolicy)) + << std::endl; + std::cout << axom::fmt::format("Array shape: {::d}", params.shape) << std::endl; + std::cout << axom::fmt::format( + "Data order: {}", + (params.dataOrder == axom::ArrayStrideOrder::ROW ? "row" : "col")) + << std::endl; + std::cout << axom::fmt::format("Repetition count: {}", params.repCount) + << std::endl; + + if(params.runtimePolicy == RuntimePolicy::seq) + { + runTest(); + } +#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP + else if(params.runtimePolicy == RuntimePolicy::omp) + { + runTest(); + } +#endif +#ifdef AXOM_RUNTIME_POLICY_USE_CUDA + else if(params.runtimePolicy == RuntimePolicy::cuda) + { + runTest>(); + } +#endif +#ifdef AXOM_RUNTIME_POLICY_USE_HIP + else if(params.runtimePolicy == RuntimePolicy::hip) + { + runTest>(); + } +#endif + return 0; +} diff --git a/src/axom/core/execution/internal/cuda_exec.hpp b/src/axom/core/execution/internal/cuda_exec.hpp index fc9144a1df..e4ede04544 100644 --- a/src/axom/core/execution/internal/cuda_exec.hpp +++ b/src/axom/core/execution/internal/cuda_exec.hpp @@ -63,7 +63,7 @@ struct execution_space> static constexpr char* name() noexcept { return (char*)"[CUDA_EXEC]"; } static int allocatorID() noexcept { - return axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + return axom::getUmpireResourceAllocatorID(umpire::resource::Device); } }; @@ -93,7 +93,7 @@ struct execution_space> } static int allocatorID() noexcept { - return axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + return axom::getUmpireResourceAllocatorID(umpire::resource::Device); } }; } // namespace axom diff --git a/src/axom/core/execution/internal/hip_exec.hpp b/src/axom/core/execution/internal/hip_exec.hpp index ed377380ea..42b43a3eba 100644 --- a/src/axom/core/execution/internal/hip_exec.hpp +++ b/src/axom/core/execution/internal/hip_exec.hpp @@ -61,7 +61,7 @@ struct execution_space> static constexpr char* name() noexcept { return (char*)"[HIP_EXEC]"; } static int allocatorID() noexcept { - return axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + return axom::getUmpireResourceAllocatorID(umpire::resource::Device); } }; @@ -88,7 +88,7 @@ struct execution_space> static constexpr char* name() noexcept { return (char*)"[HIP_EXEC] (async)"; } static int allocatorID() noexcept { - return axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + return axom::getUmpireResourceAllocatorID(umpire::resource::Device); } }; } // namespace axom diff --git a/src/axom/mint/execution/internal/structured_exec.hpp b/src/axom/core/execution/nested_for_exec.hpp similarity index 93% rename from src/axom/mint/execution/internal/structured_exec.hpp rename to src/axom/core/execution/nested_for_exec.hpp index 909793bd6c..2fa9197549 100644 --- a/src/axom/mint/execution/internal/structured_exec.hpp +++ b/src/axom/core/execution/nested_for_exec.hpp @@ -3,8 +3,8 @@ // // SPDX-License-Identifier: (BSD-3-Clause) -#ifndef AXOM_MINT_STRUCTURED_EXEC_HPP_ -#define AXOM_MINT_STRUCTURED_EXEC_HPP_ +#ifndef AXOM_CORE_NESTED_FOR_EXEC_HPP_ +#define AXOM_CORE_NESTED_FOR_EXEC_HPP_ #include "axom/core/execution/execution_space.hpp" @@ -31,12 +31,10 @@ namespace axom { -namespace mint -{ namespace internal { template -struct structured_exec +struct nested_for_exec { using loop2d_policy = void; using loop3d_policy = void; @@ -44,7 +42,7 @@ struct structured_exec //--------------------------------------------------------| SEQ_EXEC |---------- template <> -struct structured_exec +struct nested_for_exec { #ifdef AXOM_USE_RAJA /* clang-format off */ @@ -87,7 +85,7 @@ struct structured_exec //--------------------------------------------------------| OMP_EXEC |---------- #if defined(AXOM_USE_OPENMP) && defined(AXOM_USE_RAJA) template <> -struct structured_exec +struct nested_for_exec { /* clang-format off */ @@ -134,10 +132,11 @@ constexpr int TILE_SIZE_Y = 8; constexpr int TILE_SIZE_Z = 4; //--------------------------------------------------------| CUDA_EXEC |--------- -#if defined(AXOM_USE_CUDA) && defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) +#if defined(AXOM_USE_CUDA) && defined(AXOM_USE_RAJA) && \ + defined(AXOM_USE_UMPIRE) && defined(__CUDACC__) template -struct structured_exec> +struct nested_for_exec> { /* clang-format off */ @@ -177,7 +176,7 @@ struct structured_exec> }; template -struct structured_exec> +struct nested_for_exec> { /* clang-format off */ @@ -219,10 +218,11 @@ struct structured_exec> #endif //--------------------------------------------------------| HIP_EXEC |--------- -#if defined(AXOM_USE_HIP) && defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) +#if defined(AXOM_USE_HIP) && defined(AXOM_USE_RAJA) && \ + defined(AXOM_USE_UMPIRE) && defined(__HIPCC__) template -struct structured_exec> +struct nested_for_exec> { /* clang-format off */ @@ -262,7 +262,7 @@ struct structured_exec> }; template -struct structured_exec> +struct nested_for_exec> { /* clang-format off */ @@ -305,8 +305,6 @@ struct structured_exec> } /* namespace internal */ -} /* namespace mint */ - } /* namespace axom */ -#endif /* AXOM_MINT_STRUCTURED_EXEC_HPP_ */ +#endif /* AXOM_CORE_NESTED_FOR_EXEC_HPP_ */ diff --git a/src/axom/core/execution/runtime_policy.hpp b/src/axom/core/execution/runtime_policy.hpp index 401cc82fdf..445bb538ff 100644 --- a/src/axom/core/execution/runtime_policy.hpp +++ b/src/axom/core/execution/runtime_policy.hpp @@ -108,6 +108,16 @@ enum class Policy }; // clang-format on +inline Policy nameToPolicy(const std::string &name) +{ + return s_nameToPolicy.find(name)->second; +} + +inline std::string policyToName(Policy policy) +{ + return s_policyToName.find(policy)->second; +} + /// Utility function to allow formating a Policy static inline auto format_as(Policy pol) { return axom::fmt::underlying(pol); } diff --git a/src/axom/core/numerics/eigen_solve.hpp b/src/axom/core/numerics/eigen_solve.hpp index 81fa50667b..04ebe3e1d6 100644 --- a/src/axom/core/numerics/eigen_solve.hpp +++ b/src/axom/core/numerics/eigen_solve.hpp @@ -38,7 +38,7 @@ namespace numerics * \param [in] A a square input matrix * \param [in] k number of eigenvalue-eigenvectors to find * \param [out] u pointer to k eigenvectors in order by magnitude of eigenvalue - * \param [out] lambdas pointer to k eigenvales in order by size + * \param [out] lambdas pointer to k eigenvalues in order by size * \param [in] numIterations optional number of iterations for the power method * \note if k <= 0, the solve is declared successful * \return rc return value, nonzero if the solve is successful. @@ -119,9 +119,12 @@ int eigen_solve(Matrix& A, int k, T* u, T* lambdas, int numIterations) bool res = normalize(vec, N); - if(!res) // something went wrong + // something went wrong, likely because `vec` is (numerically) + // in the span of the previous eigenvectors. Try again! + if(!res) { - return 0; + i--; + continue; } // 3: run depth iterations of power method; note that a loop invariant diff --git a/src/axom/core/tests/CMakeLists.txt b/src/axom/core/tests/CMakeLists.txt index 8d6ffc0e7e..d1ebe2810d 100644 --- a/src/axom/core/tests/CMakeLists.txt +++ b/src/axom/core/tests/CMakeLists.txt @@ -17,6 +17,7 @@ set(core_serial_tests core_about.hpp core_array.hpp + core_array_mapping.hpp core_array_for_all.hpp core_utilities.hpp core_bit_utilities.hpp @@ -25,8 +26,10 @@ set(core_serial_tests core_map.hpp core_flatmap.hpp core_memory_management.hpp + core_numeric_limits.hpp core_Path.hpp core_stack_array.hpp + core_static_array.hpp numerics_determinants.hpp numerics_eigen_solve.hpp @@ -42,7 +45,6 @@ set(core_serial_tests utils_endianness.hpp utils_fileUtilities.hpp utils_locale.hpp - utils_nvtx_settings.hpp utils_stringUtilities.hpp utils_system.hpp utils_Timer.hpp @@ -148,3 +150,27 @@ if(MFEM_FOUND) set_property(TARGET utils_config_test APPEND_STRING PROPERTY COMPILE_FLAGS "${AXOM_DISABLE_UNUSED_PARAMETER_WARNINGS}") endif() + +#------------------------------------------------------------------------------ +# Test different annotation modes +#------------------------------------------------------------------------------ +axom_add_executable(NAME utils_annotations_test + SOURCES utils_annotations.cpp + OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} + DEPENDS_ON core gtest fmt cli11 + FOLDER axom/core/tests ) + +foreach(_mode none report counts gputx) + set(_test_name utils_annotations_${_mode}_test) + if(AXOM_ENABLE_MPI) + axom_add_test(NAME ${_test_name} + COMMAND utils_annotations_test -m ${_mode} + NUM_MPI_TASKS 2) + else() + axom_add_test(NAME ${_test_name} + COMMAND utils_annotations_test -m ${_mode}) + endif() + set_property(TEST ${_test_name} + APPEND PROPERTY ENVIRONMENT "CALI_LOG_VERBOSITY=2") +endforeach() + diff --git a/src/axom/core/tests/core_about.hpp b/src/axom/core/tests/core_about.hpp index 63bc18bd38..922cc6ec9a 100644 --- a/src/axom/core/tests/core_about.hpp +++ b/src/axom/core/tests/core_about.hpp @@ -26,4 +26,6 @@ TEST(core_about, get_version) std::string axom_version = axom::getVersion(); EXPECT_EQ(expected_version.str(), axom_version); + + std::cout << "Version: " << axom::getVersion() << std::endl; } diff --git a/src/axom/core/tests/core_array.hpp b/src/axom/core/tests/core_array.hpp index af59a54541..b7cacc83f5 100644 --- a/src/axom/core/tests/core_array.hpp +++ b/src/axom/core/tests/core_array.hpp @@ -25,7 +25,9 @@ axom::IndexType calc_new_capacity(axom::Array& v, axom::IndexType increase) axom::IndexType new_num_elements = v.size() + increase; if(new_num_elements > v.capacity()) { - return new_num_elements * v.getResizeRatio() + 0.5; + axom::IndexType capacity_expanded = v.capacity() * v.getResizeRatio() + 0.5; + return axom::utilities::max(capacity_expanded, + new_num_elements); } return v.capacity(); @@ -916,6 +918,33 @@ void check_device_2D(axom::Array& v) // UNIT TESTS //------------------------------------------------------------------------------ +TEST(core_array, checkSlowestDirsConstructor) +{ + axom::Array a1({3}, {{0}}); + EXPECT_TRUE(a1.size() == 3); + EXPECT_TRUE(a1.mapping().fastestStrideLength() == 1); + EXPECT_TRUE(a1.mapping().slowestDirs()[0] == 0); + EXPECT_TRUE(a1.mapping().strides()[0] == 1); + + axom::Array a2({3, 4}, {1, 0}); + EXPECT_TRUE(a2.size() == 12); + EXPECT_TRUE(a2.mapping().fastestStrideLength() == 1); + EXPECT_TRUE(a2.mapping().slowestDirs()[0] == 1); + EXPECT_TRUE(a2.mapping().slowestDirs()[1] == 0); + EXPECT_TRUE(a2.mapping().strides()[0] == 1); + EXPECT_TRUE(a2.mapping().strides()[1] == 3); + + axom::Array a3({3, 4, 5}, {2, 0, 1}); + EXPECT_TRUE(a3.size() == 60); + EXPECT_TRUE(a3.mapping().fastestStrideLength() == 1); + EXPECT_TRUE(a3.mapping().slowestDirs()[0] == 2); + EXPECT_TRUE(a3.mapping().slowestDirs()[1] == 0); + EXPECT_TRUE(a3.mapping().slowestDirs()[2] == 1); + EXPECT_TRUE(a3.mapping().strides()[0] == 4); + EXPECT_TRUE(a3.mapping().strides()[1] == 1); + EXPECT_TRUE(a3.mapping().strides()[2] == 12); +} + //------------------------------------------------------------------------------ TEST(core_array, checkStorage) { @@ -2458,4 +2487,4 @@ TEST(core_array, regression_array_move) EXPECT_EQ(44, pr5.second.size()); EXPECT_EQ(44, pr5.second.capacity()); } -} \ No newline at end of file +} diff --git a/src/axom/core/tests/core_array_for_all.hpp b/src/axom/core/tests/core_array_for_all.hpp index fb0ebdab91..8713f20e5b 100644 --- a/src/axom/core/tests/core_array_for_all.hpp +++ b/src/axom/core/tests/core_array_for_all.hpp @@ -16,24 +16,30 @@ namespace testing { +template +struct ArrayTestParams +{ + using TheExecSpace = ExecSpace; +#ifdef AXOM_USE_UMPIRE + static constexpr axom::MemorySpace HostSpace = axom::MemorySpace::Host; +#else + static constexpr axom::MemorySpace HostSpace = axom::MemorySpace::Dynamic; +#endif + static constexpr axom::MemorySpace KernelSpace = SPACE; +}; + //------------------------------------------------------------------------------ // This test harness defines some types that are useful for the tests below //------------------------------------------------------------------------------ -template +template class core_array_for_all : public ::testing::Test { public: - using ExecSpace = TheExecSpace; + using ExecSpace = typename ExecParams::TheExecSpace; // Define some memory spaces -#ifdef AXOM_USE_UMPIRE - static constexpr axom::MemorySpace host_memory = axom::MemorySpace::Host; -#else - static constexpr axom::MemorySpace host_memory = axom::MemorySpace::Dynamic; -#endif - - static constexpr axom::MemorySpace exec_space_memory = - axom::execution_space::memory_space; + static constexpr axom::MemorySpace host_memory = ExecParams::HostSpace; + static constexpr axom::MemorySpace exec_space_memory = ExecParams::KernelSpace; // Define some Array type aliases template @@ -44,29 +50,44 @@ class core_array_for_all : public ::testing::Test using DynamicArray = axom::Array; using KernelArray = axom::Array; using KernelArrayView = axom::ArrayView; + + static int getKernelAllocatorID() + { + return axom::detail::getAllocatorID(); + } }; // Generate a list of available execution types using MyTypes = ::testing::Types< #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_OPENMP) - axom::OMP_EXEC, + ArrayTestParams, #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_CUDA) && defined(AXOM_USE_UMPIRE) - axom::CUDA_EXEC<100>, - axom::CUDA_EXEC<256>, - axom::CUDA_EXEC<256, axom::ASYNC>, + ArrayTestParams, axom::MemorySpace::Device>, + ArrayTestParams, axom::MemorySpace::Unified>, + ArrayTestParams, axom::MemorySpace::Pinned>, + ArrayTestParams, axom::MemorySpace::Device>, + ArrayTestParams, axom::MemorySpace::Unified>, + ArrayTestParams, axom::MemorySpace::Pinned>, #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && defined(AXOM_USE_UMPIRE) - axom::HIP_EXEC<100>, - axom::HIP_EXEC<256>, - axom::HIP_EXEC<256, axom::ASYNC>, + ArrayTestParams, axom::MemorySpace::Device>, + ArrayTestParams, axom::MemorySpace::Unified>, + ArrayTestParams, axom::MemorySpace::Pinned>, + ArrayTestParams, axom::MemorySpace::Device>, + ArrayTestParams, axom::MemorySpace::Unified>, + ArrayTestParams, axom::MemorySpace::Pinned>, +#endif +#if defined(AXOM_USE_UMPIRE) + ArrayTestParams, #endif - axom::SEQ_EXEC>; + ArrayTestParams>; TYPED_TEST_SUITE(core_array_for_all, MyTypes); //------------------------------------------------------------------------------ -#if defined(AXOM_USE_RAJA) && defined(AXOM_USE_CUDA) && defined(AXOM_USE_UMPIRE) +#if defined(AXOM_USE_RAJA) && defined(AXOM_USE_CUDA) && \ + defined(AXOM_USE_UMPIRE) && defined(AXOM_DEBUG) AXOM_CUDA_TEST(core_array_for_all, capture_test) { using ExecSpace = axom::CUDA_EXEC<256>; @@ -248,7 +269,7 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array) using DynamicArray = typename TestFixture::DynamicArray; using HostArray = typename TestFixture::HostArray; - int kernelAllocID = axom::execution_space::allocatorID(); + int kernelAllocID = TestFixture::getKernelAllocatorID(); int hostAllocID = axom::execution_space::allocatorID(); // Create an array of N items using default MemorySpace for ExecSpace @@ -294,14 +315,7 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_insert) using HostArray = typename TestFixture::HostArray; using ExecSpace = typename TestFixture::ExecSpace; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); constexpr axom::IndexType N = 374; DynamicArray arr(N, N, kernelAllocID); @@ -367,14 +381,7 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_range_insert) using HostArray = typename TestFixture::HostArray; using ExecSpace = typename TestFixture::ExecSpace; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); constexpr axom::IndexType N = 374; DynamicArray arr(N, N, kernelAllocID); @@ -441,14 +448,7 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_range_set) using HostArray = typename TestFixture::HostArray; using ExecSpace = typename TestFixture::ExecSpace; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); constexpr axom::IndexType N = 374; DynamicArray arr(N, N, kernelAllocID); @@ -495,16 +495,8 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_initializer_list) { using DynamicArray = typename TestFixture::DynamicArray; using HostArray = typename TestFixture::HostArray; - using ExecSpace = typename TestFixture::ExecSpace; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); // Construct array with an initializer list { @@ -548,14 +540,7 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_resize) using HostArray = typename TestFixture::HostArray; using ExecSpace = typename TestFixture::ExecSpace; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); constexpr axom::IndexType N = 10; DynamicArray arr(N, N, kernelAllocID); @@ -566,6 +551,12 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_resize) N, AXOM_LAMBDA(axom::IndexType idx) { arr_v[idx] = idx; }); + // handles synchronization, if necessary + if(axom::execution_space::async()) + { + axom::synchronize(); + } + // Call resize without a default value. New elements in array should be set // to 0. arr.resize(2 * N); @@ -624,7 +615,6 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_resize) //------------------------------------------------------------------------------ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_of_arrays) { - using ExecSpace = typename TestFixture::ExecSpace; using DynamicArray = typename TestFixture::DynamicArray; using HostArray = typename TestFixture::HostArray; using ArrayOfArrays = @@ -632,14 +622,7 @@ AXOM_TYPED_TEST(core_array_for_all, dynamic_array_of_arrays) using HostArrayOfArrays = typename TestFixture::template HostTArray; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); constexpr axom::IndexType N = 5; ArrayOfArrays arr_2d(0, N, kernelAllocID); @@ -725,14 +708,7 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_default_ctor_obj) using HostArray = typename TestFixture::template HostTArray; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); int hostAllocID = axom::execution_space::allocatorID(); // Create an array of N items using default MemorySpace for ExecSpace @@ -802,14 +778,7 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_ctor_obj) typename TestFixture::template DynamicTArray; using HostArray = typename TestFixture::template HostTArray; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); int hostAllocID = axom::execution_space::allocatorID(); // Create an array of N items using default MemorySpace for ExecSpace @@ -867,19 +836,11 @@ int NonTrivialDtor::dtor_calls {0}; AXOM_TYPED_TEST(core_array_for_all, nontrivial_dtor_obj) { - using ExecSpace = typename TestFixture::ExecSpace; using DynamicArray = typename TestFixture::template DynamicTArray; using HostArray = typename TestFixture::template HostTArray; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); int hostAllocID = axom::execution_space::allocatorID(); NonTrivialDtor::dtor_calls = 0; @@ -960,14 +921,7 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_copy_ctor_obj) using IntArray = typename TestFixture::DynamicArray; using IntHostArray = typename TestFixture::HostArray; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); int hostAllocID = axom::execution_space::allocatorID(); // Helper function to check all values in the array for consistency @@ -1079,14 +1033,7 @@ AXOM_TYPED_TEST(core_array_for_all, nontrivial_emplace) using IntArray = typename TestFixture::DynamicArray; using HostIntArray = typename TestFixture::HostArray; - int kernelAllocID = axom::execution_space::allocatorID(); -#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) - if(axom::execution_space::onDevice()) - { - kernelAllocID = axom::getUmpireResourceAllocatorID( - umpire::resource::MemoryResourceType::Device); - } -#endif + int kernelAllocID = TestFixture::getKernelAllocatorID(); // Helper function to copy device values to a host array auto convert_to_host_array = [=](const DynamicArray& arr) -> HostIntArray { @@ -1202,11 +1149,19 @@ AXOM_TYPED_TEST(core_array_for_all, device_insert) using DynamicArrayOfArrays = typename TestFixture::template DynamicTArray; - int kernelAllocID = axom::execution_space::allocatorID(); + int kernelAllocID = TestFixture::getKernelAllocatorID(); + int umAllocID = kernelAllocID; +#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) + // Use unified memory for frequent movement between device operations + // and value checking on host + umAllocID = axom::getUmpireResourceAllocatorID( + umpire::resource::MemoryResourceType::Unified); +#endif + int hostAllocID = axom::execution_space::allocatorID(); constexpr axom::IndexType N = 374; - DynamicArrayOfArrays arr_container(1, 1, kernelAllocID); + DynamicArrayOfArrays arr_container(1, 1, umAllocID); arr_container[0] = DynamicArray(0, N, kernelAllocID); const auto arr_v = arr_container.view(); @@ -1222,15 +1177,15 @@ AXOM_TYPED_TEST(core_array_for_all, device_insert) { #pragma omp critical { - arr_v[0].emplace_back(3 * idx + 5); + arr_v[0].emplace_back_device(3 * idx + 5); } } else { - arr_v[0].emplace_back(3 * idx + 5); + arr_v[0].emplace_back_device(3 * idx + 5); } #else - arr_v[0].emplace_back(3 * idx + 5); + arr_v[0].emplace_back_device(3 * idx + 5); #endif }); @@ -1243,26 +1198,72 @@ AXOM_TYPED_TEST(core_array_for_all, device_insert) EXPECT_EQ(arr_container[0].size(), N); EXPECT_EQ(arr_container[0].capacity(), N); + // Copy array to host. + DynamicArray arr_host(arr_container[0], hostAllocID); + // Device-side inserts may occur in any order. // Sort them before we check the inserted values. - std::sort(arr_container[0].begin(), - arr_container[0].end(), + std::sort(arr_host.begin(), + arr_host.end(), [](const DeviceInsert& a, const DeviceInsert& b) -> bool { return a.m_value < b.m_value; }); for(int i = 0; i < N; i++) { - EXPECT_EQ(arr_container[0][i].m_value, 3 * i + 5); + EXPECT_EQ(arr_host[i].m_value, 3 * i + 5); if(axom::execution_space::onDevice()) { - EXPECT_EQ(arr_container[0][i].m_host_or_device, INSERT_ON_DEVICE); + EXPECT_EQ(arr_host[i].m_host_or_device, INSERT_ON_DEVICE); } else { - EXPECT_EQ(arr_container[0][i].m_host_or_device, INSERT_ON_HOST); + EXPECT_EQ(arr_host[i].m_host_or_device, INSERT_ON_HOST); } } } +//------------------------------------------------------------------------------ +AXOM_TYPED_TEST(core_array_for_all, unified_mem_preference) +{ + using KernelArray = typename TestFixture::KernelArray; + +#if defined(AXOM_USE_RAJA) && defined(AXOM_USE_CUDA) && defined(AXOM_USE_UMPIRE) + if(TestFixture::exec_space_memory != axom::MemorySpace::Unified && + TestFixture::exec_space_memory != axom::MemorySpace::Pinned) + { + GTEST_SKIP() << "Skipping test for a memory space that isn't accessible " + "from both CPU and GPU."; + } +#elif defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ + defined(AXOM_USE_UMPIRE) + if(TestFixture::exec_space_memory != axom::MemorySpace::Unified && + TestFixture::exec_space_memory != axom::MemorySpace::Pinned && + TestFixture::exec_space_memory != axom::MemorySpace::Device) + { + GTEST_SKIP() << "Skipping test for a memory space that isn't accessible " + "from both CPU and GPU."; + } +#else + GTEST_SKIP() << "Skipping test on non-GPU platform."; +#endif + + constexpr axom::IndexType N = 374; + + for(bool devicePref : {false, true}) + { + KernelArray arr; + arr.setDevicePreference(devicePref); + + // Check that we can do a few miscellaneous array operations. + // At the moment, we can't really test that they're actually being + // performed on the host or the device, so just check that nothing breaks. + arr.resize(N); + KernelArray arr_copy(arr); + arr.push_back(1); + arr.insert(arr.begin(), -1); + arr.clear(); + } +} + } // end namespace testing diff --git a/src/axom/quest/tests/quest_array_indexer.cpp b/src/axom/core/tests/core_array_mapping.hpp similarity index 64% rename from src/axom/quest/tests/quest_array_indexer.cpp rename to src/axom/core/tests/core_array_mapping.hpp index a84430b68d..c778568dd0 100644 --- a/src/axom/quest/tests/quest_array_indexer.cpp +++ b/src/axom/core/tests/core_array_mapping.hpp @@ -5,23 +5,21 @@ // Axom includes #include "axom/core/Array.hpp" -#include "axom/quest/ArrayIndexer.hpp" +#include "axom/core/MDMapping.hpp" #include "axom/fmt.hpp" // Google test include #include "gtest/gtest.h" // Test strides and permutations. -TEST(quest_array_indexer, quest_strides_and_permutations) +TEST(core_array_mapping, core_strides_and_permutations) { { // 1D constexpr int DIM = 1; axom::StackArray lengths {2}; - axom::ArrayIndexer colIndexer( - lengths, - axom::ArrayStrideOrder::COLUMN); + axom::MDMapping colIndexer(lengths, axom::ArrayStrideOrder::COLUMN); EXPECT_EQ(colIndexer.getStrideOrder(), axom::ArrayStrideOrder::BOTH); axom::StackArray colSlowestDirs {0}; axom::StackArray colStrides {1}; @@ -30,13 +28,9 @@ TEST(quest_array_indexer, quest_strides_and_permutations) EXPECT_EQ(colIndexer.slowestDirs()[d], colSlowestDirs[d]); EXPECT_EQ(colIndexer.strides()[d], colStrides[d]); } - EXPECT_TRUE( - colIndexer == - (axom::ArrayIndexer(lengths, colSlowestDirs))); + EXPECT_TRUE(colIndexer == (axom::MDMapping(lengths, colSlowestDirs))); - axom::ArrayIndexer rowIndexer( - lengths, - axom::ArrayStrideOrder::ROW); + axom::MDMapping rowIndexer(lengths, axom::ArrayStrideOrder::ROW); EXPECT_EQ(rowIndexer.getStrideOrder(), axom::ArrayStrideOrder::BOTH); axom::StackArray rowSlowestDirs {0}; axom::StackArray rowStrides {1}; @@ -45,18 +39,14 @@ TEST(quest_array_indexer, quest_strides_and_permutations) EXPECT_EQ(rowIndexer.slowestDirs()[d], rowSlowestDirs[d]); EXPECT_EQ(rowIndexer.strides()[d], rowStrides[d]); } - EXPECT_TRUE( - rowIndexer == - (axom::ArrayIndexer(lengths, rowSlowestDirs))); + EXPECT_TRUE(rowIndexer == (axom::MDMapping(lengths, rowSlowestDirs))); } { // 2D constexpr int DIM = 2; axom::StackArray lengths {3, 2}; - axom::ArrayIndexer colIndexer( - lengths, - axom::ArrayStrideOrder::COLUMN); + axom::MDMapping colIndexer(lengths, axom::ArrayStrideOrder::COLUMN); EXPECT_EQ(colIndexer.getStrideOrder(), axom::ArrayStrideOrder::COLUMN); axom::StackArray colSlowestDirs {1, 0}; axom::StackArray colStrides {1, 3}; @@ -66,9 +56,7 @@ TEST(quest_array_indexer, quest_strides_and_permutations) EXPECT_EQ(colIndexer.strides()[d], colStrides[d]); } - axom::ArrayIndexer rowIndexer( - lengths, - axom::ArrayStrideOrder::ROW); + axom::MDMapping rowIndexer(lengths, axom::ArrayStrideOrder::ROW); EXPECT_EQ(rowIndexer.getStrideOrder(), axom::ArrayStrideOrder::ROW); axom::StackArray rowSlowestDirs {0, 1}; axom::StackArray rowStrides {2, 1}; @@ -83,9 +71,7 @@ TEST(quest_array_indexer, quest_strides_and_permutations) constexpr int DIM = 3; axom::StackArray lengths {5, 3, 2}; - axom::ArrayIndexer colIndexer( - lengths, - axom::ArrayStrideOrder::COLUMN); + axom::MDMapping colIndexer(lengths, axom::ArrayStrideOrder::COLUMN); EXPECT_EQ(colIndexer.getStrideOrder(), axom::ArrayStrideOrder::COLUMN); axom::StackArray colSlowestDirs {2, 1, 0}; axom::StackArray colStrides {1, 5, 15}; @@ -95,9 +81,7 @@ TEST(quest_array_indexer, quest_strides_and_permutations) EXPECT_EQ(colIndexer.strides()[d], colStrides[d]); } - axom::ArrayIndexer rowIndexer( - lengths, - axom::ArrayStrideOrder::ROW); + axom::MDMapping rowIndexer(lengths, axom::ArrayStrideOrder::ROW); EXPECT_EQ(rowIndexer.getStrideOrder(), axom::ArrayStrideOrder::ROW); axom::StackArray rowSlowestDirs {0, 1, 2}; axom::StackArray rowStrides {6, 2, 1}; @@ -110,21 +94,20 @@ TEST(quest_array_indexer, quest_strides_and_permutations) } // Test row-major offsets. -TEST(quest_array_indexer, quest_row_major_offset) +TEST(quest_array_mapping, quest_row_major_offset) { { // 1D constexpr int DIM = 1; axom::StackArray lengths {3}; - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::ROW); - EXPECT_EQ(ai.getStrideOrder(), axom::ArrayStrideOrder::BOTH); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::ROW); + EXPECT_EQ(mdmap.getStrideOrder(), axom::ArrayStrideOrder::BOTH); axom::IndexType offset = 0; for(int i = 0; i < lengths[0]; ++i) { axom::StackArray indices {i}; - EXPECT_EQ(ai.toFlatIndex(indices), offset); - EXPECT_EQ(ai.toMultiIndex(offset), indices); + EXPECT_EQ(mdmap.toFlatIndex(indices), offset); + EXPECT_EQ(mdmap.toMultiIndex(offset), indices); ++offset; } } @@ -132,17 +115,16 @@ TEST(quest_array_indexer, quest_row_major_offset) // 2D constexpr int DIM = 2; axom::StackArray lengths {3, 2}; - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::ROW); - EXPECT_EQ(ai.getStrideOrder(), axom::ArrayStrideOrder::ROW); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::ROW); + EXPECT_EQ(mdmap.getStrideOrder(), axom::ArrayStrideOrder::ROW); axom::IndexType offset = 0; for(int i = 0; i < lengths[0]; ++i) { for(int j = 0; j < lengths[1]; ++j) { axom::StackArray indices {i, j}; - EXPECT_EQ(ai.toFlatIndex(indices), offset); - EXPECT_EQ(ai.toMultiIndex(offset), indices); + EXPECT_EQ(mdmap.toFlatIndex(indices), offset); + EXPECT_EQ(mdmap.toMultiIndex(offset), indices); ++offset; } } @@ -150,9 +132,8 @@ TEST(quest_array_indexer, quest_row_major_offset) { // 3D axom::StackArray lengths {5, 3, 2}; - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::ROW); - EXPECT_EQ(ai.getStrideOrder(), axom::ArrayStrideOrder::ROW); + axom::MDMapping<3> mdmap(lengths, axom::ArrayStrideOrder::ROW); + EXPECT_EQ(mdmap.getStrideOrder(), axom::ArrayStrideOrder::ROW); axom::IndexType offset = 0; for(int i = 0; i < lengths[0]; ++i) { @@ -161,8 +142,8 @@ TEST(quest_array_indexer, quest_row_major_offset) for(int k = 0; k < lengths[2]; ++k) { axom::StackArray indices {i, j, k}; - EXPECT_EQ(ai.toFlatIndex(indices), offset); - EXPECT_EQ(ai.toMultiIndex(offset), indices); + EXPECT_EQ(mdmap.toFlatIndex(indices), offset); + EXPECT_EQ(mdmap.toMultiIndex(offset), indices); ++offset; } } @@ -171,21 +152,20 @@ TEST(quest_array_indexer, quest_row_major_offset) } // Test column-major offsets. -TEST(quest_array_indexer, quest_col_major_offset) +TEST(quest_array_mapping, quest_col_major_offset) { { // 1D constexpr int DIM = 1; axom::StackArray lengths {3}; - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::COLUMN); - EXPECT_EQ(ai.getStrideOrder(), axom::ArrayStrideOrder::BOTH); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::COLUMN); + EXPECT_EQ(mdmap.getStrideOrder(), axom::ArrayStrideOrder::BOTH); axom::IndexType offset = 0; for(int i = 0; i < lengths[0]; ++i) { axom::StackArray indices {i}; - EXPECT_EQ(ai.toFlatIndex(indices), offset); - EXPECT_EQ(ai.toMultiIndex(offset), indices); + EXPECT_EQ(mdmap.toFlatIndex(indices), offset); + EXPECT_EQ(mdmap.toMultiIndex(offset), indices); ++offset; } } @@ -193,17 +173,16 @@ TEST(quest_array_indexer, quest_col_major_offset) // 2D constexpr int DIM = 2; axom::StackArray lengths {3, 2}; - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::COLUMN); - EXPECT_EQ(ai.getStrideOrder(), axom::ArrayStrideOrder::COLUMN); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::COLUMN); + EXPECT_EQ(mdmap.getStrideOrder(), axom::ArrayStrideOrder::COLUMN); axom::IndexType offset = 0; for(int j = 0; j < lengths[1]; ++j) { for(int i = 0; i < lengths[0]; ++i) { axom::StackArray indices {i, j}; - EXPECT_EQ(ai.toFlatIndex(indices), offset); - EXPECT_EQ(ai.toMultiIndex(offset), indices); + EXPECT_EQ(mdmap.toFlatIndex(indices), offset); + EXPECT_EQ(mdmap.toMultiIndex(offset), indices); ++offset; } } @@ -212,9 +191,8 @@ TEST(quest_array_indexer, quest_col_major_offset) // 3D constexpr int DIM = 3; axom::StackArray lengths {5, 3, 2}; - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::COLUMN); - EXPECT_EQ(ai.getStrideOrder(), axom::ArrayStrideOrder::COLUMN); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::COLUMN); + EXPECT_EQ(mdmap.getStrideOrder(), axom::ArrayStrideOrder::COLUMN); axom::IndexType offset = 0; for(int k = 0; k < lengths[2]; ++k) { @@ -223,8 +201,8 @@ TEST(quest_array_indexer, quest_col_major_offset) for(int i = 0; i < lengths[0]; ++i) { axom::StackArray indices {i, j, k}; - EXPECT_EQ(ai.toFlatIndex(indices), offset); - EXPECT_EQ(ai.toMultiIndex(offset), indices); + EXPECT_EQ(mdmap.toFlatIndex(indices), offset); + EXPECT_EQ(mdmap.toMultiIndex(offset), indices); ++offset; } } @@ -236,7 +214,7 @@ template typename std::enable_if::type check_arbitrary_strides_nested_loops( const axom::StackArray& lengths, const axom::StackArray& fastestDirs, - const axom::ArrayIndexer& ai) + const axom::MDMapping& mdmap) { /* We address the array with natural indices, but arange the @@ -247,9 +225,9 @@ typename std::enable_if::type check_arbitrary_strides_nested_loops( axom::IndexType offset = 0; for(n = 0; n < lengths[fastestDirs[0]]; ++n) { - SLIC_INFO(axom::fmt::format("offset {} i {}", offset, i)); - EXPECT_EQ(ai.toMultiIndex(offset), i); - EXPECT_EQ(ai.toFlatIndex(i), offset); + // SLIC_INFO(axom::fmt::format("offset {} i {}", offset, i)); + EXPECT_EQ(mdmap.toMultiIndex(offset), i); + EXPECT_EQ(mdmap.toFlatIndex(i), offset); ++offset; } } @@ -258,7 +236,7 @@ template typename std::enable_if::type check_arbitrary_strides_nested_loops( const axom::StackArray& lengths, const axom::StackArray& fastestDirs, - const axom::ArrayIndexer& ai) + const axom::MDMapping& mdmap) { /* We address the array with natural indices, but arange the @@ -272,9 +250,9 @@ typename std::enable_if::type check_arbitrary_strides_nested_loops( { for(n = 0; n < lengths[fastestDirs[0]]; ++n) { - SLIC_INFO(axom::fmt::format("offset {} ij {}", offset, ij)); - EXPECT_EQ(ai.toMultiIndex(offset), ij); - EXPECT_EQ(ai.toFlatIndex(ij), offset); + // SLIC_INFO(axom::fmt::format("offset {} ij {}", offset, ij)); + EXPECT_EQ(mdmap.toMultiIndex(offset), ij); + EXPECT_EQ(mdmap.toFlatIndex(ij), offset); ++offset; } } @@ -284,7 +262,7 @@ template typename std::enable_if::type check_arbitrary_strides_nested_loops( const axom::StackArray& lengths, const axom::StackArray& fastestDirs, - const axom::ArrayIndexer& ai) + const axom::MDMapping& mdmap) { /* We address the array with natural indices, but arange the @@ -301,9 +279,9 @@ typename std::enable_if::type check_arbitrary_strides_nested_loops( { for(n = 0; n < lengths[fastestDirs[0]]; ++n) { - SLIC_INFO(axom::fmt::format("offset {} ijk {}", offset, ijk)); - EXPECT_EQ(ai.toMultiIndex(offset), ijk); - EXPECT_EQ(ai.toFlatIndex(ijk), offset); + // SLIC_INFO(axom::fmt::format("offset {} ijk {}", offset, ijk)); + EXPECT_EQ(mdmap.toMultiIndex(offset), ijk); + EXPECT_EQ(mdmap.toFlatIndex(ijk), offset); ++offset; } } @@ -316,9 +294,7 @@ void check_arbitrary_strides( const axom::StackArray& fastestDirs) { // fastestDirs should be a permutation. - SLIC_INFO(axom::fmt::format("Testing lengths {} with fastestDirs {}", - lengths, - fastestDirs)); + // SLIC_INFO(axom::fmt::format("Testing lengths {} with fastestDirs {}", lengths, fastestDirs)); axom::StackArray strides; axom::IndexType currentStride = 1; @@ -329,23 +305,23 @@ void check_arbitrary_strides( currentStride *= lengths[currentDir]; } - axom::ArrayIndexer ai(strides); + axom::MDMapping mdmap(strides); - const auto slowestDirs = ai.slowestDirs(); + const auto slowestDirs = mdmap.slowestDirs(); for(int d = 0; d < DIM; ++d) { EXPECT_EQ(slowestDirs[d], fastestDirs[DIM - d - 1]); } - check_arbitrary_strides_nested_loops(lengths, fastestDirs, ai); + check_arbitrary_strides_nested_loops(lengths, fastestDirs, mdmap); } // Test arbitrary strides. -TEST(quest_array_indexer, quest_arbitrary_strides) +TEST(core_array_mapping, core_arbitrary_strides) { { constexpr int DIM = 1; - // ArrayIndexer is overkill for 1D, but think of it as a smoke test. + // MDMapping is overkill for 1D, but think of it as a smoke test. axom::StackArray lengths {3}; axom::StackArray fastestDirs {0}; @@ -393,32 +369,51 @@ TEST(quest_array_indexer, quest_arbitrary_strides) } } -// Test column-major element offsets with Array's. -TEST(quest_array_indexer, quest_array_match) +// Test row- and column-major element offsets with Array's. +TEST(core_array_mapping, core_array_match) { // No test for 1D. Array provides no non-trivial interface to test. { constexpr int DIM = 2; axom::StackArray lengths {3, 2}; - axom::Array a(lengths); - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::ROW); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::ROW); + axom::Array a(lengths, mdmap.getStrideOrder()); + axom::IndexType sequenceNum = 0; for(axom::IndexType i = 0; i < lengths[0]; ++i) { for(axom::IndexType j = 0; j < lengths[1]; ++j) { axom::StackArray indices {i, j}; - EXPECT_EQ(&a(i, j), &a.flatIndex(ai.toFlatIndex(indices))); + EXPECT_EQ(mdmap.toFlatIndex(indices), sequenceNum); + ++sequenceNum; + EXPECT_EQ(&a(i, j), &a.flatIndex(mdmap.toFlatIndex(indices))); + } + } + } + { + constexpr int DIM = 2; + axom::StackArray lengths {3, 2}; + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::COLUMN); + axom::Array a(lengths, mdmap.getStrideOrder()); + axom::IndexType sequenceNum = 0; + for(axom::IndexType j = 0; j < lengths[1]; ++j) + { + for(axom::IndexType i = 0; i < lengths[0]; ++i) + { + axom::StackArray indices {i, j}; + EXPECT_EQ(mdmap.toFlatIndex(indices), sequenceNum); + ++sequenceNum; + EXPECT_EQ(&a(i, j), &a.flatIndex(mdmap.toFlatIndex(indices))); } } } { constexpr int DIM = 3; axom::StackArray lengths {5, 3, 2}; - axom::Array a(lengths); - axom::ArrayIndexer ai(lengths, - axom::ArrayStrideOrder::ROW); + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::ROW); + axom::Array a(lengths, mdmap.getStrideOrder()); + axom::IndexType sequenceNum = 0; for(axom::IndexType i = 0; i < lengths[0]; ++i) { for(axom::IndexType j = 0; j < lengths[1]; ++j) @@ -426,18 +421,31 @@ TEST(quest_array_indexer, quest_array_match) for(axom::IndexType k = 0; k < lengths[2]; ++k) { axom::StackArray indices {i, j, k}; - EXPECT_EQ(&a(i, j, k), &a.flatIndex(ai.toFlatIndex(indices))); + EXPECT_EQ(mdmap.toFlatIndex(indices), sequenceNum); + ++sequenceNum; + EXPECT_EQ(&a(i, j, k), &a.flatIndex(mdmap.toFlatIndex(indices))); + } + } + } + } + { + constexpr int DIM = 3; + axom::StackArray lengths {5, 3, 2}; + axom::MDMapping mdmap(lengths, axom::ArrayStrideOrder::COLUMN); + axom::Array a(lengths, mdmap.getStrideOrder()); + axom::IndexType sequenceNum = 0; + for(axom::IndexType k = 0; k < lengths[2]; ++k) + { + for(axom::IndexType j = 0; j < lengths[1]; ++j) + { + for(axom::IndexType i = 0; i < lengths[0]; ++i) + { + axom::StackArray indices {i, j, k}; + EXPECT_EQ(mdmap.toFlatIndex(indices), sequenceNum); + ++sequenceNum; + EXPECT_EQ(&a(i, j, k), &a.flatIndex(mdmap.toFlatIndex(indices))); } } } } -} - -int main(int argc, char** argv) -{ - ::testing::InitGoogleTest(&argc, argv); - - int result = RUN_ALL_TESTS(); - - return result; } diff --git a/src/axom/core/tests/core_bit_utilities.hpp b/src/axom/core/tests/core_bit_utilities.hpp index af3cc03934..d8ec6eb5e4 100644 --- a/src/axom/core/tests/core_bit_utilities.hpp +++ b/src/axom/core/tests/core_bit_utilities.hpp @@ -7,6 +7,7 @@ #include "axom/config.hpp" #include "axom/core/Types.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/core/utilities/Utilities.hpp" #include "axom/core/utilities/BitUtilities.hpp" @@ -22,7 +23,7 @@ T random_int() { static_assert(std::is_integral::value, "T must be an integral type"); - constexpr T max_int = std::numeric_limits::max(); + constexpr T max_int = axom::numeric_limits::max(); constexpr double max_d = static_cast(max_int); const auto val = axom::utilities::random_real(0., max_d); diff --git a/src/axom/core/tests/core_execution_for_all.hpp b/src/axom/core/tests/core_execution_for_all.hpp index 5b93132811..bb56dfc17c 100644 --- a/src/axom/core/tests/core_execution_for_all.hpp +++ b/src/axom/core/tests/core_execution_for_all.hpp @@ -32,12 +32,12 @@ void check_for_all() constexpr int VALUE_2 = 42; constexpr int N = 256; - // STEP 1: set default allocator for the execution space - const int currentAllocatorID = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + // STEP 1: set allocators for the execution spaces + const int hostID = axom::execution_space::allocatorID(); + const int allocID = axom::execution_space::allocatorID(); // STEP 0: allocate buffer - int* a = axom::allocate(N); + int* a = axom::allocate(N, allocID); // STEP 1: initialize to VALUE_1 axom::for_all( @@ -50,9 +50,12 @@ void check_for_all() } // STEP 2: check array + int* a_host = axom::allocate(N, hostID); + axom::copy(a_host, a, N * sizeof(int)); + for(int i = 0; i < N; ++i) { - EXPECT_EQ(a[i], VALUE_1); + EXPECT_EQ(a_host[i], VALUE_1); } // STEP 3: add VALUE_2 to all entries resulting to zero @@ -67,15 +70,16 @@ void check_for_all() } // STEP 4: check result + axom::copy(a_host, a, N * sizeof(int)); + for(int i = 0; i < N; ++i) { - EXPECT_EQ(a[i], 0); + EXPECT_EQ(a_host[i], 0); } // STEP 5: cleanup axom::deallocate(a); - - axom::setDefaultAllocator(currentAllocatorID); + axom::deallocate(a_host); } } /* end anonymous namespace */ diff --git a/src/axom/core/tests/core_execution_space.hpp b/src/axom/core/tests/core_execution_space.hpp index 9bf2b7d0bf..a05e5758ba 100644 --- a/src/axom/core/tests/core_execution_space.hpp +++ b/src/axom/core/tests/core_execution_space.hpp @@ -183,8 +183,7 @@ TEST(core_execution_space, check_cuda_exec) constexpr bool IS_ASYNC = false; constexpr bool ON_DEVICE = true; - int allocator_id = - axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + int allocator_id = axom::getUmpireResourceAllocatorID(umpire::resource::Device); check_execution_mappings, RAJA::cuda_exec, RAJA::cuda_reduce, @@ -204,8 +203,7 @@ TEST(core_execution_space, check_cuda_exec_async) constexpr bool IS_ASYNC = true; constexpr bool ON_DEVICE = true; - int allocator_id = - axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + int allocator_id = axom::getUmpireResourceAllocatorID(umpire::resource::Device); check_execution_mappings, RAJA::cuda_exec_async, RAJA::cuda_reduce, @@ -228,8 +226,7 @@ TEST(core_execution_space, check_hip_exec) constexpr bool IS_ASYNC = false; constexpr bool ON_DEVICE = true; - int allocator_id = - axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + int allocator_id = axom::getUmpireResourceAllocatorID(umpire::resource::Device); check_execution_mappings, RAJA::hip_exec, RAJA::hip_reduce, @@ -249,8 +246,7 @@ TEST(core_execution_space, check_hip_exec_async) constexpr bool IS_ASYNC = true; constexpr bool ON_DEVICE = true; - int allocator_id = - axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + int allocator_id = axom::getUmpireResourceAllocatorID(umpire::resource::Device); check_execution_mappings, RAJA::hip_exec_async, RAJA::hip_reduce, diff --git a/src/axom/core/tests/core_mpi_main.cpp b/src/axom/core/tests/core_mpi_main.cpp index 2aa78d07aa..ea3441a831 100644 --- a/src/axom/core/tests/core_mpi_main.cpp +++ b/src/axom/core/tests/core_mpi_main.cpp @@ -7,7 +7,7 @@ #include "mpi.h" -#include "axom/config.hpp" // for compile-time definitions +#include "axom/config.hpp" #include "core_types.hpp" diff --git a/src/axom/core/tests/core_numeric_limits.hpp b/src/axom/core/tests/core_numeric_limits.hpp new file mode 100644 index 0000000000..18727579cc --- /dev/null +++ b/src/axom/core/tests/core_numeric_limits.hpp @@ -0,0 +1,170 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +#include "axom/config.hpp" // for compile time definitions + +#include "axom/core/NumericLimits.hpp" + +// for gtest macros +#include "gtest/gtest.h" + +//------------------------------------------------------------------------------ +// UNIT TESTS +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +TEST(core_NumericLimits, check_CPU) +{ + // + // Tests to compare axom::numeric_limits to std::numeric_limits + // to ensure that Axom type aliasing is correct. + // + EXPECT_TRUE(axom::numeric_limits::lowest() == + std::numeric_limits::lowest()); + EXPECT_TRUE(axom::numeric_limits::min() == std::numeric_limits::min()); + EXPECT_TRUE(axom::numeric_limits::max() == std::numeric_limits::max()); + EXPECT_TRUE(axom::numeric_limits::is_signed == + std::numeric_limits::is_signed); + + EXPECT_TRUE(axom::numeric_limits::lowest() == + std::numeric_limits::lowest()); + EXPECT_TRUE(axom::numeric_limits::min() == + std::numeric_limits::min()); + EXPECT_TRUE(axom::numeric_limits::max() == + std::numeric_limits::max()); + + EXPECT_TRUE(axom::numeric_limits::lowest() == + std::numeric_limits::lowest()); + EXPECT_TRUE(axom::numeric_limits::min() == + std::numeric_limits::min()); + EXPECT_TRUE(axom::numeric_limits::max() == + std::numeric_limits::max()); +} + +//------------------------------------------------------------------------------ +#if defined(AXOM_USE_CUDA) +// +// Tests to ensure axom::numeric_limits type alias does the correct thing +// in host and CUDA device code. +// + +// +// Simple device kernel +// +__global__ void cuda_kernel(int* a, size_t* b, float* c, double* d) +{ + a[0] = axom::numeric_limits::min(); + b[0] = axom::numeric_limits::max(); + c[0] = axom::numeric_limits::lowest(); + d[0] = axom::numeric_limits::max(); +} + +TEST(core_NumericLimits, check_CUDA) +{ + // + // Device memory allocation and initialiation for a few different types. + // + int* a; + (void)cudaMalloc(&a, sizeof(int)); + (void)cudaMemset(a, 0, sizeof(int)); + + size_t* b; + (void)cudaMalloc(&b, sizeof(size_t)); + (void)cudaMemset(b, 0, sizeof(size_t)); + + float* c; + (void)cudaMalloc(&c, sizeof(float)); + (void)cudaMemset(c, 0, sizeof(float)); + + double* d; + (void)cudaMalloc(&d, sizeof(double)); + (void)cudaMemset(d, 0, sizeof(double)); + + // + // Set values in device code. + // + cuda_kernel<<<1, 1>>>(a, b, c, d); + + // + // Copy device values back to host and compare with expectations.... + // + int ha; + size_t hb; + float hc; + double hd; + (void)cudaMemcpy(&ha, a, sizeof(int), cudaMemcpyDeviceToHost); + (void)cudaMemcpy(&hb, b, sizeof(size_t), cudaMemcpyDeviceToHost); + (void)cudaMemcpy(&hc, c, sizeof(float), cudaMemcpyDeviceToHost); + (void)cudaMemcpy(&hd, d, sizeof(double), cudaMemcpyDeviceToHost); + + EXPECT_TRUE(ha == axom::numeric_limits::min()); + EXPECT_TRUE(hb == axom::numeric_limits::max()); + EXPECT_TRUE(hc == axom::numeric_limits::lowest()); + EXPECT_TRUE(hd == axom::numeric_limits::max()); +} +#endif + +//------------------------------------------------------------------------------ +#if defined(AXOM_USE_HIP) +// +// Tests to ensure axom::numeric_limits type alias does the correct thing +// in host and CUDA device code. +// + +// +// Simple device kernel +// +__global__ void hip_kernel(int* a, size_t* b, float* c, double* d) +{ + a[0] = axom::numeric_limits::min(); + b[0] = axom::numeric_limits::max(); + c[0] = axom::numeric_limits::lowest(); + d[0] = axom::numeric_limits::max(); +} + +TEST(core_NumericLimits, check_HIP) +{ + // + // Device memory allocation and initialiation for a few different types. + // + int* a; + (void)hipMalloc(&a, sizeof(int)); + (void)hipMemset(a, 0, sizeof(int)); + + size_t* b; + (void)hipMalloc(&b, sizeof(size_t)); + (void)hipMemset(b, 0, sizeof(size_t)); + + float* c; + (void)hipMalloc(&c, sizeof(float)); + (void)hipMemset(c, 0, sizeof(float)); + + double* d; + (void)hipMalloc(&d, sizeof(double)); + (void)hipMemset(d, 0, sizeof(double)); + + // + // Set values in device code. + // + hip_kernel<<<1, 1>>>(a, b, c, d); + + // + // Copy device values back to host and compare with expectations.... + // + int ha; + size_t hb; + float hc; + double hd; + (void)hipMemcpy(&ha, a, sizeof(int), hipMemcpyDeviceToHost); + (void)hipMemcpy(&hb, b, sizeof(size_t), hipMemcpyDeviceToHost); + (void)hipMemcpy(&hc, c, sizeof(float), hipMemcpyDeviceToHost); + (void)hipMemcpy(&hd, d, sizeof(double), hipMemcpyDeviceToHost); + + EXPECT_TRUE(ha == axom::numeric_limits::min()); + EXPECT_TRUE(hb == axom::numeric_limits::max()); + EXPECT_TRUE(hc == axom::numeric_limits::lowest()); + EXPECT_TRUE(hd == axom::numeric_limits::max()); +} +#endif diff --git a/src/axom/core/tests/core_openmp_map.hpp b/src/axom/core/tests/core_openmp_map.hpp index d1abe2bd49..84e34721b1 100644 --- a/src/axom/core/tests/core_openmp_map.hpp +++ b/src/axom/core/tests/core_openmp_map.hpp @@ -29,23 +29,17 @@ template void test_storage(experimental::Map &test) { experimental::Map *test2 = &test; - axom::for_all( - 0, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - T value = key * 27; - auto ret_test = test2->insert(key, value); - EXPECT_EQ(true, ret_test.second); - }); + axom::for_all(0, test.max_size(), [=](IndexType idx) { + Key key = idx; + T value = key * 27; + auto ret_test = test2->insert(key, value); + EXPECT_EQ(true, ret_test.second); + }); EXPECT_EQ(false, test.empty()); - axom::for_all( - 0, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - EXPECT_EQ(key * 27, test2->find(key).value); - }); + axom::for_all(0, test.max_size(), [=](IndexType idx) { + Key key = idx; + EXPECT_EQ(key * 27, test2->find(key).value); + }); //This should fail, since we're at capacity. auto ret = test.insert(test.max_size(), 900); EXPECT_EQ(false, ret.second); @@ -55,57 +49,42 @@ template void test_subscript(experimental::Map &test) { experimental::Map *test2 = &test; - axom::for_all( - 0, - test.size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - EXPECT_EQ(key * 27, (*test2)[key]); - }); + axom::for_all(0, test.size(), [=](IndexType idx) { + Key key = idx; + EXPECT_EQ(key * 27, (*test2)[key]); + }); } template void test_insert_assign(experimental::Map &test) { experimental::Map *test2 = &test; - axom::for_all( - 0, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - T value = key * 27; - auto ret_test = test2->insert_or_assign(key, value); - EXPECT_EQ(true, ret_test.second); - }); + axom::for_all(0, test.max_size(), [=](IndexType idx) { + Key key = idx; + T value = key * 27; + auto ret_test = test2->insert_or_assign(key, value); + EXPECT_EQ(true, ret_test.second); + }); EXPECT_EQ(false, test.empty()); - axom::for_all( - 0, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - EXPECT_EQ(key * 27, test2->find(key).value); - }); - - axom::for_all( - 0, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - T value = key * 28; - auto ret_test = test2->insert_or_assign(key, value); - EXPECT_EQ(false, ret_test.second); - EXPECT_EQ(ret_test.first->key, key); - }); + axom::for_all(0, test.max_size(), [=](IndexType idx) { + Key key = idx; + EXPECT_EQ(key * 27, test2->find(key).value); + }); + + axom::for_all(0, test.max_size(), [=](IndexType idx) { + Key key = idx; + T value = key * 28; + auto ret_test = test2->insert_or_assign(key, value); + EXPECT_EQ(false, ret_test.second); + EXPECT_EQ(ret_test.first->key, key); + }); EXPECT_EQ(test.size(), test.max_size()); - axom::for_all( - 0, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - EXPECT_EQ(key * 28, test2->find(key).value); - }); + axom::for_all(0, test.max_size(), [=](IndexType idx) { + Key key = idx; + EXPECT_EQ(key * 28, test2->find(key).value); + }); } template @@ -114,15 +93,12 @@ void test_remove(experimental::Map &test) std::size_t to_erase = test.size(); experimental::Map *test2 = &test; - axom::for_all( - 0, - to_erase, - AXOM_LAMBDA(IndexType idx) { - Key key = (Key)idx; - bool erased = test2->erase(key); - EXPECT_EQ(erased, true); - EXPECT_EQ(test2->find(key), test2->end()); - }); + axom::for_all(0, to_erase, [=](IndexType idx) { + Key key = (Key)idx; + bool erased = test2->erase(key); + EXPECT_EQ(erased, true); + EXPECT_EQ(test2->find(key), test2->end()); + }); EXPECT_EQ(test.size(), 0); test.insert(0, 900); auto ret = test.find(0); @@ -137,31 +113,22 @@ void test_rehash(experimental::Map &test, int num, int fac experimental::Map *test2 = &test; test.rehash(num, fact); - axom::for_all( - 0, - original_size, - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - EXPECT_EQ(key * 27, test2->find(key).value); - }); - - axom::for_all( - original_size, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - T value = key * 27; - auto ret_test = test2->insert(key, value); - EXPECT_EQ(true, ret_test.second); - }); - - axom::for_all( - original_size, - test.max_size(), - AXOM_LAMBDA(IndexType idx) { - Key key = idx; - EXPECT_EQ(key * 27, test2->find(key).value); - }); + axom::for_all(0, original_size, [=](IndexType idx) { + Key key = idx; + EXPECT_EQ(key * 27, test2->find(key).value); + }); + + axom::for_all(original_size, test.max_size(), [=](IndexType idx) { + Key key = idx; + T value = key * 27; + auto ret_test = test2->insert(key, value); + EXPECT_EQ(true, ret_test.second); + }); + + axom::for_all(original_size, test.max_size(), [=](IndexType idx) { + Key key = idx; + EXPECT_EQ(key * 27, test2->find(key).value); + }); auto ret = test.insert(test.max_size(), 900); EXPECT_EQ(false, ret.second); } diff --git a/src/axom/core/tests/core_serial_main.cpp b/src/axom/core/tests/core_serial_main.cpp index 68c93b6cfa..659a607861 100644 --- a/src/axom/core/tests/core_serial_main.cpp +++ b/src/axom/core/tests/core_serial_main.cpp @@ -5,11 +5,12 @@ #include "gtest/gtest.h" -#include "axom/config.hpp" // for compile-time definitions +#include "axom/config.hpp" #include "core_about.hpp" #include "core_array.hpp" #include "core_array_for_all.hpp" +#include "core_array_mapping.hpp" #include "core_utilities.hpp" #include "core_bit_utilities.hpp" #include "core_execution_for_all.hpp" @@ -17,8 +18,10 @@ #include "core_map.hpp" #include "core_flatmap.hpp" #include "core_memory_management.hpp" +#include "core_numeric_limits.hpp" #include "core_Path.hpp" #include "core_stack_array.hpp" +#include "core_static_array.hpp" #ifndef AXOM_USE_MPI #include "core_types.hpp" @@ -38,7 +41,6 @@ #include "utils_endianness.hpp" #include "utils_fileUtilities.hpp" #include "utils_locale.hpp" -#include "utils_nvtx_settings.hpp" #include "utils_stringUtilities.hpp" #include "utils_system.hpp" #include "utils_Timer.hpp" diff --git a/src/axom/core/tests/core_static_array.hpp b/src/axom/core/tests/core_static_array.hpp new file mode 100644 index 0000000000..c4724f375c --- /dev/null +++ b/src/axom/core/tests/core_static_array.hpp @@ -0,0 +1,100 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +#include "axom/config.hpp" // for compile time definitions + +#include "axom/core/StaticArray.hpp" + +// for gtest macros +#include "gtest/gtest.h" + +//------------------------------------------------------------------------------ +// HELPER METHOD +//------------------------------------------------------------------------------ +namespace +{ +template +void check_static_array_policy() +{ + const int MAX_SIZE = 10; + using StaticArrayType = axom::StaticArray; + + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int kernel_allocator = axom::execution_space::allocatorID(); + + axom::Array s_arrays_device(MAX_SIZE, + MAX_SIZE, + kernel_allocator); + auto s_arrays_view = s_arrays_device.view(); + + axom::Array sizes_device(1, 1, kernel_allocator); + auto sizes_view = sizes_device.view(); + + axom::for_all( + MAX_SIZE, + AXOM_LAMBDA(int i) { + // Sanity check - function is callable on device + s_arrays_view[i].clear(); + + for(int idx = 0; idx <= i; idx++) + { + s_arrays_view[i].push_back(idx); + } + + sizes_view[0][i] = s_arrays_view[i].size(); + }); + + // Copy static arrays and their sizes back to host + axom::Array s_arrays_host = + axom::Array(s_arrays_device, host_allocator); + axom::Array sizes_host = + axom::Array(sizes_device, host_allocator); + + // Verify values + for(int i = 0; i < MAX_SIZE; i++) + { + EXPECT_EQ(sizes_host[0][i], i + 1); + for(int j = 0; j <= i; j++) + { + EXPECT_EQ(s_arrays_host[i][j], j); + } + } +} + +} /* end anonymous namespace */ + +//------------------------------------------------------------------------------ +// UNIT TESTS +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +TEST(core_static_array, check_static_array_seq) +{ + check_static_array_policy(); +} + +#if defined(AXOM_USE_OPENMP) && defined(AXOM_USE_RAJA) +TEST(core_static_array, check_static_array_omp) +{ + check_static_array_policy(); +} +#endif + +#if defined(AXOM_USE_CUDA) && defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) +TEST(core_static_array, check_static_array_cuda) +{ + check_static_array_policy>(); + check_static_array_policy>(); +} +#endif + +#if defined(AXOM_USE_HIP) && defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) +TEST(core_static_array, check_static_array_hip) +{ + check_static_array_policy>(); + check_static_array_policy>(); +} +#endif diff --git a/src/axom/core/tests/core_types.hpp b/src/axom/core/tests/core_types.hpp index 6a5cfd4ce1..d60b2d4486 100644 --- a/src/axom/core/tests/core_types.hpp +++ b/src/axom/core/tests/core_types.hpp @@ -7,12 +7,12 @@ #include "axom/config.hpp" #include "axom/core/Types.hpp" #include "axom/core/Macros.hpp" +#include "axom/core/NumericLimits.hpp" // gtest includes #include "gtest/gtest.h" // C/C++ includes -#include // for std::numeric_limits #include // for std::is_same, std::is_integral, etc. #ifndef AXOM_USE_MPI @@ -62,7 +62,7 @@ void check_real_type(std::size_t expected_num_bytes, MPI_Datatype expected_mpi_type) { EXPECT_TRUE(std::is_floating_point::value); - EXPECT_TRUE(std::numeric_limits::is_signed); + EXPECT_TRUE(axom::numeric_limits::is_signed); EXPECT_EQ(sizeof(RealType), expected_num_bytes); check_mpi_type(expected_num_bytes, expected_mpi_type); @@ -75,9 +75,9 @@ void check_integral_type(std::size_t expected_num_bytes, int expected_num_digits, MPI_Datatype expected_mpi_type) { - EXPECT_TRUE(std::numeric_limits::is_integer); - EXPECT_EQ(std::numeric_limits::is_signed, is_signed); - EXPECT_EQ(std::numeric_limits::digits, expected_num_digits); + EXPECT_TRUE(axom::numeric_limits::is_integer); + EXPECT_EQ(axom::numeric_limits::is_signed, is_signed); + EXPECT_EQ(axom::numeric_limits::digits, expected_num_digits); EXPECT_EQ(sizeof(IntegralType), expected_num_bytes); check_mpi_type(expected_num_bytes, expected_mpi_type); diff --git a/src/axom/core/tests/numerics_floating_point_limits.hpp b/src/axom/core/tests/numerics_floating_point_limits.hpp index a9e4bab880..833c570086 100644 --- a/src/axom/core/tests/numerics_floating_point_limits.hpp +++ b/src/axom/core/tests/numerics_floating_point_limits.hpp @@ -47,5 +47,7 @@ TEST(numerics_floating_point_limits, consistency_with_standard_numeric_limits) { check_type_limits("float"); check_type_limits("double"); +#if !defined(AXOM_DEVICE_CODE) check_type_limits("long double"); +#endif } diff --git a/src/axom/core/tests/utils_annotations.cpp b/src/axom/core/tests/utils_annotations.cpp new file mode 100644 index 0000000000..bc6ea2c43a --- /dev/null +++ b/src/axom/core/tests/utils_annotations.cpp @@ -0,0 +1,202 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +#include "gtest/gtest.h" + +#include "axom/config.hpp" +#include "axom/core/Macros.hpp" +#include "axom/core/utilities/RAII.hpp" +#include "axom/core/utilities/Annotations.hpp" +#include "axom/core/AnnotationMacros.hpp" + +#include "axom/fmt.hpp" +#include "axom/CLI11.hpp" + +#ifdef AXOM_USE_CALIPER + #include "caliper/cali.h" +#endif + +#ifdef AXOM_USE_MPI + #include +#endif + +#include + +namespace +{ +std::string s_annotation_mode {"none"}; + +} // namespace + +TEST(utils_annotations, initialize_finalize) +{ +#ifdef AXOM_USE_MPI + axom::utilities::annotations::initialize(MPI_COMM_WORLD, "none"); +#else + axom::utilities::annotations::initialize("none"); +#endif + + axom::utilities::annotations::finalize(); + + SUCCEED(); +} + +TEST(utils_annotations, print_adiak_metadata) +{ +#ifdef AXOM_USE_MPI + axom::utilities::annotations::initialize(MPI_COMM_WORLD, "none"); +#else + axom::utilities::annotations::initialize("none"); +#endif + + const auto default_metadata = axom::utilities::annotations::retrieve_metadata(); + +#ifndef AXOM_USE_ADIAK + EXPECT_EQ(std::size_t {0}, default_metadata.size()); +#else + // some default metadata is present, e.g. user + EXPECT_TRUE(default_metadata.find("user") != default_metadata.end()); + + // but other metadata is not present before we register it + EXPECT_TRUE(default_metadata.find("custom_int_metadata") == + default_metadata.end()); + EXPECT_TRUE(default_metadata.find("custom_str_metadata") == + default_metadata.end()); +#endif + + // register some additional metadata + const std::string category {"test_params"}; + AXOM_ANNOTATE_METADATA("custom_str_metadata", "arbitrary string", category); + AXOM_ANNOTATE_METADATA("custom_int_metadata", 42, category); + AXOM_ANNOTATE_METADATA("test_annotation_mode", s_annotation_mode, category); + + // check that registered metadata is now present + auto updated_metadata = axom::utilities::annotations::retrieve_metadata(); +#ifndef AXOM_USE_ADIAK + EXPECT_EQ(std::size_t {0}, updated_metadata.size()); +#else + // some default metadata is present + EXPECT_TRUE(updated_metadata.find("user") != updated_metadata.end()); + + // but other metadata is not present before we register it + EXPECT_TRUE(updated_metadata.find("custom_int_metadata") != + updated_metadata.end()); + EXPECT_TRUE(updated_metadata.find("custom_str_metadata") != + updated_metadata.end()); + + EXPECT_EQ(std::to_string(42), updated_metadata["custom_int_metadata"]); + EXPECT_EQ("arbitrary string", updated_metadata["custom_str_metadata"]); + + // print the key-value pairs on rank 0 + { + int my_rank {0}; + #ifdef AXOM_USE_MPI + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + #endif + if(my_rank == 0) + { + std::cout << "Adiak metadata: \n"; + for(const auto &kv : updated_metadata) + { + std::cout << axom::fmt::format("- {}: {}\n", kv.first, kv.second); + } + } + } +#endif // AXOM_USE_ADIAK + + axom::utilities::annotations::finalize(); +} + +TEST(utils_annotations, check_modes) +{ + EXPECT_TRUE(axom::utilities::annotations::detail::is_mode_valid("none")); + + for(const auto &m : + {"counts", "file", "trace", "report", "gputx", "nvprof", "nvtx", "roctx"}) + { +#ifdef AXOM_USE_CALIPER + EXPECT_TRUE(axom::utilities::annotations::detail::is_mode_valid(m)); +#else + EXPECT_FALSE(axom::utilities::annotations::detail::is_mode_valid(m)); +#endif + } + + EXPECT_FALSE(axom::utilities::annotations::detail::is_mode_valid("_other_")); +} + +TEST(utils_annotations, modes) +{ + std::cout << "Testing caliper service '" << s_annotation_mode << "'\n"; + +#ifdef AXOM_USE_MPI + axom::utilities::annotations::initialize(MPI_COMM_WORLD, s_annotation_mode); +#else + axom::utilities::annotations::initialize(s_annotation_mode); +#endif + +#ifdef AXOM_USE_CALIPER + { + AXOM_ANNOTATE_BEGIN("my region"); + + for(int i = 0; i < 10; ++i) + { + AXOM_ANNOTATE_SCOPE("inner1"); + } + + for(int i = 0; i < 100; ++i) + { + AXOM_ANNOTATE_SCOPE("inner2"); + } + AXOM_ANNOTATE_END("my region"); + } +#endif + + axom::utilities::annotations::finalize(); + + SUCCEED(); +} + +TEST(utils_annotations, print_help) +{ + int my_rank {0}, num_ranks {1}; + +#ifdef AXOM_USE_MPI + MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); + MPI_Comm_size(MPI_COMM_WORLD, &num_ranks); +#endif + + // This prints a lot, so let's only print for the "none" mode test + // when running w/ a single rank + if(s_annotation_mode == "none" && num_ranks == 1 && my_rank == 0) + { + std::cout << "Caliper help string: \n" + << axom::utilities::annotations::detail::mode_help_string() + << std::endl; + } + + SUCCEED(); +} + +int main(int argc, char **argv) +{ + ::testing::InitGoogleTest(&argc, argv); + + // add this line to avoid a warning in the output about thread safety + ::testing::FLAGS_gtest_death_test_style = "threadsafe"; + + // Initialize MPI if axom is configured w/ MPI + axom::utilities::raii::MPIWrapper mpi_raii_wrapper(argc, argv); + + // Parse annotation mode for the current test invocation + axom::CLI::App app {"Axom annotation tests"}; + app.add_option("-m,--mode", s_annotation_mode, "Annotation mode") + ->capture_default_str(); + CLI11_PARSE(app, argc, argv); + + // run tests + int result = RUN_ALL_TESTS(); + + return result; +} diff --git a/src/axom/core/tests/utils_nvtx_settings.hpp b/src/axom/core/tests/utils_nvtx_settings.hpp deleted file mode 100644 index 59a2d85408..0000000000 --- a/src/axom/core/tests/utils_nvtx_settings.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#include "axom/core/utilities/nvtx/interface.hpp" - -#include "gtest/gtest.h" - -//------------------------------------------------------------------------------ -// HELPER METHODS -//------------------------------------------------------------------------------ -namespace -{ -//------------------------------------------------------------------------------ -void check_defaults() -{ - EXPECT_EQ(axom::nvtx::DEFAULT_COLOR, axom::nvtx::get_color()); - EXPECT_EQ(axom::nvtx::DEFAULT_CATEGORY, axom::nvtx::get_category()); -} - -//------------------------------------------------------------------------------ -void check_set_color(axom::nvtx::Color newColor) -{ - axom::nvtx::set_color(newColor); - EXPECT_EQ(newColor, axom::nvtx::get_color()); -} - -//------------------------------------------------------------------------------ -void check_set_category(uint32_t newCategory) -{ - axom::nvtx::set_category(newCategory); - EXPECT_EQ(newCategory, axom::nvtx::get_category()); -} - -} /* end anonymous namespace */ - -//------------------------------------------------------------------------------ -// UNIT TESTS -//------------------------------------------------------------------------------ -TEST(utils_nvtx_settings, default_settings) { check_defaults(); } - -//------------------------------------------------------------------------------ -TEST(utils_nvtx_settings, set_color) -{ - check_set_color(axom::nvtx::Color::BLACK); - check_set_color(axom::nvtx::Color::BLUE); - check_set_color(axom::nvtx::Color::YELLOW); -} - -//------------------------------------------------------------------------------ -TEST(utils_nvtx_settings, set_category) -{ - constexpr uint32_t MAX_CATEGORY = 42; - for(uint32_t icategory = 1; icategory < MAX_CATEGORY; ++icategory) - { - check_set_category(icategory); - } -} - -//------------------------------------------------------------------------------ -TEST(utils_nvtx_settings, set_and_reset) -{ - check_set_color(axom::nvtx::Color::BLUE); - - constexpr uint32_t MY_CATEGORY = 42; - check_set_category(MY_CATEGORY); - - axom::nvtx::reset(); - - check_defaults(); -} diff --git a/src/axom/core/utilities/About.cpp.in b/src/axom/core/utilities/About.cpp.in index 499d2e5770..6e8a60d611 100644 --- a/src/axom/core/utilities/About.cpp.in +++ b/src/axom/core/utilities/About.cpp.in @@ -5,17 +5,16 @@ #include "axom/config.hpp" #include "axom/core/utilities/About.hpp" +#include "axom/core/Types.hpp" + +#include "axom/fmt.hpp" -#include #include -#include #include #include -#include namespace axom { - std::string gitSHA() { // Note: This is generated at configure time so that @@ -29,179 +28,176 @@ void about() { about(std::cout); } void about(std::ostream &oss) { - oss << "Axom information:" << std::endl << std::endl; + oss << "Axom information:" << std::endl; + + // list axom version info + { + oss << " AXOM_VERSION_FULL: " << AXOM_VERSION_FULL << std::endl; + oss << " AXOM_VERSION_MAJOR: " << AXOM_VERSION_MAJOR << std::endl; + oss << " AXOM_VERSION_MINOR: " << AXOM_VERSION_MINOR << std::endl; + oss << " AXOM_VERSION_PATCH: " << AXOM_VERSION_PATCH << std::endl; + oss << " AXOM_GIT_SHA: " << gitSHA() << std::endl; + } - oss << "AXOM_VERSION_FULL: " << AXOM_VERSION_FULL << std::endl; - oss << "AXOM_VERSION_MAJOR: " << AXOM_VERSION_MAJOR << std::endl; - oss << "AXOM_VERSION_MINOR: " << AXOM_VERSION_MINOR << std::endl; - oss << "AXOM_VERSION_PATCH: " << AXOM_VERSION_PATCH << std::endl; + oss << "Compiler Settings: \n" + << axom::fmt::format(" C++ Standard: {}\n", AXOM_CXX_STD) + << axom::fmt::format(" Size of axom::IndexType: {}\n", + sizeof(axom::IndexType)); - oss << "AXOM_GIT_SHA: " << gitSHA() << std::endl; + // list compiler/programming model info + { + std::vector models; - oss << "Compiler Settings: " << std::endl - << " C++ Standard: " << AXOM_CXX_STD << std::endl - << " MPI support: " -#ifdef AXOM_USE_MPI - << "ENABLED" -#else - << "DISABLED" -#endif - << std::endl - << " OpenMP support: " -#ifdef AXOM_USE_OPENMP - << "ENABLED" -#else - << "DISABLED" -#endif - << std::endl - << " CUDA support: " #ifdef AXOM_USE_CUDA - << "ENABLED" -#else - << "DISABLED" + models.push_back("cuda"); #endif - << std::endl - << " HIP support: " + #ifdef AXOM_USE_HIP - << "ENABLED" -#else - << "DISABLED" + models.push_back("hip"); +#endif + +#ifdef AXOM_USE_MPI + models.push_back("mpi"); +#endif + +#ifdef AXOM_USE_OPENMP + models.push_back("openmp"); #endif - << std::endl; - oss << "Available components: " << std::endl; + oss << axom::fmt::format("Active programming models: {{ {} }}\n", + axom::fmt::join(models, ";")); + } - std::vector comps; + // list axom components + { + std::vector comps; - comps.push_back("core"); + comps.push_back("core"); #ifdef AXOM_USE_INLET - comps.push_back("inlet"); + comps.push_back("inlet"); #endif #ifdef AXOM_USE_KLEE - comps.push_back("klee"); + comps.push_back("klee"); #endif #ifdef AXOM_USE_LUMBERJACK - comps.push_back("lumberjack"); + comps.push_back("lumberjack"); #endif #ifdef AXOM_USE_MINT - comps.push_back("mint"); + comps.push_back("mint"); #endif #ifdef AXOM_USE_PRIMAL - comps.push_back("primal"); + comps.push_back("primal"); #endif #ifdef AXOM_USE_QUEST - comps.push_back("quest"); + comps.push_back("quest"); #endif #ifdef AXOM_USE_SIDRE - comps.push_back("sidre"); + comps.push_back("sidre"); #endif #ifdef AXOM_USE_SLAM - comps.push_back("slam"); + comps.push_back("slam"); #endif #ifdef AXOM_USE_SLIC - comps.push_back("slic"); + comps.push_back("slic"); #endif #ifdef AXOM_USE_SPIN - comps.push_back("spin"); + comps.push_back("spin"); #endif - std::stringstream sstr; - std::copy(comps.begin(), - comps.end(), - std::ostream_iterator(sstr, "; ")); - oss << " { " << sstr.str() << "}" << std::endl; - - oss << "Active Dependencies: " << std::endl; + oss << axom::fmt::format("Available components: {{ {} }}\n", + axom::fmt::join(comps, ";")); + } - std::vector libs; + // list axom's built-in dependencies + { + std::vector libs; -#ifdef AXOM_USE_C2C - libs.push_back("c2c"); +#ifdef AXOM_USE_CLI11 + libs.push_back("CLI11"); #endif -#ifdef AXOM_USE_CAMP - libs.push_back("camp"); +#ifdef AXOM_USE_FMT + libs.push_back("fmt"); #endif -#ifdef AXOM_USE_CLI11 - libs.push_back("CLI11"); +#ifdef AXOM_USE_SOL + libs.push_back("sol"); #endif -#ifdef AXOM_USE_CONDUIT - libs.push_back("conduit"); +#ifdef AXOM_USE_SPARSEHASH + libs.push_back("sparsehash"); #endif -#ifdef AXOM_USE_FMT - libs.push_back("fmt"); -#endif + oss << fmt::format("Active built-in dependencies: {{ {} }}\n", + fmt::join(libs, ";")); + } -#ifdef AXOM_USE_HDF5 - libs.push_back("hdf5"); + // list axom's external dependencies + { + std::vector libs; + +#ifdef AXOM_USE_ADIAK + libs.push_back("adiak"); #endif -#ifdef AXOM_USE_LUA - libs.push_back("lua"); +#ifdef AXOM_USE_C2C + libs.push_back("c2c"); #endif -#ifdef AXOM_USE_MFEM - libs.push_back("mfem"); +#ifdef AXOM_USE_CALIPER + libs.push_back("caliper"); #endif -#ifdef AXOM_USE_MPI - libs.push_back("mpi"); +#ifdef AXOM_USE_CONDUIT + libs.push_back("conduit"); #endif -#ifdef AXOM_USE_SCR - libs.push_back("scr"); +#ifdef AXOM_USE_HDF5 + libs.push_back("hdf5"); #endif -#ifdef AXOM_USE_SOL - libs.push_back("sol"); +#ifdef AXOM_USE_LUA + libs.push_back("lua"); #endif -#ifdef AXOM_USE_SPARSEHASH - libs.push_back("sparsehash"); +#ifdef AXOM_USE_MFEM + libs.push_back("mfem"); #endif #ifdef AXOM_USE_RAJA - libs.push_back("raja"); + libs.push_back("raja"); +#endif + +#ifdef AXOM_USE_SCR + libs.push_back("scr"); #endif #ifdef AXOM_USE_UMPIRE - libs.push_back("umpire"); + libs.push_back("umpire"); #endif - // reset sstr - sstr.str(""); - std::copy(libs.begin(), - libs.end(), - std::ostream_iterator(sstr, "; ")); - oss << " { " << sstr.str() << "}" << std::endl; + oss << fmt::format("Active external dependencies: {{ {} }}\n", + fmt::join(libs, ";")); + } } //----------------------------------------------------------------------------- std::string getVersion() { - std::ostringstream oss; - oss << AXOM_VERSION_FULL; - - // Add git sha to version if not empty + // Version includes git sha if not empty std::string sha = gitSHA(); - if (!sha.empty()) { - oss << "-" << sha; - } - - return oss.str(); + return !sha.empty() ? axom::fmt::format("{}-{}", AXOM_VERSION_FULL, sha) + : axom::fmt::format("{}", AXOM_VERSION_FULL); } } // end namespace axom diff --git a/src/axom/core/utilities/AnnotationMacros.hpp b/src/axom/core/utilities/AnnotationMacros.hpp deleted file mode 100644 index 28f5dbed94..0000000000 --- a/src/axom/core/utilities/AnnotationMacros.hpp +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#ifndef AXOM_ANNOTATION_MACROS_HPP_ -#define AXOM_ANNOTATION_MACROS_HPP_ - -#include "axom/config.hpp" - -#ifndef AXOM_USE_CALIPER - #include "axom/core/utilities/nvtx/interface.hpp" -#endif - -/*! - * \def AXOM_PERF_MARK_FUNCTION( name ) - * - * \brief The AXOM_PERF_MARK_FUNCTION is used to annotate a function. - * - * \param [in] name a user-supplied name to annotate the function. - * - * \note Typically, the AXOM_PERF_MARK_FUNCTION is placed in the beginning of - * the function to annotate. - * - * - * \warning The AXOM_PERF_MARK_FUNCTION can only be called once within a given - * (function) scope. - * - * - * Usage Example: - * \code - * void foo( ) - * { - * AXOM_PERF_MARK_FUNCTION( "foo" ); - * ... - * } - * \endcode - */ -#if defined(AXOM_USE_ANNOTATIONS) && defined(AXOM_USE_CALIPER) - #error "Support for Caliper has not yet been implemented in Axom!" -#elif defined(AXOM_USE_ANNOTATIONS) - #define AXOM_PERF_MARK_FUNCTION(__func_name__) \ - AXOM_NVTX_FUNCTION(__func_name__) -#else - #define AXOM_PERF_MARK_FUNCTION(__func_name__) -#endif - -/*! - * \def AXOM_PERF_MARK_SECTION( name ) - * - * \brief The AXOM_PERF_MARK_SECTION macro is used to annotate sections of code. - * - * \note In contrast to the AXOM_PERF_MARK_FUNCTION, the AXOM_PERF_MARK_SECTION - * macro is used to annotate sections of code at a much finer granularity - * within a given function and it may be use in conjunction with the - * AXOM_PERF_MARK_FUNCTION macro. - * - * \warning Variables declared within an AXOM_PERF_MARK_SECTION are only defined - * within the scope of the annotated section. - * - * \warning The AXOM_PERF_MARK_SECTION macro may not be called in a nested - * fashion, i.e., within another AXOM_PERF_MARK_SECTION - * - * Usage Example: - * \code - * void foo( ) - * { - * AXOM_PERF_MARK_FUNCTION( "foo" ); - * - * AXOM_PERF_MARK_SECTION( "kernel_A", - * axom::for_all( 0, N, AXOM_LAMBDA(axom::IndexType idx) - * { - * ... - * } ); - * ); - * - * AXOM_PERF_MARK_SECTION( "kernel_B", - * axom::for_all( 0, N, AXOM_LAMBDA(axom::IndexType idx) - * { - * ... - * } ); - * ); - * - * } - * \endcode - * - */ -#if defined(AXOM_USE_ANNOTATIONS) && defined(AXOM_USE_CALIPER) - #error "Support for Caliper has not yet been implemented in Axom!" -#elif defined(AXOM_USE_ANNOTATIONS) - #define AXOM_PERF_MARK_SECTION(__name__, ...) \ - AXOM_NVTX_SECTION(__name__, __VA_ARGS__) -#else - #define AXOM_PERF_MARK_SECTION(__name__, ...) \ - do \ - { \ - __VA_ARGS__ \ - } while(false) -#endif - -#endif diff --git a/src/axom/core/utilities/Annotations.cpp b/src/axom/core/utilities/Annotations.cpp new file mode 100644 index 0000000000..95131107bc --- /dev/null +++ b/src/axom/core/utilities/Annotations.cpp @@ -0,0 +1,385 @@ +#include "Annotations.hpp" + +#include "axom/core/utilities/About.hpp" +#include "axom/fmt.hpp" + +#ifdef AXOM_USE_CALIPER + #include "caliper/Caliper.h" + #include "caliper/common/Attribute.h" + #include "caliper/cali-manager.h" + #ifdef AXOM_USE_MPI + #include "caliper/cali-mpi.h" + #endif +#endif + +#ifdef AXOM_USE_ADIAK + #include "adiak_tool.h" +#endif + +#include + +namespace axom +{ +namespace utilities +{ +namespace annotations +{ +static bool adiak_initialized = false; + +#ifdef AXOM_USE_CALIPER +static cali::ConfigManager *cali_mgr {nullptr}; +#endif + +namespace detail +{ +#ifdef AXOM_USE_ADIAK +void initialize_common_adiak_metadata() +{ + adiak::user(); + adiak::launchdate(); + adiak::launchday(); + adiak::executable(); + adiak::clustername(); + adiak::cmdline(); + adiak::jobsize(); + adiak::numhosts(); + adiak::hostlist(); + adiak::workdir(); + + adiak::walltime(); + adiak::systime(); + adiak::cputime(); +} +#endif + +#ifdef AXOM_USE_MPI +void initialize_adiak(MPI_Comm comm) +{ + #ifdef AXOM_USE_ADIAK + if(adiak_initialized) + { + return; + } + + adiak::init((void *)&comm); + initialize_common_adiak_metadata(); + + adiak_initialized = true; + #else + adiak_initialized = false; + AXOM_UNUSED_VAR(comm); + #endif +} +#else // AXOM_USE_MPI +void initialize_adiak() +{ + #ifdef AXOM_USE_ADIAK + if(adiak_initialized) + { + return; + } + + adiak::init(nullptr); + initialize_common_adiak_metadata(); + + adiak_initialized = true; + #else + adiak_initialized = false; + #endif +} +#endif // AXOM_USE_MPI + +void initialize_caliper(const std::string &mode) +{ +#ifdef AXOM_USE_CALIPER + cali::ConfigManager::argmap_t app_args; + cali_mgr = new cali::ConfigManager(); + cali_mgr->add(mode.c_str(), app_args); + + for(const auto &kv : app_args) + { + const std::string &cali_mode = kv.first; + const std::string &value = kv.second; + + if(cali_mode == "none") + { + // intentionally empty + } + else if(cali_mode == "report") + { + //report is an alias for the runtime-report Caliper configuration + cali_mgr->add("runtime-report(output=stdout,calc.inclusive=true)"); + } + else if(cali_mode == "counts") + { + cali_mgr->add("runtime-report(output=stdout,region.count)"); + } + else if(cali_mode == "file") + { + cali_mgr->add("hatchet-region-profile"); + } + else if(cali_mode == "trace") + { + cali_mgr->add("event-trace"); + } + else if(cali_mode == "gputx") + { + #if defined(AXOM_USE_CUDA) + cali_mgr->add("nvtx"); + #elif defined(AXOM_USE_HIP) + cali_mgr->add("roctx"); + #endif + } + else if(cali_mode == "nvtx" || cali_mode == "nvprof") + { + cali_mgr->add("nvtx"); + } + else if(cali_mode == "roctx") + { + cali_mgr->add("roctx"); + } + else if(!value.empty()) + { + declare_metadata(cali_mode, value); + } + } + + cali_mgr->start(); + +#else + AXOM_UNUSED_VAR(mode); +#endif // AXOM_USE_CALIPER +} + +static const std::set axom_valid_caliper_args = {"counts", + "file", + "gputx", + "none", + "nvprof", + "nvtx", + "report", + "trace", + "roctx"}; + +bool is_mode_valid(const std::string &mode) +{ +#ifdef AXOM_USE_CALIPER + cali::ConfigManager test_mgr; + cali::ConfigManager::argmap_t app_args; + + const bool result = test_mgr.add(mode.c_str(), app_args); + if(!result || test_mgr.error()) + { + std::cerr << axom::fmt::format( + "Bad caliper configuration for mode '{}' -> {}\n", + mode, + test_mgr.error_msg()); + return false; + } + + for(const auto &kv : app_args) + { + const std::string &name = kv.first; + const std::string &val = kv.second; + + if(!name.empty() && !val.empty()) + { + continue; // adiak-style NAME=VAL + } + if(axom_valid_caliper_args.find(name) != axom_valid_caliper_args.end()) + { + continue; // application argument + } + + return false; + } + return true; +#else + return (mode == "none") ? true : false; +#endif +} + +std::string mode_help_string() +{ +#ifdef AXOM_USE_CALIPER + const auto built_in = + axom::fmt::format("Built-in configurations: {}", + axom::fmt::join(axom_valid_caliper_args, ",")); + const auto cali_configs = axom::fmt::format( + "Caliper configurations:\n{}", + axom::fmt::join(cali::ConfigManager::get_config_docstrings(), "\n")); + return built_in + "\n" + cali_configs; +#else + return "Caliper not enabled at build-time, so the only valid mode is 'none'"; +#endif +} + +#ifdef AXOM_USE_ADIAK +static std::string adiak_value_as_string(adiak_value_t *val, adiak_datatype_t *t) +{ + // Implementation adapted from adiak user docs + + if(!t) + { + return "ERROR"; + } + + auto get_vals_array = [](adiak_datatype_t *t, adiak_value_t *val, int count) { + std::vector s; + for(int i = 0; i < count; i++) + { + adiak_value_t subval; + adiak_datatype_t *subtype; + adiak_get_subval(t, val, i, &subtype, &subval); + s.push_back(adiak_value_as_string(&subval, subtype)); + } + return s; + }; + + switch(t->dtype) + { + case adiak_type_unset: + return "UNSET"; + case adiak_long: + return axom::fmt::format("{}", val->v_long); + case adiak_ulong: + return axom::fmt::format("{}", static_cast(val->v_long)); + case adiak_longlong: + return axom::fmt::format("{}", val->v_longlong); + case adiak_ulonglong: + return axom::fmt::format("{}", + static_cast(val->v_longlong)); + case adiak_int: + return axom::fmt::format("{}", val->v_int); + case adiak_uint: + return axom::fmt::format("{}", static_cast(val->v_int)); + case adiak_double: + return axom::fmt::format("{}", val->v_double); + case adiak_date: + // holds time in seconds since epoch + return axom::fmt::format( + "{:%a %d %b %Y %T %z}", + std::chrono::system_clock::time_point {std::chrono::seconds {val->v_long}}); + case adiak_timeval: + { + const auto *tv = static_cast(val->v_ptr); + return axom::fmt::format("{:%S} seconds:timeval", + std::chrono::seconds {tv->tv_sec} + + std::chrono::microseconds {tv->tv_usec}); + } + case adiak_version: + return axom::fmt::format("{}:version", static_cast(val->v_ptr)); + case adiak_string: + return axom::fmt::format("{}", static_cast(val->v_ptr)); + case adiak_catstring: + return axom::fmt::format("{}:catstring", static_cast(val->v_ptr)); + case adiak_path: + return axom::fmt::format("{}:path", static_cast(val->v_ptr)); + case adiak_range: + return axom::fmt::format("{}", + axom::fmt::join(get_vals_array(t, val, 2), " - ")); + case adiak_set: + return axom::fmt::format( + "[{}]", + axom::fmt::join(get_vals_array(t, val, adiak_num_subvals(t)), ", ")); + case adiak_list: + return axom::fmt::format( + "{{{}}}", + axom::fmt::join(get_vals_array(t, val, adiak_num_subvals(t)), ", ")); + case adiak_tuple: + return axom::fmt::format( + "({})", + axom::fmt::join(get_vals_array(t, val, adiak_num_subvals(t)), ", ")); + default: + return std::string(""); + } +} + +static void get_namevals_as_map(const char *name, + int AXOM_UNUSED_PARAM(category), + const char *AXOM_UNUSED_PARAM(subcategory), + adiak_value_t *value, + adiak_datatype_t *t, + void *opaque_value) +{ + // add each name/value to adiak metadata map + using kv_map = std::map; + auto &metadata = *static_cast(opaque_value); + metadata[name] = adiak_value_as_string(value, t); +} + +#endif // AXOM_USE_ADIAK + +} // namespace detail + +#ifdef AXOM_USE_MPI +void initialize(MPI_Comm comm, const std::string &mode) +{ + detail::initialize_adiak(comm); + detail::initialize_caliper(mode); + + declare_metadata("axom_version", axom::getVersion()); +} +#endif + +void initialize(const std::string &mode) +{ + detail::initialize_adiak(); + detail::initialize_caliper(mode); + + declare_metadata("axom_version", axom::getVersion()); +} + +void finalize() +{ +#ifdef AXOM_USE_ADIAK + if(adiak_initialized) + { + adiak::fini(); + } + adiak_initialized = false; +#endif +#ifdef AXOM_USE_CALIPER + if(cali_mgr) + { + cali_mgr->flush(); + + delete cali_mgr; + cali_mgr = nullptr; + } +#endif +} + +void begin(const std::string &name) +{ +#ifdef AXOM_USE_CALIPER + cali_begin_region(name.c_str()); +#else + AXOM_UNUSED_VAR(name); +#endif +} + +void end(const std::string &name) +{ +#ifdef AXOM_USE_CALIPER + cali_end_region(name.c_str()); +#else + AXOM_UNUSED_VAR(name); +#endif +} + +// returns registered adiak metadata as key-value pairs of strings +std::map retrieve_metadata() +{ + std::map metadata; + +#ifdef AXOM_USE_ADIAK + adiak_list_namevals(1, adiak_category_all, detail::get_namevals_as_map, &metadata); +#endif + + return metadata; +} + +} // namespace annotations +} // namespace utilities +} // namespace axom diff --git a/src/axom/core/utilities/Annotations.hpp b/src/axom/core/utilities/Annotations.hpp new file mode 100644 index 0000000000..4e5c400f3e --- /dev/null +++ b/src/axom/core/utilities/Annotations.hpp @@ -0,0 +1,105 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +/*! + * \file Annotations.hpp + * + * \brief Defines functions to help with performance annotations + * + * The annotations API and macros are always available but they are effectively no-ops + * unless axom is built with caliper and adiak support + */ + +#ifndef AXOM_CORE_ANNOTATIONS_HPP_ +#define AXOM_CORE_ANNOTATIONS_HPP_ + +#include "axom/config.hpp" +#include "axom/core/Macros.hpp" + +#ifdef AXOM_USE_MPI + #include +#endif + +#ifdef AXOM_USE_ADIAK + #include "adiak.hpp" +#endif + +#ifdef AXOM_USE_CALIPER + #include "caliper/cali.h" +#endif + +#include +#include + +namespace axom +{ +namespace utilities +{ +namespace annotations +{ +namespace detail +{ +/// \note Intended to be called from within the axom::utilities::annotations API +#ifdef AXOM_USE_MPI +void initialize_adiak(MPI_Comm comm = MPI_COMM_WORLD); +#else +void initialize_adiak(); +#endif + +/// \note Intended to be called from within the axom::utilities::annotations API +void initialize_caliper(const std::string& mode); + +// Checks if the provided annotation mode is valid +bool is_mode_valid(const std::string& mode); + +// Returns a help string for valid annotation modes +std::string mode_help_string(); + +} // namespace detail + +/// Initializes the Annotation API +#ifdef AXOM_USE_MPI +void initialize(MPI_Comm comm, const std::string& mode); +#endif +void initialize(const std::string& mode); + +/// Finalizes and flushes the Annotation API +void finalize(); + +/// Begins an annotation within a region +void begin(const std::string& name); + +/// Ends an annotation within a region +void end(const std::string& name); + +/// Declares metadata for this run +template +void declare_metadata(const std::string& name, + const T& value, + std::string category = "") +{ +#ifdef AXOM_USE_ADIAK + detail::initialize_adiak(); + adiak::value(name, value, adiak_general, category); +#else + AXOM_UNUSED_VAR(name); + AXOM_UNUSED_VAR(value); + AXOM_UNUSED_VAR(category); +#endif +} + +/** + * \brief Access registered metadata from adiak (when available) + * and returns the result as a map of key-value pairs of strings + * + * \note Returns an empty map in configurations without adiak + */ +std::map retrieve_metadata(); + +} // namespace annotations +} // namespace utilities +} // namespace axom + +#endif // AXOM_CORE_ANNOTATIONS_HPP_ diff --git a/src/axom/core/utilities/BitUtilities.hpp b/src/axom/core/utilities/BitUtilities.hpp index 2ed603983f..e75b5f23c2 100644 --- a/src/axom/core/utilities/BitUtilities.hpp +++ b/src/axom/core/utilities/BitUtilities.hpp @@ -19,12 +19,16 @@ #include "axom/core/Types.hpp" // CUDA intrinsics: https://docs.nvidia.com/cuda/cuda-math-api/group__CUDA__MATH__INTRINSIC__INT.html -// TODO: Support HIP intrinsics (https://rocm.docs.amd.com/projects/HIP/en/latest/reference/kernel_language.html) +// HIP intrinsics: https://rocm.docs.amd.com/projects/HIP/en/latest/reference/kernel_language.html // Check for and setup defines for platform-specific intrinsics // Note: `__GNUC__` is defined for the gnu, clang and intel compilers #if defined(AXOM_USE_CUDA) // Intrinsics included implicitly + +#elif defined(AXOM_USE_HIP) + #include + #elif defined(_WIN64) && (_MSC_VER >= 1600) #define _AXOM_CORE_USE_INTRINSICS_MSVC #include @@ -89,6 +93,8 @@ AXOM_HOST_DEVICE inline int countr_zero(std::uint64_t word) noexcept /* clang-format off */ #if defined(__CUDA_ARCH__) && defined(AXOM_USE_CUDA) return word != std::uint64_t(0) ? __ffsll(word) - 1 : 64; +#elif defined(__HIP_DEVICE_COMPILE__) && defined(AXOM_USE_HIP) + return word != std::uint64_t(0) ? __ffsll(static_cast(word)) - 1 : 64; #elif defined(_AXOM_CORE_USE_INTRINSICS_MSVC) unsigned long cnt; return _BitScanForward64(&cnt, word) ? cnt : 64; @@ -127,6 +133,9 @@ AXOM_HOST_DEVICE inline int popcount(std::uint64_t word) noexcept #if defined(__CUDA_ARCH__) && defined(AXOM_USE_CUDA) // Use CUDA intrinsic for popcount return __popcll(word); +#elif defined(__HIP_DEVICE_COMPILE__) && defined(AXOM_USE_HIP) + // Use HIP intrinsic for popcount + return __popcll(word); #elif defined(_AXOM_CORE_USE_INTRINSICS_MSVC) return __popcnt64(word); #elif defined(_AXOM_CORE_USE_INTRINSICS_GCC) || defined(_AXOM_CORE_USE_INTRINSICS_PPC) @@ -166,6 +175,9 @@ AXOM_HOST_DEVICE inline std::int32_t countl_zero(std::int32_t word) noexcept #if defined(__CUDA_ARCH__) && defined(AXOM_USE_CUDA) // Use CUDA intrinsic for count leading zeros return __clz(word); +#elif defined(__HIP_DEVICE_COMPILE__) && defined(AXOM_USE_HIP) + // Use HIP intrinsic for count leading zeros + return __clz(word); #elif defined(_AXOM_CORE_USE_INTRINSICS_MSVC) unsigned long cnt; return _BitScanReverse(&cnt, word) ? 31 - cnt : 32; diff --git a/src/axom/core/utilities/CommandLineUtilities.hpp b/src/axom/core/utilities/CommandLineUtilities.hpp new file mode 100644 index 0000000000..c47feb1d70 --- /dev/null +++ b/src/axom/core/utilities/CommandLineUtilities.hpp @@ -0,0 +1,59 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +/*! + * \file CommandLineUtilities.hpp + * + * \brief Defines utilities in support of validating command line input + */ + +#ifndef AXOM_CORE_COMMANDLINE_UTILITIES_HPP_ +#define AXOM_CORE_COMMANDLINE_UTILITIES_HPP_ + +#include "axom/config.hpp" +#include "axom/core/utilities/Annotations.hpp" + +#ifdef AXOM_USE_CLI11 + #include "axom/CLI11.hpp" +#endif +#include "axom/fmt.hpp" + +#include + +namespace axom +{ +namespace utilities +{ +#if defined(AXOM_USE_CLI11) && defined(AXOM_USE_CALIPER) +/// Helper class for CLI11 to validate a caliper \a mode string passed into an axom app +struct CaliperModeValidator : public axom::CLI::Validator +{ + CaliperModeValidator() + { + name_ = "MODE"; + func_ = [](const std::string &str) { + if(str == "help") + { + return axom::fmt::format( + "Valid caliper modes are:\n{}\n", + axom::utilities::annotations::detail::mode_help_string()); + } + return axom::utilities::annotations::detail::is_mode_valid(str) + ? std::string("") + : axom::fmt::format( + "'{}' invalid caliper mode. " + "Run with '--caliper help' to see all valid options", + str); + }; + } +}; + +const static CaliperModeValidator ValidCaliperMode; +#endif // defined(AXOM_USE_CLI11) && defined(AXOM_USE_CALIPER) + +} // namespace utilities +} // namespace axom + +#endif // AXOM_CORE_COMMANDLINE_UTILITIES_HPP_ \ No newline at end of file diff --git a/src/axom/core/utilities/RAII.hpp b/src/axom/core/utilities/RAII.hpp new file mode 100644 index 0000000000..c1e67d05c2 --- /dev/null +++ b/src/axom/core/utilities/RAII.hpp @@ -0,0 +1,113 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +/*! + * \file RAII.hpp + * + * \brief Defines several RAII (Resource Acquisition Is Initialization) utility classes to help with + * initializing and finalizing libraries and/or components with \a initialize and \a finalize calls + * + * For more information about RAII, see: https://en.cppreference.com/w/cpp/language/raii + */ + +#ifndef AXOM_CORE_RAII_HPP_ +#define AXOM_CORE_RAII_HPP_ + +#include "axom/config.hpp" +#include "axom/core/Macros.hpp" +#include "axom/core/utilities/Annotations.hpp" + +#ifdef AXOM_USE_MPI + #include +#endif + +namespace axom +{ +namespace utilities +{ +namespace raii +{ +/** + * RAII wrapper class to initialize and finalize MPI + * Can also be used when Axom is not configured with MPI + */ +class MPIWrapper +{ +public: + /// Initialize MPI when Axom is configured with MPI, else no-op + MPIWrapper(int argc, char** argv) + { +#ifdef AXOM_USE_MPI + MPI_Init(&argc, &argv); + MPI_Comm_rank(MPI_COMM_WORLD, &m_rank); + MPI_Comm_size(MPI_COMM_WORLD, &m_numranks); +#else + AXOM_UNUSED_VAR(argc); + AXOM_UNUSED_VAR(argv); +#endif + } + + /// Finalize MPI when Axom is configured with MPI, else no-op + ~MPIWrapper() + { +#ifdef AXOM_USE_MPI + if(is_initialized()) + { + MPI_Finalize(); + } +#endif + } + + /// Returns number of MPI ranks (1 when Axom not configured with MPI) + int num_ranks() const { return m_numranks; } + + /// Returns id of current of MPI rank (0 when Axom not configured with MPI) + int my_rank() const { return m_rank; } + + // Returns true is MPI has been initialized (false when Axom not configured with MPI) + bool is_initialized() const + { +#ifdef AXOM_USE_MPI + int mpi = 0; + MPI_Initialized(&mpi); + return (mpi != 0); +#else + return false; +#endif + } + +private: + int m_rank {0}; + int m_numranks {1}; +}; + +/** + * Basic RAII wrapper class for initializing and finalizing axom's annotations API. + * Calls \a annotations::initialize() in constructor and \a annotations::finalize() in destructor + * + * \note Assumes MPI_COMM_WORLD is the MPI communicator. Applications using a custom communicator + * should directly call the annotations + * \note In Axom configurations with MPI, this must be called after initializing MPI + */ +class AnnotationsWrapper +{ +public: + AnnotationsWrapper(const std::string& mode) + { +#ifdef AXOM_USE_MPI + axom::utilities::annotations::initialize(MPI_COMM_WORLD, mode); +#else + axom::utilities::annotations::initialize(mode); +#endif + } + + ~AnnotationsWrapper() { axom::utilities::annotations::finalize(); } +}; + +} // namespace raii +} // namespace utilities +} // namespace axom + +#endif // AXOM_CORE_RAII_HPP_ diff --git a/src/axom/core/utilities/Utilities.hpp b/src/axom/core/utilities/Utilities.hpp index a33cf61ce9..c48d85476d 100644 --- a/src/axom/core/utilities/Utilities.hpp +++ b/src/axom/core/utilities/Utilities.hpp @@ -354,6 +354,7 @@ inline AXOM_HOST_DEVICE bool isNearlyEqualRelative(RealType a, * \param [in] cmp The comparator to use for comparing elements; "less than" * by default. */ +AXOM_SUPPRESS_HD_WARN template > inline AXOM_HOST_DEVICE void insertionSort(DataType* array, IndexType n, diff --git a/src/axom/core/utilities/nvtx/Macros.hpp b/src/axom/core/utilities/nvtx/Macros.hpp deleted file mode 100644 index 11eb77ad13..0000000000 --- a/src/axom/core/utilities/nvtx/Macros.hpp +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#ifndef AXOM_NVTX_MACROS_HPP_ -#define AXOM_NVTX_MACROS_HPP_ - -#include "axom/core/utilities/nvtx/Range.hpp" - -/*! - * \file - * - * \brief Defines NVTX Macros that can be used to annotate functions and - * sections of the code. These macros use the NVIDIA Tools Extension library - * to provide additional information to NVIDIA performance tools, e.g., - * nvprof, nvvp, Nsight, thereby, facilitate developers in performance - * evaluation. - * - */ - -/// \name AXOM NVTX Macros -///@{ - -/*! - * \def AXOM_NVTX_SECTION - * - * \brief The AXOM_NVTX_SECTION macro is used to annotate sections of code - * - * \note In contrast to the AXOM_NVTX_FUNCTION macro, the AXOM_NVTX_SECTION - * macro is used to annotate sections of code, at a much finer granularity, - * within a given function. - * - * \warning Variables declared within a given AXOM_NVTX_SECTION are only defined - * within the scope of the AXOM_NVTX_SECTION. - * - * \warning An AXOM_NVTX_SECTION cannot be called in a nested fashion, i.e., - * within another AXOM_NVTX_SECTION - * - * \note You may have multiple AXOM_NVTX_SECTION defined within a function and - * this macro can be used in conjunction with the AXOM_NVTX_FUNCTION macro. - * - * \Usage Example: - * \code - * - * void foo( ) - * { - * AXOM_NVTX_FUNCTION( "foo"" ); - * - * // STEP 0: Run kernel A - * AXOM_NVTX_SECTION( "kernelA", - * - * axom::for_all( 0, N, AXOM_LAMBDA(axom::IndexType i) - * { - * .. - * } ); - * - * ); // END NVTX SECTION for kernel A - * - * // STEP 1: Run kernel B - * AXOM_NVTX_SECTION( "kernelB", - * - * axom::for_all( 0, N, AXOM_LAMBDA(axom::IndexType i) - * { - * ... - * } ); - * - * ); // END NVTX SECTION for kernel B - * - * } - * \endcode - * - */ -#if defined(AXOM_USE_ANNOTATIONS) && defined(AXOM_USE_CUDA) - #define AXOM_NVTX_SECTION(__name__, ...) \ - do \ - { \ - axom::nvtx::Range r(__name__); \ - __VA_ARGS__ \ - } while(false) -#else - #define AXOM_NVTX_SECTION(__name__, ...) \ - do \ - { \ - __VA_ARGS__ \ - } while(false) -#endif - -/*! - * \def AXOM_NVTX_FUNCTION( name ) - * - * \brief The AXOM_NVTX_FUNCTION macro is used to annotate a function. - * \param [in] name a user-supplied name that will be given to the range. - * - * \note Typically, the AXOM_NVTX_FUNCTION macro is placed in the beginning of - * the function to annotate. - * - * \warning The AXOM_NVTX_FUNCTION can be called once within a (function) scope. - * - * Usage Example: - * \code - * void foo( ) - * { - * AXOM_NVTX_FUNCTION( "foo" ); - * ... - * } - * \endcode - * - */ -#if defined(AXOM_USE_ANNOTATIONS) && defined(AXOM_USE_CUDA) - #define AXOM_NVTX_FUNCTION(__name__) axom::nvtx::Range __func_range(__name__) -#else - #define AXOM_NVTX_FUNCTION(__name__) -#endif - -///@} - -#endif /* AXOM_NVTX_MACROS_HPP_ */ diff --git a/src/axom/core/utilities/nvtx/Range.cpp b/src/axom/core/utilities/nvtx/Range.cpp deleted file mode 100644 index fd7c382da8..0000000000 --- a/src/axom/core/utilities/nvtx/Range.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#include "axom/core/utilities/nvtx/Range.hpp" - -#include "axom/config.hpp" // for axom compile-time definitions -#include "axom/core/utilities/nvtx/interface.hpp" - -// C/C++ includes -#include - -// CUDA NVTX includes -#ifdef AXOM_USE_CUDA - #include - #include - #include -#endif - -namespace axom -{ -namespace nvtx -{ -Range::Range(const std::string& name) : m_name(name), m_active(false) -{ - assert(!m_name.empty()); - start(); - assert(m_active); -} - -//------------------------------------------------------------------------------ -Range::~Range() { stop(); } - -//------------------------------------------------------------------------------ -void Range::start() -{ - assert(!m_active); - -#ifdef AXOM_USE_CUDA - nvtxEventAttributes_t eventAttrib = {0}; - eventAttrib.version = NVTX_VERSION; - eventAttrib.size = NVTX_EVENT_ATTRIB_STRUCT_SIZE; - eventAttrib.category = nvtx::get_category(); - eventAttrib.colorType = NVTX_COLOR_ARGB; - eventAttrib.color = static_cast(nvtx::get_color()); - eventAttrib.messageType = NVTX_MESSAGE_TYPE_ASCII; - eventAttrib.message.ascii = m_name.c_str(); - - nvtxRangePushEx(&eventAttrib); -#endif - - m_active = true; -} - -//------------------------------------------------------------------------------ -void Range::stop() -{ - if(m_active) - { -#ifdef AXOM_USE_CUDA - nvtxRangePop(); -#endif - m_active = false; - } -} - -} /* namespace nvtx */ - -} /* namespace axom */ diff --git a/src/axom/core/utilities/nvtx/Range.hpp b/src/axom/core/utilities/nvtx/Range.hpp deleted file mode 100644 index 7a67a7bd4c..0000000000 --- a/src/axom/core/utilities/nvtx/Range.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#ifndef AXOM_NVTXRANGE_HPP_ -#define AXOM_NVTXRANGE_HPP_ - -#include "axom/core/Macros.hpp" // for axom macros - -// C/C++ includes -#include // for std::string - -namespace axom -{ -namespace nvtx -{ -/*! - * \class Range - * - * \brief Range is a simple utility class to annotate code. - * - * The NVTXRange class is a simple utility class that can be used in - * conjunction with the NVIDIA Tools Extension library to allow developers - * to easily mark and annotate code in order to provide additional information - * to NVIDIA performance tools, such as, nvprof, nvvp and Nsight. - * - * \see https://docs.nvidia.com/cuda/profiler-users-guide/index.html#nvtx - * - * \note NVTXRange uses the RAII idiom, consequently the range is started - * when the NVTXRange object is instantiated and stopped when the object - * goes out of scope. - * - * \remark Thanks to Jason Burmark (burmark1@llnl.gov) for his original - * implementation that inspired the implementation of this class. - * - * Usage Example: - * \code - * - * // use scope to auto-start and stop a range - * { // begin scope resolution - * axom::NVTXRage range ("foo" ); - * foo(); - * } // end scope resoltuion - * - * \endcode - * - */ -class Range -{ -public: - /*! - * \brief Default constructor. Disabled. - */ - Range() = delete; - - /*! - * \brief Creates an NVTXRage instance with the given name. - * - * \param [in] name the name to associate with the range - * - * \pre name.empty() == false - */ - Range(const std::string& name); - - /*! - * \brief Destructor. - */ - ~Range(); - -private: - /*! - * \brief Starts an NVTX range. - * \note Called by the constructor. - */ - void start(); - - /*! - * \brief Stops the NVTX range. - * \note Called by the destructor. - */ - void stop(); - - std::string m_name; - bool m_active; - - DISABLE_COPY_AND_ASSIGNMENT(Range); - DISABLE_MOVE_AND_ASSIGNMENT(Range); -}; - -} /* namespace nvtx */ - -} /* namespace axom */ - -#endif /* AXOM_NVTXRANGE_HPP_ */ diff --git a/src/axom/core/utilities/nvtx/interface.cpp b/src/axom/core/utilities/nvtx/interface.cpp deleted file mode 100644 index f409c9673c..0000000000 --- a/src/axom/core/utilities/nvtx/interface.cpp +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#include "axom/core/utilities/nvtx/interface.hpp" - -namespace axom -{ -namespace nvtx -{ -/*! - * \brief Internal data-structure to hold the NVTX settings. - */ -static struct settings_t -{ - uint32_t color; /*!< the associated color with an NVTX Range */ - uint32_t category; /*!< the associated category with an NVTX Range */ - - settings_t() - : color(static_cast(DEFAULT_COLOR)) - , category(DEFAULT_CATEGORY) - { } - -} Settings; - -//------------------------------------------------------------------------------ -// NVTX interface implementation -//------------------------------------------------------------------------------ - -void set_color(Color c) { Settings.color = static_cast(c); } - -//------------------------------------------------------------------------------ -Color get_color() { return static_cast(Settings.color); } - -//------------------------------------------------------------------------------ -void set_category(uint32_t category) { Settings.category = category; } - -//------------------------------------------------------------------------------ -uint32_t get_category() { return Settings.category; } - -//------------------------------------------------------------------------------ -void reset() -{ - set_color(DEFAULT_COLOR); - set_category(DEFAULT_CATEGORY); -} - -} /* namespace nvtx */ - -} /* namespace axom */ diff --git a/src/axom/core/utilities/nvtx/interface.hpp b/src/axom/core/utilities/nvtx/interface.hpp deleted file mode 100644 index ecec933106..0000000000 --- a/src/axom/core/utilities/nvtx/interface.hpp +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and -// other Axom Project Developers. See the top-level LICENSE file for details. -// -// SPDX-License-Identifier: (BSD-3-Clause) - -#ifndef AXOM_NVTX_INTERFACE_HPP_ -#define AXOM_NVTX_INTERFACE_HPP_ - -#include "axom/core/utilities/nvtx/Macros.hpp" -#include // For uint32_t - -namespace axom -{ -namespace nvtx -{ -/// \brief Predefined set of NVTX colors to use with NVTXRange -enum class Color : std::uint32_t -{ - BLACK = 0x00000000, - GREEN = 0x0000FF00, - LIME = 0x00BFFF00, - RED = 0x00FF0000, - BLUE = 0x000000FF, - YELLOW = 0x00FFFF00, - CYAN = 0x0000FFFF, - MAGENTA = 0x00FF00FF, - WHITE = 0x00FFFFFF, - ORANGE = 0x00FFA500, - PINK = 0x00FF69B4 -}; - -/// \name Glocal Definitions -/// @{ - -/*! - * \brief Wildcard used for category - */ -constexpr uint32_t ANY_CATEGORY = 0; - -/// @} - -/// \name Default Settings -/// @{ - -/*! - * \brief Default NVTX color to use. Set to GREEN. - */ -constexpr Color DEFAULT_COLOR = Color::GREEN; - -/*! - * \brief Default NVTX category to use. Set to ANY. - */ -constexpr uint32_t DEFAULT_CATEGORY = ANY_CATEGORY; - -/// @} - -/// \name NVTX API Functions -/// @{ - -/*! - * \brief Sets the color to use with NVTX. - * \param [in] c the color to use. - * - * \note If not set, axom::nvtx::DEFAULT_COLOR is used. - * - * \post axom::nvtx::get_color() == c - */ -void set_color(Color c); - -/*! - * \brief Returns the color use by NVTX - * \return Color the color used by NVTX - * \see nvtx::Color - */ -Color get_color(); - -/*! - * \brief Set the category to use with NVTX. - * \param [in] category the user-prescribed number for the category to use. - * - * \note If note set, axom::nvtx::DEFAULT_CATEGORY is used. - * - * \post axom::nvtx::get_category() == category - */ -void set_category(uint32_t category); - -/*! - * \brief Get the category used with NVTX. - * \return category the category used with NVTX. - */ -uint32_t get_category(); - -/*! - * \brief Resets the NVTX setting to the defaults. - * - * \post axom::nvtx::get_category() == axom::nvtx::DEFAULT_CATEGORY - * \post axom::nvtx::get_color() == axom::nvtx::DEFAULT_COLOR - */ -void reset(); - -/// @} - -} /* namespace nvtx */ - -} /* namespace axom */ - -#endif /* AXOM_NVTX_INTERFACE_HPP_ */ diff --git a/src/axom/inlet/CMakeLists.txt b/src/axom/inlet/CMakeLists.txt index e65d90b95d..9eb755634c 100644 --- a/src/axom/inlet/CMakeLists.txt +++ b/src/axom/inlet/CMakeLists.txt @@ -86,8 +86,3 @@ endif() if (AXOM_ENABLE_TESTS) add_subdirectory(tests) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX inlet) diff --git a/src/axom/inlet/InletVector.hpp b/src/axom/inlet/InletVector.hpp index 82f8e42a44..e10c728fd1 100644 --- a/src/axom/inlet/InletVector.hpp +++ b/src/axom/inlet/InletVector.hpp @@ -102,9 +102,9 @@ struct InletVector * \brief Retrieves the underlying Primal vector ******************************************************************************* */ - operator axom::primal::Vector3D &() { return vec; } + operator axom::primal::Vector3D&() { return vec; } /// \overload - operator const axom::primal::Vector3D &() const { return vec; } + operator const axom::primal::Vector3D&() const { return vec; } }; /*! diff --git a/src/axom/inlet/VariantKey.cpp b/src/axom/inlet/VariantKey.cpp index b273be84af..c97791d50b 100644 --- a/src/axom/inlet/VariantKey.cpp +++ b/src/axom/inlet/VariantKey.cpp @@ -47,7 +47,7 @@ VariantKey::operator int() const return m_int; } -VariantKey::operator const std::string &() const +VariantKey::operator const std::string&() const { if(m_type != VariantKeyType::String) { diff --git a/src/axom/inlet/VariantKey.hpp b/src/axom/inlet/VariantKey.hpp index adf6314c2b..2a3bc0e624 100644 --- a/src/axom/inlet/VariantKey.hpp +++ b/src/axom/inlet/VariantKey.hpp @@ -95,7 +95,7 @@ class VariantKey ***************************************************************************** */ operator int() const; - operator const std::string &() const; + operator const std::string&() const; /*! ***************************************************************************** diff --git a/src/axom/inlet/examples/documentation_generation.cpp b/src/axom/inlet/examples/documentation_generation.cpp index c9748b4cf6..ed74434d0d 100644 --- a/src/axom/inlet/examples/documentation_generation.cpp +++ b/src/axom/inlet/examples/documentation_generation.cpp @@ -6,11 +6,11 @@ // usage : ./inlet_documentation_generation_example --enableDocs --fil lua_file.lua #include "axom/inlet.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic/core/SimpleLogger.hpp" #include "axom/CLI11.hpp" #include -#include using axom::inlet::Inlet; using axom::inlet::LuaReader; @@ -68,17 +68,17 @@ void defineSchema(Inlet& inlet) filename_field.required(); inlet.addInt("thermal_solver/mesh/serial", "number of serial refinements") - .range(0, std::numeric_limits::max()) + .range(0, axom::numeric_limits::max()) .defaultValue(1); // The description for thermal_solver/mesh/parallel is left unspecified inlet.addInt("thermal_solver/mesh/parallel") - .range(1, std::numeric_limits::max()) + .range(1, axom::numeric_limits::max()) .defaultValue(1); inlet.addInt("thermal_solver/order", "polynomial order") .required() - .range(1, std::numeric_limits::max()); + .range(1, axom::numeric_limits::max()); auto& timestep_field = inlet.addString("thermal_solver/timestepper", "thermal solver timestepper"); @@ -109,13 +109,13 @@ void defineSchema(Inlet& inlet) solver_schema.addDouble("rel_tol", "solver relative tolerance"); rel_tol_field.required(false); rel_tol_field.defaultValue(1.e-6); - rel_tol_field.range(0.0, std::numeric_limits::max()); + rel_tol_field.range(0.0, axom::numeric_limits::max()); auto& abs_tol_field = solver_schema.addDouble("abs_tol", "solver absolute tolerance"); abs_tol_field.required(true); abs_tol_field.defaultValue(1.e-12); - abs_tol_field.range(0.0, std::numeric_limits::max()); + abs_tol_field.range(0.0, axom::numeric_limits::max()); auto& print_level_field = solver_schema.addInt("print_level", "solver print/debug level"); @@ -127,18 +127,18 @@ void defineSchema(Inlet& inlet) solver_schema.addInt("max_iter", "maximum iteration limit"); max_iter_field.required(false); max_iter_field.defaultValue(100); - max_iter_field.range(1, std::numeric_limits::max()); + max_iter_field.range(1, axom::numeric_limits::max()); auto& dt_field = solver_schema.addDouble("dt", "time step"); dt_field.required(true); dt_field.defaultValue(1); - dt_field.range(0.0, std::numeric_limits::max()); + dt_field.range(0.0, axom::numeric_limits::max()); auto& steps_field = solver_schema.addInt("steps", "number of steps/cycles to take"); steps_field.required(true); steps_field.defaultValue(1); - steps_field.range(1, std::numeric_limits::max()); + steps_field.range(1, axom::numeric_limits::max()); } // Checking the contents of the passed inlet diff --git a/src/axom/klee/CMakeLists.txt b/src/axom/klee/CMakeLists.txt index e49699aed9..7350aee9c2 100644 --- a/src/axom/klee/CMakeLists.txt +++ b/src/axom/klee/CMakeLists.txt @@ -61,9 +61,3 @@ axom_install_component( NAME klee if (AXOM_ENABLE_TESTS AND ENABLE_GMOCK) add_subdirectory(tests) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX klee) - diff --git a/src/axom/lumberjack/CMakeLists.txt b/src/axom/lumberjack/CMakeLists.txt index 97c2cdcbb1..a685825fd7 100644 --- a/src/axom/lumberjack/CMakeLists.txt +++ b/src/axom/lumberjack/CMakeLists.txt @@ -61,8 +61,3 @@ endif() if (AXOM_ENABLE_TESTS) add_subdirectory(tests) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX lumberjack) diff --git a/src/axom/lumberjack/MPIUtility.cpp b/src/axom/lumberjack/MPIUtility.cpp index 3698bae967..34a4c96b5e 100644 --- a/src/axom/lumberjack/MPIUtility.cpp +++ b/src/axom/lumberjack/MPIUtility.cpp @@ -21,7 +21,7 @@ namespace axom { namespace lumberjack { -constexpr int LJ_TAG = 55432; +constexpr int LJ_TAG = 32766; const char* mpiBlockingReceiveMessages(MPI_Comm comm) { diff --git a/src/axom/mint/CMakeLists.txt b/src/axom/mint/CMakeLists.txt index 36ea73cb71..235361cf4d 100644 --- a/src/axom/mint/CMakeLists.txt +++ b/src/axom/mint/CMakeLists.txt @@ -40,7 +40,6 @@ set( mint_headers execution/internal/for_all_nodes.hpp execution/internal/for_all_faces.hpp execution/internal/helpers.hpp - execution/internal/structured_exec.hpp ## FEM classes fem/FEBasis.hpp @@ -162,8 +161,3 @@ endif() if (AXOM_ENABLE_TESTS) add_subdirectory(tests) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX mint) diff --git a/src/axom/mint/core/config.hpp.in b/src/axom/mint/core/config.hpp.in index a429650685..4f7d6c5554 100644 --- a/src/axom/mint/core/config.hpp.in +++ b/src/axom/mint/core/config.hpp.in @@ -6,8 +6,8 @@ #ifndef MINT_CONFIG_HPP_ #define MINT_CONFIG_HPP_ -#include "axom/config.hpp"// for compile-time definitions -#include "axom/core/Types.hpp" // for fixed-width types +#include "axom/config.hpp" // for compile-time definitions +#include "axom/core/Types.hpp" // for fixed-width types #cmakedefine AXOM_MINT_USE_SIDRE @@ -22,6 +22,4 @@ using int64 = std::int64_t; } /* end namespace mint */ } /* end namespace axom */ - - #endif /* MINT_CONFIG_HPP_ */ diff --git a/src/axom/mint/execution/internal/for_all_cells.hpp b/src/axom/mint/execution/internal/for_all_cells.hpp index 6eef970aea..975ef00153 100644 --- a/src/axom/mint/execution/internal/for_all_cells.hpp +++ b/src/axom/mint/execution/internal/for_all_cells.hpp @@ -22,7 +22,7 @@ #include "axom/mint/mesh/CurvilinearMesh.hpp" // for CurvilinearMesh #include "axom/mint/mesh/UnstructuredMesh.hpp" // for UnstructuredMesh #include "axom/mint/execution/internal/helpers.hpp" -#include "axom/mint/execution/internal/structured_exec.hpp" +#include "axom/core/execution/nested_for_exec.hpp" #include "axom/core/StackArray.hpp" // for axom::StackArray #include "axom/core/numerics/Matrix.hpp" // for Matrix @@ -71,7 +71,8 @@ inline void for_all_cells_impl(xargs::ij, RAJA::RangeSegment i_range(0, Ni); RAJA::RangeSegment j_range(0, Nj); - using exec_pol = typename structured_exec::loop2d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop2d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range), @@ -130,7 +131,8 @@ inline void for_all_cells_impl(xargs::ijk, RAJA::RangeSegment i_range(0, Ni); RAJA::RangeSegment j_range(0, Nj); RAJA::RangeSegment k_range(0, Nk); - using exec_pol = typename structured_exec::loop3d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop3d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range, k_range), @@ -244,15 +246,34 @@ inline void for_all_cells_impl(xargs::nodeids, const UnstructuredMesh& m, KernelType&& kernel) { - const IndexType* cell_connectivity = m.getCellNodesArray(); - const IndexType* cell_offsets = m.getCellNodesOffsetsArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + auto cell_connectivity_h = + axom::ArrayView(m.getCellNodesArray(), m.getCellNodesSize()); + auto cell_offsets_h = + axom::ArrayView(m.getCellNodesOffsetsArray(), + m.getNumberOfCells() + 1); + + // Move cell connectivity and cell offsets onto device + axom::Array cell_connectivity_d = on_device + ? axom::Array(cell_connectivity_h, device_allocator) + : axom::Array(); + auto cell_connectivity_view = + on_device ? cell_connectivity_d.view() : cell_connectivity_h; + + axom::Array cell_offsets_d = on_device + ? axom::Array(cell_offsets_h, device_allocator) + : axom::Array(); + auto cell_offsets_view = on_device ? cell_offsets_d.view() : cell_offsets_h; for_all_cells_impl( xargs::index(), m, AXOM_LAMBDA(IndexType cellID) { - const IndexType N = cell_offsets[cellID + 1] - cell_offsets[cellID]; - kernel(cellID, &cell_connectivity[cell_offsets[cellID]], N); + const IndexType N = + cell_offsets_view[cellID + 1] - cell_offsets_view[cellID]; + kernel(cellID, &cell_connectivity_view[cell_offsets_view[cellID]], N); }); } @@ -262,14 +283,26 @@ inline void for_all_cells_impl(xargs::nodeids, const UnstructuredMesh& m, KernelType&& kernel) { - const IndexType* cell_connectivity = m.getCellNodesArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + auto cell_connectivity_h = + axom::ArrayView(m.getCellNodesArray(), m.getCellNodesSize()); + + // Move cell connectivity onto device + axom::Array cell_connectivity_d = on_device + ? axom::Array(cell_connectivity_h, device_allocator) + : axom::Array(); + auto cell_connectivity_view = + on_device ? cell_connectivity_d.view() : cell_connectivity_h; + const IndexType stride = m.getNumberOfCellNodes(); for_all_cells_impl( xargs::index(), m, AXOM_LAMBDA(IndexType cellID) { - kernel(cellID, &cell_connectivity[cellID * stride], stride); + kernel(cellID, &cell_connectivity_view[cellID * stride], stride); }); } @@ -371,14 +404,26 @@ inline void for_all_cells_impl(xargs::faceids, const UnstructuredMesh& m, KernelType&& kernel) { - const IndexType* cells_to_faces = m.getCellFacesArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType num_faces = m.getNumberOfCellFaces(); + // extract cells_to_faces into an axom::ArrayView + auto cells_to_faces_h = + axom::ArrayView(m.getCellFacesArray(), m.getCellNodesSize()); + + // Move cells_to_faces values onto device + axom::Array cells_to_faces_d = on_device + ? axom::Array(cells_to_faces_h, device_allocator) + : axom::Array(); + auto cells_to_faces_v = on_device ? cells_to_faces_d.view() : cells_to_faces_h; + for_all_cells_impl( xargs::index(), m, AXOM_LAMBDA(IndexType cellID) { - kernel(cellID, cells_to_faces + cellID * num_faces, num_faces); + kernel(cellID, cells_to_faces_v.data() + cellID * num_faces, num_faces); }); } @@ -388,15 +433,32 @@ inline void for_all_cells_impl(xargs::faceids, const UnstructuredMesh& m, KernelType&& kernel) { - const IndexType* cells_to_faces = m.getCellFacesArray(); - const IndexType* offsets = m.getCellFacesOffsetsArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + // extract cells_to_faces and offsets into an axom::ArrayView + auto cells_to_faces_h = + axom::ArrayView(m.getCellFacesArray(), m.getCellNodesSize()); + auto offsets_h = axom::ArrayView(m.getCellFacesOffsetsArray(), + m.getNumberOfCells() + 1); + + // Move cells_to_faces and offsets values onto device + axom::Array cells_to_faces_d = on_device + ? axom::Array(cells_to_faces_h, device_allocator) + : axom::Array(); + auto cells_to_faces_v = on_device ? cells_to_faces_d.view() : cells_to_faces_h; + + axom::Array offsets_d = on_device + ? axom::Array(offsets_h, device_allocator) + : axom::Array(); + auto offsets_v = on_device ? offsets_d.view() : offsets_h; for_all_cells_impl( xargs::index(), m, AXOM_LAMBDA(IndexType cellID) { - const IndexType num_faces = offsets[cellID + 1] - offsets[cellID]; - kernel(cellID, cells_to_faces + offsets[cellID], num_faces); + const IndexType num_faces = offsets_v[cellID + 1] - offsets_v[cellID]; + kernel(cellID, cells_to_faces_v.data() + offsets_v[cellID], num_faces); }); } @@ -535,10 +597,23 @@ inline void for_all_cells_impl(xargs::coords, { constexpr bool NO_COPY = true; + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + const int dimension = m.getDimension(); const IndexType nodeJp = m.nodeJp(); const IndexType nodeKp = m.nodeKp(); - const double* x = m.getCoordinateArray(X_COORDINATE); + + // Extract x coordinate values into an axom::ArrayView + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + m.getNodeResolution(X_COORDINATE)); + + // Move x values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; if(dimension == 1) { @@ -547,7 +622,7 @@ inline void for_all_cells_impl(xargs::coords, m, AXOM_LAMBDA(IndexType cellID) { const IndexType nodeIDs[2] = {cellID, cellID + 1}; - double coords[2] = {x[nodeIDs[0]], x[nodeIDs[1]]}; + double coords[2] = {x_vals_view[nodeIDs[0]], x_vals_view[nodeIDs[1]]}; numerics::Matrix coordsMatrix(dimension, 2, coords, NO_COPY); kernel(cellID, coordsMatrix, nodeIDs); @@ -555,7 +630,17 @@ inline void for_all_cells_impl(xargs::coords, } else if(dimension == 2) { - const double* y = m.getCoordinateArray(Y_COORDINATE); + // Extract y coordinate values into an axom::ArrayView + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + m.getNodeResolution(Y_COORDINATE)); + + // Move y values onto device + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + for_all_cells_impl( xargs::ij(), m, @@ -563,8 +648,14 @@ inline void for_all_cells_impl(xargs::coords, const IndexType n0 = i + j * nodeJp; const IndexType nodeIDs[4] = {n0, n0 + 1, n0 + 1 + nodeJp, n0 + nodeJp}; - double coords[8] = - {x[i], y[j], x[i + 1], y[j], x[i + 1], y[j + 1], x[i], y[j + 1]}; + double coords[8] = {x_vals_view[i], + y_vals_view[j], + x_vals_view[i + 1], + y_vals_view[j], + x_vals_view[i + 1], + y_vals_view[j + 1], + x_vals_view[i], + y_vals_view[j + 1]}; numerics::Matrix coordsMatrix(dimension, 4, coords, NO_COPY); kernel(cellID, coordsMatrix, nodeIDs); @@ -573,8 +664,26 @@ inline void for_all_cells_impl(xargs::coords, else { SLIC_ASSERT(dimension == 3); - const double* y = m.getCoordinateArray(Y_COORDINATE); - const double* z = m.getCoordinateArray(Z_COORDINATE); + + // Extract yz coordinate values into an axom::ArrayView + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + m.getNodeResolution(Y_COORDINATE)); + auto z_vals_h = + axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + m.getNodeResolution(Z_COORDINATE)); + + // Move yz values onto device + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; + for_all_cells_impl( xargs::ijk(), m, @@ -589,11 +698,15 @@ inline void for_all_cells_impl(xargs::coords, n0 + 1 + nodeJp + nodeKp, n0 + nodeJp + nodeKp}; - double coords[24] = {x[i], y[j], z[k], x[i + 1], y[j], - z[k], x[i + 1], y[j + 1], z[k], x[i], - y[j + 1], z[k], x[i], y[j], z[k + 1], - x[i + 1], y[j], z[k + 1], x[i + 1], y[j + 1], - z[k + 1], x[i], y[j + 1], z[k + 1]}; + double coords[24] = { + x_vals_view[i], y_vals_view[j], z_vals_view[k], + x_vals_view[i + 1], y_vals_view[j], z_vals_view[k], + x_vals_view[i + 1], y_vals_view[j + 1], z_vals_view[k], + x_vals_view[i], y_vals_view[j + 1], z_vals_view[k], + x_vals_view[i], y_vals_view[j], z_vals_view[k + 1], + x_vals_view[i + 1], y_vals_view[j], z_vals_view[k + 1], + x_vals_view[i + 1], y_vals_view[j + 1], z_vals_view[k + 1], + x_vals_view[i], y_vals_view[j + 1], z_vals_view[k + 1]}; numerics::Matrix coordsMatrix(dimension, 8, coords, NO_COPY); kernel(cellID, coordsMatrix, nodeIDs); @@ -653,8 +766,22 @@ inline void for_all_cells_impl(xargs::coords, { constexpr bool NO_COPY = true; + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + IndexType coordinate_size = m.getNumberOfNodes(); + const int dimension = m.getDimension(); - const double* x = m.getCoordinateArray(X_COORDINATE); + + // Extract x coordinate values into an axom::ArrayView + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + coordinate_size); + + // Move x values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; if(dimension == 1) { @@ -664,7 +791,7 @@ inline void for_all_cells_impl(xargs::coords, AXOM_LAMBDA(IndexType cellID, const IndexType* nodeIDs, IndexType AXOM_UNUSED_PARAM(numNodes)) { - double coords[2] = {x[nodeIDs[0]], x[nodeIDs[1]]}; + double coords[2] = {x_vals_view[nodeIDs[0]], x_vals_view[nodeIDs[1]]}; numerics::Matrix coordsMatrix(dimension, 2, coords, NO_COPY); kernel(cellID, coordsMatrix, nodeIDs); @@ -672,7 +799,17 @@ inline void for_all_cells_impl(xargs::coords, } else if(dimension == 2) { - const double* y = m.getCoordinateArray(Y_COORDINATE); + // Extract y coordinate values into an axom::ArrayView + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + coordinate_size); + + // Move y values onto device + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + for_all_cells_impl( xargs::nodeids(), m, @@ -681,8 +818,8 @@ inline void for_all_cells_impl(xargs::coords, for(int i = 0; i < numNodes; ++i) { const IndexType nodeID = nodeIDs[i]; - coords[2 * i] = x[nodeID]; - coords[2 * i + 1] = y[nodeID]; + coords[2 * i] = x_vals_view[nodeID]; + coords[2 * i + 1] = y_vals_view[nodeID]; } numerics::Matrix coordsMatrix(dimension, numNodes, coords, NO_COPY); @@ -692,8 +829,26 @@ inline void for_all_cells_impl(xargs::coords, else { SLIC_ASSERT(dimension == 3); - const double* y = m.getCoordinateArray(Y_COORDINATE); - const double* z = m.getCoordinateArray(Z_COORDINATE); + + // Extract coordinate values into an axom::ArrayView + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + coordinate_size); + auto z_vals_h = + axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + coordinate_size); + + // Move yz values onto device + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; + for_all_cells_impl( xargs::nodeids(), m, @@ -702,9 +857,9 @@ inline void for_all_cells_impl(xargs::coords, for(int i = 0; i < numNodes; ++i) { const IndexType nodeID = nodeIDs[i]; - coords[3 * i] = x[nodeID]; - coords[3 * i + 1] = y[nodeID]; - coords[3 * i + 2] = z[nodeID]; + coords[3 * i] = x_vals_view[nodeID]; + coords[3 * i + 1] = y_vals_view[nodeID]; + coords[3 * i + 2] = z_vals_view[nodeID]; } numerics::Matrix coordsMatrix(dimension, numNodes, coords, NO_COPY); diff --git a/src/axom/mint/execution/internal/for_all_faces.hpp b/src/axom/mint/execution/internal/for_all_faces.hpp index b1a4482857..4ba441f736 100644 --- a/src/axom/mint/execution/internal/for_all_faces.hpp +++ b/src/axom/mint/execution/internal/for_all_faces.hpp @@ -20,7 +20,7 @@ #include "axom/mint/mesh/RectilinearMesh.hpp" // for RectilinearMesh #include "axom/mint/mesh/CurvilinearMesh.hpp" // for CurvilinearMesh #include "axom/mint/execution/internal/helpers.hpp" // for for_all_coords -#include "axom/mint/execution/internal/structured_exec.hpp" +#include "axom/core/execution/nested_for_exec.hpp" #include "axom/core/numerics/Matrix.hpp" // for Matrix @@ -51,7 +51,8 @@ inline void for_all_I_faces(xargs::ij, const StructuredMesh& m, KernelType&& ker RAJA::RangeSegment i_range(0, Ni); RAJA::RangeSegment j_range(0, Nj); - using exec_pol = typename structured_exec::loop2d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop2d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range), AXOM_LAMBDA(IndexType i, IndexType j) { @@ -96,7 +97,8 @@ inline void for_all_I_faces(xargs::ijk, const StructuredMesh& m, KernelType&& ke RAJA::RangeSegment j_range(0, Nj); RAJA::RangeSegment k_range(0, Nk); - using exec_pol = typename structured_exec::loop3d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop3d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range, k_range), AXOM_LAMBDA(IndexType i, IndexType j, IndexType k) { @@ -142,7 +144,8 @@ inline void for_all_J_faces(xargs::ij, const StructuredMesh& m, KernelType&& ker RAJA::RangeSegment i_range(0, Ni); RAJA::RangeSegment j_range(0, Nj); - using exec_pol = typename structured_exec::loop2d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop2d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range), AXOM_LAMBDA(IndexType i, IndexType j) { @@ -188,7 +191,8 @@ inline void for_all_J_faces(xargs::ijk, const StructuredMesh& m, KernelType&& ke RAJA::RangeSegment j_range(0, Nj); RAJA::RangeSegment k_range(0, Nk); - using exec_pol = typename structured_exec::loop3d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop3d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range, k_range), AXOM_LAMBDA(IndexType i, IndexType j, IndexType k) { @@ -240,7 +244,8 @@ inline void for_all_K_faces(xargs::ijk, const StructuredMesh& m, KernelType&& ke RAJA::RangeSegment j_range(0, Nj); RAJA::RangeSegment k_range(0, Nk); - using exec_pol = typename structured_exec::loop3d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop3d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range, k_range), AXOM_LAMBDA(IndexType i, IndexType j, IndexType k) { @@ -404,14 +409,27 @@ inline void for_all_faces_impl(xargs::nodeids, "No faces in the mesh, perhaps you meant to call " << "UnstructuredMesh::initializeFaceConnectivity first."); - const IndexType* faces_to_nodes = m.getFaceNodesArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + auto faces_to_nodes_h = + axom::ArrayView(m.getFaceNodesArray(), m.getFaceNodesSize()); + + // Move faces to nodes onto device + axom::Array faces_to_nodes_d = on_device + ? axom::Array(faces_to_nodes_h, device_allocator) + : axom::Array(); + + auto faces_to_nodes_view = + on_device ? faces_to_nodes_d.view() : faces_to_nodes_h; + const IndexType num_nodes = m.getNumberOfFaceNodes(); for_all_faces_impl( xargs::index(), m, AXOM_LAMBDA(IndexType faceID) { - kernel(faceID, faces_to_nodes + faceID * num_nodes, num_nodes); + kernel(faceID, faces_to_nodes_view.data() + faceID * num_nodes, num_nodes); }); } @@ -425,15 +443,32 @@ inline void for_all_faces_impl(xargs::nodeids, "No faces in the mesh, perhaps you meant to call " << "UnstructuredMesh::initializeFaceConnectivity first."); - const IndexType* faces_to_nodes = m.getFaceNodesArray(); - const IndexType* offsets = m.getFaceNodesOffsetsArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + auto faces_to_nodes_h = + axom::ArrayView(m.getFaceNodesArray(), m.getFaceNodesSize()); + auto offsets_h = axom::ArrayView(m.getFaceNodesOffsetsArray(), + m.getNumberOfFaces() + 1); + + // Move faces to nodes and offsets onto device + axom::Array faces_to_nodes_d = on_device + ? axom::Array(faces_to_nodes_h, device_allocator) + : axom::Array(); + axom::Array offsets_d = on_device + ? axom::Array(offsets_h, device_allocator) + : axom::Array(); + + auto faces_to_nodes_view = + on_device ? faces_to_nodes_d.view() : faces_to_nodes_h; + auto offsets_view = on_device ? offsets_d.view() : offsets_h; for_all_faces_impl( xargs::index(), m, AXOM_LAMBDA(IndexType faceID) { - const IndexType num_nodes = offsets[faceID + 1] - offsets[faceID]; - kernel(faceID, faces_to_nodes + offsets[faceID], num_nodes); + const IndexType num_nodes = offsets_view[faceID + 1] - offsets_view[faceID]; + kernel(faceID, faces_to_nodes_view.data() + offsets_view[faceID], num_nodes); }); } @@ -596,14 +631,27 @@ inline void for_all_faces_impl(xargs::cellids, "No faces in the mesh, perhaps you meant to call " << "UnstructuredMesh::initializeFaceConnectivity first."); - const IndexType* faces_to_cells = m.getFaceCellsArray(); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + auto faces_to_cells_h = + axom::ArrayView(m.getFaceCellsArray(), + 2 * m.getNumberOfFaces()); + + // Move faces to cells onto device + axom::Array faces_to_cells_d = on_device + ? axom::Array(faces_to_cells_h, device_allocator) + : axom::Array(); + + auto faces_to_cells_view = + on_device ? faces_to_cells_d.view() : faces_to_cells_h; for_all_faces_impl( xargs::index(), m, AXOM_LAMBDA(IndexType faceID) { const IndexType offset = 2 * faceID; - kernel(faceID, faces_to_cells[offset], faces_to_cells[offset + 1]); + kernel(faceID, faces_to_cells_view[offset], faces_to_cells_view[offset + 1]); }); } @@ -786,11 +834,30 @@ inline void for_all_faces_impl(xargs::coords, SLIC_ASSERT(m.getDimension() > 1 && m.getDimension() <= 3); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + const int dimension = m.getDimension(); const IndexType nodeJp = m.nodeJp(); const IndexType nodeKp = m.nodeKp(); - const double* x = m.getCoordinateArray(X_COORDINATE); - const double* y = m.getCoordinateArray(Y_COORDINATE); + + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + m.getNodeResolution(X_COORDINATE)); + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + m.getNodeResolution(Y_COORDINATE)); + + // Move xy values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; if(dimension == 2) { @@ -801,7 +868,10 @@ inline void for_all_faces_impl(xargs::coords, const IndexType n0 = i + j * nodeJp; const IndexType nodeIDs[2] = {n0, n0 + nodeJp}; - double coords[4] = {x[i], y[j], x[i], y[j + 1]}; + double coords[4] = {x_vals_view[i], + y_vals_view[j], + x_vals_view[i], + y_vals_view[j + 1]}; numerics::Matrix coordsMatrix(dimension, 2, coords, NO_COPY); kernel(faceID, coordsMatrix, nodeIDs); @@ -814,7 +884,10 @@ inline void for_all_faces_impl(xargs::coords, const IndexType n0 = i + j * nodeJp; const IndexType nodeIDs[2] = {n0, n0 + 1}; - double coords[4] = {x[i], y[j], x[i + 1], y[j]}; + double coords[4] = {x_vals_view[i], + y_vals_view[j], + x_vals_view[i + 1], + y_vals_view[j]}; numerics::Matrix coordsMatrix(dimension, 2, coords, NO_COPY); kernel(faceID, coordsMatrix, nodeIDs); @@ -822,7 +895,17 @@ inline void for_all_faces_impl(xargs::coords, } else { - const double* z = m.getCoordinateArray(Z_COORDINATE); + auto z_vals_h = + axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + m.getNodeResolution(Z_COORDINATE)); + + // Move z values onto device + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; + helpers::for_all_I_faces( xargs::ijk(), m, @@ -833,18 +916,18 @@ inline void for_all_faces_impl(xargs::coords, n0 + nodeJp + nodeKp, n0 + nodeJp}; - double coords[12] = {x[i], - y[j], - z[k], - x[i], - y[j], - z[k + 1], - x[i], - y[j + 1], - z[k + 1], - x[i], - y[j + 1], - z[k]}; + double coords[12] = {x_vals_view[i], + y_vals_view[j], + z_vals_view[k], + x_vals_view[i], + y_vals_view[j], + z_vals_view[k + 1], + x_vals_view[i], + y_vals_view[j + 1], + z_vals_view[k + 1], + x_vals_view[i], + y_vals_view[j + 1], + z_vals_view[k]}; numerics::Matrix coordsMatrix(dimension, 4, coords, NO_COPY); kernel(faceID, coordsMatrix, nodeIDs); @@ -857,18 +940,18 @@ inline void for_all_faces_impl(xargs::coords, const IndexType n0 = i + j * nodeJp + k * nodeKp; const IndexType nodeIDs[4] = {n0, n0 + 1, n0 + 1 + nodeKp, n0 + nodeKp}; - double coords[12] = {x[i], - y[j], - z[k], - x[i + 1], - y[j], - z[k], - x[i + 1], - y[j], - z[k + 1], - x[i], - y[j], - z[k + 1]}; + double coords[12] = {x_vals_view[i], + y_vals_view[j], + z_vals_view[k], + x_vals_view[i + 1], + y_vals_view[j], + z_vals_view[k], + x_vals_view[i + 1], + y_vals_view[j], + z_vals_view[k + 1], + x_vals_view[i], + y_vals_view[j], + z_vals_view[k + 1]}; numerics::Matrix coordsMatrix(dimension, 4, coords, NO_COPY); kernel(faceID, coordsMatrix, nodeIDs); @@ -881,18 +964,18 @@ inline void for_all_faces_impl(xargs::coords, const IndexType n0 = i + j * nodeJp + k * nodeKp; const IndexType nodeIDs[4] = {n0, n0 + 1, n0 + 1 + nodeJp, n0 + nodeJp}; - double coords[12] = {x[i], - y[j], - z[k], - x[i + 1], - y[j], - z[k], - x[i + 1], - y[j + 1], - z[k], - x[i], - y[j + 1], - z[k]}; + double coords[12] = {x_vals_view[i], + y_vals_view[j], + z_vals_view[k], + x_vals_view[i + 1], + y_vals_view[j], + z_vals_view[k], + x_vals_view[i + 1], + y_vals_view[j + 1], + z_vals_view[k], + x_vals_view[i], + y_vals_view[j + 1], + z_vals_view[k]}; numerics::Matrix coordsMatrix(dimension, 4, coords, NO_COPY); kernel(faceID, coordsMatrix, nodeIDs); @@ -950,9 +1033,30 @@ inline void for_all_faces_impl(xargs::coords, SLIC_ASSERT(m.getDimension() > 1 && m.getDimension() <= 3); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + const int dimension = m.getDimension(); - const double* x = m.getCoordinateArray(X_COORDINATE); - const double* y = m.getCoordinateArray(Y_COORDINATE); + + IndexType coordinate_size = m.getNumberOfNodes(); + + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + coordinate_size); + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + coordinate_size); + + // Move xy values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; if(dimension == 2) { @@ -964,8 +1068,8 @@ inline void for_all_faces_impl(xargs::coords, for(int i = 0; i < numNodes; ++i) { const IndexType nodeID = nodeIDs[i]; - coords[2 * i] = x[nodeID]; - coords[2 * i + 1] = y[nodeID]; + coords[2 * i] = x_vals_view[nodeID]; + coords[2 * i + 1] = y_vals_view[nodeID]; } numerics::Matrix coordsMatrix(dimension, 2, coords, NO_COPY); @@ -974,7 +1078,17 @@ inline void for_all_faces_impl(xargs::coords, } else { - const double* z = m.getCoordinateArray(Z_COORDINATE); + auto z_vals_h = + axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + coordinate_size); + + // Move z values onto device + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; + for_all_faces_impl( xargs::nodeids(), m, @@ -983,12 +1097,12 @@ inline void for_all_faces_impl(xargs::coords, for(int i = 0; i < numNodes; ++i) { const IndexType nodeID = nodeIDs[i]; - coords[3 * i] = x[nodeID]; - coords[3 * i + 1] = y[nodeID]; - coords[3 * i + 2] = z[nodeID]; + coords[3 * i] = x_vals_view[nodeID]; + coords[3 * i + 1] = y_vals_view[nodeID]; + coords[3 * i + 2] = z_vals_view[nodeID]; } - numerics::Matrix coordsMatrix(dimension, 4, coords, NO_COPY); + numerics::Matrix coordsMatrix(dimension, numNodes, coords, NO_COPY); kernel(faceID, coordsMatrix, nodeIDs); }); } diff --git a/src/axom/mint/execution/internal/for_all_nodes.hpp b/src/axom/mint/execution/internal/for_all_nodes.hpp index d8162a6248..147cdbc6bc 100644 --- a/src/axom/mint/execution/internal/for_all_nodes.hpp +++ b/src/axom/mint/execution/internal/for_all_nodes.hpp @@ -18,7 +18,7 @@ #include "axom/mint/mesh/RectilinearMesh.hpp" // for mint::RectilinearMesh #include "axom/mint/mesh/StructuredMesh.hpp" // for mint::StructuredMesh #include "axom/mint/mesh/UniformMesh.hpp" // for mint::UniformMesh -#include "axom/mint/execution/internal/structured_exec.hpp" +#include "axom/core/execution/nested_for_exec.hpp" #include "axom/core/StackArray.hpp" // for axom::StackArray @@ -65,7 +65,8 @@ inline void for_all_nodes_impl(xargs::ij, RAJA::RangeSegment i_range(0, Ni); RAJA::RangeSegment j_range(0, Nj); - using exec_pol = typename structured_exec::loop2d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop2d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range), @@ -126,7 +127,8 @@ inline void for_all_nodes_impl(xargs::ijk, RAJA::RangeSegment i_range(0, Ni); RAJA::RangeSegment j_range(0, Nj); RAJA::RangeSegment k_range(0, Nk); - using exec_pol = typename structured_exec::loop3d_policy; + using exec_pol = + typename axom::internal::nested_for_exec::loop3d_policy; RAJA::kernel( RAJA::make_tuple(i_range, j_range, k_range), @@ -197,14 +199,27 @@ inline void for_all_nodes_impl(xargs::x, const Mesh& m, KernelType&& kernel) SLIC_ERROR_IF(m.getDimension() != 1, "xargs::x is only valid for 1D meshes"); SLIC_ERROR_IF(m.getMeshType() == STRUCTURED_UNIFORM_MESH, "Not valid for UniformMesh."); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + IndexType coordinate_size = m.getNumberOfNodes(); - const double* x = m.getCoordinateArray(X_COORDINATE); - SLIC_ASSERT(x != nullptr); + // extract coordinate values into an axom::Array + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + coordinate_size); + + SLIC_ASSERT(x_vals_h.data() != nullptr); + + // Move x values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; for_all_nodes_impl( xargs::index(), m, - AXOM_LAMBDA(IndexType nodeID) { kernel(nodeID, x[nodeID]); }); + AXOM_LAMBDA(IndexType nodeID) { kernel(nodeID, x_vals_view[nodeID]); }); } //------------------------------------------------------------------------------ @@ -234,16 +249,30 @@ template inline void for_all_nodes_impl(xargs::xy, const UniformMesh& m, KernelType&& kernel) { SLIC_ERROR_IF(m.getDimension() != 2, "xargs::xy is only valid for 2D meshes"); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + // extract origin and spacing into an axom::Array + auto origin_h = axom::ArrayView(m.getOrigin().begin(), 3); + auto spacing_h = axom::ArrayView(m.getSpacing().begin(), 3); + + // Move origin and spacing values onto device + axom::Array origin_d = on_device + ? axom::Array(origin_h, device_allocator) + : axom::Array(); + auto origin_view = on_device ? origin_d.view() : origin_h; - const StackArray& origin = m.getOrigin(); - const StackArray& spacing = m.getSpacing(); + axom::Array spacing_d = on_device + ? axom::Array(spacing_h, device_allocator) + : axom::Array(); + auto spacing_view = on_device ? spacing_d.view() : spacing_h; for_all_nodes_impl( xargs::ij(), m, AXOM_LAMBDA(IndexType nodeID, IndexType i, IndexType j) { - const double x = origin[0] + i * spacing[0]; - const double y = origin[1] + j * spacing[1]; + const double x = origin_view[0] + i * spacing_view[0]; + const double y = origin_view[1] + j * spacing_view[1]; kernel(nodeID, x, y); }); } @@ -256,16 +285,36 @@ inline void for_all_nodes_impl(xargs::xy, { SLIC_ERROR_IF(m.getDimension() != 2, "xargs::xy is only valid for 2D meshes"); - const double* x = m.getCoordinateArray(X_COORDINATE); - const double* y = m.getCoordinateArray(Y_COORDINATE); - SLIC_ASSERT(x != nullptr); - SLIC_ASSERT(y != nullptr); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + // extract coordinate values into an axom::Array + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + m.getNodeResolution(X_COORDINATE)); + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + m.getNodeResolution(Y_COORDINATE)); + + SLIC_ASSERT(x_vals_h.data() != nullptr); + SLIC_ASSERT(y_vals_h.data() != nullptr); + + // Move xy values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; for_all_nodes_impl( xargs::ij(), m, AXOM_LAMBDA(IndexType nodeID, IndexType i, IndexType j) { - kernel(nodeID, x[i], y[j]); + kernel(nodeID, x_vals_view[i], y_vals_view[j]); }); } @@ -279,15 +328,38 @@ inline void for_all_nodes_impl(xargs::xy, const Mesh& m, KernelType&& kernel) SLIC_ERROR_IF(m.getMeshType() == STRUCTURED_RECTILINEAR_MESH, "Not valid for RectilinearMesh."); - const double* x = m.getCoordinateArray(X_COORDINATE); - const double* y = m.getCoordinateArray(Y_COORDINATE); - SLIC_ASSERT(x != nullptr); - SLIC_ASSERT(y != nullptr); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + IndexType coordinate_size = m.getNumberOfNodes(); + + // extract coordinate values into an axom::Array + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + coordinate_size); + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + coordinate_size); + + SLIC_ASSERT(x_vals_h.data() != nullptr); + SLIC_ASSERT(y_vals_h.data() != nullptr); + + // Move xy values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; for_all_nodes_impl( xargs::index(), m, - AXOM_LAMBDA(IndexType nodeID) { kernel(nodeID, x[nodeID], y[nodeID]); }); + AXOM_LAMBDA(IndexType nodeID) { + kernel(nodeID, x_vals_view[nodeID], y_vals_view[nodeID]); + }); } //------------------------------------------------------------------------------ @@ -324,17 +396,31 @@ template inline void for_all_nodes_impl(xargs::xyz, const UniformMesh& m, KernelType&& kernel) { SLIC_ERROR_IF(m.getDimension() != 3, "xargs::xyz is only valid for 3D meshes"); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + // extract origin and spacing into an axom::Array + auto origin_h = axom::ArrayView(m.getOrigin().begin(), 3); + auto spacing_h = axom::ArrayView(m.getSpacing().begin(), 3); + + // Move origin and spacing values onto device + axom::Array origin_d = on_device + ? axom::Array(origin_h, device_allocator) + : axom::Array(); + auto origin_view = on_device ? origin_d.view() : origin_h; - const StackArray origin = m.getOrigin(); - const StackArray spacing = m.getSpacing(); + axom::Array spacing_d = on_device + ? axom::Array(spacing_h, device_allocator) + : axom::Array(); + auto spacing_view = on_device ? spacing_d.view() : spacing_h; for_all_nodes_impl( xargs::ijk(), m, AXOM_LAMBDA(IndexType nodeID, IndexType i, IndexType j, IndexType k) { - const double x = origin[0] + i * spacing[0]; - const double y = origin[1] + j * spacing[1]; - const double z = origin[2] + k * spacing[2]; + const double x = origin_view[0] + i * spacing_view[0]; + const double y = origin_view[1] + j * spacing_view[1]; + const double z = origin_view[2] + k * spacing_view[2]; kernel(nodeID, x, y, z); }); } @@ -346,15 +432,41 @@ inline void for_all_nodes_impl(xargs::xyz, KernelType&& kernel) { SLIC_ERROR_IF(m.getDimension() != 3, "xargs::xyz is only valid for 3D meshes"); - const double* x = m.getCoordinateArray(X_COORDINATE); - const double* y = m.getCoordinateArray(Y_COORDINATE); - const double* z = m.getCoordinateArray(Z_COORDINATE); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + + // extract coordinate values into an axom::Array + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + m.getNodeResolution(X_COORDINATE)); + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + m.getNodeResolution(Y_COORDINATE)); + auto z_vals_h = + axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + m.getNodeResolution(Z_COORDINATE)); + + // Move xyz values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; for_all_nodes_impl( xargs::ijk(), m, AXOM_LAMBDA(IndexType nodeID, IndexType i, IndexType j, IndexType k) { - kernel(nodeID, x[i], y[j], z[k]); + kernel(nodeID, x_vals_view[i], y_vals_view[j], z_vals_view[k]); }); } @@ -368,18 +480,46 @@ inline void for_all_nodes_impl(xargs::xyz, const Mesh& m, KernelType&& kernel) SLIC_ERROR_IF(m.getMeshType() == STRUCTURED_RECTILINEAR_MESH, "Not valid for RectilinearMesh."); - const double* x = m.getCoordinateArray(X_COORDINATE); - const double* y = m.getCoordinateArray(Y_COORDINATE); - const double* z = m.getCoordinateArray(Z_COORDINATE); - SLIC_ASSERT(x != nullptr); - SLIC_ASSERT(y != nullptr); - SLIC_ASSERT(z != nullptr); + constexpr bool on_device = axom::execution_space::onDevice(); + const int device_allocator = axom::execution_space::allocatorID(); + IndexType coordinate_size = m.getNumberOfNodes(); + + // extract coordinate values into an axom::Array + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + coordinate_size); + auto y_vals_h = + axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + coordinate_size); + auto z_vals_h = + axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + coordinate_size); + + SLIC_ASSERT(x_vals_h.data() != nullptr); + SLIC_ASSERT(y_vals_h.data() != nullptr); + SLIC_ASSERT(z_vals_h.data() != nullptr); + + // Move xyz values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, device_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; for_all_nodes_impl( xargs::index(), m, AXOM_LAMBDA(IndexType nodeID) { - kernel(nodeID, x[nodeID], y[nodeID], z[nodeID]); + kernel(nodeID, x_vals_view[nodeID], y_vals_view[nodeID], z_vals_view[nodeID]); }); } diff --git a/src/axom/mint/execution/internal/helpers.hpp b/src/axom/mint/execution/internal/helpers.hpp index 9b2f7e819c..0443257eb0 100644 --- a/src/axom/mint/execution/internal/helpers.hpp +++ b/src/axom/mint/execution/internal/helpers.hpp @@ -37,6 +37,7 @@ namespace internal * the number of nodes. * \param [in] m the Mesh to iterate over. * \param [in] kernel the kernel to call on each object. + * */ template = 1 && NDIM <= 3, "NDIM must be a valid dimension."); AXOM_STATIC_ASSERT_MSG(NNODES > 0, "NNODES must be greater than zero."); @@ -58,12 +64,38 @@ inline void for_all_coords(const FOR_ALL_FUNCTOR& for_all_nodes, SLIC_ERROR_IF(m.getDimension() != NDIM, "Dimension mismatch!"); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr bool NO_COPY = true; - const StackArray coords = { - {m.getCoordinateArray(X_COORDINATE), - (NDIM > 1) ? m.getCoordinateArray(Y_COORDINATE) : nullptr, - (NDIM > 2) ? m.getCoordinateArray(Z_COORDINATE) : nullptr}}; + IndexType coordinate_size = m.getNumberOfNodes(); + + // Extract coordinate values into an axom::ArrayView + auto x_vals_h = + axom::ArrayView(m.getCoordinateArray(X_COORDINATE), + coordinate_size); + auto y_vals_h = (NDIM > 1) + ? axom::ArrayView(m.getCoordinateArray(Y_COORDINATE), + coordinate_size) + : axom::ArrayView(); + auto z_vals_h = (NDIM > 2) + ? axom::ArrayView(m.getCoordinateArray(Z_COORDINATE), + coordinate_size) + : axom::ArrayView(); + + // Move xyz values onto device + axom::Array x_vals_d = axom::Array(x_vals_h, device_allocator); + auto x_vals_view = x_vals_d.view(); + + axom::Array y_vals_d = (NDIM > 1) + ? axom::Array(y_vals_h, device_allocator) + : axom::Array(); + auto y_vals_view = (NDIM > 1) ? y_vals_d.view() : y_vals_h; + + axom::Array z_vals_d = (NDIM > 2) + ? axom::Array(z_vals_h, device_allocator) + : axom::Array(); + auto z_vals_view = (NDIM > 2) ? z_vals_d.view() : z_vals_h; for_all_nodes( ExecPolicy(), @@ -76,9 +108,15 @@ inline void for_all_coords(const FOR_ALL_FUNCTOR& for_all_nodes, for(int i = 0; i < NNODES; ++i) { const int i_offset = NDIM * i; - for(int dim = 0; dim < NDIM; ++dim) + + localCoords[i_offset] = x_vals_view[nodeIDs[i]]; + if(NDIM > 1) + { + localCoords[i_offset + 1] = y_vals_view[nodeIDs[i]]; + } + if(NDIM > 2) { - localCoords[i_offset + dim] = coords[dim][nodeIDs[i]]; + localCoords[i_offset + 2] = z_vals_view[nodeIDs[i]]; } } diff --git a/src/axom/mint/mesh/StructuredMesh.cpp b/src/axom/mint/mesh/StructuredMesh.cpp index 067028b821..2550a92876 100644 --- a/src/axom/mint/mesh/StructuredMesh.cpp +++ b/src/axom/mint/mesh/StructuredMesh.cpp @@ -7,7 +7,7 @@ #include "axom/mint/mesh/blueprint.hpp" #include /* for memcpy() */ -#include /* for std::numeric_limits< IndexType >::max */ +#include "axom/core/NumericLimits.hpp" namespace axom { @@ -169,9 +169,9 @@ void StructuredMesh::structuredInit() /* Initialize the node meta data. */ m_node_jp = (m_ndims > 1) ? getNodeResolution(0) - : std::numeric_limits::max(); + : axom::numeric_limits::max(); m_node_kp = (m_ndims > 2) ? m_node_jp * getNodeResolution(1) - : std::numeric_limits::max(); + : axom::numeric_limits::max(); /* Initialize the cell meta data */ for(int dim = 0; dim < m_ndims; ++dim) @@ -180,9 +180,9 @@ void StructuredMesh::structuredInit() } m_cell_jp = (m_ndims > 1) ? getCellResolution(0) - : std::numeric_limits::max(); + : axom::numeric_limits::max(); m_cell_kp = (m_ndims > 2) ? m_cell_jp * getCellResolution(1) - : std::numeric_limits::max(); + : axom::numeric_limits::max(); /* Build the cell to node offsets. */ m_cell_node_offsets[0] = 0; diff --git a/src/axom/mint/tests/StructuredMesh_helpers.hpp b/src/axom/mint/tests/StructuredMesh_helpers.hpp index 9049d6049c..eed27a2d73 100644 --- a/src/axom/mint/tests/StructuredMesh_helpers.hpp +++ b/src/axom/mint/tests/StructuredMesh_helpers.hpp @@ -901,8 +901,9 @@ inline void check_constructor(const StructuredMesh* m, EXPECT_TRUE(m->hasExplicitCoordinates()); } - CellType cell_type = - (mesh_dimension == 3) ? HEX : (mesh_dimension == 2) ? QUAD : SEGMENT; + CellType cell_type = (mesh_dimension == 3) ? HEX + : (mesh_dimension == 2) ? QUAD + : SEGMENT; EXPECT_EQ(m->getCellType(), cell_type); EXPECT_EQ(m->getNumberOfCellNodes(), getCellInfo(cell_type).num_nodes); EXPECT_EQ(m->getNumberOfCellFaces(), getCellInfo(cell_type).num_faces); diff --git a/src/axom/mint/tests/mint_execution_cell_traversals.cpp b/src/axom/mint/tests/mint_execution_cell_traversals.cpp index 205e4c2446..9a2805d9f6 100644 --- a/src/axom/mint/tests/mint_execution_cell_traversals.cpp +++ b/src/axom/mint/tests/mint_execution_cell_traversals.cpp @@ -30,6 +30,7 @@ namespace mint //------------------------------------------------------------------------------ namespace { + template void check_for_all_cells_idx(int dimension) { @@ -38,6 +39,10 @@ void check_for_all_cells_idx(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -51,17 +56,29 @@ void check_for_all_cells_idx(int dimension) dynamic_cast(internal::create_mesh(uniform_mesh)); EXPECT_TRUE(test_mesh != nullptr); - IndexType* field = - test_mesh->template createField("c1", CELL_CENTERED); + const IndexType numCells = test_mesh->getNumberOfCells(); + + axom::Array field_d(numCells, numCells, device_allocator); + + auto field_v = field_d.view(); for_all_cells( test_mesh, - AXOM_LAMBDA(IndexType cellID) { field[cellID] = cellID; }); + AXOM_LAMBDA(IndexType cellID) { field_v[cellID] = cellID; }); + + // Copy field back to host + axom::Array field_h = + axom::Array(field_d, host_allocator); + + // Create mesh field from buffer + IndexType* c1_field = + test_mesh->template createField("c1", + CELL_CENTERED, + field_h.data()); - const IndexType numCells = test_mesh->getNumberOfCells(); for(IndexType cellID = 0; cellID < numCells; ++cellID) { - EXPECT_EQ(field[cellID], cellID); + EXPECT_EQ(c1_field[cellID], cellID); } delete test_mesh; @@ -75,6 +92,10 @@ void check_for_all_cells_ij() SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << internal::mesh_type::name()); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr IndexType N = 20; const double lo[] = {-10, -10}; const double hi[] = {10, 10}; @@ -86,25 +107,42 @@ void check_for_all_cells_ij() dynamic_cast(internal::create_mesh(uniform_mesh)); EXPECT_TRUE(test_mesh != nullptr); - IndexType* icoords = - test_mesh->template createField("i", CELL_CENTERED); - IndexType* jcoords = - test_mesh->template createField("j", CELL_CENTERED); + axom::Array icoords_d(N * N, N * N, device_allocator); + axom::Array jcoords_d(N * N, N * N, device_allocator); + + auto icoords_v = icoords_d.view(); + auto jcoords_v = jcoords_d.view(); for_all_cells( test_mesh, AXOM_LAMBDA(IndexType cellIdx, IndexType i, IndexType j) { - icoords[cellIdx] = i; - jcoords[cellIdx] = j; + icoords_v[cellIdx] = i; + jcoords_v[cellIdx] = j; }); + // Copy data back to host + axom::Array icoords_h = + axom::Array(icoords_d, host_allocator); + axom::Array jcoords_h = + axom::Array(jcoords_d, host_allocator); + + // Create mesh fields from buffers + IndexType* i_field = + test_mesh->template createField("i", + CELL_CENTERED, + icoords_h.data()); + IndexType* j_field = + test_mesh->template createField("j", + CELL_CENTERED, + jcoords_h.data()); + IndexType icell = 0; for(IndexType j = 0; j < (N - 1); ++j) { for(IndexType i = 0; i < (N - 1); ++i) { - EXPECT_EQ(icoords[icell], i); - EXPECT_EQ(jcoords[icell], j); + EXPECT_EQ(i_field[icell], i); + EXPECT_EQ(j_field[icell], j); ++icell; } // END for all i } // END for all j @@ -117,6 +155,10 @@ void check_for_all_cells_ij() template void check_for_all_cells_ijk() { + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << internal::mesh_type::name()); @@ -131,21 +173,46 @@ void check_for_all_cells_ijk() dynamic_cast(internal::create_mesh(uniform_mesh)); EXPECT_TRUE(test_mesh != nullptr); - IndexType* icoords = - test_mesh->template createField("i", CELL_CENTERED); - IndexType* jcoords = - test_mesh->template createField("j", CELL_CENTERED); - IndexType* kcoords = - test_mesh->template createField("k", CELL_CENTERED); + const int size = N * N * N; + axom::Array icoords_d(size, size, device_allocator); + axom::Array jcoords_d(size, size, device_allocator); + axom::Array kcoords_d(size, size, device_allocator); + + auto icoords_v = icoords_d.view(); + auto jcoords_v = jcoords_d.view(); + auto kcoords_v = kcoords_d.view(); for_all_cells( test_mesh, AXOM_LAMBDA(IndexType cellIdx, IndexType i, IndexType j, IndexType k) { - icoords[cellIdx] = i; - jcoords[cellIdx] = j; - kcoords[cellIdx] = k; + icoords_v[cellIdx] = i; + jcoords_v[cellIdx] = j; + kcoords_v[cellIdx] = k; }); + // Copy data back to host + axom::Array icoords_h = + axom::Array(icoords_d, host_allocator); + axom::Array jcoords_h = + axom::Array(jcoords_d, host_allocator); + axom::Array kcoords_h = + axom::Array(kcoords_d, host_allocator); + + // Create mesh fields from buffers + IndexType* i_field = + test_mesh->template createField("i", + CELL_CENTERED, + icoords_h.data()); + IndexType* j_field = + test_mesh->template createField("j", + CELL_CENTERED, + jcoords_h.data()); + + IndexType* k_field = + test_mesh->template createField("k", + CELL_CENTERED, + kcoords_h.data()); + IndexType icell = 0; for(IndexType k = 0; k < (N - 1); ++k) { @@ -153,9 +220,9 @@ void check_for_all_cells_ijk() { for(IndexType i = 0; i < (N - 1); ++i) { - EXPECT_EQ(icoords[icell], i); - EXPECT_EQ(jcoords[icell], j); - EXPECT_EQ(kcoords[icell], k); + EXPECT_EQ(i_field[icell], i); + EXPECT_EQ(j_field[icell], j); + EXPECT_EQ(k_field[icell], k); ++icell; } // END for all i } // END for all j @@ -174,6 +241,10 @@ void check_for_all_cell_nodes(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -188,26 +259,39 @@ void check_for_all_cell_nodes(int dimension) EXPECT_TRUE(test_mesh != nullptr); const IndexType numCells = test_mesh->getNumberOfCells(); - IndexType* conn = test_mesh->template createField("conn", - CELL_CENTERED, - MAX_CELL_NODES); + + axom::Array conn_d(numCells * MAX_CELL_NODES, + numCells * MAX_CELL_NODES, + device_allocator); + + auto conn_v = conn_d.view(); for_all_cells( test_mesh, AXOM_LAMBDA(IndexType cellID, const IndexType* nodes, IndexType N) { for(int i = 0; i < N; ++i) { - conn[cellID * MAX_CELL_NODES + i] = nodes[i]; + conn_v[cellID * MAX_CELL_NODES + i] = nodes[i]; } // END for all cell nodes }); + // Copy data back to host + axom::Array conn_h = axom::Array(conn_d, host_allocator); + + // Create mesh field from buffer + IndexType* conn_field = + test_mesh->template createField("conn", + CELL_CENTERED, + conn_h.data(), + MAX_CELL_NODES); + IndexType cellNodes[MAX_CELL_NODES]; for(IndexType cellID = 0; cellID < numCells; ++cellID) { const IndexType N = test_mesh->getCellNodeIDs(cellID, cellNodes); for(int i = 0; i < N; ++i) { - EXPECT_EQ(conn[cellID * MAX_CELL_NODES + i], cellNodes[i]); + EXPECT_EQ(conn_field[cellID * MAX_CELL_NODES + i], cellNodes[i]); } } // END for all cells @@ -225,6 +309,10 @@ void check_for_all_cell_coords(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -239,13 +327,16 @@ void check_for_all_cell_coords(int dimension) EXPECT_TRUE(test_mesh != nullptr); const IndexType numCells = test_mesh->getNumberOfCells(); - IndexType* conn = test_mesh->template createField("conn", - CELL_CENTERED, - MAX_CELL_NODES); - double* coords = - test_mesh->template createField("coords", - CELL_CENTERED, - dimension * MAX_CELL_NODES); + + axom::Array conn_d(numCells * MAX_CELL_NODES, + numCells * MAX_CELL_NODES, + device_allocator); + axom::Array coords_d(numCells * dimension * MAX_CELL_NODES, + numCells * dimension * MAX_CELL_NODES, + device_allocator); + + auto conn_v = conn_d.view(); + auto coords_v = coords_d.view(); for_all_cells( test_mesh, @@ -255,16 +346,32 @@ void check_for_all_cell_coords(int dimension) const IndexType numNodes = coordsMatrix.getNumColumns(); for(int i = 0; i < numNodes; ++i) { - conn[cellID * MAX_CELL_NODES + i] = nodes[i]; + conn_v[cellID * MAX_CELL_NODES + i] = nodes[i]; for(int dim = 0; dim < dimension; ++dim) { - coords[cellID * dimension * MAX_CELL_NODES + i * dimension + dim] = + coords_v[cellID * dimension * MAX_CELL_NODES + i * dimension + dim] = coordsMatrix(dim, i); } } // END for all cell nodes }); + // Copy data back to host + axom::Array conn_h = axom::Array(conn_d, host_allocator); + axom::Array coords_h = axom::Array(coords_d, host_allocator); + + // Create mesh fields from buffers + IndexType* conn_field = + test_mesh->template createField("conn", + CELL_CENTERED, + conn_h.data(), + MAX_CELL_NODES); + double* coords_field = + test_mesh->template createField("coords", + CELL_CENTERED, + coords_h.data(), + dimension * MAX_CELL_NODES); + double nodeCoords[3]; IndexType cellNodes[MAX_CELL_NODES]; for(IndexType cellID = 0; cellID < numCells; ++cellID) @@ -272,13 +379,13 @@ void check_for_all_cell_coords(int dimension) const IndexType numNodes = test_mesh->getCellNodeIDs(cellID, cellNodes); for(int i = 0; i < numNodes; ++i) { - EXPECT_EQ(conn[cellID * MAX_CELL_NODES + i], cellNodes[i]); + EXPECT_EQ(conn_field[cellID * MAX_CELL_NODES + i], cellNodes[i]); for(int dim = 0; dim < dimension; ++dim) { test_mesh->getNode(cellNodes[i], nodeCoords); EXPECT_NEAR( - coords[cellID * dimension * MAX_CELL_NODES + i * dimension + dim], + coords_field[cellID * dimension * MAX_CELL_NODES + i * dimension + dim], nodeCoords[dim], 1e-8); } @@ -299,6 +406,10 @@ void check_for_all_cell_faces(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -313,20 +424,32 @@ void check_for_all_cell_faces(int dimension) EXPECT_TRUE(test_mesh != nullptr); const IndexType numCells = test_mesh->getNumberOfCells(); - IndexType* cellFaces = - test_mesh->template createField("cellFaces", - CELL_CENTERED, - MAX_CELL_FACES); + axom::Array cell_faces_d(numCells * MAX_CELL_FACES, + numCells * MAX_CELL_FACES, + device_allocator); + + auto cell_faces_v = cell_faces_d.view(); for_all_cells( test_mesh, AXOM_LAMBDA(IndexType cellID, const IndexType* faces, IndexType N) { for(int i = 0; i < N; ++i) { - cellFaces[cellID * MAX_CELL_FACES + i] = faces[i]; + cell_faces_v[cellID * MAX_CELL_FACES + i] = faces[i]; } }); + // Copy data back to host + axom::Array cell_faces_h = + axom::Array(cell_faces_d, host_allocator); + + // Create mesh fields from buffers + IndexType* cell_faces_field = + test_mesh->template createField("cellFaces", + CELL_CENTERED, + cell_faces_h.data(), + MAX_CELL_NODES); + IndexType faces[MAX_CELL_FACES]; for(IndexType cellID = 0; cellID < numCells; ++cellID) { @@ -334,7 +457,7 @@ void check_for_all_cell_faces(int dimension) for(IndexType i = 0; i < N; ++i) { - EXPECT_EQ(cellFaces[cellID * MAX_CELL_FACES + i], faces[i]); + EXPECT_EQ(cell_faces_field[cellID * MAX_CELL_FACES + i], faces[i]); } } @@ -378,17 +501,12 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_nodeids) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -396,17 +514,12 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_nodeids) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); check_for_all_cell_nodes(i); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions @@ -441,17 +554,12 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_coords) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cell_coords(i); check_for_all_cell_coords(i); check_for_all_cell_coords(i); check_for_all_cell_coords(i); check_for_all_cell_coords(i); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -459,17 +567,12 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_coords) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cell_coords(i); check_for_all_cell_coords(i); check_for_all_cell_coords(i); check_for_all_cell_coords(i); check_for_all_cell_coords(i); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions @@ -504,17 +607,12 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_faceids) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cell_faces(i); check_for_all_cell_faces(i); check_for_all_cell_faces(i); check_for_all_cell_faces(i); check_for_all_cell_faces(i); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -522,17 +620,12 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_faceids) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cell_faces(i); check_for_all_cell_faces(i); check_for_all_cell_faces(i); check_for_all_cell_faces(i); check_for_all_cell_faces(i); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions @@ -561,15 +654,10 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_ij) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cells_ij(); check_for_all_cells_ij(); check_for_all_cells_ij(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -577,15 +665,10 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_ij) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cells_ij(); check_for_all_cells_ij(); check_for_all_cells_ij(); - setDefaultAllocator(prev_allocator); #endif } @@ -612,15 +695,10 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_ijk) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cells_ijk(); check_for_all_cells_ijk(); check_for_all_cells_ijk(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -628,15 +706,10 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_ijk) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cells_ijk(); check_for_all_cells_ijk(); check_for_all_cells_ijk(); - setDefaultAllocator(prev_allocator); #endif } @@ -670,17 +743,11 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_index) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cells_idx(i); check_for_all_cells_idx(i); check_for_all_cells_idx(i); check_for_all_cells_idx(i); check_for_all_cells_idx(i); - - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -688,17 +755,11 @@ AXOM_CUDA_TEST(mint_execution_cell_traversals, for_all_cells_index) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_cells_idx(i); check_for_all_cells_idx(i); check_for_all_cells_idx(i); check_for_all_cells_idx(i); check_for_all_cells_idx(i); - - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions diff --git a/src/axom/mint/tests/mint_execution_face_traversals.cpp b/src/axom/mint/tests/mint_execution_face_traversals.cpp index 6fc4368309..ea322a911d 100644 --- a/src/axom/mint/tests/mint_execution_face_traversals.cpp +++ b/src/axom/mint/tests/mint_execution_face_traversals.cpp @@ -28,6 +28,7 @@ namespace mint //------------------------------------------------------------------------------ namespace { + template void check_for_all_faces(int dimension) { @@ -36,6 +37,10 @@ void check_for_all_faces(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -51,16 +56,27 @@ void check_for_all_faces(int dimension) const IndexType numFaces = test_mesh->getNumberOfFaces(); - IndexType* field = - test_mesh->template createField("f1", FACE_CENTERED); + axom::Array field_d(numFaces, numFaces, device_allocator); + + auto field_v = field_d.view(); for_all_faces( test_mesh, - AXOM_LAMBDA(IndexType faceID) { field[faceID] = faceID; }); + AXOM_LAMBDA(IndexType faceID) { field_v[faceID] = faceID; }); + + // Copy field back to host + axom::Array field_h = + axom::Array(field_d, host_allocator); + + // Create mesh field from buffer + IndexType* f1_field = + test_mesh->template createField("f1", + FACE_CENTERED, + field_h.data()); for(IndexType faceID = 0; faceID < numFaces; ++faceID) { - EXPECT_EQ(field[faceID], faceID); + EXPECT_EQ(f1_field[faceID], faceID); } delete test_mesh; @@ -76,6 +92,10 @@ void check_for_all_face_nodes(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -90,26 +110,36 @@ void check_for_all_face_nodes(int dimension) EXPECT_TRUE(test_mesh != nullptr); const IndexType numFaces = test_mesh->getNumberOfFaces(); - IndexType* conn = test_mesh->template createField("f1", - FACE_CENTERED, - MAX_FACE_NODES); + + axom::Array conn_d(numFaces * MAX_FACE_NODES, + numFaces * MAX_FACE_NODES, + device_allocator); + + auto conn_v = conn_d.view(); for_all_faces( test_mesh, AXOM_LAMBDA(IndexType faceID, const IndexType* nodes, IndexType N) { for(int i = 0; i < N; ++i) { - conn[faceID * MAX_FACE_NODES + i] = nodes[i]; + conn_v[faceID * MAX_FACE_NODES + i] = nodes[i]; } // END for all face nodes }); + // Copy field back to host + axom::Array conn_h = axom::Array(conn_d, host_allocator); + + // Create mesh field from buffer + IndexType* conn_field = + test_mesh->template createField("f1", FACE_CENTERED, conn_h.data()); + IndexType faceNodes[MAX_FACE_NODES]; for(IndexType faceID = 0; faceID < numFaces; ++faceID) { const IndexType N = test_mesh->getFaceNodeIDs(faceID, faceNodes); for(int i = 0; i < N; ++i) { - EXPECT_EQ(conn[faceID * MAX_FACE_NODES + i], faceNodes[i]); + EXPECT_EQ(conn_field[faceID * MAX_FACE_NODES + i], faceNodes[i]); } } // END for all cells @@ -127,6 +157,10 @@ void check_for_all_face_coords(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -141,13 +175,15 @@ void check_for_all_face_coords(int dimension) EXPECT_TRUE(test_mesh != nullptr); const IndexType numFaces = test_mesh->getNumberOfFaces(); - IndexType* conn = test_mesh->template createField("conn", - FACE_CENTERED, - MAX_FACE_NODES); - double* coords = - test_mesh->template createField("coords", - FACE_CENTERED, - dimension * MAX_FACE_NODES); + axom::Array conn_d(numFaces * MAX_FACE_NODES, + numFaces * MAX_FACE_NODES, + device_allocator); + axom::Array coords_d(numFaces * dimension * MAX_FACE_NODES, + numFaces * dimension * MAX_FACE_NODES, + device_allocator); + + auto conn_v = conn_d.view(); + auto coords_v = coords_d.view(); for_all_faces( test_mesh, @@ -157,16 +193,32 @@ void check_for_all_face_coords(int dimension) const IndexType numNodes = coordsMatrix.getNumColumns(); for(int i = 0; i < numNodes; ++i) { - conn[faceID * MAX_FACE_NODES + i] = nodes[i]; + conn_v[faceID * MAX_FACE_NODES + i] = nodes[i]; for(int dim = 0; dim < dimension; ++dim) { - coords[faceID * dimension * MAX_FACE_NODES + i * dimension + dim] = + coords_v[faceID * dimension * MAX_FACE_NODES + i * dimension + dim] = coordsMatrix(dim, i); } } // END for all face nodes }); + // Copy data back to host + axom::Array conn_h = axom::Array(conn_d, host_allocator); + axom::Array coords_h = axom::Array(coords_d, host_allocator); + + // Create mesh fields from buffers + IndexType* conn_field = + test_mesh->template createField("conn", + FACE_CENTERED, + conn_h.data(), + MAX_FACE_NODES); + double* coords_field = + test_mesh->template createField("coords", + FACE_CENTERED, + coords_h.data(), + dimension * MAX_FACE_NODES); + double nodeCoords[3]; IndexType faceNodes[MAX_FACE_NODES]; for(IndexType faceID = 0; faceID < numFaces; ++faceID) @@ -174,13 +226,13 @@ void check_for_all_face_coords(int dimension) const IndexType numNodes = test_mesh->getFaceNodeIDs(faceID, faceNodes); for(int i = 0; i < numNodes; ++i) { - EXPECT_EQ(conn[faceID * MAX_FACE_NODES + i], faceNodes[i]); + EXPECT_EQ(conn_field[faceID * MAX_FACE_NODES + i], faceNodes[i]); for(int dim = 0; dim < dimension; ++dim) { test_mesh->getNode(faceNodes[i], nodeCoords); EXPECT_NEAR( - coords[faceID * dimension * MAX_FACE_NODES + i * dimension + dim], + coords_field[faceID * dimension * MAX_FACE_NODES + i * dimension + dim], nodeCoords[dim], 1e-8); } @@ -201,6 +253,10 @@ void check_for_all_face_cells(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + const IndexType Ni = 20; const IndexType Nj = (dimension >= 2) ? Ni : -1; const IndexType Nk = (dimension == 3) ? Ni : -1; @@ -215,23 +271,35 @@ void check_for_all_face_cells(int dimension) EXPECT_TRUE(test_mesh != nullptr); const IndexType numFaces = test_mesh->getNumberOfFaces(); - IndexType* faceCells = - test_mesh->template createField("f1", FACE_CENTERED, 2); + axom::Array face_cells_d(numFaces * 2, numFaces * 2, device_allocator); + + auto face_cells_v = face_cells_d.view(); for_all_faces( test_mesh, AXOM_LAMBDA(IndexType faceID, IndexType cellIDOne, IndexType cellIDTwo) { - faceCells[2 * faceID + 0] = cellIDOne; - faceCells[2 * faceID + 1] = cellIDTwo; + face_cells_v[2 * faceID + 0] = cellIDOne; + face_cells_v[2 * faceID + 1] = cellIDTwo; }); + // Copy field back to host + axom::Array face_cells_h = + axom::Array(face_cells_d, host_allocator); + + // Create mesh field from buffer + IndexType* face_cells_field = + test_mesh->template createField("f1", + FACE_CENTERED, + face_cells_h.data(), + 2); + for(IndexType faceID = 0; faceID < numFaces; ++faceID) { IndexType cellIDOne, cellIDTwo; test_mesh->getFaceCellIDs(faceID, cellIDOne, cellIDTwo); - EXPECT_EQ(faceCells[2 * faceID + 0], cellIDOne); - EXPECT_EQ(faceCells[2 * faceID + 1], cellIDTwo); + EXPECT_EQ(face_cells_field[2 * faceID + 0], cellIDOne); + EXPECT_EQ(face_cells_field[2 * faceID + 1], cellIDTwo); } /* clean up */ @@ -273,17 +341,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_face_nodeids) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -291,17 +354,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_face_nodeids) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions @@ -335,17 +393,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_face_coords) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_face_coords(dim); check_for_all_face_coords(dim); check_for_all_face_coords(dim); check_for_all_face_coords(dim); check_for_all_face_coords(dim); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -353,17 +406,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_face_coords) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_face_coords(dim); check_for_all_face_coords(dim); check_for_all_face_coords(dim); check_for_all_face_coords(dim); check_for_all_face_coords(dim); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions @@ -397,17 +445,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_face_cellids) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_face_cells(dim); check_for_all_face_cells(dim); check_for_all_face_cells(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -415,17 +458,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_face_cellids) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_face_cells(dim); check_for_all_face_cells(dim); check_for_all_face_cells(dim); check_for_all_face_nodes(dim); check_for_all_face_nodes(dim); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions @@ -460,17 +498,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_faces_index) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_faces(dim); check_for_all_faces(dim); check_for_all_faces(dim); check_for_all_faces(dim); check_for_all_faces(dim); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -478,17 +511,12 @@ AXOM_CUDA_TEST(mint_execution_face_traversals, for_all_faces_index) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_faces(dim); check_for_all_faces(dim); check_for_all_faces(dim); check_for_all_faces(dim); check_for_all_faces(dim); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions diff --git a/src/axom/mint/tests/mint_execution_node_traversals.cpp b/src/axom/mint/tests/mint_execution_node_traversals.cpp index b1ac708536..4f3713a486 100644 --- a/src/axom/mint/tests/mint_execution_node_traversals.cpp +++ b/src/axom/mint/tests/mint_execution_node_traversals.cpp @@ -29,6 +29,7 @@ namespace mint //------------------------------------------------------------------------------ namespace { + template void check_for_all_nodes_idx(int dimension) { @@ -37,6 +38,10 @@ void check_for_all_nodes_idx(int dimension) << ", policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr int MAGIC_VAL = 42; const IndexType Ni = 20; @@ -52,16 +57,25 @@ void check_for_all_nodes_idx(int dimension) dynamic_cast(internal::create_mesh(uniform_mesh)); EXPECT_TRUE(test_mesh != nullptr); - int* field = test_mesh->template createField("n1", NODE_CENTERED); + const IndexType numNodes = test_mesh->getNumberOfNodes(); + axom::Array field_d(numNodes, numNodes, device_allocator); + + auto field_v = field_d.view(); for_all_nodes( test_mesh, - AXOM_LAMBDA(IndexType nodeIdx) { field[nodeIdx] = MAGIC_VAL; }); + AXOM_LAMBDA(IndexType nodeIdx) { field_v[nodeIdx] = MAGIC_VAL; }); + + // Copy data back to host + axom::Array field_h = axom::Array(field_d, host_allocator); + + // Create mesh field from buffer + int* n1_field = + test_mesh->template createField("n1", NODE_CENTERED, field_h.data()); - const IndexType numNodes = test_mesh->getNumberOfNodes(); for(IndexType inode = 0; inode < numNodes; ++inode) { - EXPECT_EQ(field[inode], MAGIC_VAL); + EXPECT_EQ(n1_field[inode], MAGIC_VAL); } delete test_mesh; @@ -75,6 +89,10 @@ void check_for_all_nodes_ij() SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << internal::mesh_type::name()); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr IndexType N = 20; const double lo[] = {-10, -10}; const double hi[] = {10, 10}; @@ -88,23 +106,32 @@ void check_for_all_nodes_ij() const IndexType numNodes = test_mesh->getNumberOfNodes(); - IndexType* icoords = axom::allocate(numNodes); - IndexType* jcoords = axom::allocate(numNodes); + axom::Array icoords_d(numNodes, numNodes, device_allocator); + axom::Array jcoords_d(numNodes, numNodes, device_allocator); + + auto icoords_v = icoords_d.view(); + auto jcoords_v = jcoords_d.view(); for_all_nodes( test_mesh, AXOM_LAMBDA(IndexType nodeIdx, IndexType i, IndexType j) { - icoords[nodeIdx] = i; - jcoords[nodeIdx] = j; + icoords_v[nodeIdx] = i; + jcoords_v[nodeIdx] = j; }); + // Copy data back to host + axom::Array icoords_h = + axom::Array(icoords_d, host_allocator); + axom::Array jcoords_h = + axom::Array(jcoords_d, host_allocator); + IndexType inode = 0; for(IndexType j = 0; j < N; ++j) { for(IndexType i = 0; i < N; ++i) { - EXPECT_EQ(icoords[inode], i); - EXPECT_EQ(jcoords[inode], j); + EXPECT_EQ(icoords_h[inode], i); + EXPECT_EQ(jcoords_h[inode], j); ++inode; } // END for all i @@ -112,9 +139,6 @@ void check_for_all_nodes_ij() delete test_mesh; test_mesh = nullptr; - - axom::deallocate(icoords); - axom::deallocate(jcoords); } //------------------------------------------------------------------------------ @@ -124,6 +148,10 @@ void check_for_all_nodes_ijk() SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << internal::mesh_type::name()); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr IndexType N = 20; const double lo[] = {-10, -10, -10}; const double hi[] = {10, 10, 10}; @@ -137,18 +165,30 @@ void check_for_all_nodes_ijk() const IndexType numNodes = test_mesh->getNumberOfNodes(); - IndexType* icoords = axom::allocate(numNodes); - IndexType* jcoords = axom::allocate(numNodes); - IndexType* kcoords = axom::allocate(numNodes); + axom::Array icoords_d(numNodes, numNodes, device_allocator); + axom::Array jcoords_d(numNodes, numNodes, device_allocator); + axom::Array kcoords_d(numNodes, numNodes, device_allocator); + + auto icoords_v = icoords_d.view(); + auto jcoords_v = jcoords_d.view(); + auto kcoords_v = kcoords_d.view(); for_all_nodes( test_mesh, AXOM_LAMBDA(IndexType nodeIdx, IndexType i, IndexType j, IndexType k) { - icoords[nodeIdx] = i; - jcoords[nodeIdx] = j; - kcoords[nodeIdx] = k; + icoords_v[nodeIdx] = i; + jcoords_v[nodeIdx] = j; + kcoords_v[nodeIdx] = k; }); + // Copy data back to host + axom::Array icoords_h = + axom::Array(icoords_d, host_allocator); + axom::Array jcoords_h = + axom::Array(jcoords_d, host_allocator); + axom::Array kcoords_h = + axom::Array(kcoords_d, host_allocator); + IndexType inode = 0; for(IndexType k = 0; k < N; ++k) { @@ -156,9 +196,9 @@ void check_for_all_nodes_ijk() { for(IndexType i = 0; i < N; ++i) { - EXPECT_EQ(icoords[inode], i); - EXPECT_EQ(jcoords[inode], j); - EXPECT_EQ(kcoords[inode], k); + EXPECT_EQ(icoords_h[inode], i); + EXPECT_EQ(jcoords_h[inode], j); + EXPECT_EQ(kcoords_h[inode], k); ++inode; } // END for all i @@ -167,10 +207,6 @@ void check_for_all_nodes_ijk() delete test_mesh; test_mesh = nullptr; - - axom::deallocate(icoords); - axom::deallocate(jcoords); - axom::deallocate(kcoords); } //------------------------------------------------------------------------------ @@ -181,6 +217,10 @@ void check_for_all_nodes_xyz() SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr IndexType N = 20; const double lo[] = {-10, -10, -10}; const double hi[] = {10, 10, 10}; @@ -194,34 +234,41 @@ void check_for_all_nodes_xyz() // STEP 1: generate test coordinate arrays const IndexType numNodes = test_mesh->getNumberOfNodes(); - double* x = axom::allocate(numNodes); - double* y = axom::allocate(numNodes); - double* z = axom::allocate(numNodes); + + axom::Array x_d(numNodes, numNodes, device_allocator); + axom::Array y_d(numNodes, numNodes, device_allocator); + axom::Array z_d(numNodes, numNodes, device_allocator); + + auto x_v = x_d.view(); + auto y_v = y_d.view(); + auto z_v = z_d.view(); + for_all_nodes( test_mesh, AXOM_LAMBDA(IndexType idx, double xx, double yy, double zz) { - x[idx] = xx; - y[idx] = yy; - z[idx] = zz; + x_v[idx] = xx; + y_v[idx] = yy; + z_v[idx] = zz; }); + // Copy data back to host + axom::Array x_h = axom::Array(x_d, host_allocator); + axom::Array y_h = axom::Array(y_d, host_allocator); + axom::Array z_h = axom::Array(z_d, host_allocator); + // STEP 2:check coordinate arrays for(int inode = 0; inode < numNodes; ++inode) { double node[3]; test_mesh->getNode(inode, node); - EXPECT_DOUBLE_EQ(x[inode], node[X_COORDINATE]); - EXPECT_DOUBLE_EQ(y[inode], node[Y_COORDINATE]); - EXPECT_DOUBLE_EQ(z[inode], node[Z_COORDINATE]); + EXPECT_DOUBLE_EQ(x_h[inode], node[X_COORDINATE]); + EXPECT_DOUBLE_EQ(y_h[inode], node[Y_COORDINATE]); + EXPECT_DOUBLE_EQ(z_h[inode], node[Z_COORDINATE]); } // END for all nodes // STEP 3: clean up delete test_mesh; test_mesh = nullptr; - - axom::deallocate(x); - axom::deallocate(y); - axom::deallocate(z); } //------------------------------------------------------------------------------ @@ -232,6 +279,10 @@ void check_for_all_nodes_xy() SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr IndexType N = 20; const double lo[] = {-10, -10}; const double hi[] = {10, 10}; @@ -245,30 +296,36 @@ void check_for_all_nodes_xy() // STEP 1: generate test coordinate arrays const IndexType numNodes = test_mesh->getNumberOfNodes(); - double* x = axom::allocate(numNodes); - double* y = axom::allocate(numNodes); + + axom::Array x_d(numNodes, numNodes, device_allocator); + axom::Array y_d(numNodes, numNodes, device_allocator); + + auto x_v = x_d.view(); + auto y_v = y_d.view(); + for_all_nodes( test_mesh, AXOM_LAMBDA(IndexType idx, double xx, double yy) { - x[idx] = xx; - y[idx] = yy; + x_v[idx] = xx; + y_v[idx] = yy; }); + // Copy data back to host + axom::Array x_h = axom::Array(x_d, host_allocator); + axom::Array y_h = axom::Array(y_d, host_allocator); + // STEP 2:check coordinate arrays for(int inode = 0; inode < numNodes; ++inode) { double node[2]; test_mesh->getNode(inode, node); - EXPECT_DOUBLE_EQ(x[inode], node[X_COORDINATE]); - EXPECT_DOUBLE_EQ(y[inode], node[Y_COORDINATE]); + EXPECT_DOUBLE_EQ(x_h[inode], node[X_COORDINATE]); + EXPECT_DOUBLE_EQ(y_h[inode], node[Y_COORDINATE]); } // END for all nodes // STEP 3: clean up delete test_mesh; test_mesh = nullptr; - - axom::deallocate(x); - axom::deallocate(y); } //------------------------------------------------------------------------------ @@ -279,6 +336,10 @@ void check_for_all_nodes_x() SLIC_INFO("policy=" << execution_space::name() << ", mesh_type=" << mesh_name); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr IndexType Ni = 20; const double lo[] = {-10}; const double hi[] = {10}; @@ -297,23 +358,28 @@ void check_for_all_nodes_x() // STEP 1: generate test coordinate arrays const IndexType numNodes = uniform_mesh.getNumberOfNodes(); - double* x = axom::allocate(numNodes); + + axom::Array x_d(numNodes, numNodes, device_allocator); + auto x_v = x_d.view(); + for_all_nodes( test_mesh, - AXOM_LAMBDA(IndexType idx, double xx) { x[idx] = xx; }); + AXOM_LAMBDA(IndexType idx, double xx) { x_v[idx] = xx; }); + + // Copy data back to host + axom::Array x_h = axom::Array(x_d, host_allocator); // STEP 2:check coordinate arrays for(int inode = 0; inode < numNodes; ++inode) { double node[1]; uniform_mesh.getNode(inode, node); - EXPECT_DOUBLE_EQ(x[inode], node[X_COORDINATE]); + EXPECT_DOUBLE_EQ(x_h[inode], node[X_COORDINATE]); } // END for all nodes // STEP 3: clean up delete test_mesh; test_mesh = nullptr; - axom::deallocate(x); } } /* end anonymous namespace */ @@ -350,10 +416,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xyz) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_xyz(); check_for_all_nodes_xyz(); check_for_all_nodes_xyz(); @@ -361,7 +423,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xyz) check_for_all_nodes_xyz(); check_for_all_nodes_xyz(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -369,10 +430,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xyz) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_xyz(); check_for_all_nodes_xyz(); check_for_all_nodes_xyz(); @@ -380,7 +437,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xyz) check_for_all_nodes_xyz(); check_for_all_nodes_xyz(); - setDefaultAllocator(prev_allocator); #endif } @@ -413,10 +469,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xy) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_xy(); check_for_all_nodes_xy(); check_for_all_nodes_xy(); @@ -424,7 +476,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xy) check_for_all_nodes_xy(); check_for_all_nodes_xy(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -432,10 +483,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xy) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_xy(); check_for_all_nodes_xy(); check_for_all_nodes_xy(); @@ -443,7 +490,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_xy) check_for_all_nodes_xy(); check_for_all_nodes_xy(); - setDefaultAllocator(prev_allocator); #endif } @@ -476,10 +522,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_x) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_x(); check_for_all_nodes_x(); check_for_all_nodes_x(); @@ -487,7 +529,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_x) check_for_all_nodes_x(); check_for_all_nodes_x(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -495,10 +536,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_x) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_x(); check_for_all_nodes_x(); check_for_all_nodes_x(); @@ -506,7 +543,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_x) check_for_all_nodes_x(); check_for_all_nodes_x(); - setDefaultAllocator(prev_allocator); #endif } @@ -533,15 +569,10 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_ijk) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_ijk(); check_for_all_nodes_ijk(); check_for_all_nodes_ijk(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -549,15 +580,10 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_ijk) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_ijk(); check_for_all_nodes_ijk(); check_for_all_nodes_ijk(); - setDefaultAllocator(prev_allocator); #endif } @@ -584,15 +610,10 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_ij) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_ij(); check_for_all_nodes_ij(); check_for_all_nodes_ij(); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -600,15 +621,10 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_ij) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_ij(); check_for_all_nodes_ij(); check_for_all_nodes_ij(); - setDefaultAllocator(prev_allocator); #endif } @@ -644,10 +660,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_index) using cuda_exec = axom::CUDA_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_idx(i); check_for_all_nodes_idx(i); check_for_all_nodes_idx(i); @@ -655,7 +667,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_index) check_for_all_nodes_idx(i); check_for_all_nodes_idx(i); - setDefaultAllocator(prev_allocator); #endif #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_HIP) && \ @@ -663,10 +674,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_index) using hip_exec = axom::HIP_EXEC<512>; - const int exec_space_id = axom::execution_space::allocatorID(); - const int prev_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(exec_space_id); - check_for_all_nodes_idx(i); check_for_all_nodes_idx(i); check_for_all_nodes_idx(i); @@ -674,7 +681,6 @@ AXOM_CUDA_TEST(mint_execution_node_traversals, for_all_nodes_index) check_for_all_nodes_idx(i); check_for_all_nodes_idx(i); - setDefaultAllocator(prev_allocator); #endif } // END for all dimensions diff --git a/src/axom/mint/tests/mint_fem_shape_functions.cpp b/src/axom/mint/tests/mint_fem_shape_functions.cpp index ab1ea065b3..05ed8bdb65 100644 --- a/src/axom/mint/tests/mint_fem_shape_functions.cpp +++ b/src/axom/mint/tests/mint_fem_shape_functions.cpp @@ -5,6 +5,7 @@ #include "gtest/gtest.h" +#include "axom/core/NumericLimits.hpp" #include "axom/mint/fem/shape_functions/Lagrange.hpp" #include "axom/mint/fem/shape_functions/ShapeFunction.hpp" #include "axom/mint/fem/FEBasis.hpp" @@ -13,9 +14,6 @@ #include "axom/slic.hpp" -// C/C++ includes -#include - using namespace axom; using mint::Lagrange; using mint::ShapeFunction; @@ -32,7 +30,7 @@ namespace * \tparam CELLTYPE the corresponding cell type, e.g., MINT_QUAD */ template -void reference_element(double TOL = std::numeric_limits::epsilon()) +void reference_element(double TOL = axom::numeric_limits::epsilon()) { using FEMType = typename mint::FEBasis; using ShapeFunctionType = typename FEMType::ShapeFunctionType; diff --git a/src/axom/mint/tests/mint_mesh_connectivity_array.cpp b/src/axom/mint/tests/mint_mesh_connectivity_array.cpp index 6d25ce5bfd..78765c7453 100644 --- a/src/axom/mint/tests/mint_mesh_connectivity_array.cpp +++ b/src/axom/mint/tests/mint_mesh_connectivity_array.cpp @@ -41,8 +41,9 @@ IndexType calc_ID_capacity(const ConnectivityArray& connec, if(new_n_IDs > connec.getIDCapacity()) { IndexType stride = connec.getNumberOfValuesForID(); - IndexType newCapacity = - static_cast(new_n_IDs * stride * connec.getResizeRatio() + 0.5); + IndexType newCapacity = axom::utilities::max( + connec.getValueCapacity() * connec.getResizeRatio() + 0.5, + new_n_IDs * stride); IndexType remainder = newCapacity % stride; if(remainder != 0) { @@ -67,7 +68,9 @@ IndexType calc_ID_capacity(const ConnectivityArray& connec, IndexType new_n_IDs = connec.getNumberOfIDs() + increase; if(new_n_IDs > connec.getIDCapacity()) { - return static_cast(new_n_IDs * connec.getResizeRatio() + 0.5); + return axom::utilities::max( + connec.getIDCapacity() * connec.getResizeRatio() + 0.5, + new_n_IDs); } return connec.getIDCapacity(); @@ -101,7 +104,9 @@ IndexType calc_value_capacity(const ConnectivityArray& connec, IndexType new_n_values = connec.getNumberOfValues() + increase; if(new_n_values > connec.getValueCapacity()) { - return static_cast(new_n_values * connec.getResizeRatio() + 0.5); + return axom::utilities::max( + connec.getValueCapacity() * connec.getResizeRatio() + 0.5, + new_n_values); } return connec.getValueCapacity(); diff --git a/src/axom/mint/tests/mint_mesh_unstructured_mesh.cpp b/src/axom/mint/tests/mint_mesh_unstructured_mesh.cpp index bdd1c301f3..7d172dc137 100644 --- a/src/axom/mint/tests/mint_mesh_unstructured_mesh.cpp +++ b/src/axom/mint/tests/mint_mesh_unstructured_mesh.cpp @@ -2200,7 +2200,8 @@ void resize_cells(UnstructuredMesh* mesh) /* Append one more, should trigger a resize. */ append_cell_single(mesh, 1); n_cells++; - cell_capacity = static_cast(n_cells * resize_ratio + 0.5); + cell_capacity = + axom::utilities::max(cell_capacity * resize_ratio + 0.5, n_cells); connec_capacity = mesh->getCellNodesCapacity(); ASSERT_EQ(n_cells, mesh->getNumberOfCells()); ASSERT_EQ(cell_capacity, mesh->getCellCapacity()); @@ -2217,7 +2218,8 @@ void resize_cells(UnstructuredMesh* mesh) mesh->setCellResizeRatio(resize_ratio); append_cell_multiple(mesh, 100); n_cells += 100; - cell_capacity = static_cast(resize_ratio * n_cells + 0.5); + cell_capacity = + axom::utilities::max(cell_capacity * resize_ratio + 0.5, n_cells); ASSERT_EQ(n_cells, mesh->getNumberOfCells()); ASSERT_EQ(cell_capacity, mesh->getCellCapacity()); diff --git a/src/axom/mint/tests/mint_su2_io.cpp b/src/axom/mint/tests/mint_su2_io.cpp index 48ac165f7e..d38a29cf83 100644 --- a/src/axom/mint/tests/mint_su2_io.cpp +++ b/src/axom/mint/tests/mint_su2_io.cpp @@ -155,7 +155,7 @@ TEST(mint_su2_io, write_read_mixed_cell_topology_mesh) // cleanup delete test_mesh; - axom::utilities::filesystem::removeFile(su2File); + EXPECT_EQ(axom::utilities::filesystem::removeFile(su2File), 0); } //------------------------------------------------------------------------------ @@ -212,7 +212,7 @@ TEST(mint_su2_io, write_read_single_cell_topology_mesh) // cleanup delete test_mesh; - axom::utilities::filesystem::removeFile(su2File); + EXPECT_EQ(axom::utilities::filesystem::removeFile(su2File), 0); } //------------------------------------------------------------------------------ diff --git a/src/axom/mint/tests/mint_util_write_vtk.cpp b/src/axom/mint/tests/mint_util_write_vtk.cpp index 648ac3934a..8268142a64 100644 --- a/src/axom/mint/tests/mint_util_write_vtk.cpp +++ b/src/axom/mint/tests/mint_util_write_vtk.cpp @@ -820,7 +820,7 @@ void test_mesh(MeshType* mesh, const std::string& path) file.close(); delete mesh; #if DELETE_VTK_FILES - axom::utilities::filesystem::removeFile(path); + EXPECT_EQ(axom::utilities::filesystem::removeFile(path), 0); #endif } diff --git a/src/axom/multimat/CMakeLists.txt b/src/axom/multimat/CMakeLists.txt index a26d66073a..41c6194330 100644 --- a/src/axom/multimat/CMakeLists.txt +++ b/src/axom/multimat/CMakeLists.txt @@ -62,11 +62,3 @@ endif() if (AXOM_ENABLE_EXAMPLES) add_subdirectory(examples) endif() - - -#------------------------------------------------------------------------------ -# Add docs and code checks -#------------------------------------------------------------------------------ -axom_add_code_checks( - PREFIX multimat - ) diff --git a/src/axom/multimat/examples/traversal.cpp b/src/axom/multimat/examples/traversal.cpp index 6e8704660f..078d1049ae 100644 --- a/src/axom/multimat/examples/traversal.cpp +++ b/src/axom/multimat/examples/traversal.cpp @@ -284,8 +284,7 @@ void various_traversal_methods(int nmats, timer.start(); { auto map = mm.get1dField("Cell Array"); - for(MultiMat::Field1D::iterator iter = map.begin(); iter != map.end(); - iter++) + for(auto iter = map.set_begin(); iter != map.set_end(); iter++) { for(int comp = 0; comp < iter.numComp(); ++comp) { @@ -305,7 +304,7 @@ void various_traversal_methods(int nmats, for(int i = 0; i < map2d.firstSetSize(); i++) { auto submap = map2d(i); - for(auto iter = submap.begin(); iter != submap.end(); iter++) + for(auto iter = submap.set_begin(); iter != submap.set_end(); iter++) { //int idx = iter.index(); //get the index for(int comp = 0; comp < map2d.numComp(); ++comp) @@ -313,7 +312,6 @@ void various_traversal_methods(int nmats, sum += iter(comp); //<---- SLIC_ASSERT(iter(comp) == iter.value(comp)); //value() } - SLIC_ASSERT(*iter == iter.value()); //2 ways to get the first component } } } @@ -331,7 +329,7 @@ void various_traversal_methods(int nmats, auto map2d = mm.get2dField("CellMat Array"); for(int i = 0; i < mm.getNumberOfCells() /*map2d.firstSetSize()*/; i++) { - for(auto iter = map2d.begin(i); iter != map2d.end(i); iter++) + for(auto iter = map2d.set_begin(i); iter != map2d.set_end(i); iter++) { // int idx = iter.index(); get the index for(int comp = 0; comp < map2d.numComp(); ++comp) @@ -339,8 +337,8 @@ void various_traversal_methods(int nmats, sum += iter(comp); //<---- SLIC_ASSERT(iter(comp) == iter.value(comp)); //value() } - SLIC_ASSERT(iter(0) == *iter); //2 ways to get the first component - SLIC_ASSERT(iter(0) == iter.value()); + SLIC_ASSERT(iter(0) == (*iter)[0]); //2 ways to get the first component + SLIC_ASSERT(iter(0) == iter.value(0)); } } } @@ -377,7 +375,7 @@ void various_traversal_methods(int nmats, timer.start(); { auto map2d = mm.get2dField("CellMat Array"); - for(auto iter = map2d.begin(); iter != map2d.end(); ++iter) + for(auto iter = map2d.set_begin(); iter != map2d.set_end(); ++iter) { //get the indices //int cell_id = iter.firstIndex(); @@ -388,8 +386,6 @@ void various_traversal_methods(int nmats, SLIC_ASSERT(val == iter.value(comp)); //another way to get the value sum += val; } - SLIC_ASSERT(iter(0) == *iter); //2 ways to get the first component value - SLIC_ASSERT(iter(0) == iter.value()); } } timer.stop(); diff --git a/src/axom/multimat/mmsubfield.hpp b/src/axom/multimat/mmsubfield.hpp index 4ee6f15978..11edfa93e9 100644 --- a/src/axom/multimat/mmsubfield.hpp +++ b/src/axom/multimat/mmsubfield.hpp @@ -33,6 +33,7 @@ class MMSubField2D : public slam::SubMap::name()))); - // Save current/default allocator - const int current_allocator = axom::getDefaultAllocatorID(); - - // Set new default allocator - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + // Get allocators + constexpr bool on_device = axom::execution_space::onDevice(); + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); // Generate hexahedra subdividing the unit cube with corner points // (-1,-1,-1) and (1,1,1) int const HEX_RESOLUTION = params.hexResolution; int hex_index = 0; int const NUM_HEXES = HEX_RESOLUTION * HEX_RESOLUTION * HEX_RESOLUTION; - axom::Array hexes(NUM_HEXES, NUM_HEXES); - const axom::ArrayView hexes_view(hexes); + axom::Array hexes_h(NUM_HEXES, NUM_HEXES, host_allocator); SLIC_INFO(axom::fmt::format( "{:-^80}", @@ -162,10 +160,10 @@ void check_intersection_volumes(const Input& params) for(int k = 0; k < HEX_RESOLUTION; k++) { double edge_length = 2.0 / HEX_RESOLUTION; - hexes_view[hex_index] = generateCube(PointType {edge_length * i - 1, - edge_length * j - 1, - edge_length * k - 1}, - edge_length); + hexes_h[hex_index] = generateCube(PointType {edge_length * i - 1, + edge_length * j - 1, + edge_length * k - 1}, + edge_length); hex_index++; } } @@ -175,8 +173,7 @@ void check_intersection_volumes(const Input& params) int const TET_RESOLUTION = params.tetResolution; int tet_index = 0; int const NUM_TETS = 4 * std::pow(2, TET_RESOLUTION); - axom::Array tets(NUM_TETS, NUM_TETS); - const axom::ArrayView tets_view(tets); + axom::Array tets_h(NUM_TETS, NUM_TETS, host_allocator); double step_size = 1.0 / std::pow(2, TET_RESOLUTION); SLIC_INFO(axom::fmt::format( @@ -211,16 +208,26 @@ void check_intersection_volumes(const Input& params) double x2 = axom::utilities::lerp(-1.0, 1.0, step_size * (i + 1)); double z2 = std::sqrt(1 - (x2 * x2)) * z_sign; - tets_view[tet_index] = TetrahedronType(PointType {x1, 0, z1}, - PointType::zero(), - PointType {x2, 0, z2}, - PointType {0, pole_sign, 0}); + tets_h[tet_index] = TetrahedronType(PointType {x1, 0, z1}, + PointType::zero(), + PointType {x2, 0, z2}, + PointType {0, pole_sign, 0}); tet_index++; } } } // Calculate expected sum of all tetrahedra volume + axom::Array hexes_d = on_device + ? axom::Array(hexes_h, device_allocator) + : axom::Array(); + auto hexes_view = on_device ? hexes_d.view() : hexes_h.view(); + + axom::Array tets_d = on_device + ? axom::Array(tets_h, device_allocator) + : axom::Array(); + auto tets_view = on_device ? tets_d.view() : tets_h.view(); + using REDUCE_POL = typename axom::execution_space::reduce_policy; RAJA::ReduceSum total_tet_vol(0.0); @@ -276,9 +283,6 @@ void check_intersection_volumes(const Input& params) "{:-^80}", axom::fmt::format("Difference between sums is {}", std::abs(total_intersect_vol.get() - total_tet_vol.get())))); - - // Reset default allocator - axom::setDefaultAllocator(current_allocator); } int main(int argc, char** argv) diff --git a/src/axom/primal/geometry/BezierCurve.hpp b/src/axom/primal/geometry/BezierCurve.hpp index 1da4960715..c21c7e2d30 100644 --- a/src/axom/primal/geometry/BezierCurve.hpp +++ b/src/axom/primal/geometry/BezierCurve.hpp @@ -26,6 +26,7 @@ #include #include +#include "axom/fmt.hpp" namespace axom { @@ -531,8 +532,6 @@ class BezierCurve // which requires all first derivatives else { - VectorType val; - // Store BezierPatch of projective weights, (wx, wy, wz) // and BezierPatch of weights (w) BezierCurve projective(ord); @@ -717,8 +716,6 @@ class BezierCurve // which requires all first derivatives else { - VectorType val; - // Store BezierPatch of projective weights, (wx, wy, wz) // and BezierPatch of weights (w) BezierCurve projective(ord); @@ -923,4 +920,10 @@ std::ostream& operator<<(std::ostream& os, const BezierCurve& bCurve) } // namespace primal } // namespace axom +/// Overload to format a primal::BezierCurve using fmt +template +struct axom::fmt::formatter> + : ostream_formatter +{ }; + #endif // AXOM_PRIMAL_BEZIERCURVE_HPP_ diff --git a/src/axom/primal/geometry/BoundingBox.hpp b/src/axom/primal/geometry/BoundingBox.hpp index 0d739c4dfb..5f8e3a034b 100644 --- a/src/axom/primal/geometry/BoundingBox.hpp +++ b/src/axom/primal/geometry/BoundingBox.hpp @@ -6,12 +6,11 @@ #ifndef AXOM_PRIMAL_BOUNDINGBOX_HPP_ #define AXOM_PRIMAL_BOUNDINGBOX_HPP_ -#include - #include "axom/config.hpp" #include "axom/core/Macros.hpp" #include "axom/core/numerics/floating_point_limits.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/primal/geometry/Point.hpp" #include "axom/primal/geometry/Vector.hpp" @@ -72,8 +71,8 @@ class BoundingBox using VectorType = Vector; using BoxType = BoundingBox; - static constexpr T InvalidMin = std::numeric_limits::max(); - static constexpr T InvalidMax = std::numeric_limits::lowest(); + static constexpr T InvalidMin = axom::numeric_limits::max(); + static constexpr T InvalidMax = axom::numeric_limits::lowest(); public: /*! @@ -450,18 +449,19 @@ template AXOM_HOST_DEVICE bool BoundingBox::intersectsWith( const BoundingBox& otherBB) const { - bool status = true; - // AABBs cannot intersect if they are separated along any dimension for(int i = 0; i < NDIMS; ++i) { - status &= detail::intersect_bbox_bbox(m_min[i], - m_max[i], - otherBB.m_min[i], - otherBB.m_max[i]); - } // END for all dimensions + if(!detail::intersect_bbox_bbox(m_min[i], + m_max[i], + otherBB.m_min[i], + otherBB.m_max[i])) + { + return false; + } + } - return status; + return true; } //------------------------------------------------------------------------------ diff --git a/src/axom/primal/geometry/OrientedBoundingBox.hpp b/src/axom/primal/geometry/OrientedBoundingBox.hpp index d45e1a0a48..13e0d31683 100644 --- a/src/axom/primal/geometry/OrientedBoundingBox.hpp +++ b/src/axom/primal/geometry/OrientedBoundingBox.hpp @@ -10,6 +10,7 @@ #include "axom/config.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/primal/geometry/NumericArray.hpp" #include "axom/primal/geometry/Point.hpp" @@ -490,7 +491,7 @@ OrientedBoundingBox::OrientedBoundingBox(const OrientedBoundingBox& ot template void OrientedBoundingBox::clear() { - (this->m_u[0])[0] = std::numeric_limits::lowest(); + (this->m_u[0])[0] = axom::numeric_limits::lowest(); } //------------------------------------------------------------------------------ @@ -699,7 +700,7 @@ Point OrientedBoundingBox::furthestPoint(const PointType& pt template bool OrientedBoundingBox::isValid() const { - return !((this->m_u[0])[0] == std::numeric_limits::lowest()); + return !((this->m_u[0])[0] == axom::numeric_limits::lowest()); } //------------------------------------------------------------------------------ diff --git a/src/axom/primal/geometry/Plane.hpp b/src/axom/primal/geometry/Plane.hpp index 15b556a872..cb32da14d6 100644 --- a/src/axom/primal/geometry/Plane.hpp +++ b/src/axom/primal/geometry/Plane.hpp @@ -75,7 +75,7 @@ AXOM_HOST_DEVICE Plane make_plane(const Point& x1, * * \f$ \mathcal{N} \cdot x - d = 0 \f$ * - * where, \f$ \mathcal{N} \f$ is a unit normal and \f$ d \f$ is the offset of + * where, \f$ \mathcal{N} \f$ is a normal and \f$ d \f$ is the offset of * the plane (in the direction of the specified normal) to the origin. * * The Plane class defines a co-dimension-one plane that splits the ambient @@ -108,18 +108,24 @@ class Plane /// \name Constructors /// @{ + /*! + * \brief Constructs a Plane with a zero normal vector and zero offset + * + * \post isValid() == false + */ + Plane() = default; + /*! * \brief Constructs a Plane with a given normal, \f$ \mathcal{N} \f$, that * passes through the specified point, \f$ x \f$ * * \param [in] normal the supplied plane normal, \f$ \mathcal{N} \f$ * \param [in] x a specified point that the plane passes through, \f$ x \f$ - * - * \note The supplied normal will be normalized, such that, the Plane's normal - * will always be a unit normal. + * \param [in] normalize if true, normalize the given vector (default: true) */ - AXOM_HOST_DEVICE - Plane(const VectorType& normal, const PointType& x); + AXOM_HOST_DEVICE Plane(const VectorType& normal, + const PointType& x, + bool normalize = true); /*! * \brief Constructs a plane with a specified normal, \f$ \mathcal{N} \f$, @@ -127,12 +133,9 @@ class Plane * * \param [in] normal the supplied plane normal, \f$ \mathcal{N} \f$ * \param [in] offset the plane offset from origin - * - * \note The supplied normal will be normalized, such that, the Plane's normal - * will always be a unit normal. + * \param [in] normalize if true, normalize the given vector (default: true) */ - AXOM_HOST_DEVICE - Plane(const VectorType& normal, T offset); + AXOM_HOST_DEVICE Plane(const VectorType& normal, T offset, bool normalize = true); /// @} @@ -141,12 +144,11 @@ class Plane * \return dim the dimension of the Plane. * \post (dim==2) || (dim==3) */ - AXOM_HOST_DEVICE - inline int getDimension() const { return NDIMS; }; + AXOM_HOST_DEVICE static constexpr int getDimension() { return NDIMS; }; /*! - * \brief Returns a const pointer to the plane's unit normal. - * \return N the unit normal. + * \brief Returns a const pointer to the plane's normal vector. + * \return N the normal vector. */ AXOM_HOST_DEVICE const VectorType& getNormal() const { return m_normal; } @@ -175,12 +177,23 @@ class Plane * * \post this->getOrientedSide( projx ) == ON_BOUNDARY */ - PointType projectPoint(const PointType& x) const; + AXOM_HOST_DEVICE PointType projectPoint(const PointType& x) const; + + /*! + * \brief Computes the reflection of a given point, x, across this Plane. + * + * \param [in] x buffer consisting of the coordinates of the point to project. + * \return refx the coordinates of the reflected point. + * + * \post The reflected point will be on the Plane if x is on the Plane, + * otherwise it will be on the opposite side of the Plane from x. + */ + AXOM_HOST_DEVICE PointType reflectPoint(const PointType& x) const; /*! * \brief Flips the orientation of the plane. */ - inline void flip(); + AXOM_HOST_DEVICE void flip(); /*! * \brief Computes the orientation of the point with respect to this Plane. @@ -198,8 +211,19 @@ class Plane * * \see OrientationResult */ - AXOM_HOST_DEVICE inline int getOrientation(const PointType& x, - double TOL = 1.e-9) const; + AXOM_HOST_DEVICE int getOrientation(const PointType& x, + double TOL = 1.e-9) const; + + /*! + * \brief Simple check for validity of a Plane + * + * Check that the normal is not the zero vector. + * + * \param [in] TOL user-supplied tolerance. Optional. Default is 1.0e-50. + * + * \return True, if the Plane is valid, False otherwise + */ + AXOM_HOST_DEVICE bool isValid(double TOL = PRIMAL_TINY) const; /*! * \brief Prints the Plane information in the given output stream. @@ -215,11 +239,13 @@ class Plane * * \param [in] normal pointer to a buffer consisting of the normal * \note The supplied buffer must be at least NDIMS long. + * \param [in] normalize if true, normalize the given vector */ - AXOM_HOST_DEVICE inline void setNormal(const VectorType& normal); + AXOM_HOST_DEVICE void setNormal(const VectorType& normal, + bool normalize = true); - VectorType m_normal; /*!< plane unit-normal */ - T m_offset; /*!< offset from origin */ + VectorType m_normal; /*!< plane normal vector (defaults to the zero vector) */ + T m_offset {static_cast(0.0)}; /*!< offset from origin */ }; } /* namespace primal */ @@ -234,30 +260,33 @@ namespace primal { template AXOM_HOST_DEVICE Plane::Plane(const VectorType& normal, - const PointType& x) + const PointType& x, + bool normalize) { SLIC_ASSERT_MSG(!normal.is_zero(), "Normal vector of a plane should be non-zero"); - this->setNormal(normal); + this->setNormal(normal, normalize); m_offset = m_normal.dot(VectorType(x.array())); } //------------------------------------------------------------------------------ template -AXOM_HOST_DEVICE Plane::Plane(const VectorType& normal, T offset) +AXOM_HOST_DEVICE Plane::Plane(const VectorType& normal, + T offset, + bool normalize) : m_offset(offset) { SLIC_ASSERT_MSG(!normal.is_zero(), "Normal vector of a plane should be non-zero"); - this->setNormal(normal); + this->setNormal(normal, normalize); } //------------------------------------------------------------------------------ template -inline typename Plane::PointType Plane::projectPoint( +AXOM_HOST_DEVICE typename Plane::PointType Plane::projectPoint( const PointType& x) const { const T signed_distance = this->signedDistance(x); @@ -266,7 +295,16 @@ inline typename Plane::PointType Plane::projectPoint( //------------------------------------------------------------------------------ template -inline void Plane::flip() +AXOM_HOST_DEVICE typename Plane::PointType Plane::reflectPoint( + const PointType& x) const +{ + const T signed_distance = this->signedDistance(x); + return x - static_cast(2.0) * signed_distance * m_normal; +} + +//------------------------------------------------------------------------------ +template +AXOM_HOST_DEVICE void Plane::flip() { m_normal *= static_cast(-1.0); m_offset *= static_cast(-1.0); @@ -274,24 +312,42 @@ inline void Plane::flip() //------------------------------------------------------------------------------ template -AXOM_HOST_DEVICE inline int Plane::getOrientation(const PointType& x, - double TOL) const +AXOM_HOST_DEVICE int Plane::getOrientation(const PointType& x, + double TOL) const { const T signed_distance = this->signedDistance(x); - if(utilities::isNearlyEqual(signed_distance, 0.0, TOL)) + if(utilities::isNearlyEqual(signed_distance, + static_cast(0.0), + static_cast(TOL))) { return primal::ON_BOUNDARY; } - return signed_distance < 0. ? primal::ON_NEGATIVE_SIDE - : primal::ON_POSITIVE_SIDE; + return signed_distance < static_cast(0.0) ? primal::ON_NEGATIVE_SIDE + : primal::ON_POSITIVE_SIDE; +} + +template +AXOM_HOST_DEVICE bool Plane::isValid(double TOL) const +{ + for(int i = 0; i < NDIMS; ++i) + { + if(!utilities::isNearlyEqual(m_normal[i], + static_cast(0.0), + static_cast(TOL))) + { + return true; + } + } + + return false; } //------------------------------------------------------------------------------ template std::ostream& Plane::print(std::ostream& os) const { - os << "unit normal: [ "; + os << "normal: [ "; for(int i = 0; i < NDIMS; ++i) { os << m_normal[i] << " "; @@ -302,9 +358,17 @@ std::ostream& Plane::print(std::ostream& os) const //------------------------------------------------------------------------------ template -AXOM_HOST_DEVICE inline void Plane::setNormal(const VectorType& normal) +AXOM_HOST_DEVICE void Plane::setNormal(const VectorType& normal, + bool normalize) { - m_normal = normal.unitVector(); + if(normalize) + { + m_normal = normal.unitVector(); + } + else + { + m_normal = normal; + } } //------------------------------------------------------------------------------ diff --git a/src/axom/primal/geometry/Point.hpp b/src/axom/primal/geometry/Point.hpp index 6c33efec5b..c8033877ce 100644 --- a/src/axom/primal/geometry/Point.hpp +++ b/src/axom/primal/geometry/Point.hpp @@ -37,7 +37,8 @@ AXOM_HOST_DEVICE bool operator==(const Point& lhs, * \brief Inequality comparison operator for points */ template -bool operator!=(const Point& lhs, const Point& rhs); +AXOM_HOST_DEVICE bool operator!=(const Point& lhs, + const Point& rhs); /*! * \brief Overloaded output operator for points @@ -113,7 +114,8 @@ class Point * \return d the dimension of the point. * \post d >= 1. */ - static int dimension() { return NDIMS; }; + AXOM_HOST_DEVICE + static constexpr int dimension() { return NDIMS; }; /// \name Overloaded [] operator methods ///@{ @@ -174,6 +176,7 @@ class Point /*! * \brief Inequality operator for points */ + AXOM_HOST_DEVICE friend inline bool operator!=(const Point& lhs, const Point& rhs) { return !(lhs == rhs); diff --git a/src/axom/primal/geometry/Polygon.hpp b/src/axom/primal/geometry/Polygon.hpp index b97d173aa2..6eee85d4b4 100644 --- a/src/axom/primal/geometry/Polygon.hpp +++ b/src/axom/primal/geometry/Polygon.hpp @@ -13,6 +13,7 @@ #define AXOM_PRIMAL_POLYGON_HPP_ #include "axom/core/Array.hpp" +#include "axom/core/StaticArray.hpp" #include "axom/primal/geometry/Point.hpp" #include "axom/primal/geometry/Vector.hpp" @@ -22,13 +23,28 @@ namespace axom { namespace primal { +namespace +{ +static constexpr int DEFAULT_MAX_NUM_VERTICES = 8; +} /* end anonymous namespace */ + +/** + * The polygon can have a dynamic or static array to store vertices + */ +enum class PolygonArray +{ + Dynamic, + Static +}; + // Forward declare the templated classes and operator functions -template +template class Polygon; /// \brief Overloaded output operator for polygons -template -std::ostream& operator<<(std::ostream& os, const Polygon& poly); +template +std::ostream& operator<<(std::ostream& os, + const Polygon& poly); /*! * \class Polygon @@ -36,28 +52,94 @@ std::ostream& operator<<(std::ostream& os, const Polygon& poly); * \brief Represents a polygon defined by an array of points * \tparam T the coordinate type, e.g., double, float, etc. * \tparam NDIMS the number of dimensions + * \tparam PolygonArray the array type of the polygon can be dynamic or + * static (default is dynamic). The static array type is for use in + * a device kernel. + * \tparam MAX_VERTS the max number of vertices to preallocate space for + * a static array (default max is 8 vertices). MAX_VERTS is unused + * if array type is dynamic. * \note The polygon vertices should be ordered in a counter clockwise * orientation with respect to the polygon's desired normal vector */ -template +template class Polygon { public: using PointType = Point; using VectorType = Vector; + // axom::Array for dynamic array type, StaticArray for static array type + using ArrayType = std::conditional_t, + axom::StaticArray>; + public: - /// Default constructor for an empty polygon - Polygon() { } + /// Default constructor for an empty polygon (dynamic array specialization). + /// Specializations are necessary to remove __host__ __device__ warning for + /// axom::Array usage with the dynamic array type. + template = 0> + Polygon() + { } + + /// Default constructor for an empty polygon (static array specialization) + template = 0> + AXOM_HOST_DEVICE Polygon() + { } + + /*! + * \brief Destructor for Polygon. Suppress CUDA warnings for + * dynamic axom::Array. + */ + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE + ~Polygon() { m_vertices.clear(); } + + /*! + * \brief Copy assignment operator for Polygon. Suppress CUDA warnings for + * dynamic axom::Array. + */ + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE + Polygon& operator=(const Polygon& other) + { + if(this == &other) + { + return *this; + } + + m_vertices = other.m_vertices; + return *this; + } + + /// Copy constructor for Polygon. Specializations are necessary to + /// remove __host__ __device__ warning for axom::Array usage with + /// the dynamic array type. + template = 0> + Polygon(const Polygon& other) : m_vertices(other.m_vertices) + { } + + /// Copy constructor for Polygon (static array specialization) + template = 0> + AXOM_HOST_DEVICE Polygon(const Polygon& other) : m_vertices(other.m_vertices) + { } /*! * \brief Constructor for an empty polygon that reserves space for - * the given number of vertices + * the given number of vertices. Only available for dynamic arrays. * * \param [in] numExpectedVerts number of vertices for which to reserve space * \pre numExpectedVerts is not negative * */ + template = 0> explicit Polygon(int numExpectedVerts) { SLIC_ASSERT(numExpectedVerts >= 0); @@ -65,20 +147,96 @@ class Polygon } /// \brief Constructor for a polygon with the given vertices - Polygon(const axom::Array& vertices) { m_vertices = vertices; } + explicit Polygon(const axom::Array& vertices) + { + for(const auto& vertex : vertices) + { + m_vertices.push_back(vertex); + } + } + + // \brief Constructor for a polygon with an initializer list of Points + // (dynamic array specialization) + template = 0> + explicit Polygon(std::initializer_list vertices) + { + m_vertices = vertices; + } + + // \brief Constructor for a polygon with an initializer list of Points + // (static array specialization) + template = 0> + AXOM_HOST_DEVICE explicit Polygon(std::initializer_list vertices) + { + SLIC_ASSERT(static_cast(vertices.size()) <= MAX_VERTS); + + for(const auto& vertex : vertices) + { + m_vertices.push_back(vertex); + } + } /// Return the number of vertices in the polygon + AXOM_HOST_DEVICE int numVertices() const { return static_cast(m_vertices.size()); } - /// Appends a vertex to the list of vertices - void addVertex(const PointType& pt) { m_vertices.push_back(pt); } + /*! + * \brief Appends a vertex to the list of vertices + * + * \param [in] pt the point to be appended to the list of vertices + * + * \note If the array type is static and the list of vertices is full, + * addVertex will not modify the list of vertices. + * + * \sa axom::StaticArray::push_back() for behavior when array type is static + * and the list of vertices is full. + */ + /// @{ + template = 0> + AXOM_HOST_DEVICE void addVertex(const PointType& pt) + { + m_vertices.push_back(pt); + } - /// Clears the list of vertices - void clear() { m_vertices.clear(); } + template = 0> + AXOM_HOST_DEVICE void addVertex(const PointType& pt) + { +#ifdef AXOM_DEVICE_CODE + m_vertices.push_back_device(pt); +#else + m_vertices.push_back(pt); +#endif + } + /// @} + + /// Clears the list of vertices (dynamic array specialization). + /// Specializations are necessary to remove __host__ __device__ warning for + /// axom::Array usage with the dynamic array type. + template = 0> + void clear() + { + m_vertices.clear(); + } + + /// Clears the list of vertices (static array specialization) + template = 0> + AXOM_HOST_DEVICE void clear() + { + m_vertices.clear(); + } /// Retrieves the vertex at index idx + AXOM_HOST_DEVICE PointType& operator[](int idx) { return m_vertices[idx]; } + /// Retrieves the vertex at index idx + AXOM_HOST_DEVICE const PointType& operator[](int idx) const { return m_vertices[idx]; } /*! @@ -87,7 +245,7 @@ class Polygon * \return normal polygon normal vector */ template - typename std::enable_if::type normal() const + AXOM_HOST_DEVICE typename std::enable_if::type normal() const { SLIC_ASSERT(isValid()); const int nverts = numVertices(); @@ -107,12 +265,29 @@ class Polygon return normal; } + /// \brief Reverses orientation of the polygon in-place + AXOM_HOST_DEVICE + void reverseOrientation() + { + const int nverts = numVertices(); + const int mid = nverts >> 1; + + // Swap leftmost/rightmost vertices, midpoint unchanged + for(int i = 0; i < mid; ++i) + { + const int left = i; + const int right = nverts - i - 1; + axom::utilities::swap(m_vertices[left], m_vertices[right]); + } + } + /*! * \brief Computes the average of the polygon's vertex positions * * \return A point at the mean of the polygon's vertices * \pre polygon.isValid() is true */ + AXOM_HOST_DEVICE PointType vertexMean() const { SLIC_ASSERT(isValid()); @@ -140,7 +315,7 @@ class Polygon * The area is always non-negative since 3D polygons do not have a unique orientation. */ template - typename std::enable_if::type area() const + AXOM_HOST_DEVICE typename std::enable_if::type area() const { const int nVerts = numVertices(); @@ -169,7 +344,7 @@ class Polygon * \sa signedArea() */ template - typename std::enable_if::type area() const + AXOM_HOST_DEVICE typename std::enable_if::type area() const { return axom::utilities::abs(signedArea()); } @@ -184,7 +359,7 @@ class Polygon * \sa area() */ template - typename std::enable_if::type signedArea() const + AXOM_HOST_DEVICE typename std::enable_if::type signedArea() const { const int nVerts = numVertices(); double sum = 0.; @@ -235,17 +410,19 @@ class Polygon * Initial check is that the polygon has three or more vertices * \return True, if the polygon is valid, False otherwise */ + AXOM_HOST_DEVICE bool isValid() const { return m_vertices.size() >= 3; } private: - axom::Array m_vertices; + ArrayType m_vertices; }; //------------------------------------------------------------------------------ /// Free functions implementing Polygon's operators //------------------------------------------------------------------------------ -template -std::ostream& operator<<(std::ostream& os, const Polygon& poly) +template +std::ostream& operator<<(std::ostream& os, + const Polygon& poly) { poly.print(os); return os; @@ -255,8 +432,9 @@ std::ostream& operator<<(std::ostream& os, const Polygon& poly) } // namespace axom /// Overload to format a primal::Polygon using fmt -template -struct axom::fmt::formatter> : ostream_formatter +template +struct axom::fmt::formatter> + : ostream_formatter { }; #endif // AXOM_PRIMAL_POLYGON_HPP_ diff --git a/src/axom/primal/geometry/Polyhedron.hpp b/src/axom/primal/geometry/Polyhedron.hpp index 7fb6643971..adb3ebba57 100644 --- a/src/axom/primal/geometry/Polyhedron.hpp +++ b/src/axom/primal/geometry/Polyhedron.hpp @@ -374,15 +374,15 @@ class Polyhedron } /*! - * \brief Computes the centroid as the average of the polyhedron's vertex + * \brief Computes the vertex mean as the average of the polyhedron's vertex * positions * - * \return The centroid of the polyhedron's vertices + * \return The vertex mean of the polyhedron's vertices * * \pre polyhedron.isValid() is true */ AXOM_HOST_DEVICE - PointType centroid() const + PointType vertexMean() const { SLIC_ASSERT(isValid()); @@ -503,33 +503,43 @@ class Polyhedron } /*! - * \brief Computes the signed volume of the polyhedron. + * \brief Computes the moments of the polyhedron. The 0th moment is the + * volume of the polyhedron, the 1st moment is the centroid. * - * \return The signed volume of the polyhedron + * \param [out] volume The volume of the polyhedron (0th moment) + * \param [out] centroid The centroid of the polyhedron (1st moment) + * \param [in] should_compute_centroid If true, computes the centroid + * of the polyhedron. Default is true. * * \note Function is based off moments() in Mike Owen's PolyClipper. * * \pre polyhedron vertex neighbors are defined, and polyhedron is 3D * * \sa volume() + * \sa centroid() */ AXOM_HOST_DEVICE - double signedVolume() const + void moments(double& volume, + PointType& centroid, + bool should_compute_centroid = true) const { - double retVol = 0.0; + volume = 0.0; + + VectorType centroid_vector; if(!isValid() || hasDuplicateVertices()) { - return retVol; + return; } // Computes the signed volume of tetrahedra formed from vertices of the - // Polyhedron faces and an arbitrary origin (the first vertex) + // Polyhedron faces and an arbitrary origin (the first vertex), as well + // as the centroid of the Polyhedron. else { SLIC_CHECK_MSG( hasNeighbors(), - "Polyhedron::signedVolume() is only valid with vertex neighbors."); + "Polyhedron::moments() is only valid with vertex neighbors."); // faces is an overestimation int faces[MAX_VERTS * MAX_VERTS]; @@ -548,15 +558,45 @@ class Polyhedron for(int j = 1, k = 2; j < N - 1; ++j, ++k) { - retVol += VectorType::scalar_triple_product( - v0, - m_vertices[faces[i_offset + j]] - origin, - m_vertices[faces[i_offset + k]] - origin); + VectorType v1 = m_vertices[faces[i_offset + j]] - origin; + VectorType v2 = m_vertices[faces[i_offset + k]] - origin; + double curVol = VectorType::scalar_triple_product(v0, v1, v2); + + volume += curVol; + if(should_compute_centroid) + { + centroid_vector += (v0 + v1 + v2) * curVol; + } } } + + volume /= 6.; + + if(should_compute_centroid) + { + centroid_vector /= + (volume != 0.0) ? (24.0 * volume) : axom::primal::PRIMAL_TINY; + centroid = centroid_vector + origin; + } } + } - return retVol / 6.; + /*! + * \brief Computes the signed volume of the polyhedron. + * + * \return The signed volume of the polyhedron + * + * \pre polyhedron vertex neighbors are defined, and polyhedron is 3D + * + * \sa volume() + */ + AXOM_HOST_DEVICE + double signedVolume() const + { + double volume; + PointType centroid; + moments(volume, centroid, false); + return volume; } /*! @@ -566,6 +606,22 @@ class Polyhedron AXOM_HOST_DEVICE double volume() const { return axom::utilities::abs(signedVolume()); } + /*! + * \brief Computes the centroid as the center of mass of the polyhedron + * + * \return The centroid of the polyhedron + * + * \pre polyhedron.isValid() is true + */ + AXOM_HOST_DEVICE + PointType centroid() const + { + double volume; + PointType centroid; + moments(volume, centroid); + return centroid; + } + /*! * \brief Simple formatted print of a polyhedron instance * diff --git a/src/axom/primal/geometry/Segment.hpp b/src/axom/primal/geometry/Segment.hpp index 9c787a2889..f363b311a5 100644 --- a/src/axom/primal/geometry/Segment.hpp +++ b/src/axom/primal/geometry/Segment.hpp @@ -28,13 +28,15 @@ class Segment; * \brief Equality comparison operator for Segment */ template -bool operator==(const Segment& lhs, const Segment& rhs); +AXOM_HOST_DEVICE bool operator==(const Segment& lhs, + const Segment& rhs); /*! * \brief Inequality comparison operator for Segment */ template -bool operator!=(const Segment& lhs, const Segment& rhs); +AXOM_HOST_DEVICE bool operator!=(const Segment& lhs, + const Segment& rhs); /*! * \brief Overloaded output operator for Segment @@ -130,7 +132,10 @@ class Segment /*! * \brief Returns the length of the segment */ - double length() const { return VectorType(m_source, m_target).norm(); } + AXOM_HOST_DEVICE double length() const + { + return VectorType(m_source, m_target).norm(); + } /*! * \brief Returns a vector normal to the segment @@ -138,7 +143,7 @@ class Segment * \note Only available in 2D */ template - typename std::enable_if::type normal() const + AXOM_HOST_DEVICE typename std::enable_if::type normal() const { return VectorType {m_target[1] - m_source[1], m_source[0] - m_target[0]}; } @@ -146,6 +151,7 @@ class Segment /*! * \brief Equality comparison operator for segments */ + AXOM_HOST_DEVICE friend inline bool operator==(const Segment& lhs, const Segment& rhs) { return lhs.m_source == rhs.m_source && lhs.m_target == rhs.m_target; @@ -154,6 +160,7 @@ class Segment /*! * \brief Inequality operator for segments */ + AXOM_HOST_DEVICE friend inline bool operator!=(const Segment& lhs, const Segment& rhs) { return !(lhs == rhs); diff --git a/src/axom/primal/geometry/Sphere.hpp b/src/axom/primal/geometry/Sphere.hpp index db8d14ed9c..23911b9cd1 100644 --- a/src/axom/primal/geometry/Sphere.hpp +++ b/src/axom/primal/geometry/Sphere.hpp @@ -65,6 +65,7 @@ class Sphere * \param [in] radius the radius of the Sphere (optional). * \note If a radius is not supplied, the default radius is 1.0. */ + AXOM_HOST_DEVICE explicit Sphere(T radius = 1.0) : m_center(PointType::zero()) , m_radius(radius) @@ -78,6 +79,7 @@ class Sphere * * \note If a radius is not supplied, the default radius is 1.0. */ + AXOM_HOST_DEVICE explicit Sphere(const PointType& center, T radius = 1.0) : m_center(center) , m_radius(radius) @@ -93,6 +95,7 @@ class Sphere * * \pre center != nullptr */ + AXOM_HOST_DEVICE explicit Sphere(const T* center, T radius = 1.0); /// @} @@ -101,6 +104,7 @@ class Sphere * \brief Returns the radius of the Sphere. * \return r the radius of the Sphere. */ + AXOM_HOST_DEVICE inline T getRadius() const { return m_radius; }; /*! @@ -110,6 +114,7 @@ class Sphere * \note c points to an array that is NDIMS long. * \post c != nullptr */ + AXOM_HOST_DEVICE inline const PointType& getCenter() const { return m_center; }; /*! @@ -147,6 +152,7 @@ class Sphere * \see OrientationResult for the list of possible return values. * */ + AXOM_HOST_DEVICE inline int getOrientation(const PointType& q, double TOL = 1.e-9) const { const T signed_distance = this->computeSignedDistance(q); @@ -169,6 +175,7 @@ class Sphere * * \return status true if the sphere intersects, false otherwise. */ + AXOM_HOST_DEVICE inline bool intersectsWith(const Sphere& sphere, double TOL = 1.e-9) const; @@ -197,7 +204,8 @@ namespace primal { //------------------------------------------------------------------------------ template -Sphere::Sphere(const T* center, T radius) : m_radius(radius) +AXOM_HOST_DEVICE Sphere::Sphere(const T* center, T radius) + : m_radius(radius) { SLIC_ASSERT(center != nullptr); for(int i = 0; i < NDIMS; ++i) @@ -216,8 +224,9 @@ std::ostream& Sphere::print(std::ostream& os) const //------------------------------------------------------------------------------ template -inline bool Sphere::intersectsWith(const Sphere& sphere, - double TOL) const +AXOM_HOST_DEVICE inline bool Sphere::intersectsWith( + const Sphere& sphere, + double TOL) const { const T distance_squared = VectorType(sphere.getCenter(), m_center).squared_norm(); diff --git a/src/axom/primal/geometry/Vector.hpp b/src/axom/primal/geometry/Vector.hpp index 9c00380b7f..baea921f8e 100644 --- a/src/axom/primal/geometry/Vector.hpp +++ b/src/axom/primal/geometry/Vector.hpp @@ -101,7 +101,7 @@ AXOM_HOST_DEVICE Vector operator-(const Point& h, * \return C resulting vector from unary negation. */ template -Vector operator-(const Vector& vec1); +AXOM_HOST_DEVICE Vector operator-(const Vector& vec1); /*! * \brief Scalar multiplication of vector; Scalar on rhs. @@ -131,7 +131,8 @@ AXOM_HOST_DEVICE Vector operator*(const T scalar, * \pre scalar != 0.0 */ template -Vector operator/(const Vector& vec, const T scalar); +AXOM_HOST_DEVICE Vector operator/(const Vector& vec, + const T scalar); /*! * \brief Overloaded output operator for vectors @@ -229,7 +230,7 @@ class Vector * \post d >= 1. */ AXOM_HOST_DEVICE - int dimension() const { return NDIMS; }; + static constexpr int dimension() { return NDIMS; }; /*! * \brief Access operator for individual components. @@ -273,6 +274,7 @@ class Vector /*! * \brief Inequality operator for points */ + AXOM_HOST_DEVICE friend bool operator!=(const Vector& lhs, const Vector& rhs) { return !(lhs == rhs); @@ -413,6 +415,7 @@ class Vector * \param [in] z the z--coordinate of the vector. Default is 0.0. * \return v a Vector instance with the given coordinates. */ + AXOM_HOST_DEVICE static Vector make_vector(const T& x, const T& y, const T& z = 0.0); private: @@ -656,7 +659,8 @@ AXOM_HOST_DEVICE Point operator-(const Point& P, //------------------------------------------------------------------------------ template -inline Vector operator/(const Vector& vec, const T scalar) +AXOM_HOST_DEVICE inline Vector operator/(const Vector& vec, + const T scalar) { Vector result(vec); result /= scalar; @@ -683,7 +687,7 @@ AXOM_HOST_DEVICE Vector operator-(const Point& h, //------------------------------------------------------------------------------ template -inline Vector operator-(const Vector& vec1) +AXOM_HOST_DEVICE inline Vector operator-(const Vector& vec1) { Vector result(vec1); result.negate(); @@ -700,9 +704,9 @@ std::ostream& operator<<(std::ostream& os, const Vector& vec) //------------------------------------------------------------------------------ template -inline Vector Vector::make_vector(const T& x, - const T& y, - const T& z) +AXOM_HOST_DEVICE inline Vector Vector::make_vector(const T& x, + const T& y, + const T& z) { T tmp_array[3] = {x, y, z}; return Vector(tmp_array, NDIMS); diff --git a/src/axom/primal/operators/clip.hpp b/src/axom/primal/operators/clip.hpp index 3585015afc..9e3fd0473b 100644 --- a/src/axom/primal/operators/clip.hpp +++ b/src/axom/primal/operators/clip.hpp @@ -95,6 +95,67 @@ Polygon clip(const Triangle& tri, const BoundingBox& bbox) return *currentPoly; } +/*! + * \brief Clips a 2D subject polygon against a clip polygon in 2D, returning + * their geometric intersection as a polygon + * + * This function clips the subject polygon by the planes obtained from the + * clip polygon's edges (normals point inward). Clipping the + * subject polygon by each plane gives the polygon above that plane. + * Clipping the polygon by a plane involves + * finding new vertices at the intersection of the polygon edges and + * the plane, and removing vertices from the polygon that are below the + * plane. + * + * + * \param [in] subjectPolygon The subject polygon + * \param [in] clipPolygon The clip polygon + * \param [in] eps The tolerance for plane point orientation. + * Defaults to 1.e-10. + * \param [in] tryFixOrientation If true, takes each shape with a negative + * signed area and swaps the order of some vertices in that + * shape to try to obtain a nonnegative signed area. + * Defaults to false. + * + * \return A polygon of the subject polygon clipped against the clip polygon. + * + * \note Function is based off the Sutherland–Hodgman algorithm. + * + * \warning Polygons with static array types must have enough vertices + * preallocated for the output polygon. It is mandatory that + * MAX_VERTS >= subjectPolygon.numVertices() + clipPolygon.numVertices() + * for the output polygon with the largest possible vertex count. + * Otherwise, if there is not enough preallocated vertices, output + * polygon will have missing vertices. + * + * \sa axom::primal::Polygon::addVertex(), axom::StaticArray::push_back() + * for behavior when there is not enough preallocated vertices. + * + * \warning tryFixOrientation flag does not guarantee the shapes' vertex orders + * will be valid. It is the responsiblity of the caller to pass + * shapes with a valid vertex order. Otherwise, if the shapes have + * invalid vertex orders, the returned Polygon + * will have a non-positive and/or unexpected area. + * + * \warning If tryFixOrientation flag is false and some of the shapes have + * a negative signed area, the returned Polygon + * will have a non-positive and/or unexpected area. + * + */ +AXOM_SUPPRESS_HD_WARN +template +AXOM_HOST_DEVICE Polygon clip( + const Polygon& subjectPolygon, + const Polygon& clipPolygon, + double eps = 1.e-10, + bool tryFixOrientation = false) +{ + return detail::clipPolygonPolygon(subjectPolygon, + clipPolygon, + eps, + tryFixOrientation); +} + /*! * \brief Clips a 3D hexahedron against a tetrahedron in 3D, returning * the geometric intersection of the hexahedron and the tetrahedron diff --git a/src/axom/primal/operators/closest_point.hpp b/src/axom/primal/operators/closest_point.hpp index df9b55c28a..40af175e82 100644 --- a/src/axom/primal/operators/closest_point.hpp +++ b/src/axom/primal/operators/closest_point.hpp @@ -15,6 +15,7 @@ #define AXOM_PRIMAL_CLOSEST_POINT_HPP_ #include "axom/primal/geometry/Point.hpp" +#include "axom/primal/geometry/Segment.hpp" #include "axom/primal/geometry/Triangle.hpp" #include "axom/primal/geometry/Sphere.hpp" #include "axom/primal/geometry/OrientedBoundingBox.hpp" @@ -23,6 +24,106 @@ namespace axom { namespace primal { +/*! + * \brief Computes the closest point from a point, P, to a given segment. + * + * \param [in] P the query point + * \param [in] seg user-supplied segment + * \param [out] loc location along the line segment + * \param [in] EPS fuzz factor for equality comparisons + * \return cp the closest point from a point P and a segment + * + * \note loc \f$ \in [0, 1] \f% represents the fraction of the way from A to B, + * with 0 corresponding to A and 1 corresponding to B. + */ +template +AXOM_HOST_DEVICE inline Point closest_point(const Point& P, + const Segment& seg, + T* loc, + double EPS = PRIMAL_TINY) +{ + using PointType = Point; + using VectorType = Vector; + + using detail::isGeq; + using detail::isLeq; + + constexpr T ZERO {0.}; + constexpr T ONE {1.}; + + const PointType& A = seg[0]; + const PointType& B = seg[1]; + + const VectorType AB(A, B); + + // Compute length of the projection of AP onto AB + T t = VectorType(A, P).dot(AB); + + if(isLeq(t, ZERO, EPS)) + { + if(loc) + { + *loc = ZERO; + } + + return A; + } + else + { + const T squaredNormAB = AB.squared_norm(); + + if(isGeq(t, squaredNormAB, EPS)) + { + if(loc) + { + *loc = ONE; + } + + return B; + } + else if(utilities::isNearlyEqual(squaredNormAB, ZERO, EPS)) + { + // Segment is degenerate (A and B are collocated), + // so we can pick either end point. We pick A. + if(loc) + { + *loc = ZERO; + } + + return A; + } + else + { + // Normalize t + t /= squaredNormAB; + + if(loc) + { + *loc = t; + } + + return A + AB * t; + } + } +} + +/*! + * \brief Computes the closest point from a point, P, to a given segment. + * + * \param [in] P the query point + * \param [in] seg user-supplied segment + * \param [in] EPS fuzz factor for equality comparisons + * \return cp the closest point from a point P and a segment + */ +template +AXOM_HOST_DEVICE inline Point closest_point(const Point& P, + const Segment& seg, + double EPS = PRIMAL_TINY) +{ + T* loc = nullptr; + return closest_point(P, seg, loc, EPS); +} + /*! * \brief Computes the closest point from a point, P, to a given triangle. * @@ -62,7 +163,7 @@ template AXOM_HOST_DEVICE inline Point closest_point(const Point& P, const Triangle& tri, int* loc = nullptr, - double EPS = 1E-8) + double EPS = PRIMAL_TINY) { using PointType = Point; using VectorType = Vector; @@ -110,7 +211,8 @@ AXOM_HOST_DEVICE inline Point closest_point(const Point& P, //---------------------------------------------------------------------------- // Check if P in edge region of AB const T vc = d1 * d4 - d3 * d2; - if(isLeq(vc, T(0), EPS) && isGeq(d1, T(0), EPS) && isLeq(d3, T(0), EPS)) + if(isLeq(vc, T(0), EPS) && isGeq(d1, T(0), EPS) && isLeq(d3, T(0), EPS) && + !utilities::isNearlyEqual(d1, d3, EPS)) // Additional check for degenerate triangles { const T v = d1 / (d1 - d3); const VectorType v_ab = ab * v; diff --git a/src/axom/primal/operators/detail/clip_impl.hpp b/src/axom/primal/operators/detail/clip_impl.hpp index ecec7b3024..e747cca03a 100644 --- a/src/axom/primal/operators/detail/clip_impl.hpp +++ b/src/axom/primal/operators/detail/clip_impl.hpp @@ -671,6 +671,99 @@ AXOM_HOST_DEVICE Polyhedron clipTetrahedron( return poly; } +/*! + * \brief Clips a 2D subject polygon against a clip polygon in 2D, returning + * their geometric intersection as a polygon. + * + * \sa axom::primal::clip() + */ +AXOM_SUPPRESS_HD_WARN +template +AXOM_HOST_DEVICE Polygon clipPolygonPolygon( + const Polygon& subjectPolygon, + const Polygon& clipPolygon, + double eps = 1.e-10, + bool tryFixOrientation = false) +{ + SLIC_ASSERT( + ARRAY_TYPE == axom::primal::PolygonArray::Dynamic || + (ARRAY_TYPE == axom::primal::PolygonArray::Static && + MAX_VERTS >= (subjectPolygon.numVertices() + clipPolygon.numVertices()))); + + using PlaneType = Plane; + using PointType = Point; + using SegmentType = Segment; + using PolygonType = Polygon; + + PolygonType outputList = subjectPolygon; + PolygonType planePoints = clipPolygon; + + if(tryFixOrientation) + { + if(outputList.signedArea() < 0) + { + outputList.reverseOrientation(); + } + + if(planePoints.signedArea() < 0) + { + planePoints.reverseOrientation(); + } + } + + const int numClipEdges = planePoints.numVertices(); + + // Iterate through edges of clip polygon, represented as planes + for(int i = 0; i < numClipEdges; i++) + { + PlaneType plane = + make_plane(planePoints[i], planePoints[(i + 1) % numClipEdges]); + + PolygonType inputList = outputList; + outputList.clear(); + + for(int i = 0; i < inputList.numVertices(); i++) + { + PointType current_point = inputList[i]; + PointType prev_point = + inputList[(i - 1) == -1 ? (inputList.numVertices() - 1) : (i - 1)]; + + T seg_param; + PointType intersecting_point; + SegmentType subject_edge(prev_point, current_point); + + if(intersect(plane, subject_edge, seg_param)) + { + intersecting_point = subject_edge.at(seg_param); + } + + int cur_p_orientation = plane.getOrientation(current_point, eps); + int prev_p_orientation = plane.getOrientation(prev_point, eps); + + if(cur_p_orientation == ON_POSITIVE_SIDE) + { + // Handles the edge case of 3 consecutive vertices with orientations + // ON_POSITIVE_SIDE, ON_BOUNDARY, ON_POSITIVE. Default algorithm + // check (prev_p_orientation != ON_POSITIVE_SIDE) results in the + // vertex on the boundary being added twice. + if(prev_p_orientation == ON_NEGATIVE_SIDE || + (prev_p_orientation == ON_BOUNDARY && + intersecting_point != outputList[outputList.numVertices() - 1])) + { + outputList.addVertex(intersecting_point); + } + outputList.addVertex(current_point); + } + else if(prev_p_orientation == ON_POSITIVE_SIDE) + { + outputList.addVertex(intersecting_point); + } + } + } // end of iteration through edges of clip polygon + + return outputList; +} + } // namespace detail } // namespace primal } // namespace axom diff --git a/src/axom/primal/operators/detail/intersect_bounding_box_impl.hpp b/src/axom/primal/operators/detail/intersect_bounding_box_impl.hpp index b785bd76f9..e2ed209099 100644 --- a/src/axom/primal/operators/detail/intersect_bounding_box_impl.hpp +++ b/src/axom/primal/operators/detail/intersect_bounding_box_impl.hpp @@ -19,10 +19,10 @@ namespace detail /*! * \brief Helper routine for AABB / AABB intersection test. * - * \param [in] min1 the 1st AABB min coordinate along a direction. - * \param [in] max1 the 1st AABB max coordinate along a drection. - * \param [in] min2 the 2nd AABB min coordinate along a direction. - * \param [in] max2 the 2nd AABB max coordinate along a drection. + * \param [in] min1 the 1st AABB min coordinate along a direction + * \param [in] max1 the 1st AABB max coordinate along a direction + * \param [in] min2 the 2nd AABB min coordinate along a direction + * \param [in] max2 the 2nd AABB max coordinate along a direction * * \return status true if the AABB's intersect, otherwise false. * @@ -37,8 +37,7 @@ AXOM_HOST_DEVICE inline bool intersect_bbox_bbox(const T& min1, const T& min2, const T& max2) { - bool status = ((max1 < min2 || min1 > max2) ? false : true); - return status; + return max1 >= min2 && min1 <= max2; } /*! diff --git a/src/axom/primal/operators/detail/intersect_impl.hpp b/src/axom/primal/operators/detail/intersect_impl.hpp index 6978657eba..1c01b39062 100644 --- a/src/axom/primal/operators/detail/intersect_impl.hpp +++ b/src/axom/primal/operators/detail/intersect_impl.hpp @@ -22,9 +22,11 @@ #include "axom/primal/geometry/OrientedBoundingBox.hpp" #include "axom/primal/geometry/Plane.hpp" #include "axom/primal/geometry/Point.hpp" +#include "axom/primal/geometry/Polygon.hpp" #include "axom/primal/geometry/Ray.hpp" #include "axom/primal/geometry/Segment.hpp" #include "axom/primal/geometry/Triangle.hpp" +#include "axom/primal/geometry/Tetrahedron.hpp" namespace axom { @@ -158,8 +160,6 @@ AXOM_HOST_DEVICE bool intersect_tri3D_tri3D(const Triangle& t1, bool includeBoundary, double EPS) { - using Vector3 = primal::Vector; - SLIC_CHECK_MSG(!t1.degenerate(), "\n\n WARNING \n\n Triangle " << t1 << " is degenerate"); SLIC_CHECK_MSG(!t2.degenerate(), @@ -171,9 +171,9 @@ AXOM_HOST_DEVICE bool intersect_tri3D_tri3D(const Triangle& t1, // Vector3 t2Normal = Vector3::cross_product(Vector3(t2[2], t2[0]), // Vector3(t2[2], t2[1])); Vector3 t2Normal = t2.normal().unitVector(); - double dp1 = (Vector3(t2[2], t1[0])).dot(t2Normal); - double dq1 = (Vector3(t2[2], t1[1])).dot(t2Normal); - double dr1 = (Vector3(t2[2], t1[2])).dot(t2Normal); + const double dp1 = (t1[0] - t2[2]).dot(t2Normal); + const double dq1 = (t1[1] - t2[2]).dot(t2Normal); + const double dr1 = (t1[2] - t2[2]).dot(t2Normal); if(nonzeroSignMatch(dp1, dq1, dr1, EPS)) { @@ -192,9 +192,9 @@ AXOM_HOST_DEVICE bool intersect_tri3D_tri3D(const Triangle& t1, // Vector3 t1Normal = Vector3::cross_product(Vector3(t1[0], t1[1]), // Vector3(t1[0], t1[2])); Vector3 t1Normal = t1.normal().unitVector(); - double dp2 = (Vector3(t1[2], t2[0])).dot(t1Normal); - double dq2 = (Vector3(t1[2], t2[1])).dot(t1Normal); - double dr2 = (Vector3(t1[2], t2[2])).dot(t1Normal); + const double dp2 = (t2[0] - t1[2]).dot(t1Normal); + const double dq2 = (t2[1] - t1[2]).dot(t1Normal); + const double dr2 = (t2[2] - t1[2]).dot(t1Normal); if(nonzeroSignMatch(dp2, dq2, dr2, EPS)) { @@ -874,7 +874,6 @@ bool intersect_tri_segment(const Triangle& tri, T& t, Point& p) { - using Vector3 = Vector; Ray r(S.source(), Vector3(S.source(), S.target())); //Ray-triangle intersection does not check endpoints, so we explicitly check @@ -1098,19 +1097,19 @@ AXOM_HOST_DEVICE bool intersect_plane_bbox(const Plane& p, } /*! - * \brief Determines if a 3D plane intersects a 3D segment. - * \param [in] b1 A 3D plane - * \param [in] b2 A 3D segment + * \brief Determines if a plane intersects a segment. + * \param [in] plane A plane + * \param [in] seg A segment * \param [out] t Intersection point of plane and seg, w.r.t. * parametrization of seg * \return true iff plane intersects with segment, otherwise, false. */ -template -AXOM_HOST_DEVICE bool intersect_plane_seg(const Plane& plane, - const Segment& seg, +template +AXOM_HOST_DEVICE bool intersect_plane_seg(const Plane& plane, + const Segment& seg, T& t) { - using VectorType = Vector; + using VectorType = Vector; VectorType ab(seg.source(), seg.target()); VectorType normal = plane.getNormal(); @@ -1610,6 +1609,84 @@ inline bool intervalsDisjoint(double d0, double d1, double d2, double r) return d1 < -r || d0 > r; } +AXOM_SUPPRESS_HD_WARN +template +AXOM_HOST_DEVICE bool intersect_plane_tet3d(const Plane& p, + const Tetrahedron& tet, + Polygon& intersection) +{ + intersection.clear(); + + T distances[4]; + distances[0] = p.signedDistance(tet[0]); + distances[1] = p.signedDistance(tet[1]); + distances[2] = p.signedDistance(tet[2]); + distances[3] = p.signedDistance(tet[3]); + + constexpr T zero {0}; + int gt[4]; + gt[0] = distances[0] > zero; + gt[1] = distances[1] > zero; + gt[2] = distances[2] > zero; + gt[3] = distances[3] > zero; + int caseNumber = (gt[3] << 3) | (gt[2] << 2) | (gt[1] << 1) | gt[0]; + + // Cases 0, 15 indicate all points were on one side of the zero. That would + // normally not produce geometry. We may have zeroes and some bigger negatives + // so try picking a better case. + if(caseNumber == 0 || caseNumber == 15) + { + int lt[4]; + lt[0] = distances[0] < zero; + lt[1] = distances[1] < zero; + lt[2] = distances[2] < zero; + lt[3] = distances[3] < zero; + caseNumber = (~((lt[3] << 3) | (lt[2] << 2) | (lt[1] << 1) | lt[0])) & 0xf; + } + + // clang-format off + // Edge lookup (pairs of point ids) + const std::uint8_t edges[] = { + /* 0 */ // None + /* 1 */ 0, 2, 0, 1, 0, 3, + /* 2 */ 0, 1, 1, 2, 1, 3, + /* 3 */ 0, 2, 1, 2, 1, 3, 0, 3, + /* 4 */ 1, 2, 0, 2, 2, 3, + /* 5 */ 1, 2, 0, 1, 0, 3, 2, 3, + /* 6 */ 0, 1, 0, 2, 2, 3, 1, 3, + /* 7 */ 2, 3, 1, 3, 0, 3, + /* 8 */ 0, 3, 1, 3, 2, 3, + /* 9 */ 0, 2, 0, 1, 1, 3, 2, 3, + /* 10 */ 0, 1, 1, 2, 2, 3, 0, 3, + /* 11 */ 0, 2, 1, 2, 2, 3, + /* 12 */ 1, 2, 0, 2, 0, 3, 1, 3, + /* 13 */ 1, 2, 0, 1, 1, 3, + /* 14 */ 0, 1, 0, 2, 0, 3, + /* 15 */ // None + }; + const std::uint8_t edges_offsets[] = {0, 0, 6, 12, 20, 26, 34, 42, 48, 54, 62, 70, 76, 84, 90, 96, 96}; + // clang-format on + + // Add new vertices to the polygon according to the case. + const int n = + static_cast(edges_offsets[caseNumber + 1] - edges_offsets[caseNumber]) >> + 1; + for(int i = 0; i < n; i++) + { + const auto eOffset = static_cast(edges_offsets[caseNumber]) + (i << 1); + const auto p0 = static_cast(edges[eOffset]); + const auto p1 = static_cast(edges[eOffset + 1]); + + const double d0 = (distances[p0] < 0.) ? -distances[p0] : distances[p0]; + const double d1 = (distances[p1] < 0.) ? -distances[p1] : distances[p1]; + + const auto t = d0 / (d0 + d1); + intersection.addVertex(Point::lerp(tet[p0], tet[p1], t)); + } + + return caseNumber > 0 && caseNumber < 15; +} + } // end namespace detail } // end namespace primal } // end namespace axom diff --git a/src/axom/primal/operators/detail/winding_number_impl.hpp b/src/axom/primal/operators/detail/winding_number_impl.hpp index 2f3d652359..fca2796899 100644 --- a/src/axom/primal/operators/detail/winding_number_impl.hpp +++ b/src/axom/primal/operators/detail/winding_number_impl.hpp @@ -31,18 +31,18 @@ namespace primal namespace detail { /* - * \brief Compute the winding number with respect to a line segment + * \brief Compute the GWN at a 2D point wrt a 2D line segment * * \param [in] q The query point to test * \param [in] c0 The initial point of the line segment * \param [in] c1 The terminal point of the line segment * \param [in] edge_tol The tolerance at which a point is on the line * - * The winding number for a point with respect to a straight line + * The GWN for a 2D point with respect to a 2D straight line * is the signed angle subtended by the query point to each endpoint. - * Colinear points return 0 for their winding number. + * Colinear points return 0 for their GWN. * - * \return double The winding number + * \return The GWN */ template double linear_winding_number(const Point& q, @@ -75,8 +75,8 @@ double linear_winding_number(const Point& q, } /*! - * \brief Directly compute the winding number at either endpoint of a - * Bezier curve with a convex control polygon + * \brief Compute the GWN at either endpoint of a + * 2D Bezier curve with a convex control polygon * * \param [in] q The query point * \param [in] c The BezierCurve object to compute the winding number along @@ -86,14 +86,19 @@ double linear_winding_number(const Point& q, * \pre Control polygon for c must be convex * \pre The query point must be on one of the endpoints * - * The winding number for a Bezier curve with a convex control polygon is + * The GWN for a Bezier curve with a convex control polygon is * given by the signed angle between the tangent vector at that endpoint and * the vector in the direction of the other endpoint. * + * See Algorithm 2 in + * Jacob Spainhour, David Gunderman, and Kenneth Weiss. 2024. + * Robust Containment Queries over Collections of Rational Parametric Curves via Generalized Winding Numbers. + * ACM Trans. Graph. 43, 4, Article 38 (July 2024) + * * The query can be located on both endpoints if it is closed, in which case * the angle is that between the tangent lines at both endpoints * - * \return double The winding number + * \return The GWN */ template double convex_endpoint_winding_number(const Point& q, @@ -176,54 +181,55 @@ double convex_endpoint_winding_number(const Point& q, } /*! - * \brief Recursively compute the winding number for a query point with respect - * to a single Bezier curve. + * \brief Recursively construct a polygon with the same *integer* winding number + * as the closed original Bezier curve at a given query point. * * \param [in] q The query point at which to compute winding number - * \param [in] c The BezierCurve object along which to compute the winding number - * \param [in] isConvexControlPolygon Boolean flag if the input Bezier curve + * \param [in] c A BezierCurve subcurve of the curve along which to compute the winding number + * \param [in] isConvexControlPolygon Boolean flag if the input Bezier subcurve is already convex * \param [in] edge_tol The physical distance level at which objects are * considered indistinguishable * \param [in] EPS Miscellaneous numerical tolerance for nonphysical distances, used in - * isLinear, isNearlyZero, in_polygon, is_convex - * - * Use a recursive algorithm that checks if the query point is exterior to - * some convex shape containing the Bezier curve, in which case we have a direct - * formula for the winding number. If not, we bisect our curve and run the algorithm on - * each half. Use the proximity of the query point to endpoints and approximate - * linearity of the Bezier curve as base cases. + * isLinear, isNearlyZero, is_convex + * \param [out] approximating_polygon The Polygon that, by termination of recursion, + * has the same integer winding number as the original closed curve + * \param [out] endpoint_gwn A running sum for the exact GWN if the point is at the + * endpoint of a subcurve + * + * By the termination of the recursive algorithm, `approximating_polygon` contains + * a polygon that has the same *integer* winding number as the original curve. * - * \return double The winding number. + * Upon entering this algorithm, the closing line of `c` is already an + * edge of the approximating polygon. + * If q is outside a convex shape that contains the entire curve, the + * integer winding number for the *closed* curve `c` is zero, + * and the algorithm terminates. + * If the shape is not convex or we're inside it, instead add the midpoint + * as a vertex and repeat the algorithm. */ template -double curve_winding_number_recursive(const Point& q, - const BezierCurve& c, - bool isConvexControlPolygon, - double edge_tol = 1e-8, - double EPS = 1e-8) +void construct_approximating_polygon(const Point& q, + const BezierCurve& c, + bool isConvexControlPolygon, + double edge_tol, + double EPS, + Polygon& approximating_polygon, + double& endpoint_gwn, + bool& isCoincident) { const int ord = c.getOrder(); - if(ord <= 0) - { - return 0.0; // Catch degenerate cases - } - - // If q is outside a convex shape that contains the entire curve, the winding - // number for the shape connected at the endpoints with straight lines is zero. - // We then subtract the contribution of this line segment. // Simplest convex shape containing c is its bounding box - BoundingBox bBox(c.boundingBox()); - if(!bBox.contains(q)) + if(!c.boundingBox().expand(edge_tol).contains(q)) { - return 0.0 - linear_winding_number(q, c[ord], c[0], edge_tol); + return; } - // Use linearity as base case for recursion. + // Use linearity as base case for recursion if(c.isLinear(EPS)) { - return linear_winding_number(q, c[0], c[ord], edge_tol); + return; } // Check if our control polygon is convex. @@ -236,19 +242,25 @@ double curve_winding_number_recursive(const Point& q, { isConvexControlPolygon = is_convex(controlPolygon, EPS); } - else // Formulas for winding number only work if shape is convex + + // Formulas for winding number only work if shape is convex + if(isConvexControlPolygon) { // Bezier curves are always contained in their convex control polygon - if(!in_polygon(q, controlPolygon, includeBoundary, useNonzeroRule, EPS)) + if(!in_polygon(q, controlPolygon, includeBoundary, useNonzeroRule, edge_tol)) { - return 0.0 - linear_winding_number(q, c[ord], c[0], edge_tol); + return; } - // If the query point is at either endpoint, use direct formula - if((squared_distance(q, c[0]) <= edge_tol * edge_tol) || - (squared_distance(q, c[ord]) <= edge_tol * edge_tol)) + // If the query point is at either endpoint... + if(squared_distance(q, c[0]) <= edge_tol * edge_tol || + squared_distance(q, c[ord]) <= edge_tol * edge_tol) { - return convex_endpoint_winding_number(q, c, edge_tol, EPS); + // ...we can use a direct formula for the GWN at the endpoint + endpoint_gwn += convex_endpoint_winding_number(q, c, edge_tol, EPS); + isCoincident = true; + + return; } } @@ -256,8 +268,25 @@ double curve_winding_number_recursive(const Point& q, BezierCurve c1, c2; c.split(0.5, c1, c2); - return curve_winding_number_recursive(q, c1, isConvexControlPolygon, edge_tol, EPS) + - curve_winding_number_recursive(q, c2, isConvexControlPolygon, edge_tol, EPS); + construct_approximating_polygon(q, + c1, + isConvexControlPolygon, + edge_tol, + EPS, + approximating_polygon, + endpoint_gwn, + isCoincident); + approximating_polygon.addVertex(c2[0]); + construct_approximating_polygon(q, + c2, + isConvexControlPolygon, + edge_tol, + EPS, + approximating_polygon, + endpoint_gwn, + isCoincident); + + return; } /// Type to indicate orientation of singularities relative to surface @@ -271,7 +300,8 @@ enum class SingularityAxis #ifdef AXOM_USE_MFEM /*! - * \brief Evaluates an "anti-curl" of the winding number along a curve + * \brief Evaluates the integral of the "anti-curl" of the GWN integrand + * (via Stokes' theorem) at a point wrt to a 3D Bezier curve * * \param [in] query The query point to test * \param [in] curve The BezierCurve object @@ -287,7 +317,7 @@ enum class SingularityAxis * \note This is only meant to be used for `winding_number()`, * and the result does not make sense outside of that context. * - * \return double One component of the winding number + * \return The value of the integral */ template double stokes_winding_number(const Point& query, @@ -376,7 +406,8 @@ double stokes_winding_number(const Point& query, #ifdef AXOM_USE_MFEM /*! - * \brief Recursively evaluates an "anti-curl" of the winding number on subcurves + * \brief Accurately evaluates the integral of the "anti-curl" of the GWN integrand + * (via Stokes' theorem) at a point wrt to a 3D Bezier curve via recursion * * \param [in] query The query point to test * \param [in] curve The BezierCurve object @@ -393,7 +424,7 @@ double stokes_winding_number(const Point& query, * \note This is only meant to be used for `winding_number()`, * and the result does not make sense outside of that context. * - * \return double One component of the winding number + * \return The value of the integral */ template double stokes_winding_number_adaptive(const Point& query, diff --git a/src/axom/primal/operators/in_polygon.hpp b/src/axom/primal/operators/in_polygon.hpp index f29205bdf3..2621459b78 100644 --- a/src/axom/primal/operators/in_polygon.hpp +++ b/src/axom/primal/operators/in_polygon.hpp @@ -36,7 +36,7 @@ namespace primal * \param [in] poly The Polygon object to test for containment * \param [in] includeBoundary If true, points on the boundary are considered interior. * \param [in] useNonzeroRule If false, use even/odd protocol for inclusion - * \param [in] EPS The tolerance level for collinearity + * \param [in] edge_tol The distance at which a point is considered on the boundary * * Determines containment using the winding number with respect to the * given polygon. @@ -51,11 +51,11 @@ bool in_polygon(const Point& query, const Polygon& poly, bool includeBoundary = false, bool useNonzeroRule = true, - double EPS = 1e-8) + double edge_tol = 1e-8) { return useNonzeroRule - ? winding_number(query, poly, includeBoundary, EPS) != 0 - : (winding_number(query, poly, includeBoundary, EPS) % 2) == 1; + ? winding_number(query, poly, includeBoundary, edge_tol) != 0 + : (winding_number(query, poly, includeBoundary, edge_tol) % 2) == 1; } } // namespace primal diff --git a/src/axom/primal/operators/intersect.hpp b/src/axom/primal/operators/intersect.hpp index 57dbc11bf9..d7f5ef96e6 100644 --- a/src/axom/primal/operators/intersect.hpp +++ b/src/axom/primal/operators/intersect.hpp @@ -21,9 +21,11 @@ #include "axom/primal/geometry/OrientedBoundingBox.hpp" #include "axom/primal/geometry/Plane.hpp" #include "axom/primal/geometry/Point.hpp" +#include "axom/primal/geometry/Polygon.hpp" #include "axom/primal/geometry/Ray.hpp" #include "axom/primal/geometry/Segment.hpp" #include "axom/primal/geometry/Sphere.hpp" +#include "axom/primal/geometry/Tetrahedron.hpp" #include "axom/primal/geometry/Triangle.hpp" #include "axom/primal/geometry/BezierCurve.hpp" @@ -568,9 +570,9 @@ AXOM_HOST_DEVICE bool intersect(const Plane& p, } /*! - * \brief Determines if a 3D plane intersects a 3D segment. - * \param [in] plane A 3D plane - * \param [in] seg A 3D line segment + * \brief Determines if a plane intersects a segment. + * \param [in] plane A plane + * \param [in] seg A line segment * \param [out] t Intersection point of plane and seg, w.r.t. seg's * parametrization * \note If there is an intersection, the intersection point pt is: @@ -581,14 +583,35 @@ AXOM_HOST_DEVICE bool intersect(const Plane& p, * \note Uses method from pg 176 of * Real Time Collision Detection by Christer Ericson. */ -template -AXOM_HOST_DEVICE bool intersect(const Plane& plane, - const Segment& seg, +template +AXOM_HOST_DEVICE bool intersect(const Plane& plane, + const Segment& seg, T& t) { return detail::intersect_plane_seg(plane, seg, t); } +/*! + * \brief Determines if a 3D plane intersects a tetrahedron. + * + * \param [in] p A 3D plane + * \param [in] tet A 3D tetrahedron + * \param [out] intersection A polygon containing the intersection. + * + * \return true if plane intersects with tetrahedron, otherwise, false. + * + * \note If no intersection is found, the output polygon will be empty. + * If the plane intersects at a tetrahedron vertex, the polygon + * will contain duplicated points. + */ +template +AXOM_HOST_DEVICE bool intersect(const Plane& p, + const Tetrahedron& tet, + Polygon& intersection) +{ + return detail::intersect_plane_tet3d(p, tet, intersection); +} + /// @} } // namespace primal diff --git a/src/axom/primal/operators/squared_distance.hpp b/src/axom/primal/operators/squared_distance.hpp index 1ff3f1839a..d91d2645f3 100644 --- a/src/axom/primal/operators/squared_distance.hpp +++ b/src/axom/primal/operators/squared_distance.hpp @@ -21,6 +21,7 @@ #include "axom/primal/operators/closest_point.hpp" #include "axom/core/utilities/Utilities.hpp" +#include "axom/core/numerics/floating_point_limits.hpp" #include "axom/slic/interface/slic.hpp" @@ -72,7 +73,7 @@ AXOM_HOST_DEVICE inline double squared_distance(const Point& A, * \param [in] P the query point. * \param [in] B the axis-aligned bounding box. * \return the squared distance from P to the closest point on box \a B - * or std::numeric_limits::max() if \a B is invalid. + * or axom::numerics::floating_point_limits::max() if \a B is invalid. */ template AXOM_HOST_DEVICE inline double squared_distance(const Point& P, @@ -82,7 +83,7 @@ AXOM_HOST_DEVICE inline double squared_distance(const Point& P, if(!B.isValid()) { - return std::numeric_limits::max(); + return axom::numerics::floating_point_limits::max(); } if(B.contains(P)) @@ -107,7 +108,7 @@ AXOM_HOST_DEVICE inline double squared_distance(const Point& P, * \param [in] B the second axis-aligned bounding box. * If the boxes overlap, the minimum distance is zero. * \return the squared distance between the closest points on A and B - * or std::numeric_limits::max() if either box is invalid. + * or axom::numerics::floating_point_limits::max() if either box is invalid. */ template AXOM_HOST_DEVICE inline double squared_distance(const BoundingBox& A, @@ -131,7 +132,7 @@ AXOM_HOST_DEVICE inline double squared_distance(const BoundingBox& A, return v.squared_norm(); } - return std::numeric_limits::max(); + return axom::numerics::floating_point_limits::max(); } /*! @@ -145,31 +146,7 @@ template inline double squared_distance(const Point& P, const Segment& S) { - Vector ab(S.source(), S.target()); - Vector ac(S.source(), P); - - const T e = Vector::dot_product(ac, ab); - - // outside segment, on the side of a - // Testing if closest point is A - if(e <= 0.0f) - { - return ac.squared_norm(); - } - - // outside segment, on the side of b - // Testing if closest point is B - const T f = ab.squared_norm(); - if(e >= f) - { - Vector bc(S.target(), P); - return bc.squared_norm(); - } - - // P projects onto the segment - // Otherwise, we are in between A,B, therefore we project inside A,B. - const T dist = ac.squared_norm() - (e * e / f); - return dist; + return squared_distance(P, closest_point(P, S)); } /*! @@ -183,8 +160,7 @@ template inline double squared_distance(const Point& P, const Triangle& tri) { - Point cpt = closest_point(P, tri); - return squared_distance(P, cpt); + return squared_distance(P, closest_point(P, tri)); } } // namespace primal diff --git a/src/axom/primal/operators/winding_number.hpp b/src/axom/primal/operators/winding_number.hpp index 8773a66c93..d5315895ae 100644 --- a/src/axom/primal/operators/winding_number.hpp +++ b/src/axom/primal/operators/winding_number.hpp @@ -6,8 +6,8 @@ /*! * \file winding_number.hpp * - * \brief Consists of methods to compute winding numbers for points - * with respect to various geometric objects. + * \brief Consists of methods to compute the generalized winding number (GWN) + * for points with respect to various geometric objects. */ #ifndef AXOM_PRIMAL_WINDING_NUMBER_HPP_ @@ -27,6 +27,7 @@ #include "axom/primal/geometry/CurvedPolygon.hpp" #include "axom/primal/geometry/BoundingBox.hpp" #include "axom/primal/geometry/OrientedBoundingBox.hpp" + #include "axom/primal/operators/detail/winding_number_impl.hpp" // C++ includes @@ -42,16 +43,16 @@ namespace axom namespace primal { //@{ -//! @name Winding number operations between 2D points and primatives +//! @name Winding number operations between 2D points and primitives /* - * \brief Compute the winding number with respect to a 2D line segment + * \brief Compute the GWN for a 2D point wrt a 2D line segment * * \param [in] q The query point to test * \param [in] s The line segment * \param [in] edge_tol The tolerance at which a point is on the line * - * \return double The generalized winding number + * \return The GWN */ template double winding_number(const Point& q, @@ -62,7 +63,7 @@ double winding_number(const Point& q, } /* - * \brief Compute the winding number with respect to a 2D triangle + * \brief Compute the winding number for a 2D point wrt a 2D triangle * * \param [in] q The query point to test * \param [in] tri The triangle @@ -71,7 +72,7 @@ double winding_number(const Point& q, * * The triangle is assumed to be closed, so the winding number is an integer * - * \return int The integer winding number + * \return The integer winding number */ template int winding_number(const Point& q, @@ -87,12 +88,13 @@ int winding_number(const Point& q, } /*! - * \brief Computes the winding number for a point and a 2D polygon + * \brief Computes the winding number for a 2D point wrt a 2D polygon * * \param [in] R The query point to test * \param [in] P The Polygon object to test for containment - * \param [in] includeBoundary If true, points on the boundary are considered interior. - * \param [in] EPS The tolerance level for collinearity + * \param [in] includeBoundary If true, points on the boundary are considered interior + * \param [in] isOnEdge An optional return parameter if the point is on the boundary + * \param [in] edge_tol The distance at which a point is considered on the boundary * * Uses an adapted ray-casting approach that counts quarter-rotation * of vertices around the query point. Current policy is to return 1 on edges @@ -109,34 +111,24 @@ int winding_number(const Point& q, template int winding_number(const Point& R, const Polygon& P, - bool includeBoundary = false, - double EPS = 1e-8) + bool& isOnEdge, + bool includeBoundary, + double edge_tol) { const int nverts = P.numVertices(); - - // If the query is a vertex, return a value interpreted - // as "inside" by evenodd or nonzero protocols - if(axom::utilities::isNearlyEqual(P[0][0], R[0], EPS) && - axom::utilities::isNearlyEqual(P[0][1], R[1], EPS)) - { - return includeBoundary; - } + const double edge_tol_2 = edge_tol * edge_tol; + isOnEdge = false; int winding_num = 0; for(int i = 0; i < nverts; i++) { int j = (i == nverts - 1) ? 0 : i + 1; - if(axom::utilities::isNearlyEqual(P[j][1], R[1], EPS)) + // Check if the point is on the edge up to some tolerance + if(squared_distance(R, Segment(P[i], P[j])) <= edge_tol_2) { - if(axom::utilities::isNearlyEqual(P[j][0], R[0], EPS)) - { - return includeBoundary; // On vertex - } - else if(P[i][1] == R[1] && ((P[j][0] > R[0]) == (P[i][0] < R[0]))) - { - return includeBoundary; // On horizontal edge - } + isOnEdge = true; + return includeBoundary ? 1 : 0; } // Check if edge crosses horizontal line @@ -152,15 +144,9 @@ int winding_number(const Point& R, { // clang-format off double det = axom::numerics::determinant(P[i][0] - R[0], P[j][0] - R[0], - P[i][1] - R[1], P[j][1] - R[1]); + P[i][1] - R[1], P[j][1] - R[1]); // clang-format on - // On edge - if(axom::utilities::isNearlyEqual(det, 0.0, EPS)) - { - return includeBoundary; - } - // Check if edge intersects horitonal ray to the right of R if((det > 0) == (P[j][1] > P[i][1])) { @@ -177,12 +163,6 @@ int winding_number(const Point& R, P[i][1] - R[1], P[j][1] - R[1]); // clang-format on - // On edge - if(axom::utilities::isNearlyEqual(det, 0.0, EPS)) - { - return includeBoundary; - } - // Check if edge intersects horitonal ray to the right of R if((det > 0) == (P[j][1] > P[i][1])) { @@ -197,18 +177,50 @@ int winding_number(const Point& R, } /*! - * \brief Computes the generalized winding number for a single 2D Bezier curve + * \brief Computes the winding number for a 2D point wrt a 2D polygon + * + * \param [in] R The query point to test + * \param [in] P The Polygon object to test for containment + * \param [in] includeBoundary If true, points on the boundary are considered interior + * \param [in] edge_tol The distance at which a point is considered on the boundary + * + * Computes the integer winding number for a polygon without an additional + * return parameter for whether the point is on the boundary. + * + * \return The integer winding number + */ +template +int winding_number(const Point& R, + const Polygon& P, + bool includeBoundary = false, + double edge_tol = 1e-8) +{ + bool isOnEdge = false; + return winding_number(R, P, isOnEdge, includeBoundary, edge_tol); +} + +/*! + * \brief Computes the GWN for a 2D point wrt a 2D Bezier curve * * \param [in] query The query point to test * \param [in] c The Bezier curve object - * \param [in] edge_tol The physical distance level at which objects are - * considered indistinguishable + * \param [in] edge_tol The physical distance level at which objects are considered indistinguishable * \param [in] EPS Miscellaneous numerical tolerance level for nonphysical distances * - * Computes the winding number using a recursive, bisection algorithm, - * using nearly-linear Bezier curves as a base case. + * Computes the GWN using a recursive, bisection algorithm + * that constructs a polygon with the same *integer* WN as + * the curve closed with a linear segment. The *generalized* WN + * of the closing line is then subtracted from the integer WN to + * return the GWN of the original curve. (See ) + * + * Nearly-linear Bezier curves are the base case for recursion. + * + * See Algorithm 2 in + * Jacob Spainhour, David Gunderman, and Kenneth Weiss. 2024. + * Robust Containment Queries over Collections of Rational Parametric Curves via Generalized Winding Numbers. + * ACM Trans. Graph. 43, 4, Article 38 (July 2024) * - * \return double the generalized winding number. + * \return The GWN. */ template double winding_number(const Point& q, @@ -216,21 +228,78 @@ double winding_number(const Point& q, double edge_tol = 1e-8, double EPS = 1e-8) { - return detail::curve_winding_number_recursive(q, c, false, edge_tol, EPS); + const int ord = c.getOrder(); + if(ord <= 0) return 0.0; + + // Early return is possible for must points + curves + if(!c.boundingBox().expand(edge_tol).contains(q)) + { + return detail::linear_winding_number(q, c[0], c[ord], edge_tol); + } + + // The first vertex of the polygon is the t=0 point of the curve + Polygon approximating_polygon(1); + approximating_polygon.addVertex(c[0]); + + // Need to keep a running total of the GWN to account for + // the winding number of coincident points + double gwn = 0.0; + bool isCoincident = false; + detail::construct_approximating_polygon(q, + c, + false, + edge_tol, + EPS, + approximating_polygon, + gwn, + isCoincident); + + // The last vertex of the polygon is the t=1 point of the curve + approximating_polygon.addVertex(c[ord]); + + // Compute the integer winding number of the closed curve + bool isOnEdge = false; + double closed_curve_wn = + winding_number(q, approximating_polygon, isOnEdge, false, edge_tol); + + // Compute the fractional value of the closed curve + const int n = approximating_polygon.numVertices(); + const double closure_wn = + detail::linear_winding_number(q, + approximating_polygon[n - 1], + approximating_polygon[0], + edge_tol); + + // If the point is on the boundary of the approximating polygon, + // or coincident with the curve (rare), then winding_number + // doesn't return the right half-integer. Have to go edge-by-edge. + if(isCoincident || isOnEdge) + { + closed_curve_wn = closure_wn; + for(int i = 1; i < n; ++i) + { + closed_curve_wn += + detail::linear_winding_number(q, + approximating_polygon[i - 1], + approximating_polygon[i], + edge_tol); + } + } + + return gwn + closed_curve_wn - closure_wn; } /*! - * \brief Computes the generalized winding number for a 2D curved polygon + * \brief Computes the GWN for a 2D point wrt to a 2D curved polygon * * \param [in] query The query point to test * \param [in] cpoly The CurvedPolygon object - * \param [in] edge_tol The physical distance level at which objects are - * considered indistinguishable + * \param [in] edge_tol The physical distance level at which objects are considered indistinguishable * \param [in] EPS Miscellaneous numerical tolerance level for nonphysical distances * - * Computes the winding number by summing the winding number for each curve + * Computes the GWN for the curved polygon by summing the GWN for each curved edge * - * \return double the generalized winding number. + * \return The GWN. */ template double winding_number(const Point& q, @@ -241,34 +310,60 @@ double winding_number(const Point& q, double ret_val = 0.0; for(int i = 0; i < cpoly.numEdges(); i++) { - ret_val += - detail::curve_winding_number_recursive(q, cpoly[i], false, edge_tol, EPS); + ret_val += winding_number(q, cpoly[i], edge_tol, EPS); } return ret_val; } +/*! + * \brief Computes the GWN for a 2D point wrt to a collection of 2D Bezier curves + * + * \param [in] query The query point to test + * \param [in] cpoly The CurvedPolygon object + * \param [in] edge_tol The physical distance level at which objects are considered indistinguishable + * \param [in] EPS Miscellaneous numerical tolerance level for nonphysical distances + * + * Sums the GWN at `query` for each curved edge + * + * \return The GWN. + */ +template +double winding_number(const Point& q, + const axom::Array>& carray, + double edge_tol = 1e-8, + double EPS = 1e-8) +{ + AXOM_UNUSED_VAR(EPS); + + double ret_val = 0.0; + for(int i = 0; i < carray.size(); i++) + { + ret_val += winding_number(q, carray[i], false, edge_tol); + } + + return ret_val; +} //@} //@{ -//! @name Winding number operations between 3D points and primatives +//! @name Winding number operations between 3D points and primitives /*! - * \brief Computes the solid angle winding number for a 3D triangle + * \brief Computes the GWN for a 3D point wrt a 3D triangle * * \param [in] query The query point to test * \param [in] tri The 3D Triangle object * \param [in] isOnFace An optional return parameter if the point is on the triangle - * \param [in] edge_tol The physical distance level at which objects are - * considered indistinguishable + * \param [in] edge_tol The physical distance level at which objects are considered indistinguishable * \param [in] EPS Miscellaneous numerical tolerance level for nonphysical distances * - * Computes the winding number using the formula from + * Computes the GWN as the solid angle modulo 4pi using the formula from * Oosterom, Strackee, "The Solid Angle of a Plane Triangle" * IEEE Transactions on Biomedical Engineering, Vol BME-30, No. 2, February 1983 * with extra adjustments if the triangle takes up a full octant * - * \return double the generalized winding number. + * \return The GWN. */ template double winding_number(const Point& q, @@ -305,8 +400,8 @@ double winding_number(const Point& q, return 0; } - const double denom = a_norm * b_norm * c_norm // - + a_norm * b.dot(c) + b_norm * a.dot(c) + c_norm * a.dot(b); + const double denom = a_norm * b_norm * c_norm + a_norm * b.dot(c) + + b_norm * a.dot(c) + c_norm * a.dot(b); // Handle direct cases where argument to atan is undefined if(axom::utilities::isNearlyEqual(denom, 0.0, EPS)) @@ -327,9 +422,16 @@ double winding_number(const Point& q, } /*! - * \brief Computes the solid angle winding number for a 3D triangle + * \brief Computes the GWN for a 3D point wrt a 3D triangle * - * Overload function without additional returning parameter + * \param [in] query The query point to test + * \param [in] tri The 3D Triangle object + * \param [in] edge_tol The physical distance level at which objects are considered indistinguishable + * \param [in] EPS Miscellaneous numerical tolerance level for nonphysical distances + * + * Computes the GWN for the triangle without an additional return parameter + * + * \return The GWN. */ template double winding_number(const Point& q, @@ -342,7 +444,7 @@ double winding_number(const Point& q, } /*! - * \brief Computes the solid angle winding number for a 3D planar polygon + * \brief Computes the GWN for a 3D point wrt a 3D planar polygon * * \param [in] query The query point to test * \param [in] poly The Polygon object @@ -353,9 +455,9 @@ double winding_number(const Point& q, * * \pre Assumes the polygon is planar. Otherwise, a meaningless value is returned. * - * Triangulates the polygon and computes the triangular solid angle for each part + * Triangulates the polygon and computes the triangular GWN for each component * - * \return double the generalized winding number. + * \return The GWN. */ template double winding_number(const Point& q, @@ -384,9 +486,19 @@ double winding_number(const Point& q, } /*! - * \brief Computes the solid angle winding number for a 3D planar polygon + * \brief Computes the GWN for a 3D point wrt a 3D planar polygon * - * Overload function without additional returning parameter + * \param [in] query The query point to test + * \param [in] poly The Polygon object + * \param [in] edge_tol The physical distance level at which objects are + * considered indistinguishable + * \param [in] EPS Miscellaneous numerical tolerance level for nonphysical distances + * + * \pre Assumes the polygon is planar. Otherwise, a meaningless value is returned. + * + * Computes the GWN for the polygon without an additional return parameter + * + * \return The GWN. */ template double winding_number(const Point& q, @@ -399,7 +511,7 @@ double winding_number(const Point& q, } /*! - * \brief Computes the solid angle winding number for a 3D convex polyhedron + * \brief Computes the winding number for a 3D point wrt a 3D convex polyhedron * * \param [in] query The query point to test * \param [in] poly The Polyhedron object @@ -410,9 +522,10 @@ double winding_number(const Point& q, * * \pre Expects the polyhedron to be convex and closed so that the returned value is an integer. * - * Computes the faces of the polyhedron and computes the winding number for each. - * - * \return int The integer winding number. + * Computes the faces of the polyhedron and computes the GWN for each. + * The sum is then rounded to the nearest integer, as the shape is assumed to be closed. + * + * \return The integer winding number. */ template int winding_number(const Point& query, @@ -456,7 +569,7 @@ int winding_number(const Point& query, #ifdef AXOM_USE_MFEM /* - * \brief Computes the solid angle winding number for a Bezier patch + * \brief Computes the GWN for a 3D point wrt a 3D Bezier patch * * \param [in] query The query point to test * \param [in] bPatch The Bezier patch object @@ -471,7 +584,7 @@ int winding_number(const Point& query, * \note Warning: This algorithm is only tested to high accuracy for queries within * 1e-5 of the surface. Otherwise, it will return less accurate results. * - * \return double The generalized winding number. + * \return The GWN. */ template double winding_number(const Point& query, diff --git a/src/axom/primal/tests/primal_boundingbox.cpp b/src/axom/primal/tests/primal_boundingbox.cpp index 6c8f1ad8ec..1a15212c0d 100644 --- a/src/axom/primal/tests/primal_boundingbox.cpp +++ b/src/axom/primal/tests/primal_boundingbox.cpp @@ -3,13 +3,12 @@ // // SPDX-License-Identifier: (BSD-3-Clause) -#include - #include "gtest/gtest.h" #include "axom/slic.hpp" #include "axom/core/execution/execution_space.hpp" #include "axom/core/execution/for_all.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/primal/geometry/Point.hpp" #include "axom/primal/geometry/BoundingBox.hpp" @@ -40,7 +39,10 @@ void check_bb_policy() box[i].isValid(); }); - EXPECT_EQ(box[0], BoundingBoxType(PointType(0.0), PointType(10.0))); + BoundingBoxType box_host; + axom::copy(&box_host, box, sizeof(BoundingBoxType)); + + EXPECT_EQ(box_host, BoundingBoxType(PointType(0.0), PointType(10.0))); axom::deallocate(box); } @@ -609,28 +611,28 @@ TEST(primal_boundingBox, highest_lowest_values) // is doing the right thing in our CXX11 and pre-CXX11 compilers // Test double - double maxD = std::numeric_limits::max(); + double maxD = axom::numeric_limits::max(); double minD = -maxD; - EXPECT_EQ(maxD, std::numeric_limits::max()); - EXPECT_EQ(minD, std::numeric_limits::lowest()); + EXPECT_EQ(maxD, axom::numeric_limits::max()); + EXPECT_EQ(minD, axom::numeric_limits::lowest()); // Test float - double maxF = std::numeric_limits::max(); + double maxF = axom::numeric_limits::max(); double minF = -maxF; - EXPECT_EQ(maxF, std::numeric_limits::max()); - EXPECT_EQ(minF, std::numeric_limits::lowest()); + EXPECT_EQ(maxF, axom::numeric_limits::max()); + EXPECT_EQ(minF, axom::numeric_limits::lowest()); // Test int - int maxI = std::numeric_limits::max(); - int minI = std::numeric_limits::min(); - EXPECT_EQ(maxI, std::numeric_limits::max()); - EXPECT_EQ(minI, std::numeric_limits::lowest()); + int maxI = axom::numeric_limits::max(); + int minI = axom::numeric_limits::min(); + EXPECT_EQ(maxI, axom::numeric_limits::max()); + EXPECT_EQ(minI, axom::numeric_limits::lowest()); // Test uint - unsigned int maxU = std::numeric_limits::max(); - unsigned int minU = std::numeric_limits::min(); - EXPECT_EQ(maxU, std::numeric_limits::max()); - EXPECT_EQ(minU, std::numeric_limits::lowest()); + unsigned int maxU = axom::numeric_limits::max(); + unsigned int minU = axom::numeric_limits::min(); + EXPECT_EQ(maxU, axom::numeric_limits::max()); + EXPECT_EQ(minU, axom::numeric_limits::lowest()); // Testing that our default constructor for bounding boxes is properly setting the range. diff --git a/src/axom/primal/tests/primal_clip.cpp b/src/axom/primal/tests/primal_clip.cpp index c3bfe21757..54807f31e5 100644 --- a/src/axom/primal/tests/primal_clip.cpp +++ b/src/axom/primal/tests/primal_clip.cpp @@ -329,6 +329,12 @@ void unit_check_poly_clip() // | // In addition, vertices 0 and 3 should be marked as clipped. + const int current_allocator = axom::getDefaultAllocatorID(); + axom::setDefaultAllocator(axom::execution_space::allocatorID()); + + PolyhedronType* out_square = axom::allocate(1); + unsigned int* out_clipped = axom::allocate(1); + PolyhedronType square; square.addVertex({0.0, 0.0, 0.0}); square.addVertex({1.0, 0.0, 0.0}); @@ -340,28 +346,27 @@ void unit_check_poly_clip() square.addNeighbors(2, {1, 3}); square.addNeighbors(3, {0, 2}); - PlaneType plane(VectorType {1, 0, 0}, PointType {0.5, 0.0, 0.0}); - - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - - PolyhedronType* out_square = axom::allocate(1); - out_square[0] = square; - - unsigned int* out_clipped = axom::allocate(1); - out_clipped[0] = 0; + axom::copy(out_square, &square, sizeof(PolyhedronType)); axom::for_all( 0, 1, AXOM_LAMBDA(int /* idx */) { + PlaneType plane(VectorType {1, 0, 0}, PointType {0.5, 0.0, 0.0}); + + out_clipped[0] = 0; + axom::primal::detail::poly_clip_vertices(out_square[0], plane, EPS, out_clipped[0]); }); - const PolyhedronType& clippedSquare = out_square[0]; + PolyhedronType clippedSquare; + axom::copy(&clippedSquare, out_square, sizeof(PolyhedronType)); + + unsigned int out_clipped_host; + axom::copy(&out_clipped_host, out_clipped, sizeof(unsigned int)); EXPECT_EQ(clippedSquare.numVertices(), 6); // Check that existing vertices were not modified @@ -388,7 +393,7 @@ void unit_check_poly_clip() EXPECT_NE(hi_idx, -1); // Check that vertices outside the plane were marked as clipped - EXPECT_EQ(out_clipped[0], (1 | (1 << 3))); + EXPECT_EQ(out_clipped_host, (1 | (1 << 3))); // Generate sets of expected neighbors std::vector> expectedNbrs(6); @@ -434,35 +439,50 @@ void check_hex_tet_clip(double EPS) HexahedronType* hex = axom::allocate(1); PolyhedronType* res = axom::allocate(1); - tet[0] = TetrahedronType(PointType {1, 0, 0}, - PointType {1, 1, 0}, - PointType {0, 1, 0}, - PointType {1, 0, 1}); - - hex[0] = HexahedronType(PointType {0, 0, 0}, - PointType {1, 0, 0}, - PointType {1, 1, 0}, - PointType {0, 1, 0}, - PointType {0, 0, 1}, - PointType {1, 0, 1}, - PointType {1, 1, 1}, - PointType {0, 1, 1}); + // Shapes on host + TetrahedronType tet_host; + HexahedronType hex_host; + PolyhedronType res_host; + axom::for_all( 1, - AXOM_LAMBDA(int i) { res[i] = axom::primal::clip(hex[i], tet[i]); }); + AXOM_LAMBDA(int i) { + tet[0] = TetrahedronType(PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {0, 1, 0}, + PointType {1, 0, 1}); + + hex[0] = HexahedronType(PointType {0, 0, 0}, + PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {0, 1, 0}, + PointType {0, 0, 1}, + PointType {1, 0, 1}, + PointType {1, 1, 1}, + PointType {0, 1, 1}); + + res[i] = axom::primal::clip(hex[i], tet[i]); + }); + + axom::copy(&tet_host, tet, sizeof(TetrahedronType)); + axom::copy(&hex_host, hex, sizeof(HexahedronType)); + axom::copy(&res_host, res, sizeof(PolyhedronType)); - EXPECT_NEAR(0.1666, res[0].volume(), EPS); + EXPECT_NEAR(0.1666, res_host.volume(), EPS); EXPECT_NEAR(0.1666, - axom::primal::intersection_volume(hex[0], tet[0]), + axom::primal::intersection_volume(hex_host, tet_host), EPS); // Test tryFixOrientation optional parameter using shapes with negative volumes - axom::utilities::swap(tet[0][1], tet[0][2]); - axom::utilities::swap(hex[0][1], hex[0][3]); - axom::utilities::swap(hex[0][5], hex[0][7]); + axom::utilities::swap(tet_host[1], tet_host[2]); + axom::utilities::swap(hex_host[1], hex_host[3]); + axom::utilities::swap(hex_host[5], hex_host[7]); - EXPECT_LT(tet[0].signedVolume(), 0.0); - EXPECT_LT(hex[0].signedVolume(), 0.0); + EXPECT_LT(tet_host.signedVolume(), 0.0); + EXPECT_LT(hex_host.signedVolume(), 0.0); + + axom::copy(tet, &tet_host, sizeof(TetrahedronType)); + axom::copy(hex, &hex_host, sizeof(HexahedronType)); axom::for_all( 1, @@ -470,10 +490,12 @@ void check_hex_tet_clip(double EPS) res[i] = axom::primal::clip(hex[i], tet[i], EPS, CHECK_ORIENTATION); }); - EXPECT_NEAR(0.1666, res[0].volume(), EPS); + axom::copy(&res_host, res, sizeof(PolyhedronType)); + + EXPECT_NEAR(0.1666, res_host.volume(), EPS); EXPECT_NEAR(0.1666, - axom::primal::intersection_volume(hex[0], - tet[0], + axom::primal::intersection_volume(hex_host, + tet_host, EPS, CHECK_ORIENTATION), EPS); @@ -503,33 +525,47 @@ void check_oct_tet_clip(double EPS) OctahedronType* oct = axom::allocate(1); PolyhedronType* res = axom::allocate(1); - tet[0] = TetrahedronType(PointType {1, 0, 0}, - PointType {1, 1, 0}, - PointType {0, 1, 0}, - PointType {1, 0, 1}); - - oct[0] = OctahedronType(PointType {1, 0, 0}, - PointType {1, 1, 0}, - PointType {0, 1, 0}, - PointType {0, 1, 1}, - PointType {0, 0, 1}, - PointType {1, 0, 1}); + // Shapes on host + TetrahedronType tet_host; + OctahedronType oct_host; + PolyhedronType res_host; axom::for_all( 1, - AXOM_LAMBDA(int i) { res[i] = axom::primal::clip(oct[i], tet[i]); }); + AXOM_LAMBDA(int i) { + tet[0] = TetrahedronType(PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {0, 1, 0}, + PointType {1, 0, 1}); + + oct[0] = OctahedronType(PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {0, 1, 0}, + PointType {0, 1, 1}, + PointType {0, 0, 1}, + PointType {1, 0, 1}); + + res[i] = axom::primal::clip(oct[i], tet[i]); + }); + + axom::copy(&tet_host, tet, sizeof(TetrahedronType)); + axom::copy(&oct_host, oct, sizeof(OctahedronType)); + axom::copy(&res_host, res, sizeof(PolyhedronType)); - EXPECT_NEAR(0.1666, res[0].volume(), EPS); + EXPECT_NEAR(0.1666, res_host.volume(), EPS); EXPECT_NEAR(0.1666, - axom::primal::intersection_volume(oct[0], tet[0]), + axom::primal::intersection_volume(oct_host, tet_host), EPS); // Test tryFixOrientation optional parameter using shapes with negative volumes - axom::utilities::swap(tet[0][1], tet[0][2]); - axom::utilities::swap(oct[0][1], oct[0][2]); - axom::utilities::swap(oct[0][4], oct[0][5]); + axom::utilities::swap(tet_host[1], tet_host[2]); + axom::utilities::swap(oct_host[1], oct_host[2]); + axom::utilities::swap(oct_host[4], oct_host[5]); - EXPECT_LT(tet[0].signedVolume(), 0.0); + EXPECT_LT(tet_host.signedVolume(), 0.0); + + axom::copy(tet, &tet_host, sizeof(TetrahedronType)); + axom::copy(oct, &oct_host, sizeof(OctahedronType)); axom::for_all( 1, @@ -537,10 +573,12 @@ void check_oct_tet_clip(double EPS) res[i] = axom::primal::clip(oct[i], tet[i], EPS, CHECK_ORIENTATION); }); - EXPECT_NEAR(0.1666, res[0].volume(), EPS); + axom::copy(&res_host, res, sizeof(PolyhedronType)); + + EXPECT_NEAR(0.1666, res_host.volume(), EPS); EXPECT_NEAR(0.1666, - axom::primal::intersection_volume(oct[0], - tet[0], + axom::primal::intersection_volume(oct_host, + tet_host, EPS, CHECK_ORIENTATION), EPS); @@ -570,31 +608,45 @@ void check_tet_tet_clip(double EPS) TetrahedronType* tet2 = axom::allocate(1); PolyhedronType* res = axom::allocate(1); - tet1[0] = TetrahedronType(PointType {1, 0, 0}, - PointType {1, 1, 0}, - PointType {0, 1, 0}, - PointType {1, 1, 1}); - - tet2[0] = TetrahedronType(PointType {0, 0, 0}, - PointType {1, 0, 0}, - PointType {1, 1, 0}, - PointType {1, 1, 1}); + // Shapes on host + TetrahedronType tet1_host; + TetrahedronType tet2_host; + PolyhedronType res_host; axom::for_all( 1, - AXOM_LAMBDA(int i) { res[i] = axom::primal::clip(tet1[i], tet2[i]); }); + AXOM_LAMBDA(int i) { + tet1[0] = TetrahedronType(PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {0, 1, 0}, + PointType {1, 1, 1}); + + tet2[0] = TetrahedronType(PointType {0, 0, 0}, + PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {1, 1, 1}); + + res[i] = axom::primal::clip(tet1[i], tet2[i]); + }); + + axom::copy(&tet1_host, tet1, sizeof(TetrahedronType)); + axom::copy(&tet2_host, tet2, sizeof(TetrahedronType)); + axom::copy(&res_host, res, sizeof(PolyhedronType)); - EXPECT_NEAR(0.0833, res[0].volume(), EPS); + EXPECT_NEAR(0.0833, res_host.volume(), EPS); EXPECT_NEAR(0.0833, - axom::primal::intersection_volume(tet1[0], tet2[0]), + axom::primal::intersection_volume(tet1_host, tet2_host), EPS); // Test tryFixOrientation optional parameter using shapes with negative volumes - axom::utilities::swap(tet1[0][1], tet1[0][2]); - axom::utilities::swap(tet2[0][1], tet2[0][2]); + axom::utilities::swap(tet1_host[1], tet1_host[2]); + axom::utilities::swap(tet2_host[1], tet2_host[2]); - EXPECT_LT(tet1[0].signedVolume(), 0.0); - EXPECT_LT(tet2[0].signedVolume(), 0.0); + EXPECT_LT(tet1_host.signedVolume(), 0.0); + EXPECT_LT(tet2_host.signedVolume(), 0.0); + + axom::copy(tet1, &tet1_host, sizeof(TetrahedronType)); + axom::copy(tet2, &tet2_host, sizeof(TetrahedronType)); axom::for_all( 1, @@ -602,10 +654,12 @@ void check_tet_tet_clip(double EPS) res[i] = axom::primal::clip(tet1[i], tet2[i], EPS, CHECK_ORIENTATION); }); - EXPECT_NEAR(0.0833, res[0].volume(), EPS); + axom::copy(&res_host, res, sizeof(PolyhedronType)); + + EXPECT_NEAR(0.0833, res_host.volume(), EPS); EXPECT_NEAR(0.0833, - axom::primal::intersection_volume(tet1[0], - tet2[0], + axom::primal::intersection_volume(tet1_host, + tet2_host, EPS, CHECK_ORIENTATION), EPS); @@ -617,6 +671,84 @@ void check_tet_tet_clip(double EPS) axom::setDefaultAllocator(current_allocator); } +template +void check_polygon_polygon_clip(double EPS) +{ + // Will be clipping two triangles, max number of vertices for output polygon + // is 3 + 3 = 6 + const int MAX_NUM_VERTS = 6; + + constexpr bool CHECK_SIGN = true; + + using PolygonStatic2D = + axom::primal::Polygon; + using Point2D = axom::primal::Point; + + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int kernel_allocator = axom::execution_space::allocatorID(); + + axom::Array subject_polygon_device(1, 1, kernel_allocator); + auto subject_polygon_view = subject_polygon_device.view(); + + axom::Array clip_polygon_device(1, 1, kernel_allocator); + auto clip_polygon_view = clip_polygon_device.view(); + + axom::Array output_polygon_device(1, 1, kernel_allocator); + auto output_polygon_view = output_polygon_device.view(); + + axom::for_all( + 1, + AXOM_LAMBDA(int i) { + subject_polygon_view[i] = PolygonStatic2D( + {Point2D({0.0, 0.0}), Point2D({1.0, 0.0}), Point2D({0.5, 1})}); + + clip_polygon_view[i] = PolygonStatic2D({Point2D({0.0, 2.0 / 3.0}), + Point2D({0.5, -1.0 / 3.0}), + Point2D({1.0, 2.0 / 3.0})}); + + output_polygon_view[i] = + axom::primal::clip(subject_polygon_view[i], clip_polygon_view[i], EPS); + }); + + // Copy output polygon back to host + axom::Array output_polygon_host = + axom::Array(output_polygon_device, host_allocator); + + EXPECT_NEAR(0.3333, output_polygon_host[0].signedArea(), EPS); + EXPECT_EQ(output_polygon_host[0].numVertices(), 6); + + // Test tryFixOrientation optional parameter using same polygons with + // negative volumes (clockwise ordering) + axom::for_all( + 1, + AXOM_LAMBDA(int i) { + subject_polygon_view[i].clear(); + clip_polygon_view[i].clear(); + output_polygon_view[i].clear(); + + subject_polygon_view[i].addVertex(Point2D({0.5, 1})); + subject_polygon_view[i].addVertex(Point2D({1.0, 0.0})); + subject_polygon_view[i].addVertex(Point2D({0.0, 0.0})); + + clip_polygon_view[i].addVertex(Point2D({0.5, -1.0 / 3.0})); + clip_polygon_view[i].addVertex(Point2D({0.0, 2.0 / 3.0})); + clip_polygon_view[i].addVertex(Point2D({1.0, 2.0 / 3.0})); + + output_polygon_view[i] = axom::primal::clip(subject_polygon_view[i], + clip_polygon_view[i], + EPS, + CHECK_SIGN); + }); + + // Copy output polygon back to host + output_polygon_host = + axom::Array(output_polygon_device, host_allocator); + + EXPECT_NEAR(0.3333, output_polygon_host[0].signedArea(), EPS); + EXPECT_EQ(output_polygon_host[0].numVertices(), 6); +} + TEST(primal_clip, unit_poly_clip_vertices_sequential) { unit_check_poly_clip(); @@ -640,6 +772,12 @@ TEST(primal_clip, clip_tet_tet_sequential) check_tet_tet_clip(EPS); } +TEST(primal_clip, clip_polygon_polygon_sequential) +{ + constexpr double EPS = 1e-4; + check_polygon_polygon_clip(EPS); +} + #ifdef AXOM_USE_OPENMP TEST(primal_clip, unit_poly_clip_vertices_omp) { @@ -663,6 +801,12 @@ TEST(primal_clip, clip_tet_tet_omp) constexpr double EPS = 1e-4; check_tet_tet_clip(EPS); } + +TEST(primal_clip, clip_polygon_polygon_omp) +{ + constexpr double EPS = 1e-4; + check_polygon_polygon_clip(EPS); +} #endif /* AXOM_USE_OPENMP */ #if defined(AXOM_USE_CUDA) @@ -688,6 +832,12 @@ TEST(primal_clip, clip_tet_tet_cuda) constexpr double EPS = 1e-4; check_tet_tet_clip>(EPS); } + +TEST(primal_clip, clip_polygon_polygon_cuda) +{ + constexpr double EPS = 1e-4; + check_polygon_polygon_clip>(EPS); +} #endif /* AXOM_USE_CUDA */ #if defined(AXOM_USE_HIP) @@ -713,6 +863,12 @@ TEST(primal_clip, clip_tet_tet_hip) constexpr double EPS = 1e-4; check_tet_tet_clip>(EPS); } + +TEST(primal_clip, clip_polygon_polygon_hip) +{ + constexpr double EPS = 1e-4; + check_polygon_polygon_clip>(EPS); +} #endif /* AXOM_USE_HIP */ #endif /* AXOM_USE_RAJA && AXOM_USE_UMPIRE */ @@ -1589,6 +1745,215 @@ TEST(primal_clip, tet_plane_intersect_four_edges) EXPECT_NEAR(tet.signedVolume() / 2.0, poly.signedVolume(), EPS); } +TEST(primal_clip, empty_polygons) +{ + using Polygon2D = axom::primal::Polygon; + + Polygon2D subjectPolygon; + + Polygon2D clipPolygon; + + Polygon2D poly = axom::primal::clip(subjectPolygon, clipPolygon); + + EXPECT_EQ(poly.isValid(), false); +} + +TEST(primal_clip, polygon_intersects_polygon) +{ + using Polygon2D = axom::primal::Polygon; + using PolygonStatic2D = + axom::primal::Polygon; + using Point2D = axom::primal::Point; + constexpr double EPS = 1e-10; + constexpr bool CHECK_SIGN = true; + + // Expected counter-clockwise vertex ordering + { + Polygon2D subjectPolygon; + subjectPolygon.addVertex(Point2D {0, 0}); + subjectPolygon.addVertex(Point2D {1, 0}); + subjectPolygon.addVertex(Point2D {1, 1}); + subjectPolygon.addVertex(Point2D {0, 1}); + + Polygon2D clipPolygon; + clipPolygon.addVertex(Point2D {0.5, -1}); + clipPolygon.addVertex(Point2D {1.5, -1}); + clipPolygon.addVertex(Point2D {1.5, 2}); + clipPolygon.addVertex(Point2D {0.5, 2}); + + Polygon2D poly = axom::primal::clip(subjectPolygon, clipPolygon, EPS); + + EXPECT_NEAR(subjectPolygon.signedArea(), 1.0, EPS); + EXPECT_NEAR(clipPolygon.signedArea(), 3.0, EPS); + EXPECT_NEAR(poly.signedArea(), 0.5, EPS); + } + + // Same polygons with static arrays + { + PolygonStatic2D subjectPolygon; + subjectPolygon.addVertex(Point2D {0, 0}); + subjectPolygon.addVertex(Point2D {1, 0}); + subjectPolygon.addVertex(Point2D {1, 1}); + subjectPolygon.addVertex(Point2D {0, 1}); + + PolygonStatic2D clipPolygon; + clipPolygon.addVertex(Point2D {0.5, -1}); + clipPolygon.addVertex(Point2D {1.5, -1}); + clipPolygon.addVertex(Point2D {1.5, 2}); + clipPolygon.addVertex(Point2D {0.5, 2}); + + PolygonStatic2D poly = axom::primal::clip(subjectPolygon, clipPolygon, EPS); + + EXPECT_NEAR(subjectPolygon.signedArea(), 1.0, EPS); + EXPECT_NEAR(clipPolygon.signedArea(), 3.0, EPS); + EXPECT_NEAR(poly.signedArea(), 0.5, EPS); + } + + // Negative clockwise vertex ordering, use tryFixOrientation optional + // parameter to fix. + { + Polygon2D subjectPolygon; + subjectPolygon.addVertex(Point2D {0, 0}); + subjectPolygon.addVertex(Point2D {0, 1}); + subjectPolygon.addVertex(Point2D {1, 1}); + subjectPolygon.addVertex(Point2D {1, 0}); + + Polygon2D clipPolygon; + clipPolygon.addVertex(Point2D {0.5, -1}); + clipPolygon.addVertex(Point2D {0.5, 2}); + clipPolygon.addVertex(Point2D {1.5, 2}); + clipPolygon.addVertex(Point2D {1.5, -1}); + + Polygon2D poly_fix_orientation = + axom::primal::clip(subjectPolygon, clipPolygon, EPS, CHECK_SIGN); + + // Negative areas + EXPECT_NEAR(subjectPolygon.signedArea(), -1.0, EPS); + EXPECT_NEAR(clipPolygon.signedArea(), -3.0, EPS); + + // Positive area with tryFixOrientation flag enabled + EXPECT_NEAR(poly_fix_orientation.signedArea(), 0.5, EPS); + } + + // Edge case with 3 consecutive vertices having the orientations + // ON_POSITIVE_SIDE, ON_BOUNDARY, ON_POSITIVE in respect to the + // last edge of the clip polygon. Prior to fix, resulted in the + // vertex on the boundary being added twice. + { + Polygon2D subjectPolygon; + subjectPolygon.addVertex(Point2D {0.0, 0.0}); + subjectPolygon.addVertex(Point2D {1.0, 0.0}); + subjectPolygon.addVertex(Point2D {1.0, 1.0}); + + Polygon2D clipPolygon; + clipPolygon.addVertex(Point2D {0.0, 0.0}); + clipPolygon.addVertex(Point2D {1.0, 0.0}); + clipPolygon.addVertex(Point2D {0.0, 1.0}); + + Polygon2D poly = axom::primal::clip(subjectPolygon, clipPolygon, EPS); + + EXPECT_NEAR(poly.signedArea(), 0.25, EPS); + EXPECT_EQ(poly.numVertices(), 3); + } + + // Non-clipping - polygons intersect at a line + { + Polygon2D subjectPolygon; + subjectPolygon.addVertex(Point2D {0, 0}); + subjectPolygon.addVertex(Point2D {1, 0}); + subjectPolygon.addVertex(Point2D {1, 1}); + subjectPolygon.addVertex(Point2D {0, 1}); + + Polygon2D clipPolygon; + clipPolygon.addVertex(Point2D {-1, 0}); + clipPolygon.addVertex(Point2D {0, 0}); + clipPolygon.addVertex(Point2D {0, 1}); + clipPolygon.addVertex(Point2D {-1, 1}); + + Polygon2D poly = + axom::primal::clip(subjectPolygon, clipPolygon, EPS, CHECK_SIGN); + + EXPECT_EQ(poly.isValid(), false); + EXPECT_EQ(poly.numVertices(), 0); + } + + // Non-clipping - polygons intersect at a point + { + Polygon2D subjectPolygon; + subjectPolygon.addVertex(Point2D {0, 0}); + subjectPolygon.addVertex(Point2D {1, 0}); + subjectPolygon.addVertex(Point2D {1, 1}); + subjectPolygon.addVertex(Point2D {0, 1}); + + Polygon2D clipPolygon; + clipPolygon.addVertex(Point2D {-1, -1}); + clipPolygon.addVertex(Point2D {0, -1}); + clipPolygon.addVertex(Point2D {0, 0}); + clipPolygon.addVertex(Point2D {-1, 0}); + + Polygon2D poly = + axom::primal::clip(subjectPolygon, clipPolygon, EPS, CHECK_SIGN); + + EXPECT_EQ(poly.isValid(), false); + EXPECT_EQ(poly.numVertices(), 0); + } + + // Rosetta Code example + { + Polygon2D subjectPolygon; + subjectPolygon.addVertex(Point2D {50, 150}); + subjectPolygon.addVertex(Point2D {200, 50}); + subjectPolygon.addVertex(Point2D {350, 150}); + subjectPolygon.addVertex(Point2D {350, 300}); + subjectPolygon.addVertex(Point2D {250, 300}); + subjectPolygon.addVertex(Point2D {200, 250}); + subjectPolygon.addVertex(Point2D {150, 350}); + subjectPolygon.addVertex(Point2D {100, 250}); + subjectPolygon.addVertex(Point2D {100, 200}); + + Polygon2D clipPolygon; + clipPolygon.addVertex(Point2D {100, 100}); + clipPolygon.addVertex(Point2D {300, 100}); + clipPolygon.addVertex(Point2D {300, 300}); + clipPolygon.addVertex(Point2D {100, 300}); + + Polygon2D poly = axom::primal::clip(subjectPolygon, clipPolygon, EPS); + EXPECT_NEAR(poly.signedArea(), 37083.3333333333, EPS); + EXPECT_EQ(poly.numVertices(), 10); + + // Check vertices + EXPECT_NEAR(poly[0][0], 100, EPS); + EXPECT_NEAR(poly[0][1], 116.6666666666, EPS); + + EXPECT_NEAR(poly[1][0], 125, EPS); + EXPECT_NEAR(poly[1][1], 100, EPS); + + EXPECT_NEAR(poly[2][0], 275, EPS); + EXPECT_NEAR(poly[2][1], 100, EPS); + + EXPECT_NEAR(poly[3][0], 300, EPS); + EXPECT_NEAR(poly[3][1], 116.6666666666, EPS); + + EXPECT_NEAR(poly[4][0], 300, EPS); + EXPECT_NEAR(poly[4][1], 300, EPS); + + EXPECT_NEAR(poly[5][0], 250, EPS); + EXPECT_NEAR(poly[5][1], 300, EPS); + + EXPECT_NEAR(poly[6][0], 200, EPS); + EXPECT_NEAR(poly[6][1], 250, EPS); + + EXPECT_NEAR(poly[7][0], 175, EPS); + EXPECT_NEAR(poly[7][1], 300, EPS); + + EXPECT_NEAR(poly[8][0], 125, EPS); + EXPECT_NEAR(poly[8][1], 300, EPS); + + EXPECT_NEAR(poly[9][0], 100, EPS); + EXPECT_NEAR(poly[9][1], 250, EPS); + } +} + //------------------------------------------------------------------------------ int main(int argc, char* argv[]) { diff --git a/src/axom/primal/tests/primal_closest_point.cpp b/src/axom/primal/tests/primal_closest_point.cpp index 770af91f29..2c5e998f2f 100644 --- a/src/axom/primal/tests/primal_closest_point.cpp +++ b/src/axom/primal/tests/primal_closest_point.cpp @@ -11,6 +11,597 @@ namespace primal = axom::primal; +//------------------------------------------------------------------------------ +TEST(primal_closest_point, seg_test_degenerate) +{ + constexpr double EPS = primal::PRIMAL_TINY; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QSegment = primal::Segment; + + QPoint A({1.1, 1.1, 1.1}); + QPoint B({1.1, 1.1, 1.1}); + QSegment S(A, B); + double t; + + // Query point is on A/B + EXPECT_TRUE(primal::closest_point(QPoint({1.1, 1.1, 1.1}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is anywhere else + EXPECT_TRUE(primal::closest_point(QPoint({2.2, 2.2, 2.2}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // + // Now let's reverse the segment + // + QSegment S_reverse(B, A); + + // Query point is on A/B + EXPECT_TRUE( + primal::closest_point(QPoint({1.1, 1.1, 1.1}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is anywhere else + EXPECT_TRUE( + primal::closest_point(QPoint({2.2, 2.2, 2.2}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, seg_test_tiny) +{ + constexpr double EPS = 1e-12; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QSegment = primal::Segment; + + QPoint A({0.0, 0.0, 0.0}); + QPoint B({1.0e-9, 0.0, 0.0}); + QSegment S(A, B); + double t; + + // Query point is on the midpoint of AB + EXPECT_TRUE(primal::closest_point(QPoint({0.5e-10, 0.0, 0.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is on the line perpendicular to AB running through the midpoint + EXPECT_TRUE(primal::closest_point(QPoint({0.5e-10, 1.0, 0.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is equal to A + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 0.0, 0.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is equal to B (for a degenerate segment, A is always returned) + EXPECT_TRUE(primal::closest_point(QPoint({1.0e-9, 0.0, 0.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // + // Now let's reverse the segment + // + QSegment S_reverse(B, A); + + // Query point is on the midpoint of AB + EXPECT_TRUE( + primal::closest_point(QPoint({0.5e-10, 0.0, 0.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is on the line perpendicular to AB running through the midpoint + EXPECT_TRUE( + primal::closest_point(QPoint({0.5e-10, 1.0, 0.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is equal to A + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 0.0, 0.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is equal to B (for a degenerate segment, A is always returned) + EXPECT_TRUE( + primal::closest_point(QPoint({1.0e-9, 0.0, 0.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, seg_test_closest_point_vertex_0) +{ + constexpr double EPS = 1e-12; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QSegment = primal::Segment; + + QPoint A({0.0, 1.0, 1.0}); + QPoint B({1.0, 0.0, 0.0}); + QSegment S(A, B); + double t; + + // Query point is on the line extended past point A + EXPECT_TRUE(primal::closest_point(QPoint({-1.0, 2.0, 2.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is on the line perpendicular to AB running through point A + EXPECT_TRUE(primal::closest_point(QPoint({-1.0, 0.0, 2.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is equal to A + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 1.0, 1.0}), S, &t, EPS) == A); + EXPECT_NEAR(t, 0.0, EPS); + + // + // Now let's reverse the segment + // + QSegment S_reverse(B, A); + + // Query point is on the line extended past point A + EXPECT_TRUE( + primal::closest_point(QPoint({-1.0, 2.0, 2.0}), S_reverse, &t, EPS) == A); + EXPECT_NEAR(t, 1.0, EPS); + + // Query point is on the line perpendicular to AB running through point A + EXPECT_TRUE( + primal::closest_point(QPoint({-1.0, 0.0, 2.0}), S_reverse, &t, EPS) == A); + EXPECT_NEAR(t, 1.0, EPS); + + // Query point is equal to A + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 1.0, 1.0}), S_reverse, &t, EPS) == A); + EXPECT_NEAR(t, 1.0, EPS); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, seg_test_closest_point_vertex_1) +{ + constexpr double EPS = 1e-12; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QSegment = primal::Segment; + + QPoint A({0.0, 1.0, 1.0}); + QPoint B({1.0, 0.0, 0.0}); + QSegment S(A, B); + double t; + + // Query point is on the line extended past point B + EXPECT_TRUE(primal::closest_point(QPoint({2.0, -1.0, 1.0}), S, &t, EPS) == B); + EXPECT_NEAR(t, 1.0, EPS); + + // Query point is on the line perpendicular to AB running through point B + EXPECT_TRUE(primal::closest_point(QPoint({2.0, 1.0, -1.0}), S, &t, EPS) == B); + EXPECT_NEAR(t, 1.0, EPS); + + // Query point is equal to B + EXPECT_TRUE(primal::closest_point(QPoint({1.0, 0.0, 0.0}), S, &t, EPS) == B); + EXPECT_NEAR(t, 1.0, EPS); + + // + // Now let's reverse the segment + // + QSegment S_reverse(B, A); + + // Query point is on the line extended past point B + EXPECT_TRUE( + primal::closest_point(QPoint({2.0, -1.0, 1.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is on the line perpendicular to AB running through point B + EXPECT_TRUE( + primal::closest_point(QPoint({2.0, 1.0, -1.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); + + // Query point is equal to B + EXPECT_TRUE( + primal::closest_point(QPoint({1.0, 0.0, 0.0}), S_reverse, &t, EPS) == B); + EXPECT_NEAR(t, 0.0, EPS); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, seg_test_closest_point_interior) +{ + constexpr double EPS = 1e-12; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QSegment = primal::Segment; + + QPoint A({0.0, 1.0, 1.0}); + QPoint B({1.0, 0.0, 0.0}); + QSegment S(A, B); + double t; + + // Query point is perpendicular to the midpoint of AB + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 0.0, 0.5}), S, &t, EPS) == + QPoint::lerp(A, B, 0.5)); + EXPECT_NEAR(t, 0.5, EPS); + + // Query point is a quarter of the way to B from A + EXPECT_TRUE(primal::closest_point(QPoint({0.25, 0.75, 0.75}), S, &t, EPS) == + QPoint::lerp(A, B, 0.25)); + EXPECT_NEAR(t, 0.25, EPS); + + // + // Now let's reverse the segment + // + QSegment S_reverse(B, A); + + // Query point is perpendicular to the midpoint of AB + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 0.0, 0.5}), S_reverse, &t, EPS) == + QPoint::lerp(A, B, 0.5)); + EXPECT_NEAR(t, 0.5, EPS); + + // Query point is a quarter of the way to B from A + EXPECT_TRUE( + primal::closest_point(QPoint({0.25, 0.75, 0.75}), S_reverse, &t, EPS) == + QPoint::lerp(A, B, 0.25)); + EXPECT_NEAR(t, 0.75, EPS); + + // Test without loc argument + EXPECT_TRUE(primal::closest_point(QPoint({0.25, 0.75, 0.75}), S_reverse, EPS) == + QPoint::lerp(A, B, 0.25)); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, triangle_test_tiny) +{ + constexpr double EPS = primal::PRIMAL_TINY; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QTriangle = primal::Triangle; + + QTriangle tri({QPoint({0.0, 0.0, 0.0}), + QPoint({0.0, 0.0, 1.0e-16}), + QPoint({0.0, 1.0, 0.0})}); + + const QPoint& A = tri[0]; + const QPoint& B = tri[1]; + const QPoint& C = tri[2]; + + int loc; + + // Query point is on vertex A + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 0.0, 0.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 0.0, -1.0e-16}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is on vertex B + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 0.0, 1.0e-16}), tri, &loc, EPS) == B); + EXPECT_EQ(loc, 1); + + // Query point is in the vertex region of B + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 0.0, 1.0e-15}), tri, &loc, EPS) == B); + EXPECT_EQ(loc, 1); + + // Query point is on vertex C + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 1.0, 0.0}), tri, &loc, EPS) == C); + EXPECT_EQ(loc, 2); + + // Query point is in the vertex region of C + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 1.0 + 1.0e-16, 0.0}), tri, &loc, EPS) == C); + EXPECT_EQ(loc, 2); + + // Query point is on AB + QPoint queryPoint({0.0, 0.0, 1.0e-17}); + QPoint closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -1); + + // Query point is in the edge region of AB + queryPoint = QPoint({0.0, -0.1, 1.0e-17}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + QPoint expectedClosestPoint({0.0, 0.0, 1.0e-17}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -1); + + // Query point is on BC + queryPoint = QPoint({0.0, 0.5, 5.0e-17}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -2); + + // Query point is in the edge region of BC + queryPoint = QPoint({0.5, 0.5, 5.0e-17}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + expectedClosestPoint = QPoint({0.0, 0.5, 5.0e-17}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -2); + + // Query point is on CA + queryPoint = QPoint({0.0, 0.25, 0.0}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -3); + + // Query point is in the edge region of BC + queryPoint = QPoint({-0.25, 0.75, -0.25}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + expectedClosestPoint = QPoint({0.0, 0.75, 0.0}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -3); + + // Query point is on the interior of the triangle + queryPoint = QPoint({0.0, 1.0 / 3.0, 1.0e-16 / 3.0}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, 3); + + // Query point is in the interior region of the triangle + queryPoint = QPoint({-0.5, 1.0 / 3.0, 1.0e-16 / 3.0}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + expectedClosestPoint = QPoint({0.0, 1.0 / 3.0, 1.0e-16 / 3.0}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, 3); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, triangle_test_degenerate_side_AB) +{ + constexpr double EPS = primal::PRIMAL_TINY; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QTriangle = primal::Triangle; + + QTriangle tri( + {QPoint({0.0, 0.0, 0.0}), QPoint({0.0, 0.0, 0.0}), QPoint({0.0, 1.0, 0.0})}); + + const QPoint& A = tri[0]; + const QPoint& C = tri[2]; + + int loc; + + // Query point is on vertex A/B + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 0.0, 0.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A/B + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 0.0, -1.0e-16}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A/B + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 0.0, 1.0e-16}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A/B + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, -1.0e-16, 0.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is on vertex C + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 1.0, 0.0}), tri, &loc, EPS) == C); + EXPECT_EQ(loc, 2); + + // Query point is in the vertex region of C + EXPECT_TRUE( + primal::closest_point(QPoint({0.0, 1.0 + 1.0e-16, 0.0}), tri, &loc, EPS) == C); + EXPECT_EQ(loc, 2); + + // Query point is on BC/CA + QPoint queryPoint({0.0, 0.25, 0.0}); + QPoint closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -3); + + // Query point is in the edge region of BC/CA + queryPoint = QPoint({-0.25, 0.75, -0.25}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + QPoint expectedClosestPoint({0.0, 0.75, 0.0}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -3); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, triangle_test_degenerate_side_BC) +{ + constexpr double EPS = primal::PRIMAL_TINY; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QTriangle = primal::Triangle; + + QTriangle tri( + {QPoint({2.0, 0.0, 0.0}), QPoint({2.0, 1.0, 1.0}), QPoint({2.0, 1.0, 1.0})}); + + const QPoint& A = tri[0]; + const QPoint& B = tri[1]; + + int loc; + + // Query point is on vertex A + EXPECT_TRUE(primal::closest_point(QPoint({2.0, 0.0, 0.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A + EXPECT_TRUE(primal::closest_point(QPoint({2.0, 0.0, 0.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is on vertex B/C + EXPECT_TRUE(primal::closest_point(QPoint({2.0, 1.0, 1.0}), tri, &loc, EPS) == B); + EXPECT_EQ(loc, 1); + + // Query point is in the vertex region of B/C + EXPECT_TRUE(primal::closest_point(QPoint({3.0, 2.0, 2.0}), tri, &loc, EPS) == B); + EXPECT_EQ(loc, 1); + + // Query point is on AB/CA + QPoint queryPoint({2.0, 0.75, 0.75}); + QPoint closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -1); + + // Query point is in the edge region of AB/CA + queryPoint = QPoint({2.0, 1.0, 0.0}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + QPoint expectedClosestPoint({2.0, 0.5, 0.5}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -1); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, triangle_test_degenerate_side_CA) +{ + constexpr double EPS = primal::PRIMAL_TINY; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QTriangle = primal::Triangle; + + QTriangle tri( + {QPoint({1.0, 3.0, 1.0}), QPoint({2.0, 4.0, 2.0}), QPoint({1.0, 3.0, 1.0})}); + + const QPoint& A = tri[0]; + const QPoint& B = tri[1]; + + int loc; + + // Query point is on vertex A/C + EXPECT_TRUE(primal::closest_point(QPoint({1.0, 3.0, 1.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A/C + EXPECT_TRUE(primal::closest_point(QPoint({0.0, 0.0, 0.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is on vertex B + EXPECT_TRUE(primal::closest_point(QPoint({2.0, 4.0, 2.0}), tri, &loc, EPS) == B); + EXPECT_EQ(loc, 1); + + // Query point is in the vertex region of B + EXPECT_TRUE(primal::closest_point(QPoint({2.1, 4.1, 2.1}), tri, &loc, EPS) == B); + EXPECT_EQ(loc, 1); + + // Query point is on AB/BC + QPoint queryPoint({4.0 / 3.0, 10.0 / 3.0, 4.0 / 3.0}); + QPoint closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], queryPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -1); + + // Query point is in the edge region of AB/BC + queryPoint = QPoint({1.0, 4.0, 1.0}); + closestPoint = primal::closest_point(queryPoint, tri, &loc, EPS); + QPoint expectedClosestPoint({4.0 / 3.0, 10.0 / 3.0, 4.0 / 3.0}); + + for(int i = 0; i < DIM; ++i) + { + EXPECT_NEAR(closestPoint[i], expectedClosestPoint[i], 1.0e-16); + } + + EXPECT_EQ(loc, -1); +} + +//------------------------------------------------------------------------------ +TEST(primal_closest_point, triangle_test_all_sides_degenerate) +{ + constexpr double EPS = primal::PRIMAL_TINY; + + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QTriangle = primal::Triangle; + + QTriangle tri( + {QPoint({1.0, 3.0, 1.0}), QPoint({1.0, 3.0, 1.0}), QPoint({1.0, 3.0, 1.0})}); + + const QPoint& A = tri[0]; + + int loc; + + // Query point is on vertex A/B/C + EXPECT_TRUE(primal::closest_point(QPoint({1.0, 3.0, 1.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); + + // Query point is in the vertex region of A/B/C + EXPECT_TRUE(primal::closest_point(QPoint({2.0, 4.0, 2.0}), tri, &loc, EPS) == A); + EXPECT_EQ(loc, 0); +} + //------------------------------------------------------------------------------ TEST(primal_closest_point, obb_test_closest_point_interior) { @@ -263,4 +854,4 @@ TEST(primal_closest_point, sphere_point_3D) } } } -} \ No newline at end of file +} diff --git a/src/axom/primal/tests/primal_intersect.cpp b/src/axom/primal/tests/primal_intersect.cpp index e98035d12d..9702137744 100644 --- a/src/axom/primal/tests/primal_intersect.cpp +++ b/src/axom/primal/tests/primal_intersect.cpp @@ -2178,48 +2178,434 @@ TEST(primal_intersect, plane_bb_test_intersection) TEST(primal_intersect, plane_seg_test_intersection) { double t1, t2, t3; - const int DIM = 3; - using PointType = primal::Point; - using PlaneType = primal::Plane; - using SegmentType = primal::Segment; - using VectorType = primal::Vector; + using Point3D = primal::Point; + using Plane3D = primal::Plane; + using Segment3D = primal::Segment; + using Vector3D = primal::Vector; + + using Point2D = primal::Point; + using Plane2D = primal::Plane; + using Segment2D = primal::Segment; + using Vector2D = primal::Vector; + + // 3D Tests + { + // Line segment goes from (0,0,0) to (1,1,1) + Point3D A(0.); + Point3D B(1.); + Segment3D s(A, B); + + // Line segment parallel to plane (non-intersect) + Point3D A_p {-1, -1, 0}; + Point3D B_p {1, -1, 0}; + Segment3D s_p(A_p, B_p); + + // intersect A + Vector3D normal1 {0.0, 1.0, 0.0}; + double offset1 = 0.0; + Plane3D p1(normal1, offset1); + + // intersect midpoint + Vector3D normal2 {0.0, 1.0, 0.0}; + double offset2 = 0.5; + Plane3D p2(normal2, offset2); + + // intersect B + Vector3D normal3 {0.0, 1.0, 0.0}; + double offset3 = 1.0; + Plane3D p3(normal3, offset3); + + EXPECT_TRUE(axom::primal::intersect(p1, s, t1)); + EXPECT_EQ(s.at(t1), Point3D({0.0, 0.0, 0.0})); + + EXPECT_TRUE(axom::primal::intersect(p2, s, t2)); + EXPECT_EQ(s.at(t2), Point3D({0.5, 0.5, 0.5})); - // Line segment goes from (0,0,0) to (1,1,1) - PointType A(0.); - PointType B(1.); - SegmentType s(A, B); + EXPECT_TRUE(axom::primal::intersect(p3, s, t3)); + EXPECT_EQ(s.at(t3), Point3D({1.0, 1.0, 1.0})); - // Line segment parallel to plane (non-intersect) - PointType A_p {-1, -1, 0}; - PointType B_p {1, -1, 0}; - SegmentType s_p(A_p, B_p); + EXPECT_FALSE(axom::primal::intersect(p1, s_p, t1)); + } - // intersect A - VectorType normal1 {0.0, 1.0, 0.0}; - double offset1 = 0.0; - PlaneType p1(normal1, offset1); + // 2D Tests + { + // Line segment goes from (0,0) to (1,1) + Point2D A(0.); + Point2D B(1.); + Segment2D s(A, B); + + // Line segment parallel to plane (non-intersect) + Point2D A_p {-1, -1}; + Point2D B_p {1, -1}; + Segment2D s_p(A_p, B_p); + + // intersect A + Vector2D normal1 {0.0, 1.0}; + double offset1 = 0.0; + Plane2D p1(normal1, offset1); - // intersect midpoint - VectorType normal2 {0.0, 1.0, 0.0}; - double offset2 = 0.5; - PlaneType p2(normal2, offset2); + // intersect midpoint + Vector2D normal2 {0.0, 1.0}; + double offset2 = 0.5; + Plane2D p2(normal2, offset2); - // intersect B - VectorType normal3 {0.0, 1.0, 0.0}; - double offset3 = 1.0; - PlaneType p3(normal3, offset3); + // intersect B + Vector2D normal3 {0.0, 1.0}; + double offset3 = 1.0; + Plane2D p3(normal3, offset3); - EXPECT_TRUE(axom::primal::intersect(p1, s, t1)); - EXPECT_EQ(s.at(t1), PointType({0.0, 0.0, 0.0})); + EXPECT_TRUE(axom::primal::intersect(p1, s, t1)); + EXPECT_EQ(s.at(t1), Point2D({0.0, 0.0})); - EXPECT_TRUE(axom::primal::intersect(p2, s, t2)); - EXPECT_EQ(s.at(t2), PointType({0.5, 0.5, 0.5})); + EXPECT_TRUE(axom::primal::intersect(p2, s, t2)); + EXPECT_EQ(s.at(t2), Point2D({0.5, 0.5})); - EXPECT_TRUE(axom::primal::intersect(p3, s, t3)); - EXPECT_EQ(s.at(t3), PointType({1.0, 1.0, 1.0})); + EXPECT_TRUE(axom::primal::intersect(p3, s, t3)); + EXPECT_EQ(s.at(t3), Point2D({1.0, 1.0})); - EXPECT_FALSE(axom::primal::intersect(p1, s_p, t1)); + EXPECT_FALSE(axom::primal::intersect(p1, s_p, t1)); + } } + +//------------------------------------------------------------------------------ +TEST(primal_intersect, plane_tet_test_intersection) +{ + const int DIM = 3; + using PointType = primal::Point; + using PlaneType = primal::Plane; + using TetType = primal::Tetrahedron; + using VectorType = primal::Vector; + using PolygonType = primal::Polygon; + + PointType A {0., 0., 1.}; + PointType B {1., 0., 0.}; + PointType C {0., 0., 0.}; + PointType D {0., 1., 0.}; + + PointType origin {0., 0., 0.}; + + PointType ABmid(PointType::lerp(A, B, 0.5)); + PointType ACmid(PointType::lerp(A, C, 0.5)); + PointType ADmid(PointType::lerp(A, D, 0.5)); + PointType BCmid(PointType::lerp(B, C, 0.5)); + PointType BDmid(PointType::lerp(B, D, 0.5)); + PointType CDmid(PointType::lerp(C, D, 0.5)); + + TetType T {A, B, C, D}; + + PolygonType poly; + + // --------------------------------------------------------------------------- + // Not even close + EXPECT_FALSE(axom::primal::intersect( + PlaneType(VectorType {0., 0., 1.}, PointType {0., 0., -10.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 0); + + // --------------------------------------------------------------------------- + // Tests along X axis + + // Plane hits only at point B. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {1., 0., 0.}, B), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], B); + EXPECT_EQ(poly[1], B); + EXPECT_EQ(poly[2], B); + + // Plane hits only at point B. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., 0., 0.}, B), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], B); + EXPECT_EQ(poly[1], B); + EXPECT_EQ(poly[2], B); + + // Plane misses near point B. + EXPECT_FALSE(axom::primal::intersect( + PlaneType(VectorType {1., 0., 0.}, PointType {1.5, 0., 0.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 0); + + // Plane slices at x=0.5 + EXPECT_TRUE(axom::primal::intersect( + PlaneType(VectorType {1., 0., 0.}, PointType {0.5, 0., 0.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], PointType::lerp(A, B, 0.5)); + EXPECT_EQ(poly[1], PointType::lerp(B, C, 0.5)); + EXPECT_EQ(poly[2], PointType::lerp(B, D, 0.5)); + + // Plane slices at x=0.5 + EXPECT_TRUE(axom::primal::intersect( + PlaneType(VectorType {-1., 0., 0.}, PointType {0.5, 0., 0.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], PointType::lerp(B, C, 0.5)); + EXPECT_EQ(poly[1], PointType::lerp(A, B, 0.5)); + EXPECT_EQ(poly[2], PointType::lerp(B, D, 0.5)); + + // Slice at x=0 + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {1., 0., 0.}, origin), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], A); + EXPECT_EQ(poly[1], C); + EXPECT_EQ(poly[2], D); + + // Slice at x=0 + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., 0., 0.}, origin), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], C); + EXPECT_EQ(poly[1], A); + EXPECT_EQ(poly[2], D); + + // --------------------------------------------------------------------------- + // Tests along Y axis + + // Plane hits only at point D. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 1., 0.}, D), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], D); + EXPECT_EQ(poly[1], D); + EXPECT_EQ(poly[2], D); + + // Plane hits only at point D. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., -1., 0.}, D), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], D); + EXPECT_EQ(poly[1], D); + EXPECT_EQ(poly[2], D); + + // Plane misses near point D. + EXPECT_FALSE(axom::primal::intersect( + PlaneType(VectorType {0., 1., 0.}, PointType {0., 1.5, 0.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 0); + + // Plane slices at y=0.5 + EXPECT_TRUE(axom::primal::intersect( + PlaneType(VectorType {0., 1., 0.}, PointType {0., 0.5, 0.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], PointType::lerp(A, D, 0.5)); + EXPECT_EQ(poly[1], PointType::lerp(B, D, 0.5)); + EXPECT_EQ(poly[2], PointType::lerp(C, D, 0.5)); + + // Plane slices at y=0.5 + EXPECT_TRUE(axom::primal::intersect( + PlaneType(VectorType {0., -1., 0.}, PointType {0., 0.5, 0.}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], PointType::lerp(C, D, 0.5)); + EXPECT_EQ(poly[1], PointType::lerp(B, D, 0.5)); + EXPECT_EQ(poly[2], PointType::lerp(A, D, 0.5)); + + // Slice at y=0 + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 1., 0.}, origin), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], A); + EXPECT_EQ(poly[1], B); + EXPECT_EQ(poly[2], C); + + // Slice at y=0 + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., -1., 0.}, origin), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], C); + EXPECT_EQ(poly[1], B); + EXPECT_EQ(poly[2], A); + + // --------------------------------------------------------------------------- + // Tests along Z axis + + // Plane hits only at point A. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 0., 1.}, A), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], A); + EXPECT_EQ(poly[1], A); + EXPECT_EQ(poly[2], A); + + // Plane hits only at point A. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 0., -1.}, A), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], A); + EXPECT_EQ(poly[1], A); + EXPECT_EQ(poly[2], A); + + // Plane misses near point A. + EXPECT_FALSE(axom::primal::intersect( + PlaneType(VectorType {0., 0., -1.}, PointType {0., 0., 1.5}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 0); + + // Plane slices at z=0.5 + EXPECT_TRUE(axom::primal::intersect( + PlaneType(VectorType {0., 0., 1.}, PointType {0., 0., 0.5}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], PointType::lerp(A, C, 0.5)); + EXPECT_EQ(poly[1], PointType::lerp(A, B, 0.5)); + EXPECT_EQ(poly[2], PointType::lerp(A, D, 0.5)); + + // Plane slices at z=0.5 + EXPECT_TRUE(axom::primal::intersect( + PlaneType(VectorType {0., 0., -1.}, PointType {0., 0., 0.5}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], PointType::lerp(A, B, 0.5)); + EXPECT_EQ(poly[1], PointType::lerp(A, C, 0.5)); + EXPECT_EQ(poly[2], PointType::lerp(A, D, 0.5)); + + // Slice at z=0 + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 0., 1.}, origin), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], C); + EXPECT_EQ(poly[1], B); + EXPECT_EQ(poly[2], D); + + // Slice at z=0 + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 0., -1.}, origin), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], B); + EXPECT_EQ(poly[1], C); + EXPECT_EQ(poly[2], D); + + // --------------------------------------------------------------------------- + // Tests along normal (1,1,1) from point C + + // Plane hits only at point C. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {1., 1., 1.}, C), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], C); + EXPECT_EQ(poly[1], C); + EXPECT_EQ(poly[2], C); + + // Plane hits only at point C. + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., -1., -1.}, C), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], C); + EXPECT_EQ(poly[1], C); + EXPECT_EQ(poly[2], C); + + // Plane misses near point C. + EXPECT_FALSE(axom::primal::intersect( + PlaneType(VectorType {1., 1., 1.}, PointType {-0.1, -0.1, -0.1}), + T, + poly)); + EXPECT_EQ(poly.numVertices(), 0); + + // Plane slices at ACmid + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {1., 1., 1.}, ACmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], ACmid); + EXPECT_EQ(poly[1], BCmid); + EXPECT_EQ(poly[2], CDmid); + + // Plane slices at ACmid + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., -1., -1.}, ACmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], BCmid); + EXPECT_EQ(poly[1], ACmid); + EXPECT_EQ(poly[2], CDmid); + + // Slice at face ABD + EXPECT_TRUE(axom::primal::intersect(make_plane(A, B, D), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], A); + EXPECT_EQ(poly[1], B); + EXPECT_EQ(poly[2], D); + + // --------------------------------------------------------------------------- + // Tests along normal (1,0,1) from point ACmid + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {1., 0., 1.}, ACmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 4); + EXPECT_EQ(poly[0], ACmid); + EXPECT_EQ(poly[1], BCmid); + EXPECT_EQ(poly[2], BDmid); + EXPECT_EQ(poly[3], ADmid); + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., 0., -1.}, ACmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 4); + EXPECT_EQ(poly[0], BCmid); + EXPECT_EQ(poly[1], ACmid); + EXPECT_EQ(poly[2], ADmid); + EXPECT_EQ(poly[3], BDmid); + + // --------------------------------------------------------------------------- + // Tests along normal (1,1,0) from point BCmid + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {1., 1., 0.}, BCmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 4); + EXPECT_EQ(poly[0], ABmid); + EXPECT_EQ(poly[1], BCmid); + EXPECT_EQ(poly[2], CDmid); + EXPECT_EQ(poly[3], ADmid); + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., -1., 0.}, BCmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 4); + EXPECT_EQ(poly[0], BCmid); + EXPECT_EQ(poly[1], ABmid); + EXPECT_EQ(poly[2], ADmid); + EXPECT_EQ(poly[3], CDmid); + + // --------------------------------------------------------------------------- + // Tests along normal (0,1,1) from point ACmid + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., 1., 1.}, ACmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 4); + EXPECT_EQ(poly[0], ACmid); + EXPECT_EQ(poly[1], ABmid); + EXPECT_EQ(poly[2], BDmid); + EXPECT_EQ(poly[3], CDmid); + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {0., -1., -1.}, ACmid), T, poly)); + EXPECT_EQ(poly.numVertices(), 4); + EXPECT_EQ(poly[0], ABmid); + EXPECT_EQ(poly[1], ACmid); + EXPECT_EQ(poly[2], CDmid); + EXPECT_EQ(poly[3], BDmid); + + // --------------------------------------------------------------------------- + // Cut in half through CD segment + + EXPECT_TRUE( + axom::primal::intersect(PlaneType(VectorType {-1., 0., 1.}, C), T, poly)); + EXPECT_EQ(poly.numVertices(), 3); + EXPECT_EQ(poly[0], C); + EXPECT_EQ(poly[1], ABmid); + EXPECT_EQ(poly[2], D); +} + //------------------------------------------------------------------------------ #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) diff --git a/src/axom/primal/tests/primal_numeric_array.cpp b/src/axom/primal/tests/primal_numeric_array.cpp index ba27011679..36049d4cce 100644 --- a/src/axom/primal/tests/primal_numeric_array.cpp +++ b/src/axom/primal/tests/primal_numeric_array.cpp @@ -21,6 +21,8 @@ void check_numeric_array_policy() double* coords = axom::allocate(DIM, axom::execution_space::allocatorID()); + double coords_host[DIM]; + axom::for_all( 1, AXOM_LAMBDA(int /*i*/) { @@ -28,7 +30,9 @@ void check_numeric_array_policy() ones.to_array(coords); }); - EXPECT_EQ(NumericArrayType(coords), NumericArrayType(1)); + axom::copy(&coords_host, coords, DIM * sizeof(double)); + + EXPECT_EQ(NumericArrayType(coords_host), NumericArrayType(1)); axom::deallocate(coords); } diff --git a/src/axom/primal/tests/primal_orientedboundingbox.cpp b/src/axom/primal/tests/primal_orientedboundingbox.cpp index 01f57dfe14..a9415f570c 100644 --- a/src/axom/primal/tests/primal_orientedboundingbox.cpp +++ b/src/axom/primal/tests/primal_orientedboundingbox.cpp @@ -121,6 +121,81 @@ TEST(primal_OBBox, obb_ctor_from_data) EXPECT_TRUE(obbox1.getExtents() == e); } +//------------------------------------------------------------------------------ +TEST(primal_OBBox, obb_ctor_from_point_array) +{ + constexpr int DIM = 3; + using CoordType = double; + using QPoint = primal::Point; + using QOBBox = primal::OrientedBoundingBox; + + QPoint pt1; // origin + QPoint pt2({1.0, 0.0, 0.0}); + QPoint pt3({0.0, 1.0, 0.0}); + QPoint pt4({0.0, 0.0, 1.0}); + QPoint pt5({1.0, 1.0, 0.0}); + QPoint pt6({1.0, 0.0, 1.0}); + QPoint pt7({0.0, 1.0, 1.0}); + QPoint pt8({1.0, 1.0, 1.0}); + + /* -1D OBB */ + QPoint* pts_00 = nullptr; + QOBBox obbox00(pts_00, 0); + + EXPECT_FALSE(obbox00.isValid()); + + /* 0D OBB */ + QPoint pts_0d[] = {pt1}; + QOBBox obbox0(pts_0d, 1); + + EXPECT_TRUE(obbox0.isValid()); + EXPECT_TRUE(obbox0.contains(pt1)); + + EXPECT_NEAR(obbox0.getCentroid()[0], 0.0, 1e-6); + EXPECT_NEAR(obbox0.getCentroid()[1], 0.0, 1e-6); + EXPECT_NEAR(obbox0.getCentroid()[2], 0.0, 1e-6); + + /* 1D OBB */ + QPoint pts_1d[] = {pt1, pt2}; + QOBBox obbox1(pts_1d, 2); + + EXPECT_TRUE(obbox1.isValid()); + EXPECT_TRUE(obbox1.contains(pt1)); + EXPECT_TRUE(obbox1.contains(pt2)); + + EXPECT_NEAR(obbox1.getCentroid()[0], 0.5, 1e-6); + EXPECT_NEAR(obbox1.getCentroid()[1], 0.0, 1e-6); + EXPECT_NEAR(obbox1.getCentroid()[2], 0.0, 1e-6); + + /* 2D OBB */ + QPoint pts_2d[] = {pt1, pt2, pt3, pt5}; + QOBBox obbox2(pts_2d, 4); + + EXPECT_TRUE(obbox2.isValid()); + EXPECT_TRUE(obbox2.contains(pt1)); + EXPECT_TRUE(obbox2.contains(pt2)); + EXPECT_TRUE(obbox2.contains(pt3)); + EXPECT_TRUE(obbox2.contains(pt5)); + + EXPECT_NEAR(obbox2.getCentroid()[0], 0.5, 1e-6); + EXPECT_NEAR(obbox2.getCentroid()[1], 0.5, 1e-6); + EXPECT_NEAR(obbox2.getCentroid()[2], 0.0, 1e-6); + + /* 3D OBB */ + QPoint pts_3d[] = {pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8}; + QOBBox obbox3(pts_3d, 8); + + // check containments + EXPECT_TRUE(obbox3.isValid()); + for(int i = 0; i < 8; i++) + { + EXPECT_TRUE(obbox3.contains(pts_3d[i])); + } + + // check settings + EXPECT_TRUE(obbox3.getCentroid() == QPoint(0.5)); +} + //------------------------------------------------------------------------------ TEST(primal_OBBox, obb_test_clear) { diff --git a/src/axom/primal/tests/primal_plane.cpp b/src/axom/primal/tests/primal_plane.cpp index 3e3487a413..e637f1840c 100644 --- a/src/axom/primal/tests/primal_plane.cpp +++ b/src/axom/primal/tests/primal_plane.cpp @@ -93,29 +93,98 @@ void check_assignment_operator() //------------------------------------------------------------------------------ // UNIT TEST //------------------------------------------------------------------------------ + +TEST(primal_plane, default_constructor) +{ + // test 3D + { + PlaneType3 P; + EXPECT_DOUBLE_EQ(P.getOffset(), 0.0); + EXPECT_DOUBLE_EQ(P.getNormal()[0], 0.0); + EXPECT_DOUBLE_EQ(P.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P.getNormal()[2], 0.0); + EXPECT_EQ(P.getDimension(), 3); + EXPECT_FALSE(P.isValid()); + } + + // test 2D + { + PlaneType2 P; + EXPECT_DOUBLE_EQ(P.getOffset(), 0.0); + EXPECT_DOUBLE_EQ(P.getNormal()[0], 0.0); + EXPECT_DOUBLE_EQ(P.getNormal()[1], 0.0); + EXPECT_EQ(P.getDimension(), 2); + EXPECT_FALSE(P.isValid()); + } +} + TEST(primal_plane, construct_from_normal_and_point) { // test 3D { VectorType3 normal {0.0, 0.0, 10.0}; PointType3 x {0.0, 0.0, 2.0}; + + // Implicitly normalized PlaneType3 P(normal, x); - EXPECT_DOUBLE_EQ(P.getOffset(), 2.0); + ensure_unit_norm(P.getNormal()); EXPECT_DOUBLE_EQ(P.getNormal()[0], 0.0); EXPECT_DOUBLE_EQ(P.getNormal()[1], 0.0); EXPECT_DOUBLE_EQ(P.getNormal()[2], 1.0); + EXPECT_DOUBLE_EQ(P.getOffset(), 2.0); EXPECT_EQ(P.getDimension(), 3); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType3 P2(normal, x, true); + ensure_unit_norm(P.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], 0.0); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P2.getNormal()[2], 1.0); + EXPECT_DOUBLE_EQ(P2.getOffset(), 2.0); + EXPECT_EQ(P2.getDimension(), 3); + EXPECT_TRUE(P2.isValid()); + + // Not normalized + PlaneType3 P3(normal, x, false); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 0.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[2], 10.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), 20.0); + EXPECT_EQ(P3.getDimension(), 3); + EXPECT_TRUE(P3.isValid()); } // test 2D { - VectorType2 normal2 {1.0, 2.0}; - PointType2 x2 {1.0, 2.0}; + VectorType2 normal {1.0, 2.0}; + PointType2 x {1.0, 2.0}; - PlaneType2 P2(normal2, x2); + // Implicitly normalized + PlaneType2 P(normal, x); + ensure_unit_norm(P.getNormal()); + EXPECT_DOUBLE_EQ(P.getNormal()[0], 1.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P.getNormal()[1], 2.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P.getOffset(), std::sqrt(5.0)); + EXPECT_EQ(P.getDimension(), 2); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType2 P2(normal, x, true); ensure_unit_norm(P2.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], 1.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], 2.0 / std::sqrt(5.0)); EXPECT_DOUBLE_EQ(P2.getOffset(), std::sqrt(5.0)); EXPECT_EQ(P2.getDimension(), 2); + EXPECT_TRUE(P2.isValid()); + + // Not normalized + PlaneType2 P3(normal, x, false); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 2.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), 5.0); + EXPECT_EQ(P3.getDimension(), 2); + EXPECT_TRUE(P3.isValid()); } } @@ -126,41 +195,153 @@ TEST(primal_plane, construct_from_normal_and_offset) { VectorType3 normal {0.0, 0.0, 1.0}; double offset = 2.0; + + // Implicitly normalized PlaneType3 P(normal, offset); + ensure_unit_norm(P.getNormal()); EXPECT_DOUBLE_EQ(P.getNormal()[0], 0.0); EXPECT_DOUBLE_EQ(P.getNormal()[1], 0.0); EXPECT_DOUBLE_EQ(P.getNormal()[2], 1.0); EXPECT_DOUBLE_EQ(P.getOffset(), offset); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType3 P2(normal, offset, true); + ensure_unit_norm(P2.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], 0.0); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P2.getNormal()[2], 1.0); + EXPECT_DOUBLE_EQ(P2.getOffset(), offset); + EXPECT_TRUE(P2.isValid()); + + // Not normalized (but already a unit vector) + PlaneType3 P3(normal, offset, false); + ensure_unit_norm(P3.getNormal()); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 0.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[2], 1.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), offset); + EXPECT_TRUE(P3.isValid()); } // test 3D with non-unit vector { VectorType3 normal {1.0, 1.0, 1.0}; double offset = 2.0; + + // Implicitly normalized PlaneType3 P(normal, offset); + ensure_unit_norm(P.getNormal()); EXPECT_DOUBLE_EQ(P.getNormal()[0], std::sqrt(3) / 3); EXPECT_DOUBLE_EQ(P.getNormal()[1], std::sqrt(3) / 3); EXPECT_DOUBLE_EQ(P.getNormal()[2], std::sqrt(3) / 3); EXPECT_DOUBLE_EQ(P.getOffset(), offset); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType3 P2(normal, offset, true); + ensure_unit_norm(P2.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], std::sqrt(3) / 3); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], std::sqrt(3) / 3); + EXPECT_DOUBLE_EQ(P2.getNormal()[2], std::sqrt(3) / 3); + EXPECT_DOUBLE_EQ(P2.getOffset(), offset); + EXPECT_TRUE(P2.isValid()); + + // Not normalized + PlaneType3 P3(normal, offset, false); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 1.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[2], 1.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), offset); + EXPECT_TRUE(P3.isValid()); } - // test 2D + // test 2D with unit vector { - VectorType2 normal2 {1.0, 2.0}; + VectorType2 normal {1.0, 0.0}; double offset = std::sqrt(5.0); - PlaneType2 P2(normal2, offset); + + // Implicitly normalized + PlaneType2 P(normal, offset); + ensure_unit_norm(P.getNormal()); + EXPECT_DOUBLE_EQ(P.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P.getOffset(), offset); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType2 P2(normal, offset, true); ensure_unit_norm(P2.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], 0.0); EXPECT_DOUBLE_EQ(P2.getOffset(), offset); + EXPECT_TRUE(P2.isValid()); + + // Not normalized (but already a unit vector) + PlaneType2 P3(normal, offset, false); + ensure_unit_norm(P3.getNormal()); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 0.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), offset); + EXPECT_TRUE(P3.isValid()); } // test 2D with non-unit vector + { + VectorType2 normal {1.0, 2.0}; + double offset = std::sqrt(5.0); + + // Implicitly normalized + PlaneType2 P(normal, offset); + ensure_unit_norm(P.getNormal()); + EXPECT_DOUBLE_EQ(P.getNormal()[0], 1.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P.getNormal()[1], 2.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P.getOffset(), offset); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType2 P2(normal, offset, true); + ensure_unit_norm(P2.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], 1.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], 2.0 / std::sqrt(5.0)); + EXPECT_DOUBLE_EQ(P2.getOffset(), offset); + EXPECT_TRUE(P2.isValid()); + + // Not normalized + PlaneType2 P3(normal, offset, false); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 2.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), offset); + EXPECT_TRUE(P3.isValid()); + } + + // test 2D with another non-unit vector { VectorType2 normal {1.0, 1.0}; double offset = 2.0; + + // Implicitly normalized PlaneType2 P(normal, offset); + ensure_unit_norm(P.getNormal()); EXPECT_DOUBLE_EQ(P.getNormal()[0], std::sqrt(2) / 2); EXPECT_DOUBLE_EQ(P.getNormal()[1], std::sqrt(2) / 2); EXPECT_DOUBLE_EQ(P.getOffset(), offset); + EXPECT_TRUE(P.isValid()); + + // Explicitly normalized + PlaneType2 P2(normal, offset, true); + ensure_unit_norm(P2.getNormal()); + EXPECT_DOUBLE_EQ(P2.getNormal()[0], std::sqrt(2) / 2); + EXPECT_DOUBLE_EQ(P2.getNormal()[1], std::sqrt(2) / 2); + EXPECT_DOUBLE_EQ(P2.getOffset(), offset); + EXPECT_TRUE(P2.isValid()); + + // Not normalized + PlaneType2 P3(normal, offset, false); + EXPECT_DOUBLE_EQ(P3.getNormal()[0], 1.0); + EXPECT_DOUBLE_EQ(P3.getNormal()[1], 1.0); + EXPECT_DOUBLE_EQ(P3.getOffset(), offset); + EXPECT_TRUE(P3.isValid()); } } @@ -175,6 +356,7 @@ TEST(primal_plane, construct_from_points) PlaneType3 P = primal::make_plane(x1, x2, x3); ensure_unit_norm(P.getNormal()); EXPECT_DOUBLE_EQ(P.getOffset(), 3.0); + EXPECT_TRUE(P.isValid()); } // test 2D @@ -184,6 +366,7 @@ TEST(primal_plane, construct_from_points) PlaneType2 P2 = primal::make_plane(a, b); ensure_unit_norm(P2.getNormal()); EXPECT_DOUBLE_EQ(P2.getOffset(), -2.0); + EXPECT_TRUE(P2.isValid()); } } @@ -332,6 +515,74 @@ TEST(primal_plane, project_point) } } +//------------------------------------------------------------------------------ +TEST(primal_plane, reflect_point) +{ + // test 3D + { + const PointType3 x1 {1.0, 1.0, 3.0}; + const PointType3 x2 {2.0, 2.0, 3.0}; + const PointType3 x3 {1.0, 3.0, 3.0}; + PointType3 q {0.0, 0.0, 0.0}; + PointType3 qproj; + + PlaneType3 P = primal::make_plane(x1, x2, x3); + + // (a) test reflect point below plane + qproj = P.reflectPoint(q); + EXPECT_EQ(P.getOrientation(qproj), primal::ON_POSITIVE_SIDE); + EXPECT_DOUBLE_EQ(qproj[0], 0.0); + EXPECT_DOUBLE_EQ(qproj[1], 0.0); + EXPECT_DOUBLE_EQ(qproj[2], 6.0); + + // (b) test reflect point above plane + q[2] = 6.0; + qproj = P.reflectPoint(q); + EXPECT_EQ(P.getOrientation(qproj), primal::ON_NEGATIVE_SIDE); + EXPECT_DOUBLE_EQ(qproj[0], 0.0); + EXPECT_DOUBLE_EQ(qproj[1], 0.0); + EXPECT_DOUBLE_EQ(qproj[2], 0.0); + + // (c) test reflect point (already) on plane + q[2] = 3.0; + qproj = P.reflectPoint(q); + EXPECT_EQ(P.getOrientation(qproj), primal::ON_BOUNDARY); + EXPECT_DOUBLE_EQ(qproj[0], q[0]); + EXPECT_DOUBLE_EQ(qproj[1], q[1]); + EXPECT_DOUBLE_EQ(qproj[2], q[2]); + } + + // test 2D + { + const PointType2 x1 {2.0, -1.0}; + const PointType2 x2 {2.0, 2.0}; + PlaneType2 P = primal::make_plane(x1, x2); + PointType2 q {0.0, 0.0}; + PointType2 qproj; + + // (a) test reflect point below plane + q[0] = 4.0; + qproj = P.reflectPoint(q); + EXPECT_EQ(P.getOrientation(qproj), primal::ON_POSITIVE_SIDE); + EXPECT_DOUBLE_EQ(qproj[0], 0.0); + EXPECT_DOUBLE_EQ(qproj[1], 0.0); + + // (b) test reflect point above plane + q[0] = 0.0; + qproj = P.reflectPoint(q); + EXPECT_EQ(P.getOrientation(qproj), primal::ON_NEGATIVE_SIDE); + EXPECT_DOUBLE_EQ(qproj[0], 4.0); + EXPECT_DOUBLE_EQ(qproj[1], 0.0); + + // (c) test reflect point (already) on plane + q[0] = 2.0; + qproj = P.reflectPoint(q); + EXPECT_EQ(P.getOrientation(qproj), primal::ON_BOUNDARY); + EXPECT_DOUBLE_EQ(qproj[0], q[0]); + EXPECT_DOUBLE_EQ(qproj[1], q[1]); + } +} + //------------------------------------------------------------------------------ TEST(primal_plane, flip) { diff --git a/src/axom/primal/tests/primal_point.cpp b/src/axom/primal/tests/primal_point.cpp index debe7368e8..f691177b0c 100644 --- a/src/axom/primal/tests/primal_point.cpp +++ b/src/axom/primal/tests/primal_point.cpp @@ -22,6 +22,8 @@ void check_point_policy() double* coords = axom::allocate(DIM, axom::execution_space::allocatorID()); + double coords_host[DIM]; + axom::for_all( 1, AXOM_LAMBDA(int /*i*/) { @@ -29,7 +31,9 @@ void check_point_policy() ones.to_array(coords); }); - EXPECT_EQ(PointType(coords), PointType::ones()); + axom::copy(&coords_host, coords, DIM * sizeof(double)); + + EXPECT_EQ(PointType(coords_host), PointType::ones()); axom::deallocate(coords); } diff --git a/src/axom/primal/tests/primal_polygon.cpp b/src/axom/primal/tests/primal_polygon.cpp index 8d2384be6f..5ece8d9785 100644 --- a/src/axom/primal/tests/primal_polygon.cpp +++ b/src/axom/primal/tests/primal_polygon.cpp @@ -7,6 +7,8 @@ #include "axom/primal.hpp" #include "axom/slic.hpp" +#include "axom/core/execution/execution_space.hpp" + #include #include "gtest/gtest.h" @@ -718,6 +720,184 @@ TEST(primal_polygon, normal) } } +//------------------------------------------------------------------------------ +TEST(primal_polygon, reverseOrientation) +{ + using Polygon2D = axom::primal::Polygon; + using Point2D = axom::primal::Point; + + // Test an odd number of vertices + { + Polygon2D poly({Point2D {0, 0}, Point2D {1, 0}, Point2D {1, 1}}); + poly.reverseOrientation(); + + EXPECT_NEAR(poly[0][0], 1, EPS); + EXPECT_NEAR(poly[0][1], 1, EPS); + + EXPECT_NEAR(poly[1][0], 1, EPS); + EXPECT_NEAR(poly[1][1], 0, EPS); + + EXPECT_NEAR(poly[2][0], 0, EPS); + EXPECT_NEAR(poly[2][1], 0, EPS); + } + + // Test an even number of vertices + { + Polygon2D poly( + {Point2D {0, 0}, Point2D {1, 0}, Point2D {1, 1}, Point2D {0, 1}}); + poly.reverseOrientation(); + + EXPECT_NEAR(poly[0][0], 0, EPS); + EXPECT_NEAR(poly[0][1], 1, EPS); + + EXPECT_NEAR(poly[1][0], 1, EPS); + EXPECT_NEAR(poly[1][1], 1, EPS); + + EXPECT_NEAR(poly[2][0], 1, EPS); + EXPECT_NEAR(poly[2][1], 0, EPS); + + EXPECT_NEAR(poly[3][0], 0, EPS); + EXPECT_NEAR(poly[3][1], 0, EPS); + } +} + +template +void check_polygon_policy() +{ + const int NUM_VERTS_SQUARE = 4; + + using Polygon3D = + axom::primal::Polygon; + using Point3D = axom::primal::Point; + using Polygon2D = + axom::primal::Polygon; + using Point2D = axom::primal::Point; + using Vector3D = axom::primal::Vector; + + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int kernel_allocator = axom::execution_space::allocatorID(); + + axom::Array poly_3d_device(1, 1, kernel_allocator); + auto poly_3d_view = poly_3d_device.view(); + axom::Array poly_2d_device(1, 1, kernel_allocator); + auto poly_2d_view = poly_2d_device.view(); + + axom::Array vertex_mean_3d_device(1, 1, kernel_allocator); + auto vertex_mean_3d_view = vertex_mean_3d_device.view(); + axom::Array vertex_mean_2d_device(1, 1, kernel_allocator); + auto vertex_mean_2d_view = vertex_mean_2d_device.view(); + + axom::Array area_3d_device(1, 1, kernel_allocator); + auto area_3d_view = area_3d_device.view(); + axom::Array area_2d_device(1, 1, kernel_allocator); + auto area_2d_view = area_2d_device.view(); + + // 3d only + axom::Array normal_3d_device(1, 1, kernel_allocator); + auto normal_3d_view = normal_3d_device.view(); + + axom::for_all( + 1, + AXOM_LAMBDA(int i) { + // Initialize to empty polygons + poly_3d_view[i] = Polygon3D(); + poly_2d_view[i] = Polygon2D(); + poly_3d_view[i].clear(); + poly_2d_view[i].clear(); + + // Initialize to triangles + poly_3d_view[i] = Polygon3D({Point3D({0.0, 0.0, 0.0}), + Point3D({1.0, 0.0, 0.0}), + Point3D({1.0, 1.0, 0.0})}); + poly_2d_view[i] = Polygon2D( + {Point2D({0.0, 0.0}), Point2D({1.0, 0.0}), Point2D({1.0, 1.0})}); + + // Add a vertex to make squares + (poly_3d_view[i]).addVertex(Point3D({0.0, 1.0, 0.0})); + (poly_2d_view[i]).addVertex(Point2D({0.0, 1.0})); + + // Collect info about squares + vertex_mean_3d_view[i] = poly_3d_view[i].vertexMean(); + vertex_mean_2d_view[i] = poly_2d_view[i].vertexMean(); + area_3d_view[i] = poly_3d_view[i].area(); + area_2d_view[i] = poly_2d_view[i].area(); + normal_3d_view[i] = poly_3d_view[i].normal(); + + //Sanity check - functions are callable on device + poly_3d_view[i].numVertices(); + poly_3d_view[i].isValid(); + poly_2d_view[i].numVertices(); + poly_2d_view[i].isValid(); + + poly_2d_view[i].reverseOrientation(); + poly_2d_view[i].reverseOrientation(); + poly_3d_view[i].reverseOrientation(); + poly_3d_view[i].reverseOrientation(); + }); + + // Copy polygons and data back to host + axom::Array poly_3d_host = + axom::Array(poly_3d_device, host_allocator); + axom::Array poly_2d_host = + axom::Array(poly_2d_device, host_allocator); + axom::Array vertex_mean_3d_host = + axom::Array(vertex_mean_3d_device, host_allocator); + axom::Array vertex_mean_2d_host = + axom::Array(vertex_mean_2d_device, host_allocator); + axom::Array area_3d_host = + axom::Array(area_3d_device, host_allocator); + axom::Array area_2d_host = + axom::Array(area_2d_device, host_allocator); + axom::Array normal_3d_host = + axom::Array(normal_3d_device, host_allocator); + + // Verify values + EXPECT_EQ(poly_3d_host[0].numVertices(), NUM_VERTS_SQUARE); + EXPECT_EQ(poly_2d_host[0].numVertices(), NUM_VERTS_SQUARE); + + EXPECT_EQ(vertex_mean_3d_host[0], Point3D({0.5, 0.5, 0})); + EXPECT_EQ(vertex_mean_2d_host[0], Point2D({0.5, 0.5})); + + EXPECT_DOUBLE_EQ(area_3d_host[0], 1.0); + EXPECT_DOUBLE_EQ(area_2d_host[0], 1.0); + + EXPECT_EQ(normal_3d_host[0], Vector3D(Point3D({0.0, 0.0, 2.0}))); + + EXPECT_TRUE(poly_3d_host[0].isValid()); + EXPECT_TRUE(poly_2d_host[0].isValid()); +} + +//------------------------------------------------------------------------------ +TEST(primal_polygon, polygon_check_seq) +{ + check_polygon_policy(); +} + +#if defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) + #ifdef AXOM_USE_OPENMP +TEST(primal_polygon, polygon_check_omp) +{ + check_polygon_policy(); +} + #endif /* AXOM_USE_OPENMP */ + + #ifdef AXOM_USE_CUDA +TEST(primal_polygon, polygon_check_cuda) +{ + check_polygon_policy>(); +} + #endif /* AXOM_USE_CUDA */ + + #ifdef AXOM_USE_HIP +TEST(primal_clip, polygon_check_hip) +{ + check_polygon_policy>(); +} + #endif /* AXOM_USE_HIP */ + +#endif /* AXOM_USE_RAJA && AXOM_USE_UMPIRE */ + //------------------------------------------------------------------------------ int main(int argc, char* argv[]) { diff --git a/src/axom/primal/tests/primal_polyhedron.cpp b/src/axom/primal/tests/primal_polyhedron.cpp index 2aadb91c68..0fe7691198 100644 --- a/src/axom/primal/tests/primal_polyhedron.cpp +++ b/src/axom/primal/tests/primal_polyhedron.cpp @@ -60,6 +60,11 @@ TEST(primal_polyhedron, polyhedron_unit_cube) EXPECT_EQ(1, poly.volume()); + PointType centroid = poly.centroid(); + EXPECT_NEAR(0.5, centroid[0], 1e-12); + EXPECT_NEAR(0.5, centroid[1], 1e-12); + EXPECT_NEAR(0.5, centroid[2], 1e-12); + // Example usage of experimental getFaces() function // (input parameters and/or output may change in the future) @@ -178,6 +183,11 @@ TEST(primal_polyhedron, polyhedron_tetrahedron) EXPECT_NEAR(tet.volume(), poly.volume(), EPS); EXPECT_NEAR(2.6666, poly.volume(), EPS); + PointType centroid = poly.centroid(); + EXPECT_NEAR(0.0, centroid[0], EPS); + EXPECT_NEAR(0.0, centroid[1], EPS); + EXPECT_NEAR(0.0, centroid[2], EPS); + // Test containment using winding numbers const bool includeBoundary = true; const bool useNonzeroRule = true; @@ -230,6 +240,11 @@ TEST(primal_polyhedron, polyhedron_tetrahedron) EXPECT_NEAR(tet.volume(), poly.volume(), EPS); EXPECT_NEAR(0.1666, poly.volume(), EPS); + + PointType centroid = poly.centroid(); + EXPECT_NEAR(0.75, centroid[0], EPS); + EXPECT_NEAR(0.5, centroid[1], EPS); + EXPECT_NEAR(0.25, centroid[2], EPS); } } @@ -237,6 +252,7 @@ TEST(primal_polyhedron, polyhedron_tetrahedron) TEST(primal_polyhedron, polyhedron_octahedron) { using PolyhedronType = primal::Polyhedron; + using PointType = primal::Point; constexpr double EPS = 1e-4; PolyhedronType octA; @@ -257,6 +273,11 @@ TEST(primal_polyhedron, polyhedron_octahedron) EXPECT_NEAR(1.3333, octA.volume(), EPS); EXPECT_NEAR(1.3333, octA.signedVolume(), EPS); + PointType centroidA = octA.centroid(); + EXPECT_NEAR(0.0, centroidA[0], EPS); + EXPECT_NEAR(0.0, centroidA[1], EPS); + EXPECT_NEAR(0.0, centroidA[2], EPS); + PolyhedronType octB; octB.addVertex({1, 0, 0}); octB.addVertex({1, 1, 0}); @@ -274,6 +295,11 @@ TEST(primal_polyhedron, polyhedron_octahedron) EXPECT_NEAR(0.6666, octB.volume(), EPS); EXPECT_NEAR(0.6666, octB.signedVolume(), EPS); + + PointType centroidB = octB.centroid(); + EXPECT_NEAR(0.5, centroidB[0], EPS); + EXPECT_NEAR(0.5, centroidB[1], EPS); + EXPECT_NEAR(0.5, centroidB[2], EPS); } //------------------------------------------------------------------------------ @@ -284,52 +310,60 @@ void check_volume() { const int DIM = 3; using PolyhedronType = primal::Polyhedron; + using PointType = primal::Point; - umpire::ResourceManager& rm = umpire::ResourceManager::getInstance(); - - // Save current/default allocator - const int current_allocator = axom::getDefaultAllocatorID(); - - // Determine new allocator (for CUDA or HIP policy, set to Unified) - umpire::Allocator allocator = - rm.getAllocator(axom::execution_space::allocatorID()); - - // Set new default to device - axom::setDefaultAllocator(allocator.getId()); - - // Initialize polyhedron and volume in unified memory - PolyhedronType* polys = axom::allocate(1); - double* res = axom::allocate(1); - - polys[0] = PolyhedronType(); - polys[0].addVertex({0, 0, 0}); - polys[0].addVertex({1, 0, 0}); - polys[0].addVertex({1, 1, 0}); - polys[0].addVertex({0, 1, 0}); - polys[0].addVertex({0, 0, 1}); - polys[0].addVertex({1, 0, 1}); - polys[0].addVertex({1, 1, 1}); - polys[0].addVertex({0, 1, 1}); - - polys[0].addNeighbors(0, {1, 4, 3}); - polys[0].addNeighbors(1, {5, 0, 2}); - polys[0].addNeighbors(2, {3, 6, 1}); - polys[0].addNeighbors(3, {7, 2, 0}); - polys[0].addNeighbors(4, {5, 7, 0}); - polys[0].addNeighbors(5, {1, 6, 4}); - polys[0].addNeighbors(6, {2, 7, 5}); - polys[0].addNeighbors(7, {4, 6, 3}); + constexpr double EPS = 1e-10; - axom::for_all( - 1, - AXOM_LAMBDA(int i) { res[i] = polys[i].volume(); }); + // Get ids of necessary allocators + const int host_allocator = axom::execution_space::allocatorID(); + const int kernel_allocator = axom::execution_space::allocatorID(); - EXPECT_EQ(res[0], 1); + // Initialize volume + axom::Array volume_device(1, 1, kernel_allocator); + auto volume_view = volume_device.view(); - axom::deallocate(polys); - axom::deallocate(res); + // Initialize centroid + axom::Array centroid_device(1, 1, kernel_allocator); + auto centroid_view = centroid_device.view(); - axom::setDefaultAllocator(current_allocator); + axom::for_all( + 1, + AXOM_LAMBDA(int i) { + PolyhedronType poly; + poly.addVertex({0, 0, 0}); + poly.addVertex({1, 0, 0}); + poly.addVertex({1, 1, 0}); + poly.addVertex({0, 1, 0}); + poly.addVertex({0, 0, 1}); + poly.addVertex({1, 0, 1}); + poly.addVertex({1, 1, 1}); + poly.addVertex({0, 1, 1}); + + poly.addNeighbors(0, {1, 4, 3}); + poly.addNeighbors(1, {5, 0, 2}); + poly.addNeighbors(2, {3, 6, 1}); + poly.addNeighbors(3, {7, 2, 0}); + poly.addNeighbors(4, {5, 7, 0}); + poly.addNeighbors(5, {1, 6, 4}); + poly.addNeighbors(6, {2, 7, 5}); + poly.addNeighbors(7, {4, 6, 3}); + + volume_view[i] = poly.volume(); + + centroid_view[i] = poly.centroid(); + }); + + // Copy volume and centroid back to host + axom::Array volume_host = + axom::Array(volume_device, host_allocator); + axom::Array centroid_host = + axom::Array(centroid_device, host_allocator); + + EXPECT_EQ(volume_host[0], 1); + + EXPECT_NEAR(0.5, centroid_host[0][0], EPS); + EXPECT_NEAR(0.5, centroid_host[0][1], EPS); + EXPECT_NEAR(0.5, centroid_host[0][2], EPS); } TEST(primal_polyhedron, check_volume_sequential) @@ -390,7 +424,7 @@ TEST(primal_polyhedron, polyhedron_decomposition) poly.addNeighbors(poly[7], {4, 6, 3}); // Hex center (hc) - PointType hc = poly.centroid(); + PointType hc = poly.vertexMean(); //Face means (fm) PointType fm1 = PointType::midpoint(PointType::midpoint(poly[0], poly[1]), @@ -696,6 +730,8 @@ TEST(primal_polyhedron, polyhedron_from_primitive) Polyhedron3D poly; + Point3D centroid; + // Valid hexahedron Hexahedron3D hex(Point3D {0, 0, 1}, Point3D {1, 0, 1}, @@ -713,6 +749,12 @@ TEST(primal_polyhedron, polyhedron_from_primitive) EXPECT_NEAR(1.0, poly.signedVolume(), EPS); EXPECT_NEAR(hex.signedVolume(), poly.signedVolume(), EPS); + // Check centroid + centroid = poly.centroid(); + EXPECT_NEAR(0.5, centroid[0], EPS); + EXPECT_NEAR(0.5, centroid[1], EPS); + EXPECT_NEAR(0.5, centroid[2], EPS); + // Negative volume axom::utilities::swap(hex[1], hex[3]); axom::utilities::swap(hex[5], hex[7]); @@ -736,6 +778,12 @@ TEST(primal_polyhedron, polyhedron_from_primitive) poly = Polyhedron3D::from_primitive(oct, false); EXPECT_NEAR(0.6666, poly.volume(), EPS); + // Check centroid + centroid = poly.centroid(); + EXPECT_NEAR(0.5, centroid[0], EPS); + EXPECT_NEAR(0.5, centroid[1], EPS); + EXPECT_NEAR(0.5, centroid[2], EPS); + // Negative volume axom::utilities::swap(oct[1], oct[2]); axom::utilities::swap(oct[4], oct[5]); @@ -756,6 +804,12 @@ TEST(primal_polyhedron, polyhedron_from_primitive) poly = Polyhedron3D::from_primitive(tet, false); EXPECT_NEAR(2.6666, poly.volume(), EPS); + // Check centroid + centroid = poly.centroid(); + EXPECT_NEAR(0.0, centroid[0], EPS); + EXPECT_NEAR(0.0, centroid[1], EPS); + EXPECT_NEAR(0.0, centroid[2], EPS); + // Check signed volume EXPECT_NEAR(2.6666, poly.signedVolume(), EPS); EXPECT_NEAR(tet.signedVolume(), poly.signedVolume(), EPS); @@ -772,6 +826,191 @@ TEST(primal_polyhedron, polyhedron_from_primitive) EXPECT_NEAR(2.6666, poly.signedVolume(), EPS); } +//------------------------------------------------------------------------------ +TEST(primal_polyhedron, polyhedron_moments) +{ + using PointType = primal::Point; + using VectorType = primal::Vector; + using TetrahedronType = primal::Tetrahedron; + using PolyhedronType = primal::Polyhedron; + using TransformMatrix = axom::numerics::Matrix; + + double EPS = 1e-10; + + // Rolling volume and centroid + double volume; + PointType centroid; + + TetrahedronType tet {PointType {1, 0, 0}, + PointType {1, 1, 0}, + PointType {0, 1, 0}, + PointType {1, 0, 1}}; + + EXPECT_TRUE(tet.signedVolume() > 0.); + + PolyhedronType poly; + poly.addVertex(tet[0]); + poly.addVertex(tet[1]); + poly.addVertex(tet[2]); + poly.addVertex(tet[3]); + + poly.addNeighbors(0, {1, 3, 2}); + poly.addNeighbors(1, {0, 2, 3}); + poly.addNeighbors(2, {0, 3, 1}); + poly.addNeighbors(3, {0, 1, 2}); + + poly.moments(volume, centroid); + + // Volume and centroid without affine transformations applied + double original_volume = volume; + PointType original_centroid = centroid; + + EXPECT_NEAR(tet.volume(), volume, EPS); + EXPECT_NEAR(1.0 / 6.0, volume, EPS); + + EXPECT_NEAR(0.75, centroid[0], EPS); + EXPECT_NEAR(0.5, centroid[1], EPS); + EXPECT_NEAR(0.25, centroid[2], EPS); + + // lambda to generate an affine transformation matrix for 3D points + auto generateTransformMatrix3D = [&EPS](const PointType& scale, + const PointType& translate, + const VectorType& axis, + double angle) { + // create scaling matrix + auto sc_matx = TransformMatrix::identity(4); + { + sc_matx(0, 0) = scale[0]; + sc_matx(1, 1) = scale[1]; + sc_matx(2, 2) = scale[2]; + } + + // create rotation matrix + auto rot_matx = TransformMatrix::zeros(4, 4); + { + const double sinT = std::sin(angle); + const double cosT = std::cos(angle); + + const auto unitAxis = axis.unitVector(); + const double& ux = unitAxis[0]; + const double& uy = unitAxis[1]; + const double& uz = unitAxis[2]; + + rot_matx(0, 0) = cosT + ux * ux * (1 - cosT); + rot_matx(0, 1) = ux * uy * (1 - cosT) - uz * sinT; + rot_matx(0, 2) = ux * uz * (1 - cosT) + uy * sinT; + rot_matx(1, 0) = uy * ux * (1 - cosT) + uz * sinT; + rot_matx(1, 1) = cosT + uy * uy * (1 - cosT); + rot_matx(1, 2) = uy * uz * (1 - cosT) - ux * sinT; + rot_matx(2, 0) = uz * ux * (1 - cosT) - uy * sinT; + rot_matx(2, 1) = uz * uy * (1 - cosT) + ux * sinT; + rot_matx(2, 2) = cosT + uz * uz * (1 - cosT); + rot_matx(3, 3) = 1; + } + + // create translation matrix + auto tr_matx = TransformMatrix::identity(4); + { + tr_matx(0, 3) = translate[0]; + tr_matx(1, 3) = translate[1]; + tr_matx(2, 3) = translate[2]; + } + + // multiply them to get the final transform + TransformMatrix affine_matx1(4, 4); + matrix_multiply(rot_matx, sc_matx, affine_matx1); + TransformMatrix affine_matx2(4, 4); + matrix_multiply(tr_matx, affine_matx1, affine_matx2); + + EXPECT_NEAR(scale[0] * scale[1] * scale[2], determinant(affine_matx2), EPS); + return affine_matx2; + }; + + // Omit scaling by zero, as it results in an invalid transformed polyhedron + const auto scales = axom::Array({-3., -1., -.5, 0.01, 1., 42.3}); + const auto translations = axom::Array({-.5, 0., 1., 42.3}); + const auto angles = axom::Array({-.57, 0., 2. / 3. * M_PI}); + const auto axes = axom::Array({ + VectorType {0., 0., 1.}, + VectorType {0., 1., 0.}, + VectorType {1., 0., 0.}, + VectorType {1., 0., 1.}, + VectorType {1., 1., 1.}, + VectorType {-2., -5., 0.}, + }); + + // lambda to transform a point + auto transformPoint = [](const PointType& p, const TransformMatrix& matx) { + const double vec_in[4] = {p[0], p[1], p[2], 1.}; + double vec_out[4] = {0., 0., 0., 0.}; + axom::numerics::matrix_vector_multiply(matx, vec_in, vec_out); + return PointType {vec_out[0], vec_out[1], vec_out[2]}; + }; + + // lambda to transform the polyhedron + auto transformedPolyhedron = [&transformPoint](const PolyhedronType& poly, + const TransformMatrix& matx) { + PolyhedronType xformed; + for(int i = 0; i < poly.numVertices(); ++i) + { + xformed.addVertex(transformPoint(poly[i], matx)); + } + + xformed.addNeighbors(0, {1, 3, 2}); + xformed.addNeighbors(1, {0, 2, 3}); + xformed.addNeighbors(2, {0, 3, 1}); + xformed.addNeighbors(3, {0, 1, 2}); + return xformed; + }; + + // check moments of polyhedron after affine transforms + for(double sc_x : scales) + { + for(double sc_y : scales) + { + for(double sc_z : scales) + { + for(double tr_x : translations) + { + for(double tr_y : translations) + { + for(double tr_z : translations) + { + for(const auto& axis : axes) + { + for(double theta : angles) + { + const auto sc = PointType {sc_x, sc_y, sc_z}; + const auto tr = PointType {tr_x, tr_y, tr_z}; + auto affine_matx = + generateTransformMatrix3D(sc, tr, axis, theta); + auto xformed_polyhedron = + transformedPolyhedron(poly, affine_matx); + + // Get moments of transformed polyhedron + centroid = PointType(); + xformed_polyhedron.moments(volume, centroid); + + // Compare transformed volume against scaled original volume + EXPECT_NEAR(original_volume * sc_x * sc_y * sc_z, volume, EPS); + + // Compare centroid of transformed polyhedron against + // transformed original centroid point + PointType xformed_original_centroid = + transformPoint(original_centroid, affine_matx); + EXPECT_NEAR(xformed_original_centroid[0], centroid[0], EPS); + EXPECT_NEAR(xformed_original_centroid[1], centroid[1], EPS); + EXPECT_NEAR(xformed_original_centroid[2], centroid[2], EPS); + } + } + } + } + } + } + } + } +} + //------------------------------------------------------------------------------ int main(int argc, char* argv[]) diff --git a/src/axom/primal/tests/primal_squared_distance.cpp b/src/axom/primal/tests/primal_squared_distance.cpp index d780694a49..c9a3b77b88 100644 --- a/src/axom/primal/tests/primal_squared_distance.cpp +++ b/src/axom/primal/tests/primal_squared_distance.cpp @@ -6,6 +6,7 @@ #include "gtest/gtest.h" #include "axom/config.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/primal.hpp" @@ -201,7 +202,7 @@ TEST(primal_squared_distance, point_to_bbox) EXPECT_NEAR(sqsum, primal::squared_distance(pt, cube), EPS); } - EXPECT_EQ(std::numeric_limits::max(), + EXPECT_EQ(axom::numeric_limits::max(), squared_distance(pt, empty)); } } @@ -233,9 +234,9 @@ TEST(primal_squared_distance, bbox_to_bbox) // check that squared distances for empty/invalid boxes is max double const QBBox empty; - EXPECT_EQ(std::numeric_limits::max(), squared_distance(middle, empty)); - EXPECT_EQ(std::numeric_limits::max(), squared_distance(empty, middle)); - EXPECT_EQ(std::numeric_limits::max(), squared_distance(empty, empty)); + EXPECT_EQ(axom::numeric_limits::max(), squared_distance(middle, empty)); + EXPECT_EQ(axom::numeric_limits::max(), squared_distance(empty, middle)); + EXPECT_EQ(axom::numeric_limits::max(), squared_distance(empty, empty)); } //---------------------------------------------------------------------- diff --git a/src/axom/primal/tests/primal_vector.cpp b/src/axom/primal/tests/primal_vector.cpp index 730ae168d3..f61882eed0 100644 --- a/src/axom/primal/tests/primal_vector.cpp +++ b/src/axom/primal/tests/primal_vector.cpp @@ -27,6 +27,8 @@ void check_vector_policy() axom::allocate(1, axom::execution_space::allocatorID()); + VectorType vec_host; + axom::for_all( 1, AXOM_LAMBDA(int /*i*/) { @@ -34,7 +36,9 @@ void check_vector_policy() vec[0].negate(); }); - EXPECT_EQ(vec[0], VectorType(1)); + axom::copy(&vec_host, vec, sizeof(VectorType)); + + EXPECT_EQ(vec_host, VectorType(1)); axom::deallocate(vec); } diff --git a/src/axom/primal/tests/primal_winding_number.cpp b/src/axom/primal/tests/primal_winding_number.cpp index 488b85a15f..f554d3b57a 100644 --- a/src/axom/primal/tests/primal_winding_number.cpp +++ b/src/axom/primal/tests/primal_winding_number.cpp @@ -21,8 +21,7 @@ namespace primal = axom::primal; TEST(primal_winding_number, simple_cases) { - // Test points that are straightforwardly "inside" or "outside" - // the closed shape + // Test points that are straightforwardly "inside" or "outside" the closed shape using Point2D = primal::Point; using Triangle = primal::Triangle; using Bezier = primal::BezierCurve; @@ -167,6 +166,35 @@ TEST(primal_winding_number, closure_edge_cases) 0.0, abs_tol); + // Tests a potential issue where the query point is treated as being + // on the closure, but not on the edge of the approximating polygon. + for(int i = 2; i < 15; ++i) + { + // In all cases, the winding number should be *near* 0.5. + // If the tolerances don't match, we would get an "off-by-0.5" error + + double diff = std::pow(10, -i); + EXPECT_NEAR(winding_number(Point2D({0, diff}), quartic, 0.5 * diff, EPS), + 0.5, + 0.1); + EXPECT_NEAR(winding_number(Point2D({0, diff}), quartic, 1.0 * diff, EPS), + 0.5, + 0.1); + EXPECT_NEAR(winding_number(Point2D({0, diff}), quartic, 2.0 * diff, EPS), + 0.5, + 0.1); + + EXPECT_NEAR(winding_number(Point2D({0, -diff}), quartic, 0.5 * diff, EPS), + 0.5, + 0.1); + EXPECT_NEAR(winding_number(Point2D({0, -diff}), quartic, 1.0 * diff, EPS), + 0.5, + 0.1); + EXPECT_NEAR(winding_number(Point2D({0, -diff}), quartic, 2.0 * diff, EPS), + 0.5, + 0.1); + } + // Flip the curve vertically quartic[2] = Point2D({0.0, -1.0}); EXPECT_NEAR(winding_number(Point2D({0, 0}), quartic, edge_tol, EPS), diff --git a/src/axom/primal/tests/primal_zip.cpp b/src/axom/primal/tests/primal_zip.cpp index 18ef0eeb2a..c665add9dd 100644 --- a/src/axom/primal/tests/primal_zip.cpp +++ b/src/axom/primal/tests/primal_zip.cpp @@ -45,6 +45,7 @@ void check_zip_points_3d() double* z = axom::allocate(N); bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -64,9 +65,11 @@ void check_zip_points_3d() valid[idx] = (it[idx] == PrimitiveType {x[idx], y[idx], z[idx]}); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(x); @@ -92,6 +95,7 @@ void check_zip_points_2d_from_3d() double* z = nullptr; bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -110,9 +114,11 @@ void check_zip_points_2d_from_3d() valid[idx] = (it[idx] == PointType {x[idx], y[idx]}); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(x); @@ -137,6 +143,7 @@ void check_zip_vectors_2d_from_3d() double* z = nullptr; bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -155,9 +162,11 @@ void check_zip_vectors_2d_from_3d() valid[idx] = (it[idx] == PointType {x[idx], y[idx]}); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(x); @@ -187,6 +196,7 @@ void check_zip_bbs_3d() double* zmax = axom::allocate(N); bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -213,9 +223,11 @@ void check_zip_bbs_3d() valid[idx] = (it[idx] == actual); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(xmin); @@ -251,6 +263,7 @@ void check_zip_bbs_2d_from_3d() double* zmax = nullptr; bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -275,9 +288,11 @@ void check_zip_bbs_2d_from_3d() valid[idx] = (it[idx] == actual); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(xmin); @@ -312,6 +327,7 @@ void check_zip_rays_3d() double* zd = axom::allocate(N); bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -349,9 +365,11 @@ void check_zip_rays_3d() (it[idx].direction() == actual.direction()); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(xo); @@ -388,6 +406,7 @@ void check_zip_rays_2d_from_3d() double* zd = nullptr; bool* valid = axom::allocate(N); + bool valid_host[N]; axom::for_all( 0, @@ -425,9 +444,11 @@ void check_zip_rays_2d_from_3d() (it[idx].direction() == actual.direction()); }); + axom::copy(&valid_host, valid, N * sizeof(bool)); + for(int i = 0; i < N; i++) { - EXPECT_TRUE(valid[i]); + EXPECT_TRUE(valid_host[i]); } axom::deallocate(xo); diff --git a/src/axom/quest/CMakeLists.txt b/src/axom/quest/CMakeLists.txt index 7daceb2ea3..079b8cbdd9 100644 --- a/src/axom/quest/CMakeLists.txt +++ b/src/axom/quest/CMakeLists.txt @@ -59,7 +59,6 @@ set( quest_headers util/mesh_helpers.hpp MeshViewUtil.hpp - ArrayIndexer.hpp ) set( quest_sources @@ -206,5 +205,3 @@ endif() if (AXOM_ENABLE_TESTS) add_subdirectory(tests) endif() - -axom_add_code_checks(PREFIX quest) diff --git a/src/axom/quest/DistributedClosestPoint.cpp b/src/axom/quest/DistributedClosestPoint.cpp index 64d53db346..ea5f2a874a 100644 --- a/src/axom/quest/DistributedClosestPoint.cpp +++ b/src/axom/quest/DistributedClosestPoint.cpp @@ -4,10 +4,10 @@ // SPDX-License-Identifier: (BSD-3-Clause) #include "axom/config.hpp" -#include "axom/slic.hpp" #include "axom/core/memory_management.hpp" #include "axom/core/execution/execution_space.hpp" #include "axom/core/execution/runtime_policy.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/quest/DistributedClosestPoint.hpp" #include "axom/quest/detail/DistributedClosestPointImpl.hpp" @@ -17,7 +17,6 @@ #include "conduit_blueprint_mpi.hpp" #include "conduit_relay_mpi.hpp" -#include #include #ifndef AXOM_USE_MPI @@ -33,7 +32,7 @@ DistributedClosestPoint::DistributedClosestPoint() : m_mpiComm(MPI_COMM_WORLD) , m_mpiCommIsPrivate(false) , m_allocatorID(axom::INVALID_ALLOCATOR_ID) - , m_sqDistanceThreshold(std::numeric_limits::max()) + , m_sqDistanceThreshold(axom::numeric_limits::max()) { setDefaultAllocatorID(); setMpiCommunicator(MPI_COMM_WORLD); @@ -98,13 +97,9 @@ void DistributedClosestPoint::setAllocatorID(int allocatorID) "Invalid allocator id."); m_allocatorID = allocatorID; - if(m_dcp_2 != nullptr) + if(m_impl) { - m_dcp_2->setAllocatorID(m_allocatorID); - } - if(m_dcp_3 != nullptr) - { - m_dcp_3->setAllocatorID(m_allocatorID); + m_impl->setAllocatorID(m_allocatorID); } } @@ -161,7 +156,10 @@ void DistributedClosestPoint::setOutput(const std::string& field, bool on) void DistributedClosestPoint::setObjectMesh(const conduit::Node& meshNode, const std::string& topologyName) { - SLIC_ASSERT(this->isValidBlueprint(meshNode)); + if(m_impl) + { + SLIC_ERROR("Object mesh already created."); + } const bool isMultidomain = conduit::blueprint::mesh::is_multi_domain(meshNode); @@ -200,99 +198,83 @@ void DistributedClosestPoint::setObjectMesh(const conduit::Node& meshNode, allocateQueryInstance(); - switch(m_dimension) - { - case 2: - m_dcp_2->importObjectPoints(mdMeshNode, topologyName); - break; - case 3: - m_dcp_3->importObjectPoints(mdMeshNode, topologyName); - break; - } + m_impl->importObjectPoints(mdMeshNode, topologyName); return; } bool DistributedClosestPoint::generateBVHTree() { - SLIC_ASSERT_MSG(m_objectMeshCreated, + SLIC_ASSERT_MSG(m_impl, "Must call 'setObjectMesh' before calling generateBVHTree"); - bool success = false; - - // dispatch to implementation class over dimension - switch(m_dimension) - { - case 2: - success = m_dcp_2->generateBVHTree(); - break; - case 3: - success = m_dcp_3->generateBVHTree(); - break; - } - + bool success = m_impl->generateBVHTree(); return success; } void DistributedClosestPoint::computeClosestPoints(conduit::Node& query_node, const std::string& topology) { - SLIC_ASSERT_MSG(m_objectMeshCreated, + SLIC_ASSERT_MSG(m_impl, "Must call 'setObjectMesh' before calling generateBVHTree"); SLIC_ASSERT(this->isValidBlueprint(query_node)); - // dispatch to implementation class over dimension - switch(m_dimension) - { - case 2: - m_dcp_2->setSquaredDistanceThreshold(m_sqDistanceThreshold); - m_dcp_2->setMpiCommunicator(m_mpiComm); - m_dcp_2->setOutputSwitches(m_outputRank, - m_outputIndex, - m_outputDistance, - m_outputCoords, - m_outputDomainIndex); - m_dcp_2->computeClosestPoints(query_node, topology); - break; - case 3: - m_dcp_3->setSquaredDistanceThreshold(m_sqDistanceThreshold); - m_dcp_3->setMpiCommunicator(m_mpiComm); - m_dcp_3->setOutputSwitches(m_outputRank, - m_outputIndex, - m_outputDistance, - m_outputCoords, - m_outputDomainIndex); - m_dcp_3->computeClosestPoints(query_node, topology); - break; - } + m_impl->setSquaredDistanceThreshold(m_sqDistanceThreshold); + m_impl->setMpiCommunicator(m_mpiComm); + m_impl->setOutputSwitches(m_outputRank, + m_outputIndex, + m_outputDistance, + m_outputCoords, + m_outputDomainIndex); + m_impl->computeClosestPoints(query_node, topology); } void DistributedClosestPoint::allocateQueryInstance() { - SLIC_ASSERT_MSG(m_objectMeshCreated == false, "Object mesh already created"); - - switch(m_dimension) + switch(m_runtimePolicy) { - case 2: - m_dcp_2 = - std::make_unique>(m_runtimePolicy, - m_allocatorID, - m_isVerbose); - m_objectMeshCreated = true; + case RuntimePolicy::seq: + m_dimension == 2 ? allocateQueryInstance<2, axom::SEQ_EXEC>() + : allocateQueryInstance<3, axom::SEQ_EXEC>(); + break; + +#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP + case RuntimePolicy::omp: + m_dimension == 2 ? allocateQueryInstance<2, axom::OMP_EXEC>() + : allocateQueryInstance<3, axom::OMP_EXEC>(); break; - case 3: - m_dcp_3 = - std::make_unique>(m_runtimePolicy, - m_allocatorID, - m_isVerbose); - m_objectMeshCreated = true; +#endif + +#ifdef AXOM_RUNTIME_POLICY_USE_CUDA + case RuntimePolicy::cuda: + m_dimension == 2 ? allocateQueryInstance<2, axom::CUDA_EXEC<256>>() + : allocateQueryInstance<3, axom::CUDA_EXEC<256>>(); break; +#endif + +#ifdef AXOM_RUNTIME_POLICY_USE_HIP + case RuntimePolicy::hip: + m_dimension == 2 ? allocateQueryInstance<2, axom::HIP_EXEC<256>>() + : allocateQueryInstance<3, axom::HIP_EXEC<256>>(); + break; +#endif + + default: + SLIC_ERROR(axom::fmt::format( + "DistriburedClosestPoint: axom was not built for runtime policy {}." + " Please select another policy.", + axom::runtime_policy::s_policyToName.at(m_runtimePolicy))); } +} - SLIC_ASSERT_MSG( - m_objectMeshCreated, - "Called allocateQueryInstance, but did not create an instance"); +template +void DistributedClosestPoint::allocateQueryInstance() +{ + m_impl = + std::make_unique>( + m_allocatorID, + m_isVerbose); } bool DistributedClosestPoint::isValidBlueprint(const conduit::Node& mesh_node) const diff --git a/src/axom/quest/DistributedClosestPoint.hpp b/src/axom/quest/DistributedClosestPoint.hpp index 0dda02c891..8b98419f31 100644 --- a/src/axom/quest/DistributedClosestPoint.hpp +++ b/src/axom/quest/DistributedClosestPoint.hpp @@ -8,6 +8,7 @@ #include "axom/config.hpp" #include "axom/core/execution/runtime_policy.hpp" +#include "axom/slic.hpp" #include "conduit_node.hpp" @@ -25,7 +26,6 @@ namespace quest { namespace internal { -template class DistributedClosestPointImpl; } @@ -68,7 +68,12 @@ class DistributedClosestPoint See axom::runtime_policy. */ - void setRuntimePolicy(RuntimePolicy policy) { m_runtimePolicy = policy; } + void setRuntimePolicy(RuntimePolicy policy) + { + SLIC_ASSERT_MSG(!m_impl, + "Runtime policy may not change after setObjectMesh()"); + m_runtimePolicy = policy; + } /*! @brief Sets the allocator ID to the default associated with the execution policy @@ -121,6 +126,13 @@ class DistributedClosestPoint * * \pre \a meshNode must follow the mesh blueprint convention. * \pre Dimension of the mesh must be 2D or 3D + * + * \post The physical dimension and runtime policy are locked in, + * and attempts to change them are disallowed. + * + * \internal This method also allocates the templated query instance, + * which locks in the physical dimension and the runtime policy. + * */ void setObjectMesh(const conduit::Node& meshNode, const std::string& topologyName); @@ -163,7 +175,16 @@ class DistributedClosestPoint const std::string& topology); private: - //!@brief Create the implementation objects, either m_dcp_2 or m_dcp_3. + /*! + @brief Allocate the DistributedClosestPointImpl object, which actually does the work. + + \post The implementation object is for a specific dimension and runtime policy, + so changes to those are disallowed. + */ + void allocateQueryInstance(); + + //!@brief Allocate the DistributedClosestPointImpl for compile-time dimension and execution space. + template void allocateQueryInstance(); /// Check validity of blueprint group @@ -182,17 +203,14 @@ class DistributedClosestPoint bool m_isVerbose {false}; double m_sqDistanceThreshold; - bool m_objectMeshCreated {false}; - bool m_outputRank = true; bool m_outputIndex = true; bool m_outputDistance = true; bool m_outputCoords = true; bool m_outputDomainIndex = true; - // One instance per dimension - std::unique_ptr> m_dcp_2; - std::unique_ptr> m_dcp_3; + //!@brief Instantiated implementation, created by setting object mesh. + std::unique_ptr m_impl; }; } // end namespace quest diff --git a/src/axom/quest/InOutOctree.hpp b/src/axom/quest/InOutOctree.hpp index 4f52f1c9d2..ebd99fdf94 100644 --- a/src/axom/quest/InOutOctree.hpp +++ b/src/axom/quest/InOutOctree.hpp @@ -13,6 +13,7 @@ #define AXOM_QUEST_INOUT_OCTREE__HPP_ #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/slam.hpp" #include "axom/primal.hpp" @@ -28,7 +29,6 @@ #include #include -#include #include #include @@ -436,14 +436,14 @@ namespace inline std::ostream& operator<<(std::ostream& os, const InOutOctree<3>::CellVertIndices& tvInd) { - os << fmt::format("[{}]", fmt::join(tvInd, ",")); + os << axom::fmt::format("[{}]", fmt::join(tvInd, ",")); return os; } inline std::ostream& operator<<(std::ostream& os, const InOutOctree<3>::CellIndexSet& tSet) { - os << fmt::format("[{}]", fmt::join(tSet, ",")); + os << axom::fmt::format("[{}]", fmt::join(tSet, ",")); return os; } @@ -456,78 +456,115 @@ void InOutOctree::generateIndex() using Timer = axom::utilities::Timer; // Loop through mesh vertices - SLIC_INFO( - fmt::format(" Generating InOutOctree over surface mesh with {} vertices " - "and {} elements.", - m_meshWrapper.numMeshVertices(), - m_meshWrapper.numMeshCells())); + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + " Generating InOutOctree over surface mesh with " + "{:L} vertices and {:L} elements.", + m_meshWrapper.numMeshVertices(), + m_meshWrapper.numMeshCells())); Timer timer; + AXOM_ANNOTATE_SCOPE("InOutOctree::generateIndex"); // STEP 1 -- Add mesh vertices to octree - timer.start(); - int numMeshVerts = m_meshWrapper.numMeshVertices(); - for(int idx = 0; idx < numMeshVerts; ++idx) { - insertVertex(idx); + AXOM_ANNOTATE_SCOPE("insert vertices"); + timer.start(); + int numMeshVerts = m_meshWrapper.numMeshVertices(); + for(int idx = 0; idx < numMeshVerts; ++idx) + { + insertVertex(idx); + } + timer.stop(); + m_generationState = INOUTOCTREE_VERTICES_INSERTED; } - timer.stop(); - m_generationState = INOUTOCTREE_VERTICES_INSERTED; - SLIC_INFO( - fmt::format("\t--Inserting vertices took {} seconds.", timer.elapsed())); + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "\t--Inserting vertices took {:.3Lf} seconds.", + timer.elapsed())); // STEP 1(b) -- Update the mesh vertices and cells with after vertex welding from octree - timer.start(); - updateSurfaceMeshVertices(); - timer.stop(); - m_generationState = INOUTOCTREE_MESH_REORDERED; - - SLIC_INFO("\t--Updating mesh took " << timer.elapsed() << " seconds."); + { + AXOM_ANNOTATE_SCOPE("update surface mesh vertices"); + timer.start(); + updateSurfaceMeshVertices(); + timer.stop(); + m_generationState = INOUTOCTREE_MESH_REORDERED; + } + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "\t--Updating mesh took {:.3Lf} seconds.", + timer.elapsed())); SLIC_INFO( - fmt::format(" After inserting vertices, reindexed mesh has {} vertices " - "and {} cells.", - m_meshWrapper.numMeshVertices(), - m_meshWrapper.numMeshCells())); + axom::fmt::format(axom::utilities::locale(), + " After inserting vertices, reindexed mesh has {:L} " + "vertices and {:L} cells.", + m_meshWrapper.numMeshVertices(), + m_meshWrapper.numMeshCells())); #ifdef DUMP_OCTREE_INFO // -- Print some stats about the octree SLIC_INFO("** Octree stats after inserting vertices"); - dumpSurfaceMeshVTK("surfaceMesh"); - dumpOctreeMeshVTK("prOctree"); - printOctreeStats(); + { + AXOM_ANNOTATE_SCOPE("dump stats after inserting vertices"); + dumpSurfaceMeshVTK("surfaceMesh"); + dumpOctreeMeshVTK("prOctree"); + printOctreeStats(); + } #endif - checkValid(); + { + AXOM_ANNOTATE_SCOPE("validate after inserting vertices"); + checkValid(); + } // STEP 2 -- Add mesh cells (segments in 2D; triangles in 3D) to octree - timer.start(); - insertMeshCells(); - timer.stop(); - m_generationState = INOUTOCTREE_ELEMENTS_INSERTED; - SLIC_INFO("\t--Inserting cells took " << timer.elapsed() << " seconds."); + { + AXOM_ANNOTATE_SCOPE("insert mesh cells"); + timer.start(); + insertMeshCells(); + timer.stop(); + m_generationState = INOUTOCTREE_ELEMENTS_INSERTED; + } + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "\t--Inserting cells took {:.3Lf} seconds.", + timer.elapsed())); // STEP 3 -- Color the blocks of the octree // -- Black (in), White(out), Gray(Intersects surface) - timer.start(); - colorOctreeLeaves(); + { + AXOM_ANNOTATE_SCOPE("color octree leaves"); + timer.start(); + colorOctreeLeaves(); - timer.stop(); - m_generationState = INOUTOCTREE_LEAVES_COLORED; - SLIC_INFO("\t--Coloring octree leaves took " << timer.elapsed() << " seconds."); + timer.stop(); + m_generationState = INOUTOCTREE_LEAVES_COLORED; + } + SLIC_INFO( + axom::fmt::format(axom::utilities::locale(), + "\t--Coloring octree leaves took {:.3Lf} seconds.", + timer.elapsed())); // -- Print some stats about the octree #ifdef DUMP_OCTREE_INFO SLIC_INFO("** Octree stats after inserting cells"); - dumpOctreeMeshVTK("pmOctree"); - dumpDifferentColoredNeighborsMeshVTK("differentNeighbors"); - printOctreeStats(); + { + AXOM_ANNOTATE_SCOPE("dump stats after inserting cells"); + dumpOctreeMeshVTK("pmOctree"); + dumpDifferentColoredNeighborsMeshVTK("differentNeighbors"); + printOctreeStats(); + } #endif - checkValid(); - + { + AXOM_ANNOTATE_SCOPE("validate after inserting cells"); + checkValid(); + } // CLEANUP -- Finally, fix up the surface mesh after octree operations - timer.start(); - m_meshWrapper.regenerateSurfaceMesh(); - timer.stop(); - SLIC_INFO("\t--Regenerating the mesh took " << timer.elapsed() << " seconds."); + { + AXOM_ANNOTATE_SCOPE("regenerate surface mesh"); + timer.start(); + m_meshWrapper.regenerateSurfaceMesh(); + timer.stop(); + } + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "\t--Regenerating the mesh took {:.3Lf} seconds.", + timer.elapsed())); SLIC_INFO(" Finished generating the InOutOctree."); } @@ -542,13 +579,14 @@ void InOutOctree::insertVertex(VertexIndex idx, int startingLevel) QUEST_OCTREE_DEBUG_LOG_IF( idx == DEBUG_VERT_IDX, - fmt::format("\t -- inserting pt {} with index {}. " - "Looking at block {} w/ blockBB {} indexing leaf vertex {}", - pt, - idx, - axom::fmt::streamed(block), - this->blockBoundingBox(block), - blkData.dataIndex())); + axom::fmt::format( + "\t -- inserting pt {} with index {}. " + "Looking at block {} w/ blockBB {} indexing leaf vertex {}", + pt, + idx, + axom::fmt::streamed(block), + this->blockBoundingBox(block), + blkData.dataIndex())); if(!blkData.hasData()) { @@ -577,10 +615,10 @@ void InOutOctree::insertVertex(VertexIndex idx, int startingLevel) QUEST_OCTREE_DEBUG_LOG_IF( blkData.dataIndex() == DEBUG_VERT_IDX, - fmt::format("-- vertex {} is indexed in block {}. Leaf vertex is {}", - idx, - axom::fmt::streamed(block), - blkData.dataIndex())); + axom::fmt::format("-- vertex {} is indexed in block {}. Leaf vertex is {}", + idx, + axom::fmt::streamed(block), + blkData.dataIndex())); } template @@ -656,14 +694,14 @@ void InOutOctree::insertMeshCells() QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == blk || DEBUG_BLOCK_2 == blk, - fmt::format("Attempting to insert cells from block {}." - "\n\tDynamic data: {}" - "\n\tBlock data: {}" - "\n\tAbout to finalize? {}", - axom::fmt::streamed(blk), - dynamicLeafData, - blkData, - (!isInternal && !isLeafThatMustRefine ? " yes" : "no"))); + axom::fmt::format("Attempting to insert cells from block {}." + "\n\tDynamic data: {}" + "\n\tBlock data: {}" + "\n\tAbout to finalize? {}", + axom::fmt::streamed(blk), + dynamicLeafData, + blkData, + (!isInternal && !isLeafThatMustRefine ? " yes" : "no"))); // Leaf blocks that don't refine are 'finalized' // -- add them to the current level's relations @@ -685,12 +723,12 @@ void InOutOctree::insertMeshCells() QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == blk || DEBUG_BLOCK_2 == blk, - fmt::format("[Added block {} into tree as a gray leaf]." - "\n\tDynamic data: {}" - "\n\tBlock data: {}", - axom::fmt::streamed(blk), - dynamicLeafData, - blkData)); + axom::fmt::format("[Added block {} into tree as a gray leaf]." + "\n\tDynamic data: {}" + "\n\tBlock data: {}", + axom::fmt::streamed(blk), + dynamicLeafData, + blkData)); } } else @@ -720,7 +758,7 @@ void InOutOctree::insertMeshCells() SLIC_ASSERT_MSG( this->isInternal(blk), - fmt::format( + axom::fmt::format( "Block {} was refined, so it should be marked as internal.", fmt::streamed(blk))); @@ -782,16 +820,16 @@ void InOutOctree::insertMeshCells() QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == childBlk[j] || DEBUG_BLOCK_2 == childBlk[j], //&& tIdx == DEBUG_TRI_IDX - fmt::format("Attempting to insert cell {} @ {} w/ BB {}" - "\n\t into block {} w/ BB {} and data {} " - "\n\tShould add? {}", - tIdx, - spaceTri, - tBB, - axom::fmt::streamed(childBlk[j]), - childBB[j], - *childDataPtr[j], - (shouldAddCell ? " yes" : "no"))); + axom::fmt::format("Attempting to insert cell {} @ {} w/ BB {}" + "\n\t into block {} w/ BB {} and data {} " + "\n\tShould add? {}", + tIdx, + spaceTri, + tBB, + axom::fmt::streamed(childBlk[j]), + childBB[j], + *childDataPtr[j], + (shouldAddCell ? " yes" : "no"))); if(shouldAddCell) { @@ -813,7 +851,7 @@ void InOutOctree::insertMeshCells() QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == childBlk[j] || DEBUG_BLOCK_2 == childBlk[j], //&& tIdx == DEBUG_TRI_IDX - fmt::format( + axom::fmt::format( "Added cell {} @ {} with verts [{}]" "\n\tinto block {} with data {}.", tIdx, @@ -917,20 +955,21 @@ void InOutOctree::colorOctreeLeaves() SLIC_ASSERT_MSG( static_cast(uncoloredBlocks.size()) < prevCount, - fmt::format("Problem coloring leaf blocks at level {}. " - "There are {} blocks that are still not colored. " - "First problem block is: {}", - lev, - uncoloredBlocks.size(), - fmt::streamed(BlockIndex(uncoloredBlocks[0], lev)))); + axom::fmt::format("Problem coloring leaf blocks at level {}. " + "There are {} blocks that are still not colored. " + "First problem block is: {}", + lev, + uncoloredBlocks.size(), + fmt::streamed(BlockIndex(uncoloredBlocks[0], lev)))); } if(!levelLeafMap.empty()) { checkAllLeavesColoredAtLevel(lev); - SLIC_DEBUG(fmt::format("\tColoring level {} took {} seconds.", - lev, - levelTimer.elapsed())); + SLIC_DEBUG(axom::fmt::format(axom::utilities::locale(), + "\tColoring level {} took {:.3Lf} seconds.", + lev, + levelTimer.elapsed())); } } } @@ -941,10 +980,11 @@ bool InOutOctree::colorLeafAndNeighbors(const BlockIndex& leafBlk, { bool isColored = leafData.isColored(); - QUEST_OCTREE_DEBUG_LOG_IF(leafBlk == DEBUG_BLOCK_1 || leafBlk == DEBUG_BLOCK_2, - fmt::format("Trying to color {} with data: {}", - axom::fmt::streamed(leafBlk), - leafData)); + QUEST_OCTREE_DEBUG_LOG_IF( + leafBlk == DEBUG_BLOCK_1 || leafBlk == DEBUG_BLOCK_2, + axom::fmt::format("Trying to color {} with data: {}", + axom::fmt::streamed(leafBlk), + leafData)); if(!isColored) { @@ -959,18 +999,18 @@ bool InOutOctree::colorLeafAndNeighbors(const BlockIndex& leafBlk, QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == neighborBlk || DEBUG_BLOCK_2 == neighborBlk || DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("Spreading color to block {} with data {}, " - "bounding box {} w/ midpoint {}" - "\n\t\t from block {} with data {}, " - "bounding box {} w/ midpoint {}.", - axom::fmt::streamed(leafBlk), - leafData, - this->blockBoundingBox(leafBlk), - this->blockBoundingBox(leafBlk).getCentroid(), - axom::fmt::streamed(neighborBlk), - neighborData, - this->blockBoundingBox(neighborBlk), - this->blockBoundingBox(neighborBlk).getCentroid())); + axom::fmt::format("Spreading color to block {} with data {}, " + "bounding box {} w/ midpoint {}" + "\n\t\t from block {} with data {}, " + "bounding box {} w/ midpoint {}.", + axom::fmt::streamed(leafBlk), + leafData, + this->blockBoundingBox(leafBlk), + this->blockBoundingBox(leafBlk).getCentroid(), + axom::fmt::streamed(neighborBlk), + neighborData, + this->blockBoundingBox(neighborBlk), + this->blockBoundingBox(neighborBlk).getCentroid())); switch(neighborData.color()) { @@ -1004,9 +1044,9 @@ bool InOutOctree::colorLeafAndNeighbors(const BlockIndex& leafBlk, QUEST_OCTREE_DEBUG_LOG_IF( isColored && (DEBUG_BLOCK_1 == neighborBlk || DEBUG_BLOCK_2 == neighborBlk), - fmt::format("Leaf block was colored -- {} now has data {}", - axom::fmt::streamed(leafBlk), - leafData)); + axom::fmt::format("Leaf block was colored -- {} now has data {}", + axom::fmt::streamed(leafBlk), + leafData)); } } } @@ -1025,18 +1065,18 @@ bool InOutOctree::colorLeafAndNeighbors(const BlockIndex& leafBlk, QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == neighborBlk || DEBUG_BLOCK_2 == neighborBlk || DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("Spreading color from block {} with data {}, " - "bounding box {} w/ midpoint {}" - "\n\t\t to block {} with data {}, " - "bounding box {} w/ midpoint {}.", - axom::fmt::streamed(leafBlk), - leafData, - this->blockBoundingBox(leafBlk), - this->blockBoundingBox(leafBlk).getCentroid(), - axom::fmt::streamed(neighborBlk), - neighborData, - this->blockBoundingBox(neighborBlk), - this->blockBoundingBox(neighborBlk).getCentroid())); + axom::fmt::format("Spreading color from block {} with data {}, " + "bounding box {} w/ midpoint {}" + "\n\t\t to block {} with data {}, " + "bounding box {} w/ midpoint {}.", + axom::fmt::streamed(leafBlk), + leafData, + this->blockBoundingBox(leafBlk), + this->blockBoundingBox(leafBlk).getCentroid(), + axom::fmt::streamed(neighborBlk), + neighborData, + this->blockBoundingBox(neighborBlk), + this->blockBoundingBox(neighborBlk).getCentroid())); switch(leafData.color()) { @@ -1070,9 +1110,10 @@ bool InOutOctree::colorLeafAndNeighbors(const BlockIndex& leafBlk, QUEST_OCTREE_DEBUG_LOG_IF( neighborData.isColored() && (DEBUG_BLOCK_1 == neighborBlk || DEBUG_BLOCK_2 == neighborBlk), - fmt::format("Neighbor block was colored -- {} now has data {}", - axom::fmt::streamed(neighborBlk), - neighborData)); + axom::fmt::format( + "Neighbor block was colored -- {} now has data {}", + axom::fmt::streamed(neighborBlk), + neighborData)); } } } @@ -1162,19 +1203,20 @@ typename std::enable_if::type InOutOctree::withinGrayBlock /// intersection. Note: We have to check all triangles to ensure that /// there is not a closer triangle than tri along this direction. CellIndex tIdx = MeshWrapper::NO_CELL; - double minRayParam = std::numeric_limits::infinity(); + double minRayParam = axom::numeric_limits::infinity(); SpaceRay ray(queryPt, SpaceVector(queryPt, triPt)); QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("Checking if pt {} is within block {} with data {}, " - "ray is {}, triangle point is {} on triangle with index {}.", - queryPt, - axom::fmt::streamed(leafBlk), - leafData, - ray, - triPt, - idx)); + axom::fmt::format( + "Checking if pt {} is within block {} with data {}, " + "ray is {}, triangle point is {} on triangle with index {}.", + queryPt, + axom::fmt::streamed(leafBlk), + leafData, + ray, + triPt, + idx)); double rayParam = 0; if(primal::intersect(tri, ray, rayParam)) @@ -1184,11 +1226,11 @@ typename std::enable_if::type InOutOctree::withinGrayBlock QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("... intersection for triangle w/ index {} at ray " - "parameter {} at point {}", - tIdx, - minRayParam, - ray.at(minRayParam))); + axom::fmt::format("... intersection for triangle w/ index {} at ray " + "parameter {} at point {}", + tIdx, + minRayParam, + ray.at(minRayParam))); } for(int j = 0; j < numTris; ++j) @@ -1208,11 +1250,12 @@ typename std::enable_if::type InOutOctree::withinGrayBlock QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("... intersection for triangle w/ index {} at ray " - "parameter {} at point {}", - tIdx, - minRayParam, - ray.at(minRayParam))); + axom::fmt::format( + "... intersection for triangle w/ index {} at ray " + "parameter {} at point {}", + tIdx, + minRayParam, + ray.at(minRayParam))); } } } @@ -1277,20 +1320,21 @@ typename std::enable_if::type InOutOctree::withinGrayBlock // Using a ray from query pt to point on this segment // Find closest intersection to surface within cell inside this bounding box CellIndex tIdx = MeshWrapper::NO_CELL; - double minRayParam = std::numeric_limits::infinity(); - double minSegParam = std::numeric_limits::infinity(); + double minRayParam = axom::numeric_limits::infinity(); + double minSegParam = axom::numeric_limits::infinity(); SpaceRay ray(queryPt, SpaceVector(queryPt, segmentPt)); QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("Checking if pt {} is within block {} with data {}, " - "ray is {}, segment point is {} on segment with index {}.", - queryPt, - axom::fmt::streamed(leafBlk), - leafData, - ray, - segmentPt, - idx)); + axom::fmt::format( + "Checking if pt {} is within block {} with data {}, " + "ray is {}, segment point is {} on segment with index {}.", + queryPt, + axom::fmt::streamed(leafBlk), + leafData, + ray, + segmentPt, + idx)); double rayParam = 0; double segParam = 0; @@ -1302,13 +1346,13 @@ typename std::enable_if::type InOutOctree::withinGrayBlock QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("... intersection for segment w/ index {} " - "at ray parameter {} and segment parameter {} " - "is at point {}", - tIdx, - minRayParam, - minSegParam, - ray.at(minRayParam))); + axom::fmt::format("... intersection for segment w/ index {} " + "at ray parameter {} and segment parameter {} " + "is at point {}", + tIdx, + minRayParam, + minSegParam, + ray.at(minRayParam))); } for(int j = 0; j < numSegments; ++j) @@ -1332,13 +1376,13 @@ typename std::enable_if::type InOutOctree::withinGrayBlock QUEST_OCTREE_DEBUG_LOG_IF( DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("... intersection for segment w/ index {} " - "at ray parameter {} and segment parameter {} " - "is at point {}", - tIdx, - minRayParam, - minSegParam, - ray.at(minRayParam))); + axom::fmt::format("... intersection for segment w/ index {} " + "at ray parameter {} and segment parameter {} " + "is at point {}", + tIdx, + minRayParam, + minSegParam, + ray.at(minRayParam))); } } } @@ -1353,10 +1397,10 @@ typename std::enable_if::type InOutOctree::withinGrayBlock m_meshWrapper.surfaceNormal(tIdx, minSegParam, segmentSet); QUEST_OCTREE_DEBUG_LOG_IF(DEBUG_BLOCK_1 == leafBlk || DEBUG_BLOCK_2 == leafBlk, - fmt::format("... normal {}, ray {}, dot {}", - normal, - ray, - normal.dot(ray.direction()))); + axom::fmt::format("... normal {}, ray {}, dot {}", + normal, + ray, + normal.dot(ray.direction()))); // Query point is inside when the dot product of the normal with ray is positive return normal.dot(ray.direction()) > 0.; @@ -1506,10 +1550,11 @@ bool InOutOctree::within(const SpacePt& pt) const case InOutBlockData::Undetermined: SLIC_ASSERT_MSG( false, - fmt::format("Error -- All leaf blocks must have a color. The color of " - "leafBlock {} was 'Undetermined' when querying point {}", - fmt::streamed(block), - pt)); + axom::fmt::format( + "Error -- All leaf blocks must have a color. The color of " + "leafBlock {} was 'Undetermined' when querying point {}", + fmt::streamed(block), + pt)); break; } } @@ -1567,7 +1612,7 @@ template void InOutOctree::checkValid() const { #ifdef AXOM_DEBUG - SLIC_DEBUG(fmt::format( + SLIC_DEBUG(axom::fmt::format( "Inside InOutOctree::checkValid() to verify state of {} octree", (m_generationState >= INOUTOCTREE_ELEMENTS_INSERTED ? "PM" : "PR"))); diff --git a/src/axom/quest/IntersectionShaper.hpp b/src/axom/quest/IntersectionShaper.hpp index c12802b5ec..406c4a264b 100644 --- a/src/axom/quest/IntersectionShaper.hpp +++ b/src/axom/quest/IntersectionShaper.hpp @@ -163,6 +163,7 @@ class GridFunctionView m_numElements = nElem; m_needResult = _needResult; int execSpaceAllocatorID = axom::execution_space::allocatorID(); + auto dataSize = sizeof(double) * m_numElements; m_deviceData = axom::allocate(dataSize, execSpaceAllocatorID); axom::copy(m_deviceData, m_hostData, dataSize); @@ -255,17 +256,22 @@ AXOM_HOST_DEVICE inline void GridFunctionView::finalize() //--------------------------------------------------------------------------- /** * \class - * \brief Revolves contours and intersects the solid with the input mesh to - * produce volume fractions. + * \brief Intersects a solid, created by revolving a c2c contour or by + * loading a Pro/E mesh, with an input mesh to produce volume fractions. + * + * The IntersectionShaper generates material volume fractions: + * + * - For c2c, an input set of 2D contours and replacement rules. Each contour + * covers an area from the curve down to the axis of revolution about which + * the area is revolved to produce a volume. Contours are refined into smaller + * linear spans that are revolved to produce a set of truncated cones, which + * are divided into a set set of progressively refined octahedra that can be + * intersected with the mesh. The octahedra are intersected with the input + * mesh to produce volume fractions. * - * The IntersectionShaper generates material volume fractions using an input - * set of 2D contours and replacement rules. Each contour covers an area from - * the curve down to the axis of revolution about which the area is revolved - * to produce a volume that is intersected with the input mesh to produce - * volume fractions. Contours are refined into smaller linear spans that are - * revolved to produce a set of truncated cones, which are divided into a set - * set of progressively refined octahedra that can be intersected with the - * mesh. + * - For Pro/E, an input mesh of 3D tetrahedra are loaded in. + * Each tetrahedron has its own respective volume. The tetrahedra are + * intersected with the input mesh to produce volume fractions. * * Volume fractions are represented as a GridFunction with a special prefix, * currently "vol_frac_", followed by a material name. Volume fractions @@ -376,11 +382,14 @@ class IntersectionShaper : public Shaper template void prepareProECells() { + const int host_allocator = + axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + // Number of tets in mesh m_tetcount = m_surfaceMesh->getNumberOfCells(); - m_tets = axom::Array(m_tetcount, m_tetcount); - axom::ArrayView tets_view = m_tets.view(); + axom::Array tets_host(m_tetcount, m_tetcount, host_allocator); // Initialize tetrahedra axom::Array nodeIds(4); @@ -395,29 +404,34 @@ class IntersectionShaper : public Shaper m_surfaceMesh->getNode(nodeIds[2], pts[2].data()); m_surfaceMesh->getNode(nodeIds[3], pts[3].data()); - tets_view[i] = TetrahedronType({pts[0], pts[1], pts[2], pts[3]}); + tets_host[i] = TetrahedronType({pts[0], pts[1], pts[2], pts[3]}); } + // Copy tets to device + m_tets = axom::Array(tets_host, device_allocator); + if(this->isVerbose()) { // Print out the bounding box containing all the tetrahedra BoundingBoxType all_tet_bb; for(int i = 0; i < m_tetcount; i++) { - all_tet_bb.addBox(primal::compute_bounding_box(tets_view[i])); + all_tet_bb.addBox(primal::compute_bounding_box(tets_host[i])); } SLIC_INFO(axom::fmt::format( "DEBUG: Bounding box containing all generated tetrahedra " "has dimensions:\n\t{}", all_tet_bb)); + auto tets_device_view = m_tets.view(); + // Print out the total volume of all the tetrahedra using REDUCE_POL = typename axom::execution_space::reduce_policy; RAJA::ReduceSum total_tet_vol(0.0); axom::for_all( m_tetcount, AXOM_LAMBDA(axom::IndexType i) { - total_tet_vol += tets_view[i].volume(); + total_tet_vol += tets_device_view[i].volume(); }); SLIC_INFO(axom::fmt::format( @@ -429,7 +443,7 @@ class IntersectionShaper : public Shaper axom::for_all( m_tetcount, AXOM_LAMBDA(axom::IndexType i) { - if(tets_view[i].degenerate()) + if(tets_device_view[i].degenerate()) { num_degenerate += 1; } @@ -442,13 +456,16 @@ class IntersectionShaper : public Shaper // Dump tet mesh as a vtk mesh axom::mint::write_vtk(m_surfaceMesh, "proe_tet.vtk"); - } // end of verbose output for contour + } // end of verbose output for Pro/E } // Prepares the C2C mesh cells for the spatial index template void prepareC2CCells() { + const int host_allocator = + axom::execution_space::allocatorID(); + // Number of points in polyline int pointcount = getSurfaceMesh()->getNumberOfNodes(); @@ -461,7 +478,8 @@ class IntersectionShaper : public Shaper SLIC_INFO(axom::fmt::format( "{:-^80}", axom::fmt::format( - " Checking contour with {} points for degenerate segments ", + axom::utilities::locale(), + " Checking contour with {:L} points for degenerate segments", pointcount))); // The mesh points are filtered like we want. We need only copy @@ -473,13 +491,14 @@ class IntersectionShaper : public Shaper int polyline_size = pointcount; // Generate the Octahedra + // (octahedra m_octs will be on device) const bool disc_status = axom::quest::discretize(polyline, polyline_size, m_level, m_octs, m_octcount); - axom::ArrayView octs_view = m_octs.view(); + axom::ArrayView octs_device_view = m_octs.view(); AXOM_UNUSED_VAR(disc_status); // silence warnings in release configs SLIC_ASSERT_MSG( @@ -487,16 +506,21 @@ class IntersectionShaper : public Shaper "Discretization of contour has failed. Check that contour is valid"); SLIC_INFO( - axom::fmt::format("Contour has been discretized into {} octahedra ", + axom::fmt::format(axom::utilities::locale(), + "Contour has been discretized into {:L} octahedra ", m_octcount)); if(this->isVerbose()) { // Print out the bounding box containing all the octahedra BoundingBoxType all_oct_bb; + axom::Array octs_host = + axom::Array(m_octs, host_allocator); + auto octs_host_view = octs_host.view(); + for(int i = 0; i < m_octcount; i++) { - all_oct_bb.addBox(primal::compute_bounding_box(octs_view[i])); + all_oct_bb.addBox(primal::compute_bounding_box(octs_host[i])); } SLIC_INFO(axom::fmt::format( "DEBUG: Bounding box containing all generated octahedra " @@ -512,12 +536,12 @@ class IntersectionShaper : public Shaper // Convert Octahedron into Polyhedrom PolyhedronType octPoly; - octPoly.addVertex(octs_view[i][0]); - octPoly.addVertex(octs_view[i][1]); - octPoly.addVertex(octs_view[i][2]); - octPoly.addVertex(octs_view[i][3]); - octPoly.addVertex(octs_view[i][4]); - octPoly.addVertex(octs_view[i][5]); + octPoly.addVertex(octs_device_view[i][0]); + octPoly.addVertex(octs_device_view[i][1]); + octPoly.addVertex(octs_device_view[i][2]); + octPoly.addVertex(octs_device_view[i][3]); + octPoly.addVertex(octs_device_view[i][4]); + octPoly.addVertex(octs_device_view[i][5]); octPoly.addNeighbors(0, {1, 5, 4, 2}); octPoly.addNeighbors(1, {0, 2, 3, 5}); @@ -539,7 +563,7 @@ class IntersectionShaper : public Shaper m_octcount, AXOM_LAMBDA(axom::IndexType i) { OctahedronType degenerate_oct; - if(octs_view[i].equals(degenerate_oct)) + if(octs_device_view[i].equals(degenerate_oct)) { num_degenerate += 1; } @@ -551,7 +575,7 @@ class IntersectionShaper : public Shaper // Dump discretized octs as a tet mesh axom::mint::Mesh* tetmesh; - axom::quest::mesh_from_discretized_polyline(octs_view, + axom::quest::mesh_from_discretized_polyline(octs_host_view, m_octcount, polyline_size - 1, tetmesh); @@ -572,13 +596,6 @@ class IntersectionShaper : public Shaper "Running intersection-based shaper in execution Space: {}", axom::execution_space::name()))); - // Save current/default allocator - const int current_allocator = axom::getDefaultAllocatorID(); - - // Determine new allocator (for CUDA/HIP policy, set to Unified) - // Set new default to device - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - const auto& shapeName = shape.getName(); AXOM_UNUSED_VAR(shapeDimension); AXOM_UNUSED_VAR(shapeName); @@ -601,8 +618,6 @@ class IntersectionShaper : public Shaper SLIC_ERROR( axom::fmt::format("The shape format {} is unsupported", shapeFormat)); } - - axom::setDefaultAllocator(current_allocator); } #endif @@ -613,40 +628,39 @@ class IntersectionShaper : public Shaper int shape_count) { + const int host_allocator = + axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + constexpr int NUM_VERTS_PER_HEX = 8; constexpr int NUM_COMPS_PER_VERT = 3; constexpr int NUM_TETS_PER_HEX = 24; constexpr double ZERO_THRESHOLD = 1.e-10; - // Save current/default allocator - const int current_allocator = axom::getDefaultAllocatorID(); - - // Determine new allocator (for CUDA/HIP policy, set to Unified) - // Set new default to device - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - SLIC_INFO(axom::fmt::format("{:-^80}", " Inserting shapes' bounding boxes into BVH ")); // Generate the BVH tree over the shapes // Access-aligned bounding boxes - m_aabbs = axom::Array(shape_count, shape_count); + m_aabbs = + axom::Array(shape_count, shape_count, device_allocator); - axom::ArrayView shapes_view = shapes.view(); + axom::ArrayView shapes_device_view = shapes.view(); - axom::ArrayView aabbs_view = m_aabbs.view(); + axom::ArrayView aabbs_device_view = m_aabbs.view(); // Get the bounding boxes for the shapes axom::for_all( shape_count, AXOM_LAMBDA(axom::IndexType i) { - aabbs_view[i] = primal::compute_bounding_box(shapes_view[i]); + aabbs_device_view[i] = + primal::compute_bounding_box(shapes_device_view[i]); }); // Insert shapes' Bounding Boxes into BVH. //bvh.setAllocatorID(poolID); spin::BVH<3, ExecSpace, double> bvh; - bvh.initialize(aabbs_view, shape_count); + bvh.initialize(aabbs_device_view, shape_count); SLIC_INFO(axom::fmt::format("{:-^80}", " Querying the BVH tree ")); @@ -679,19 +693,20 @@ class IntersectionShaper : public Shaper this->getDC()->RegisterField(volFracName, volFrac); // Initialize hexahedral elements - m_hexes = axom::Array(NE, NE); - axom::ArrayView hexes_view = m_hexes.view(); + m_hexes = axom::Array(NE, NE, device_allocator); + axom::ArrayView hexes_device_view = m_hexes.view(); - m_hex_bbs = axom::Array(NE, NE); - axom::ArrayView hex_bbs_view = m_hex_bbs.view(); + m_hex_bbs = axom::Array(NE, NE, device_allocator); + axom::ArrayView hex_bbs_device_view = m_hex_bbs.view(); // Initialize vertices from mfem mesh and // set each shape volume fraction to 1 // Allocation size is: // # of elements * # of vertices per hex * # of components per vertex - axom::Array vertCoords(NE * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT, - NE * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT); - axom::ArrayView verts_view = vertCoords.view(); + axom::Array vertCoords_host( + NE * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT, + NE * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT, + host_allocator); for(int i = 0; i < NE; i++) { @@ -709,52 +724,58 @@ class IntersectionShaper : public Shaper { for(int k = 0; k < NUM_COMPS_PER_VERT; k++) { - verts_view[(i * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT) + - (j * NUM_COMPS_PER_VERT) + k] = + vertCoords_host[(i * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT) + + (j * NUM_COMPS_PER_VERT) + k] = (mesh->GetVertex(verts[j]))[k]; } } } + axom::Array vertCoords_device = + axom::Array(vertCoords_host, device_allocator); + auto vertCoords_device_view = vertCoords_device.view(); + // Initialize each hexahedral element and its bounding box axom::for_all( NE, AXOM_LAMBDA(axom::IndexType i) { // Set each hexahedral element vertices - hexes_view[i] = HexahedronType(); + hexes_device_view[i] = HexahedronType(); for(int j = 0; j < NUM_VERTS_PER_HEX; ++j) { int vertIndex = (i * NUM_VERTS_PER_HEX * NUM_COMPS_PER_VERT) + j * NUM_COMPS_PER_VERT; - hexes_view[i][j] = Point3D({verts_view[vertIndex], - verts_view[vertIndex + 1], - verts_view[vertIndex + 2]}); + hexes_device_view[i][j] = + Point3D({vertCoords_device_view[vertIndex], + vertCoords_device_view[vertIndex + 1], + vertCoords_device_view[vertIndex + 2]}); // Set hexahedra components to zero if within threshold - if(axom::utilities::isNearlyEqual(hexes_view[i][j][0], + if(axom::utilities::isNearlyEqual(hexes_device_view[i][j][0], 0.0, ZERO_THRESHOLD)) { - hexes_view[i][j][0] = 0.0; + hexes_device_view[i][j][0] = 0.0; } - if(axom::utilities::isNearlyEqual(hexes_view[i][j][1], + if(axom::utilities::isNearlyEqual(hexes_device_view[i][j][1], 0.0, ZERO_THRESHOLD)) { - hexes_view[i][j][1] = 0.0; + hexes_device_view[i][j][1] = 0.0; } - if(axom::utilities::isNearlyEqual(hexes_view[i][j][2], + if(axom::utilities::isNearlyEqual(hexes_device_view[i][j][2], 0.0, ZERO_THRESHOLD)) { - hexes_view[i][j][2] = 0.0; + hexes_device_view[i][j][2] = 0.0; } } // Get bounding box for hexahedral element - hex_bbs_view[i] = primal::compute_bounding_box(hexes_view[i]); + hex_bbs_device_view[i] = + primal::compute_bounding_box(hexes_device_view[i]); }); // end of loop to initialize hexahedral elements and bounding boxes // Set shape components to zero if within threshold @@ -763,25 +784,25 @@ class IntersectionShaper : public Shaper AXOM_LAMBDA(axom::IndexType i) { for(int j = 0; j < ShapeType::NUM_VERTS; j++) { - if(axom::utilities::isNearlyEqual(shapes_view[i][j][0], + if(axom::utilities::isNearlyEqual(shapes_device_view[i][j][0], 0.0, ZERO_THRESHOLD)) { - shapes_view[i][j][0] = 0.0; + shapes_device_view[i][j][0] = 0.0; } - if(axom::utilities::isNearlyEqual(shapes_view[i][j][1], + if(axom::utilities::isNearlyEqual(shapes_device_view[i][j][1], 0.0, ZERO_THRESHOLD)) { - shapes_view[i][j][1] = 0.0; + shapes_device_view[i][j][1] = 0.0; } - if(axom::utilities::isNearlyEqual(shapes_view[i][j][2], + if(axom::utilities::isNearlyEqual(shapes_device_view[i][j][2], 0.0, ZERO_THRESHOLD)) { - shapes_view[i][j][2] = 0.0; + shapes_device_view[i][j][2] = 0.0; } } }); @@ -791,41 +812,56 @@ class IntersectionShaper : public Shaper "{:-^80}", " Finding shape candidates for each hexahedral element ")); - axom::Array offsets(NE); - axom::Array counts(NE); + axom::Array offsets(NE, NE, device_allocator); + axom::Array counts(NE, NE, device_allocator); axom::Array candidates; - bvh.findBoundingBoxes(offsets, counts, candidates, NE, hex_bbs_view); + bvh.findBoundingBoxes(offsets, counts, candidates, NE, hex_bbs_device_view); // Get the total number of candidates using REDUCE_POL = typename axom::execution_space::reduce_policy; using ATOMIC_POL = typename axom::execution_space::atomic_policy; - const auto counts_v = counts.view(); + const auto counts_device_view = counts.view(); RAJA::ReduceSum totalCandidates(0); axom::for_all( NE, - AXOM_LAMBDA(axom::IndexType i) { totalCandidates += counts_v[i]; }); + AXOM_LAMBDA(axom::IndexType i) { + totalCandidates += counts_device_view[i]; + }); // Initialize hexahedron indices and shape candidates - axom::IndexType* hex_indices = - axom::allocate(totalCandidates.get() * NUM_TETS_PER_HEX); - axom::IndexType* shape_candidates = - axom::allocate(totalCandidates.get() * NUM_TETS_PER_HEX); + axom::Array hex_indices_device( + totalCandidates.get() * NUM_TETS_PER_HEX, + totalCandidates.get() * NUM_TETS_PER_HEX, + device_allocator); + auto hex_indices_device_view = hex_indices_device.view(); + + axom::Array shape_candidates_device( + totalCandidates.get() * NUM_TETS_PER_HEX, + totalCandidates.get() * NUM_TETS_PER_HEX, + device_allocator); + auto shape_candidates_device_view = shape_candidates_device.view(); // Tetrahedrons from hexes (24 for each hex) - axom::Array tets_from_hexes(NE * NUM_TETS_PER_HEX, - NE * NUM_TETS_PER_HEX); - axom::ArrayView tets_from_hexes_view = - tets_from_hexes.view(); + axom::Array tets_from_hexes_device(NE * NUM_TETS_PER_HEX, + NE * NUM_TETS_PER_HEX, + device_allocator); + axom::ArrayView tets_from_hexes_device_view = + tets_from_hexes_device.view(); // Index into 'tets' - axom::IndexType* tet_indices = - axom::allocate(totalCandidates.get() * NUM_TETS_PER_HEX); + axom::Array tet_indices_device( + totalCandidates.get() * NUM_TETS_PER_HEX, + totalCandidates.get() * NUM_TETS_PER_HEX, + device_allocator); + auto tet_indices_device_view = tet_indices_device.view(); // New total number of candidates after omitting degenerate shapes - axom::Array newTotalCandidates(1, 1); - const auto newTotalCandidates_view = newTotalCandidates.view(); - newTotalCandidates_view[0] = 0; + axom::Array newTotalCandidates_host(1, 1, host_allocator); + newTotalCandidates_host[0] = 0; + axom::Array newTotalCandidates_device = + axom::Array(newTotalCandidates_host, device_allocator); + auto newTotalCandidates_device_view = newTotalCandidates_device.view(); SLIC_INFO(axom::fmt::format( "{:-^80}", @@ -833,73 +869,79 @@ class IntersectionShaper : public Shaper using TetHexArray = axom::StackArray; - AXOM_PERF_MARK_SECTION("init_tets", - axom::for_all( - NE, - AXOM_LAMBDA(axom::IndexType i) { - TetHexArray cur_tets; - hexes_view[i].triangulate(cur_tets); + { + AXOM_ANNOTATE_SCOPE("init_tets"); + axom::for_all( + NE, + AXOM_LAMBDA(axom::IndexType i) { + TetHexArray cur_tets; + hexes_device_view[i].triangulate(cur_tets); - for(int j = 0; j < NUM_TETS_PER_HEX; j++) - { - tets_from_hexes_view[i * NUM_TETS_PER_HEX + j] = - cur_tets[j]; - } - });); + for(int j = 0; j < NUM_TETS_PER_HEX; j++) + { + tets_from_hexes_device_view[i * NUM_TETS_PER_HEX + j] = cur_tets[j]; + } + }); + } SLIC_INFO( axom::fmt::format("{:-^80}", " Creating an array of candidate pairs for shaping ")); - const auto offsets_v = offsets.view(); - const auto candidates_v = candidates.view(); - AXOM_PERF_MARK_SECTION("init_candidates", - axom::for_all( - NE, - AXOM_LAMBDA(axom::IndexType i) { - for(int j = 0; j < counts_v[i]; j++) - { - int shapeIdx = candidates_v[offsets_v[i] + j]; - - for(int k = 0; k < NUM_TETS_PER_HEX; k++) - { - IndexType idx = RAJA::atomicAdd( - &newTotalCandidates_view[0], - IndexType {1}); - hex_indices[idx] = i; - shape_candidates[idx] = shapeIdx; - tet_indices[idx] = i * NUM_TETS_PER_HEX + k; - } - } - });); - - // Overlap volume is the volume of clip(oct,tet) - m_overlap_volumes = axom::Array(NE, NE); + const auto offsets_device_view = offsets.view(); + const auto candidates_device_view = candidates.view(); + { + AXOM_ANNOTATE_SCOPE("init_candidates"); + axom::for_all( + NE, + AXOM_LAMBDA(axom::IndexType i) { + for(int j = 0; j < counts_device_view[i]; j++) + { + int shapeIdx = candidates_device_view[offsets_device_view[i] + j]; + + for(int k = 0; k < NUM_TETS_PER_HEX; k++) + { + IndexType idx = + RAJA::atomicAdd(&newTotalCandidates_device_view[0], + IndexType {1}); + hex_indices_device_view[idx] = i; + shape_candidates_device_view[idx] = shapeIdx; + tet_indices_device_view[idx] = i * NUM_TETS_PER_HEX + k; + } + } + }); + } + + // Overlap volume is the volume of clip(oct,tet) for c2c + // or clip(tet,tet) for Pro/E meshes + m_overlap_volumes = axom::Array(NE, NE, device_allocator); // Hex volume is the volume of the hexahedron element - m_hex_volumes = axom::Array(NE, NE); + m_hex_volumes = axom::Array(NE, NE, device_allocator); - axom::ArrayView overlap_volumes_view = m_overlap_volumes.view(); - axom::ArrayView hex_volumes_view = m_hex_volumes.view(); + axom::ArrayView overlap_volumes_device_view = + m_overlap_volumes.view(); + axom::ArrayView hex_volumes_device_view = m_hex_volumes.view(); // Set initial values to 0 axom::for_all( NE, AXOM_LAMBDA(axom::IndexType i) { - hex_volumes_view[i] = 0; - overlap_volumes_view[i] = 0; + overlap_volumes_device_view[i] = 0; + hex_volumes_device_view[i] = 0; }); SLIC_INFO( axom::fmt::format("{:-^80}", " Calculating hexahedron element volume ")); - AXOM_PERF_MARK_SECTION("hex_volume", - axom::for_all( - NE, - AXOM_LAMBDA(axom::IndexType i) { - hex_volumes_view[i] = hexes_view[i].volume(); - });); - + { + AXOM_ANNOTATE_SCOPE("hex_volume"); + axom::for_all( + NE, + AXOM_LAMBDA(axom::IndexType i) { + hex_volumes_device_view[i] = hexes_device_view[i].volume(); + }); + } SLIC_INFO(axom::fmt::format( "{:-^80}", " Calculating element overlap volume from each tet-shape pair ")); @@ -907,27 +949,36 @@ class IntersectionShaper : public Shaper constexpr double EPS = 1e-10; constexpr bool tryFixOrientation = true; - AXOM_PERF_MARK_SECTION( - "tet_shape_volume", + { + // Copy calculated total back to host + axom::Array newTotalCandidates_calc_host = + axom::Array(newTotalCandidates_device, host_allocator); + + AXOM_ANNOTATE_SCOPE("tet_shape_volume"); axom::for_all( - newTotalCandidates_view[0], + newTotalCandidates_calc_host[0], AXOM_LAMBDA(axom::IndexType i) { - int index = hex_indices[i]; - int shapeIndex = shape_candidates[i]; - int tetIndex = tet_indices[i]; + const int index = hex_indices_device_view[i]; + const int shapeIndex = shape_candidates_device_view[i]; + const int tetIndex = tet_indices_device_view[i]; - PolyhedronType poly = primal::clip(shapes_view[shapeIndex], - tets_from_hexes_view[tetIndex], - EPS, - tryFixOrientation); + const PolyhedronType poly = + primal::clip(shapes_device_view[shapeIndex], + tets_from_hexes_device_view[tetIndex], + EPS, + tryFixOrientation); // Poly is valid if(poly.numVertices() >= 4) { - RAJA::atomicAdd(overlap_volumes_view.data() + index, - poly.volume()); + // Workaround - intermediate volume variable needed for + // CUDA Pro/E test case correctness + double volume = poly.volume(); + RAJA::atomicAdd(overlap_volumes_device_view.data() + index, + volume); } - });); + }); + } RAJA::ReduceSum totalOverlap(0); RAJA::ReduceSum totalHex(0); @@ -935,21 +986,16 @@ class IntersectionShaper : public Shaper axom::for_all( NE, AXOM_LAMBDA(axom::IndexType i) { - totalOverlap += overlap_volumes_view[i]; - totalHex += hex_volumes_view[i]; + totalOverlap += overlap_volumes_device_view[i]; + totalHex += hex_volumes_device_view[i]; }); - SLIC_INFO(axom::fmt::format("Total overlap volume with shape is {}", + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "Total overlap volume with shape is {:.3Lf}", this->allReduceSum(totalOverlap))); - SLIC_INFO(axom::fmt::format("Total mesh volume is {}", + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "Total mesh volume is {:.3Lf}", this->allReduceSum(totalHex))); - - // Deallocate no longer needed variables - axom::deallocate(hex_indices); - axom::deallocate(shape_candidates); - axom::deallocate(tet_indices); - - axom::setDefaultAllocator(current_allocator); } // end of runShapeQuery() function #endif @@ -1089,25 +1135,25 @@ class IntersectionShaper : public Shaper cfgf = newVolFracGridFunction(); this->getDC()->RegisterField(fieldName, cfgf); - AXOM_PERF_MARK_SECTION("compute_free", { - int dataSize = cfgf->Size(); - GridFunctionView cfView(cfgf); + AXOM_ANNOTATE_SCOPE("compute_free"); + + int dataSize = cfgf->Size(); + GridFunctionView cfView(cfgf); + axom::for_all( + dataSize, + AXOM_LAMBDA(axom::IndexType i) { cfView[i] = 1.; }); + + // Iterate over all materials and subtract off their VFs from cfgf. + for(auto& gf : m_vf_grid_functions) + { + GridFunctionView matVFView(gf, false); axom::for_all( dataSize, - AXOM_LAMBDA(axom::IndexType i) { cfView[i] = 1.; }); - - // Iterate over all materials and subtract off their VFs from cfgf. - for(auto& gf : m_vf_grid_functions) - { - GridFunctionView matVFView(gf, false); - axom::for_all( - dataSize, - AXOM_LAMBDA(axom::IndexType i) { - cfView[i] -= matVFView[i]; - cfView[i] = (cfView[i] < 0.) ? 0. : cfView[i]; - }); - } - }); + AXOM_LAMBDA(axom::IndexType i) { + cfView[i] -= matVFView[i]; + cfView[i] = (cfView[i] < 0.) ? 0. : cfView[i]; + }); + } } return cfgf; } @@ -1183,6 +1229,7 @@ class IntersectionShaper : public Shaper // Allocate some memory for the replacement rule data arrays. int execSpaceAllocatorID = axom::execution_space::allocatorID(); + Array vf_subtract_array(dataSize, dataSize, execSpaceAllocatorID); Array vf_writable_array(dataSize, dataSize, execSpaceAllocatorID); ArrayView vf_subtract(vf_subtract_array); @@ -1264,45 +1311,46 @@ class IntersectionShaper : public Shaper if(!shape.getMaterialsReplaced().empty()) { // Replaces - We'll sum up the VFs that we can replace in a zone. - AXOM_PERF_MARK_SECTION("compute_vf_writable", { + AXOM_ANNOTATE_SCOPE("compute_vf_writable"); + axom::for_all( + dataSize, + AXOM_LAMBDA(axom::IndexType i) { vf_writable[i] = 0.; }); + for(const auto& name : shape.getMaterialsReplaced()) + { + auto mat = getMaterial(name); + GridFunctionView matVFView(mat.first, false); axom::for_all( dataSize, - AXOM_LAMBDA(axom::IndexType i) { vf_writable[i] = 0.; }); - for(const auto& name : shape.getMaterialsReplaced()) - { - auto mat = getMaterial(name); - GridFunctionView matVFView(mat.first, false); - axom::for_all( - dataSize, - AXOM_LAMBDA(axom::IndexType i) { - vf_writable[i] += matVFView[i]; - vf_writable[i] = (vf_writable[i] > 1.) ? 1. : vf_writable[i]; - }); - } - }); + AXOM_LAMBDA(axom::IndexType i) { + vf_writable[i] += matVFView[i]; + vf_writable[i] = (vf_writable[i] > 1.) ? 1. : vf_writable[i]; + }); + } } else { // Does not replace. We can replace all except for listed mats. - AXOM_PERF_MARK_SECTION("compute_vf_writable", { + AXOM_ANNOTATE_SCOPE("compute_vf_writable"); + axom::for_all( + dataSize, + AXOM_LAMBDA(axom::IndexType i) { vf_writable[i] = 1.; }); + + for(auto& gf : excludeVFs) + { + GridFunctionView matVFView(gf, false); axom::for_all( dataSize, - AXOM_LAMBDA(axom::IndexType i) { vf_writable[i] = 1.; }); - for(auto& gf : excludeVFs) - { - GridFunctionView matVFView(gf, false); - axom::for_all( - dataSize, - AXOM_LAMBDA(axom::IndexType i) { - vf_writable[i] -= matVFView[i]; - vf_writable[i] = (vf_writable[i] < 0.) ? 0. : vf_writable[i]; - }); - } - }); + AXOM_LAMBDA(axom::IndexType i) { + vf_writable[i] -= matVFView[i]; + vf_writable[i] = (vf_writable[i] < 0.) ? 0. : vf_writable[i]; + }); + } } // Compute the volume fractions for the current shape's material. - AXOM_PERF_MARK_SECTION("compute_vf", { + { + AXOM_ANNOTATE_SCOPE("compute_vf"); + GridFunctionView matVFView(matVF.first); GridFunctionView shapeVFView(shapeVolFrac); @@ -1327,11 +1375,11 @@ class IntersectionShaper : public Shaper // Store the max shape VF. shapeVFView[i] = vf; }); - }); + } - // Iterate over updateVFs to subtract off VFs we allocated to the - // current shape's material. - AXOM_PERF_MARK_SECTION("update_vf", { + // Iterate over updateVFs to subtract off VFs we allocated to the current shape's material. + { + AXOM_ANNOTATE_SCOPE("update_vf"); for(auto& gf : updateVFs) { GridFunctionView matVFView(gf); @@ -1348,7 +1396,7 @@ class IntersectionShaper : public Shaper vf_subtract[i] -= s; }); } - }); + } } #endif @@ -1358,6 +1406,8 @@ class IntersectionShaper : public Shaper */ void applyReplacementRules(const klee::Shape& shape) override { + AXOM_ANNOTATE_SCOPE("applyReplacementRules"); + switch(m_execPolicy) { #if defined(AXOM_USE_RAJA) && defined(AXOM_USE_UMPIRE) @@ -1386,6 +1436,8 @@ class IntersectionShaper : public Shaper void finalizeShapeQuery() override { + AXOM_ANNOTATE_SCOPE("finalizeShapeQuery"); + // Implementation here -- destroy BVH tree and other shape-based data structures delete m_surfaceMesh; @@ -1400,7 +1452,8 @@ class IntersectionShaper : public Shaper void prepareShapeQuery(klee::Dimensions shapeDimension, const klee::Shape& shape) override { - std::string shapeFormat = shape.getGeometry().getFormat(); + AXOM_ANNOTATE_SCOPE("prepareShapeQuery"); + const std::string shapeFormat = shape.getGeometry().getFormat(); // Save m_percentError and m_level in case refineShape needs to change them // to meet the overall desired error tolerance for the volume. @@ -1448,7 +1501,8 @@ class IntersectionShaper : public Shaper // (default is sequential) void runShapeQuery(const klee::Shape& shape) override { - std::string shapeFormat = shape.getGeometry().getFormat(); + AXOM_ANNOTATE_SCOPE("runShapeQuery"); + const std::string shapeFormat = shape.getGeometry().getFormat(); // Testing separate workflow for Pro/E if(shapeFormat == "proe") @@ -1604,7 +1658,9 @@ class IntersectionShaper : public Shaper SLIC_INFO(axom::fmt::format( "{:-^80}", - axom::fmt::format(" Discretizing contour with {} points ", polyline_size))); + axom::fmt::format(axom::utilities::locale(), + " Discretizing contour with {:L} points ", + polyline_size))); // Flip point order if(flip) @@ -1825,9 +1881,9 @@ class IntersectionShaper : public Shaper dr = avg_pct < percentError; if(dr) { - SLIC_INFO(fmt::format("Dimishing returns triggered: {} < {}.", - avg_pct, - percentError)); + SLIC_INFO(axom::fmt::format("Dimishing returns triggered: {} < {}.", + avg_pct, + percentError)); } } return dr; @@ -1869,32 +1925,32 @@ class IntersectionShaper : public Shaper pct = 100. * (1. - currentVol / revolvedVolume); SLIC_INFO( - fmt::format("Refining... " - "revolvedVolume = {}" - ", currentVol = {}" - ", pct = {}" - ", level = {}" - ", curvePercentError = {}", - revolvedVolume, - currentVol, - pct, - level, - curvePercentError)); + axom::fmt::format("Refining... " + "revolvedVolume = {}" + ", currentVol = {}" + ", pct = {}" + ", level = {}" + ", curvePercentError = {}", + revolvedVolume, + currentVol, + pct, + level, + curvePercentError)); if(pct <= m_percentError) { SLIC_INFO( - fmt::format("Contour refinement complete. " - "revolvedVolume = {}" - ", currentVol = {}" - ", pct = {}" - ", level = {}" - ", curvePercentError = {}", - revolvedVolume, - currentVol, - pct, - level, - curvePercentError)); + axom::fmt::format("Contour refinement complete. " + "revolvedVolume = {}" + ", currentVol = {}" + ", pct = {}" + ", level = {}" + ", curvePercentError = {}", + revolvedVolume, + currentVol, + pct, + level, + curvePercentError)); circleLevel = level; refine = false; @@ -1911,17 +1967,17 @@ class IntersectionShaper : public Shaper refine = false; SLIC_INFO( - fmt::format("Stop refining due to diminishing returns. " - "revolvedVolume = {}" - ", currentVol = {}" - ", pct = {}" - ", level = {}" - ", curvePercentError = {}", - revolvedVolume, - currentVol, - pct, - circleLevel, - curvePercentError)); + axom::fmt::format("Stop refining due to diminishing returns. " + "revolvedVolume = {}" + ", currentVol = {}" + ", pct = {}" + ", level = {}" + ", curvePercentError = {}", + revolvedVolume, + currentVol, + pct, + circleLevel, + curvePercentError)); // NOTE: Trying to increase circleLevel at this point does not help. } @@ -1945,9 +2001,9 @@ class IntersectionShaper : public Shaper // a new m_surfaceMesh to be created. double rv = 0.; SLIC_INFO( - fmt::format("Reloading shape {} with curvePercentError = {}.", - shape.getName(), - curvePercentError)); + axom::fmt::format("Reloading shape {} with curvePercentError = {}.", + shape.getName(), + curvePercentError)); loadShapeInternal(shape, curvePercentError, rv); // Filter the mesh, store in m_surfaceMesh. @@ -1958,7 +2014,7 @@ class IntersectionShaper : public Shaper } else { - SLIC_INFO(fmt::format( + SLIC_INFO(axom::fmt::format( "Stopping refinement due to curvePercentError {} being too small.", ce)); refine = false; diff --git a/src/axom/quest/MarchingCubes.cpp b/src/axom/quest/MarchingCubes.cpp index 50fec43b75..a92e502f5f 100644 --- a/src/axom/quest/MarchingCubes.cpp +++ b/src/axom/quest/MarchingCubes.cpp @@ -56,8 +56,6 @@ void MarchingCubes::setMesh(const conduit::Node& bpMesh, conduit::blueprint::mesh::is_multi_domain(bpMesh), "MarchingCubes class input mesh must be in multidomain format."); - clearMesh(); - m_topologyName = topologyName; m_maskFieldName = maskField; @@ -70,10 +68,15 @@ void MarchingCubes::setMesh(const conduit::Node& bpMesh, */ auto newDomainCount = conduit::blueprint::mesh::number_of_domains(bpMesh); - while(m_singles.size() < newDomainCount) + if(m_singles.size() < newDomainCount) { - m_singles.emplace_back( - new detail::marching_cubes::MarchingCubesSingleDomain(*this)); + auto tmpSize = m_singles.size(); + m_singles.resize(newDomainCount); + for(int d = tmpSize; d < newDomainCount; ++d) + { + m_singles[d].reset( + new detail::marching_cubes::MarchingCubesSingleDomain(*this)); + } } for(int d = 0; d < newDomainCount; ++d) @@ -81,6 +84,10 @@ void MarchingCubes::setMesh(const conduit::Node& bpMesh, const auto& dom = bpMesh.child(d); m_singles[d]->setDomain(dom, m_topologyName, maskField); } + for(int d = newDomainCount; d < m_singles.size(); ++d) + { + m_singles[d]->getImpl().clearDomain(); + } m_domainCount = newDomainCount; } @@ -89,23 +96,24 @@ void MarchingCubes::setFunctionField(const std::string& fcnField) { m_fcnFieldName = fcnField; m_fcnPath = "fields/" + fcnField; - for(auto& s : m_singles) + for(axom::IndexType d = 0; d < m_domainCount; ++d) { - s->setFunctionField(fcnField); + m_singles[d]->setFunctionField(fcnField); } } void MarchingCubes::computeIsocontour(double contourVal) { - AXOM_PERF_MARK_FUNCTION("MarchingCubes::computeIsoContour"); + AXOM_ANNOTATE_SCOPE("MarchingCubes::computeIsoContour"); // Mark and scan domains while adding up their // facet counts to get the total facet counts. m_facetIndexOffsets.resize(m_singles.size()); - for(axom::IndexType d = 0; d < m_singles.size(); ++d) + for(axom::IndexType d = 0; d < m_domainCount; ++d) { auto& single = *m_singles[d]; single.setContourValue(contourVal); + single.setMaskValue(m_maskVal); single.markCrossings(); single.scanCrossings(); m_facetIndexOffsets[d] = m_facetCount; @@ -118,7 +126,7 @@ void MarchingCubes::computeIsocontour(double contourVal) auto facetNodeIdsView = m_facetNodeIds.view(); auto facetNodeCoordsView = m_facetNodeCoords.view(); auto facetParentIdsView = m_facetParentIds.view(); - for(axom::IndexType d = 0; d < m_singles.size(); ++d) + for(axom::IndexType d = 0; d < m_domainCount; ++d) { m_singles[d]->getImpl().setOutputBuffers(facetNodeIdsView, facetNodeCoordsView, @@ -126,16 +134,16 @@ void MarchingCubes::computeIsocontour(double contourVal) m_facetIndexOffsets[d]); } - for(axom::IndexType d = 0; d < m_singles.size(); ++d) + for(axom::IndexType d = 0; d < m_domainCount; ++d) { m_singles[d]->computeFacets(); } - for(axom::IndexType d = 0; d < m_singles.size(); ++d) + for(axom::IndexType d = 0; d < m_domainCount; ++d) { const auto domainId = m_singles[d]->getDomainId(d); const auto domainFacetCount = - (d < m_singles.size() - 1 ? m_facetIndexOffsets[d + 1] : m_facetCount) - + (d < m_domainCount - 1 ? m_facetIndexOffsets[d + 1] : m_facetCount) - m_facetIndexOffsets[d]; m_facetDomainIds.fill(domainId, domainFacetCount, m_facetIndexOffsets[d]); } @@ -144,22 +152,10 @@ void MarchingCubes::computeIsocontour(double contourVal) axom::IndexType MarchingCubes::getContourNodeCount() const { axom::IndexType contourNodeCount = - m_singles.empty() ? 0 : m_facetCount * m_singles[0]->spatialDimension(); + (m_domainCount > 0) ? m_facetCount * m_singles[0]->spatialDimension() : 0; return contourNodeCount; } -void MarchingCubes::clearMesh() -{ - for(int d = 0; d < m_singles.size(); ++d) - { - m_singles[d]->getImpl().clearDomain(); - } - m_domainCount = 0; - m_facetNodeIds.clear(); - m_facetNodeCoords.clear(); - m_facetParentIds.clear(); -} - void MarchingCubes::clearOutput() { m_facetCount = 0; @@ -174,7 +170,7 @@ void MarchingCubes::populateContourMesh( const std::string& cellIdField, const std::string& domainIdField) const { - AXOM_PERF_MARK_FUNCTION("MarchingCubes::populateContourMesh"); + AXOM_ANNOTATE_SCOPE("MarchingCubes::populateContourMesh"); if(!cellIdField.empty() && !mesh.hasField(cellIdField, axom::mint::CELL_CENTERED)) { @@ -254,7 +250,7 @@ void MarchingCubes::populateContourMesh( void MarchingCubes::allocateOutputBuffers() { - AXOM_PERF_MARK_FUNCTION("MarchingCubes::allocateOutputBuffers"); + AXOM_ANNOTATE_SCOPE("MarchingCubes::allocateOutputBuffers"); if(!m_singles.empty()) { int ndim = m_singles[0]->spatialDimension(); diff --git a/src/axom/quest/MarchingCubes.hpp b/src/axom/quest/MarchingCubes.hpp index bc053915a8..4a4b10db05 100644 --- a/src/axom/quest/MarchingCubes.hpp +++ b/src/axom/quest/MarchingCubes.hpp @@ -137,8 +137,6 @@ class MarchingCubes Some metadata from \a bpMesh may be cached. Any change to it after setMesh() leads to undefined behavior. - - @see clearMesh() */ void setMesh(const conduit::Node &bpMesh, const std::string &topologyName, @@ -150,6 +148,16 @@ class MarchingCubes */ void setFunctionField(const std::string &fcnField); + /*! + @brief Set the mask value. + \param [in] maskVal mask value. If a mask field is given in + setMesh(), compute only for cells whose mask matches this value. + + The default vask value is 1 unless explicitly set by this method. + The mask value has no effect if a mask field is not specified. + */ + void setMaskValue(int maskVal) { m_maskVal = maskVal; } + /*! \brief Computes the isocontour. \param [in] contourVal isocontour value @@ -218,8 +226,9 @@ class MarchingCubes @brief Return view of parent cell indices Array. The buffer size is getContourCellCount(). The parent ID is the - column-major ordered flat index of the cell in the parent domain - (see ArrayIndexer), not counting ghost cells. + flat index of the cell in the parent domain (see MDMapping), + not counting ghost cells, with row- or major-ordering same as that + for the input scalar function array. */ axom::ArrayView getContourFacetParents() const { @@ -275,19 +284,6 @@ class MarchingCubes } //@} - /*! - @brief Clear the input mesh data. - - The contour mesh is *not* cleared. See clearOutput() for this. - - After clearing, you have to call setMesh() as if it was a new - object. - - @internal For good GPU performance, memory is not deallocated. To - really deallocate memory, destruct this object and use another. - */ - void clearMesh(); - /*! @brief Clear the computed contour mesh. */ @@ -319,6 +315,8 @@ class MarchingCubes std::string m_maskFieldName; std::string m_maskPath; + int m_maskVal = 1; + //!@brief First facet index from each parent domain. axom::Array m_facetIndexOffsets; @@ -331,7 +329,7 @@ class MarchingCubes axom::Array m_caseIdsFlat; axom::Array m_crossingFlags; axom::Array m_scannedFlags; - axom::Array m_facetIncrs; + axom::Array m_facetIncrs; //@} //@{ diff --git a/src/axom/quest/MeshTester.hpp b/src/axom/quest/MeshTester.hpp index c9c1f71e4d..381d65db42 100644 --- a/src/axom/quest/MeshTester.hpp +++ b/src/axom/quest/MeshTester.hpp @@ -10,6 +10,7 @@ #include "axom/config.hpp" #include "axom/core.hpp" #include "axom/primal.hpp" +#include "axom/slic.hpp" #include "axom/spin.hpp" #include "axom/mint.hpp" @@ -70,7 +71,7 @@ void findTriMeshIntersectionsBVH( std::vector& degenerateIndices, double intersectionThreshold = 1E-8) { - AXOM_PERF_MARK_FUNCTION("findTriMeshIntersectionsBVH"); + AXOM_ANNOTATE_SCOPE("findTriMeshIntersectionsBVH"); SLIC_INFO("Running BVH intersection algorithm " << " in execution Space: " @@ -122,7 +123,7 @@ void findTriMeshIntersectionsImplicitGrid( int spatialIndexResolution = 0, double intersectionThreshold = 1E-8) { - AXOM_PERF_MARK_FUNCTION("findTriMeshIntersectionsImplicitGrid"); + AXOM_ANNOTATE_SCOPE("findTriMeshIntersectionsImplicitGrid"); SLIC_INFO("Running ImplicitGrid intersection algorithm " << " in execution Space: " @@ -175,7 +176,7 @@ void findTriMeshIntersectionsUniformGrid( int spatialIndexResolution = 0, double intersectionThreshold = 1E-8) { - AXOM_PERF_MARK_FUNCTION("findTriMeshIntersectionsUniformGrid"); + AXOM_ANNOTATE_SCOPE("findTriMeshIntersectionsUniformGrid"); SLIC_INFO("Running UniformGrid intersection algorithm " << " in execution Space: " diff --git a/src/axom/quest/MeshViewUtil.hpp b/src/axom/quest/MeshViewUtil.hpp index 7c3098c6e5..b8a633090f 100644 --- a/src/axom/quest/MeshViewUtil.hpp +++ b/src/axom/quest/MeshViewUtil.hpp @@ -12,7 +12,9 @@ #ifdef AXOM_USE_CONDUIT #include "axom/core.hpp" + #include "axom/core/NumericLimits.hpp" #include "axom/fmt.hpp" + #include "axom/slic.hpp" #include "conduit_blueprint.hpp" #include "conduit_blueprint_mcarray.hpp" #ifdef AXOM_USE_MPI @@ -21,7 +23,6 @@ #endif #include - #include #include #include #include @@ -33,7 +34,7 @@ namespace quest namespace internal { template -inline axom::StackArray makeStackArray(T v = std::numeric_limits::max()) +inline axom::StackArray makeStackArray(T v = axom::numeric_limits::max()) { axom::StackArray rval; for(int d = 0; d < DIM; ++d) @@ -605,14 +606,7 @@ class MeshViewUtil } } - MdIndices offsets = conduitIndicesToStackArray(fieldNode, "offsets"); - if(!fieldNode.has_child("offsets")) - { - for(int d = 0; d < DIM; ++d) - { - offsets[d] = 0; - } - } + MdIndices offsets = conduitIndicesToStackArray(fieldNode, "offsets", 0); MdIndices loPads, hiPads, paddedShape, strideOrder; axom::quest::internal::stridesAndOffsetsToShapes(realShape, @@ -629,7 +623,6 @@ class MeshViewUtil if(withGhosts == false) { - MdIndices offsets = conduitIndicesToStackArray(fieldNode, "offsets", 0); auto rval1 = rval; rval = rval1.subspan(offsets, realShape); } @@ -818,7 +811,7 @@ class MeshViewUtil MdIndices conduitIndicesToStackArray( const conduit::Node& node, const std::string& path, - axom::IndexType defaultVal = std::numeric_limits::max()) const + axom::IndexType defaultVal = axom::numeric_limits::max()) const { if(node.has_path(path)) { diff --git a/src/axom/quest/PointInCell.hpp b/src/axom/quest/PointInCell.hpp index ee2f50d2ca..786436f329 100644 --- a/src/axom/quest/PointInCell.hpp +++ b/src/axom/quest/PointInCell.hpp @@ -8,6 +8,7 @@ #include "axom/config.hpp" #include "axom/core/Macros.hpp" +#include "axom/slic.hpp" #include "axom/primal/geometry/Point.hpp" diff --git a/src/axom/quest/SamplingShaper.hpp b/src/axom/quest/SamplingShaper.hpp index 215c05ad7c..9c4d6dffcb 100644 --- a/src/axom/quest/SamplingShaper.hpp +++ b/src/axom/quest/SamplingShaper.hpp @@ -203,8 +203,8 @@ class InOutSampler SLIC_INFO( axom::fmt::format(axom::utilities::locale(), - "\t Sampling inout field '{}' took {} seconds (@ " - "{:L} queries per second)", + "\t Sampling inout field '{}' took {:.3Lf} seconds " + "(@ {:L} queries per second)", inoutName, timer.elapsed(), static_cast((NE * nq) / timer.elapsed()))); @@ -395,6 +395,8 @@ class SamplingShaper : public Shaper void prepareShapeQuery(klee::Dimensions shapeDimension, const klee::Shape& shape) override { + AXOM_ANNOTATE_SCOPE("prepareShapeQuery"); + internal::ScopedLogLevelChanger logLevelChanger( this->isVerbose() ? slic::message::Debug : slic::message::Warning); @@ -451,6 +453,8 @@ class SamplingShaper : public Shaper void runShapeQuery(const klee::Shape& shape) override { + AXOM_ANNOTATE_SCOPE("runShapeQuery"); + internal::ScopedLogLevelChanger logLevelChanger( this->isVerbose() ? slic::message::Debug : slic::message::Warning); @@ -476,6 +480,8 @@ class SamplingShaper : public Shaper void applyReplacementRules(const klee::Shape& shape) override { + AXOM_ANNOTATE_SCOPE("applyReplacementRules"); + internal::ScopedLogLevelChanger logLevelChanger( this->isVerbose() ? slic::message::Debug : slic::message::Warning); @@ -570,6 +576,8 @@ class SamplingShaper : public Shaper void finalizeShapeQuery() override { + AXOM_ANNOTATE_SCOPE("finalizeShapeQuery"); + delete m_inoutSampler2D; m_inoutSampler2D = nullptr; @@ -639,6 +647,8 @@ class SamplingShaper : public Shaper void adjustVolumeFractions() override { + AXOM_ANNOTATE_SCOPE("adjustVolumeFractions"); + internal::ScopedLogLevelChanger logLevelChanger( this->isVerbose() ? slic::message::Debug : slic::message::Warning); @@ -679,28 +689,35 @@ class SamplingShaper : public Shaper return keys; }; - std::stringstream sstr; - sstr << "List of registered fields in the SamplingShaper " << initialMessage - << fmt::format("\n\t* Data collection grid funcs: {}", - fmt::join(extractKeys(m_dc->GetFieldMap()), ", ")) - << fmt::format("\n\t* Data collection qfuncs: {}", - fmt::join(extractKeys(m_dc->GetQFieldMap()), ", ")) - << fmt::format("\n\t* Known materials: {}", - fmt::join(m_knownMaterials, ", ")); + axom::fmt::memory_buffer out; + + axom::fmt::format_to( + std::back_inserter(out), + "List of registered fields in the SamplingShaper {}" + "\n\t* Data collection grid funcs: {}" + "\n\t* Data collection qfuncs: {}" + "\n\t* Known materials: {}", + initialMessage, + axom::fmt::join(extractKeys(m_dc->GetFieldMap()), ", "), + axom::fmt::join(extractKeys(m_dc->GetQFieldMap()), ", "), + axom::fmt::join(m_knownMaterials, ", ")); if(m_vfSampling == shaping::VolFracSampling::SAMPLE_AT_QPTS) { - sstr << fmt::format("\n\t* Shape qfuncs: {}", - fmt::join(extractKeys(m_inoutShapeQFuncs), ", ")) - << fmt::format("\n\t* Mat qfuncs: {}", - fmt::join(extractKeys(m_inoutMaterialQFuncs), ", ")); + axom::fmt::format_to( + std::back_inserter(out), + "\n\t* Shape qfuncs: {}" + "\n\t* Mat qfuncs: {}", + axom::fmt::join(extractKeys(m_inoutShapeQFuncs), ", "), + axom::fmt::join(extractKeys(m_inoutMaterialQFuncs), ", ")); } else if(m_vfSampling == shaping::VolFracSampling::SAMPLE_AT_DOFS) { - sstr << fmt::format("\n\t* Shape samples at DOFs: {}", - fmt::join(extractKeys(m_inoutDofs), ", ")); + axom::fmt::format_to(std::back_inserter(out), + "\n\t* Shape samples at DOFs: {}", + axom::fmt::join(extractKeys(m_inoutDofs), ", ")); } - SLIC_INFO(sstr.str()); + SLIC_INFO(axom::fmt::to_string(out)); } private: diff --git a/src/axom/quest/ScatteredInterpolation.hpp b/src/axom/quest/ScatteredInterpolation.hpp index 996b967a91..4628bcd7b5 100644 --- a/src/axom/quest/ScatteredInterpolation.hpp +++ b/src/axom/quest/ScatteredInterpolation.hpp @@ -7,6 +7,7 @@ #define QUEST_SCATTERED_INTERPOLATION_H_ #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/sidre.hpp" #include "axom/spin.hpp" @@ -19,7 +20,6 @@ #include "conduit_blueprint.hpp" #include -#include namespace { @@ -321,8 +321,10 @@ class ScatteredInterpolation spin::Mortonizer; // Fit as many bits as possible per dimension into an int64, i.e. floor(63/DIM) - constexpr int shift_bits = (DIM == 2) ? 31 : 21; - primal::NumericArray res(1 << shift_bits, DIM); + constexpr QuantizedCoordType shift_bits = (DIM == 2) ? 31 : 21; + primal::NumericArray res( + static_cast(1) << shift_bits, + DIM); auto quantizer = spin::rectangular_lattice_from_bounding_box( bb, @@ -498,7 +500,7 @@ class ScatteredInterpolation conduit::Node& input_mesh, const std::string& input_field_name, const std::string& output_field_name, - const double INVALID_VALUE = std::numeric_limits::quiet_NaN()) + const double INVALID_VALUE = axom::numeric_limits::quiet_NaN()) { constexpr auto INVALID_INDEX = DelaunayTriangulation::INVALID_INDEX; diff --git a/src/axom/quest/Shaper.cpp b/src/axom/quest/Shaper.cpp index 6c732aac70..cbf6e5b594 100644 --- a/src/axom/quest/Shaper.cpp +++ b/src/axom/quest/Shaper.cpp @@ -149,6 +149,8 @@ bool Shaper::isValidFormat(const std::string& format) const void Shaper::loadShape(const klee::Shape& shape) { + AXOM_ANNOTATE_SCOPE("loadShape"); + // Do not save the revolved volume in the default shaper. double revolved = 0.; loadShapeInternal(shape, m_percentError, revolved); @@ -175,9 +177,9 @@ void Shaper::loadShapeInternal(const klee::Shape& shape, if(!shape.getGeometry().hasGeometry()) { SLIC_DEBUG( - fmt::format("Current shape '{}' of material '{}' has no geometry", - shape.getName(), - shape.getMaterial())); + axom::fmt::format("Current shape '{}' of material '{}' has no geometry", + shape.getName(), + shape.getMaterial())); return; } @@ -292,6 +294,8 @@ void Shaper::applyTransforms(const klee::Shape& shape) void Shaper::applyTransforms(const numerics::Matrix& transformation) { + AXOM_ANNOTATE_SCOPE("applyTransforms"); + // Apply transformation to coordinates of each vertex in mesh if(!transformation.isIdentity()) { diff --git a/src/axom/quest/SignedDistance.hpp b/src/axom/quest/SignedDistance.hpp index d6a5756837..3380514d7b 100644 --- a/src/axom/quest/SignedDistance.hpp +++ b/src/axom/quest/SignedDistance.hpp @@ -11,6 +11,7 @@ #include "axom/core/Macros.hpp" #include "axom/core/Types.hpp" #include "axom/core/utilities/Utilities.hpp" +#include "axom/slic.hpp" // primal includes #include "axom/spin/BVH.hpp" @@ -430,7 +431,7 @@ template bool SignedDistance::setMesh(const mint::Mesh* surfaceMesh, int allocatorID) { - AXOM_PERF_MARK_FUNCTION("SignedDistance::setMesh"); + AXOM_ANNOTATE_SCOPE("SignedDistance::setMesh"); SLIC_ASSERT(surfaceMesh != nullptr); m_surfaceMesh = surfaceMesh; @@ -567,57 +568,55 @@ inline void SignedDistance::computeDistances( AXOM_UNUSED_VAR(result); SLIC_CHECK_MSG(result, "Input mesh is not an unstructured surface mesh"); - AXOM_PERF_MARK_SECTION( - "ComputeDistances", - for_all( - npts, - AXOM_LAMBDA(std::int32_t idx) { - PointType qpt = queryPts[idx]; - - MinCandidate curr_min {}; - - auto searchMinDist = [&](std::int32_t current_node, - const std::int32_t* leaf_nodes) { - int candidate_idx = leaf_nodes[current_node]; - - checkCandidate(qpt, - curr_min, - candidate_idx, - surfaceData, - surf_pts, - computeSigns); - }; - - auto traversePredicate = [&](const PointType& p, - const BoxType& bb) -> bool { - return axom::primal::squared_distance(p, bb) <= curr_min.minSqDist; - }; - - // Traverse the tree, searching for the point with minimum distance. - it.traverse_tree(qpt, searchMinDist, traversePredicate); - - double sgn = 1.0; - if(computeSigns) - { - // STEP 0: if point is outside the bounding box of the surface mesh, then - // it is outside, just return 1.0 - if(!(watertightInput && !boxDomain.contains(curr_min.minPt))) - { - sgn = computeSign(qpt, curr_min); - } - } + AXOM_ANNOTATE_SCOPE("ComputeDistances"); + for_all( + npts, + AXOM_LAMBDA(std::int32_t idx) { + PointType qpt = queryPts[idx]; - outSgnDist[idx] = sqrt(curr_min.minSqDist) * sgn; - if(outClosestPts) - { - outClosestPts[idx] = curr_min.minPt; - } + MinCandidate curr_min {}; + + auto searchMinDist = [&](std::int32_t current_node, + const std::int32_t* leaf_nodes) { + int candidate_idx = leaf_nodes[current_node]; + + checkCandidate(qpt, + curr_min, + candidate_idx, + surfaceData, + surf_pts, + computeSigns); + }; + + auto traversePredicate = [&](const PointType& p, const BoxType& bb) -> bool { + return axom::primal::squared_distance(p, bb) <= curr_min.minSqDist; + }; + + // Traverse the tree, searching for the point with minimum distance. + it.traverse_tree(qpt, searchMinDist, traversePredicate); - if(outNormals) + double sgn = 1.0; + if(computeSigns) + { + // STEP 0: if point is outside the bounding box of the surface mesh, then + // it is outside, just return 1.0 + if(!(watertightInput && !boxDomain.contains(curr_min.minPt))) { - outNormals[idx] = getSurfaceNormal(curr_min).unitVector(); + sgn = computeSign(qpt, curr_min); } - });); + } + + outSgnDist[idx] = sqrt(curr_min.minSqDist) * sgn; + if(outClosestPts) + { + outClosestPts[idx] = curr_min.minPt; + } + + if(outNormals) + { + outNormals[idx] = getSurfaceNormal(curr_min).unitVector(); + } + }); } //------------------------------------------------------------------------------ diff --git a/src/axom/quest/detail/Discretize_detail.hpp b/src/axom/quest/detail/Discretize_detail.hpp index 6dcd076a1b..9fdb582ba2 100644 --- a/src/axom/quest/detail/Discretize_detail.hpp +++ b/src/axom/quest/detail/Discretize_detail.hpp @@ -154,6 +154,8 @@ int discrSeg(const Point2D &a, axom::ArrayView &out, int idx) { + int hostAllocID = axom::execution_space::allocatorID(); + // Assert input assumptions SLIC_ASSERT(b[0] - a[0] >= 0); SLIC_ASSERT(a[1] >= 0); @@ -174,7 +176,11 @@ int discrSeg(const Point2D &a, // Establish a prism (in an octahedron record) with one triangular // end lying on the circle described by rotating point a around the // x-axis and the other lying on circle from rotating b. - out[idx + 0] = from_segment(a, b); + OctType *oct_from_seg = axom::allocate(1, hostAllocID); + oct_from_seg[0] = from_segment(a, b); + + axom::copy(out.data() + idx + 0, oct_from_seg, sizeof(OctType)); + axom::deallocate(oct_from_seg); // curr_lvl indexes to the first prism in the level we're currently refining int curr_lvl = idx; diff --git a/src/axom/quest/detail/DistributedClosestPointImpl.hpp b/src/axom/quest/detail/DistributedClosestPointImpl.hpp index 0875eb889a..86509bfd77 100644 --- a/src/axom/quest/detail/DistributedClosestPointImpl.hpp +++ b/src/axom/quest/detail/DistributedClosestPointImpl.hpp @@ -8,10 +8,11 @@ #include "axom/config.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" +#include "axom/core/execution/runtime_policy.hpp" #include "axom/slic.hpp" #include "axom/primal.hpp" #include "axom/spin.hpp" -#include "axom/core/execution/runtime_policy.hpp" #include "axom/fmt.hpp" @@ -22,7 +23,6 @@ #include "conduit_relay_io.hpp" #include -#include #include #include #include @@ -232,101 +232,332 @@ inline int isend_using_schema(conduit::Node& node, return mpi_error; } -/// A modified version of the conduit method. -// This version works correctly when src is MPI_ANY_SOURCE -// and tag is MPI_ANY_TAG. When conduit supports this, -// this version can be removed. -inline int recv_using_schema(conduit::Node& node, int src, int tag, MPI_Comm comm) +} // namespace mpi +} // namespace relay + +/*! + @brief Non-templated base class for the distributed closest point + implementation. + + This class provides an abstract base class handle for + DistributedClosestPointExec, which generically implements the code + for templated dimensions and execution spaces. + This class implements the non-templated parts of the implementation. + The two are highly coupled. +*/ +class DistributedClosestPointImpl { - MPI_Status status; +public: + DistributedClosestPointImpl(int allocatorID, bool isVerbose) + : m_allocatorID(allocatorID) + , m_isVerbose(isVerbose) + , m_mpiComm(MPI_COMM_NULL) + , m_rank(-1) + , m_nranks(-1) + , m_sqDistanceThreshold(axom::numeric_limits::max()) + { } - int mpi_error = MPI_Probe(src, tag, comm, &status); + virtual ~DistributedClosestPointImpl() { } - // CONDUIT_CHECK_MPI_ERROR(mpi_error); - // Expand the conduit macro: - if(static_cast(mpi_error) != MPI_SUCCESS) + virtual int getDimension() const = 0; + + /*! @brief Sets the allocator ID to the default associated with the + execution policy + */ + void setAllocatorID(int allocatorID) { - char check_mpi_err_str_buff[MPI_MAX_ERROR_STRING]; - int check_mpi_err_str_len = 0; - MPI_Error_string(mpi_error, check_mpi_err_str_buff, &check_mpi_err_str_len); + SLIC_ASSERT(allocatorID != axom::INVALID_ALLOCATOR_ID); + // TODO: If appropriate, how to check for compatibility with runtime policy? + m_allocatorID = allocatorID; + } - SLIC_ERROR( - fmt::format("MPI call failed: error code = {} error message = {}", - mpi_error, - check_mpi_err_str_buff)); + /*! + @brief Import object mesh points from the object blueprint mesh into internal memory. + + @param [in] mdMeshNode The blueprint mesh containing the object points. + @param [in] topologyName Name of the blueprint topology in \a mdMeshNode. + @note This function currently supports mesh blueprints with the "point" topology + */ + virtual void importObjectPoints(const conduit::Node& mdMeshNode, + const std::string& topologyName) = 0; + + //! @brief Generates the BVH tree for the classes execution space + virtual bool generateBVHTree() = 0; + + /*! + @brief Set the MPI communicator. + */ + void setMpiCommunicator(MPI_Comm mpiComm) + { + m_mpiComm = mpiComm; + MPI_Comm_rank(m_mpiComm, &m_rank); + MPI_Comm_size(m_mpiComm, &m_nranks); } - int buffer_size = 0; - MPI_Get_count(&status, MPI_BYTE, &buffer_size); + /*! + @brief Sets the threshold for the query - conduit::Node n_buffer(conduit::DataType::uint8(buffer_size)); + @param [in] threshold Ignore distances greater than this value. + */ + void setSquaredDistanceThreshold(double sqThreshold) + { + SLIC_ERROR_IF(sqThreshold < 0.0, + "Squared distance-threshold must be non-negative."); + m_sqDistanceThreshold = sqThreshold; + } + + /*! + @brief Set which output data fields to generate. + */ + void setOutputSwitches(bool outputRank, + bool outputIndex, + bool outputDistance, + bool outputCoords, + bool outputDomainIndex) + { + m_outputRank = outputRank; + m_outputIndex = outputIndex; + m_outputDistance = outputDistance; + m_outputCoords = outputCoords; + m_outputDomainIndex = outputDomainIndex; + } + + /*! + * Copy parts of query mesh partition to a conduit::Node for + * computation and communication. + * queryNode must be a blueprint multidomain mesh. + */ + void node_copy_query_to_xfer(conduit::Node& queryNode, + conduit::Node& xferNode, + const std::string& topologyName) const + { + xferNode["homeRank"] = m_rank; + xferNode["is_first"] = 1; + + const bool isMultidomain = + conduit::blueprint::mesh::is_multi_domain(queryNode); + const auto domainCount = + conduit::blueprint::mesh::number_of_domains(queryNode); + conduit::Node& xferDoms = xferNode["xferDoms"]; + for(conduit::index_t domainNum = 0; domainNum < domainCount; ++domainNum) + { + auto& queryDom = isMultidomain ? queryNode.child(domainNum) : queryNode; + + const std::string coordsetName = + queryDom + .fetch_existing( + axom::fmt::format("topologies/{}/coordset", topologyName)) + .as_string(); + const std::string& domName = queryDom.name(); + conduit::Node& xferDom = xferDoms[domName]; + conduit::Node& queryCoords = + queryDom.fetch_existing(fmt::format("coordsets/{}", coordsetName)); + conduit::Node& queryCoordsValues = queryCoords.fetch_existing("values"); - mpi_error = MPI_Recv(n_buffer.data_ptr(), - buffer_size, - MPI_BYTE, - status.MPI_SOURCE, - status.MPI_TAG, - comm, - &status); + const int dim = internal::extractDimension(queryCoordsValues); + const int qPtCount = internal::extractSize(queryCoordsValues); + xferDom["qPtCount"] = qPtCount; + xferDom["dim"] = dim; - std::uint8_t* n_buff_ptr = (std::uint8_t*)n_buffer.data_ptr(); + copy_components_to_interleaved(queryCoordsValues, xferDom["coords"]); - conduit::Node n_msg; - // length of the schema is sent as a 64-bit signed int - // NOTE: we aren't using this value ... - n_msg["schema_len"].set_external((std::int64_t*)n_buff_ptr); - n_buff_ptr += 8; - // wrap the schema string - n_msg["schema"].set_external_char8_str((char*)(n_buff_ptr)); - // create the schema - conduit::Schema rcv_schema; - conduit::Generator gen(n_msg["schema"].as_char8_str()); - gen.walk(rcv_schema); + constexpr bool isInt32 = std::is_same::value; + auto dtype = + isInt32 ? conduit::DataType::int32() : conduit::DataType::int64(); + dtype.set_number_of_elements(qPtCount); + xferDom["cp_index"].set_dtype(dtype); + xferDom["cp_rank"].set_dtype(dtype); + xferDom["cp_domain_index"].set_dtype(dtype); + xferDom["debug/cp_distance"].set_dtype(conduit::DataType::float64(qPtCount)); + xferDom["cp_coords"].set_dtype(conduit::DataType::float64(dim * qPtCount)); + } + } - // advance by the schema length - n_buff_ptr += n_msg["schema"].total_bytes_compact(); + /// Copy xferNode back to query mesh partition. + void node_copy_xfer_to_query(conduit::Node& xferNode, + conduit::Node& queryNode, + const std::string& topologyName) const + { + const bool isMultidomain = + conduit::blueprint::mesh::is_multi_domain(queryNode); + const auto domainCount = + conduit::blueprint::mesh::number_of_domains(queryNode); + conduit::Node& xferDoms = xferNode.fetch_existing("xferDoms"); + SLIC_ASSERT(xferDoms.number_of_children() == domainCount); + for(conduit::index_t domainNum = 0; domainNum < domainCount; ++domainNum) + { + auto& queryDom = isMultidomain ? queryNode.child(domainNum) : queryNode; + conduit::Node& xferDom = xferDoms.child(domainNum); + conduit::Node& fields = queryDom.fetch_existing("fields"); - // apply the schema to the data - n_msg["data"].set_external(rcv_schema, n_buff_ptr); + conduit::Node genericHeaders; + genericHeaders["association"] = "vertex"; + genericHeaders["topology"] = topologyName; - // copy out to our result node - node.update(n_msg["data"]); + if(m_outputRank) + { + auto& src = xferDom.fetch_existing("cp_rank"); + auto& dst = fields["cp_rank"]; + dst.set_node(genericHeaders); + dst["values"].move(src); + } - return mpi_error; -} + if(m_outputIndex) + { + auto& src = xferDom.fetch_existing("cp_index"); + auto& dst = fields["cp_index"]; + dst.set_node(genericHeaders); + dst["values"].move(src); + } -} // namespace mpi -} // namespace relay + if(m_outputDomainIndex) + { + auto& src = xferDom.fetch_existing("cp_domain_index"); + auto& dst = fields["cp_domain_index"]; + dst.set_node(genericHeaders); + dst["values"].move(src); + } -/** - * \brief Implements the DistributedClosestPoint query for a specified dimension - * using a provided execution policy (e.g. sequential, openmp, cuda, hip) - * - * \tparam NDIMS The dimension of the object mesh and query points - */ -template -class DistributedClosestPointImpl -{ -public: - static constexpr int DIM = NDIMS; - using RuntimePolicy = axom::runtime_policy::Policy; - using PointType = primal::Point; - using BoxType = primal::BoundingBox; - using PointArray = axom::Array; - using BoxArray = axom::Array; + if(m_outputDistance) + { + auto& src = xferDom.fetch_existing("debug/cp_distance"); + auto& dst = fields["cp_distance"]; + dst.set_node(genericHeaders); + dst["values"].move(src); + } - using SeqBVHTree = spin::BVH; -#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP - using OmpBVHTree = spin::BVH; -#endif -#ifdef AXOM_RUNTIME_POLICY_USE_CUDA - using CudaBVHTree = spin::BVH>; -#endif -#ifdef AXOM_RUNTIME_POLICY_USE_HIP - using HipBVHTree = spin::BVH>; -#endif + if(m_outputCoords) + { + auto& dst = fields["cp_coords"]; + dst.set_node(genericHeaders); + auto& dstValues = dst["values"]; + copy_interleaved_to_components(xferDom.fetch_existing("cp_coords"), + dstValues); + } + } + } + + /* + Special copy from coordinates (in a format that's not + necessarily interleaved) to a 1D array of interleaved values). + If coordinates are already interleaved, copy pointer. + */ + void copy_components_to_interleaved(conduit::Node& components, + conduit::Node& interleaved) const + { + const int dim = getDimension(); + const int qPtCount = internal::extractSize(components); + bool interleavedSrc = conduit::blueprint::mcarray::is_interleaved(components); + if(interleavedSrc) + { + interleaved.set_external(internal::getPointer(components.child(0)), + dim * qPtCount); + } + else + { + // Copy from component-wise src to 1D-interleaved dst. + interleaved.reset(); + interleaved.set_dtype(conduit::DataType::float64(dim * qPtCount)); + for(int d = 0; d < dim; ++d) + { + auto src = components.child(d).as_float64_array(); + double* dst = interleaved.as_float64_ptr() + d; + for(int i = 0; i < qPtCount; ++i) + { + dst[i * dim] = src[i]; + } + } + } + } + + /* + Special copy from 1D interleaved coordinate values back to + component-wise storage. + This is a nop if they point to the same data. + */ + void copy_interleaved_to_components(const conduit::Node& interleaved, + conduit::Node& components) const + { + const int dim = getDimension(); + const int qPtCount = interleaved.dtype().number_of_elements() / dim; + components.reset(); + // Copy from 1D-interleaved src to component-wise dst. + for(int d = 0; d < dim; ++d) + { + const double* src = interleaved.as_float64_ptr() + d; + auto& dstNode = components.append(); + dstNode.set_dtype(conduit::DataType(interleaved.dtype().id(), qPtCount)); + double* dst = dstNode.as_float64_ptr(); + for(int i = 0; i < qPtCount; ++i) + { + dst[i] = src[i * dim]; + } + } + } + + /// Wait for some non-blocking sends (if any) to finish. + void check_send_requests(std::list& isendRequests, + bool atLeastOne) const + { + std::vector reqs; + for(auto& isr : isendRequests) + { + reqs.push_back(isr.m_request); + } + + int inCount = static_cast(reqs.size()); + int outCount = 0; + std::vector indices(reqs.size(), -1); + if(atLeastOne) + { + MPI_Waitsome(inCount, + reqs.data(), + &outCount, + indices.data(), + MPI_STATUSES_IGNORE); + } + else + { + MPI_Testsome(inCount, + reqs.data(), + &outCount, + indices.data(), + MPI_STATUSES_IGNORE); + } + indices.resize(outCount); + + auto reqIter = isendRequests.begin(); + int prevIdx = 0; + for(const int idx : indices) + { + for(; prevIdx < idx; ++prevIdx) + { + ++reqIter; + } + reqIter = isendRequests.erase(reqIter); + ++prevIdx; + } + } + + virtual void computeClosestPoints(conduit::Node& queryMesh, + const std::string& topologyName) const = 0; + +protected: + int m_allocatorID; + bool m_isVerbose; + + MPI_Comm m_mpiComm; + int m_rank; + int m_nranks; + + double m_sqDistanceThreshold; + + bool m_outputRank = true; + bool m_outputIndex = true; + bool m_outputDistance = true; + bool m_outputCoords = true; + bool m_outputDomainIndex = true; -private: struct MinCandidate { /// Squared distance to query point @@ -338,28 +569,42 @@ class DistributedClosestPointImpl /// MPI rank of closest element int rank {-1}; }; +}; + +/*! + \brief Implements the DistributedClosestPoint query for + compile-time dimension and execution space. + + This class implements closest point search parts that depend + on dimension and execution space. + \tparam NDIMS The dimension of the object mesh and query points + \tparam ExecSpace The general execution space, such as axom::SEQ_EXEC and + axom::CUDA_EXEC<256>. +*/ +template +class DistributedClosestPointExec : public DistributedClosestPointImpl +{ public: + static constexpr int DIM = NDIMS; + using LoopPolicy = typename execution_space::loop_policy; + using ReducePolicy = typename execution_space::reduce_policy; + using PointType = primal::Point; + using BoxType = primal::BoundingBox; + using PointArray = axom::Array; + using BoxArray = axom::Array; + using BVHTreeType = spin::BVH; + /*! @brief Constructor - @param [i] runtimePolicy Indicates where local computations - are done. See axom::runtime_policy. @param [i] allocatorID Allocator ID, which must be compatible with - @c runtimePolicy. See axom::allocate and axom::reallocate. + @c ExecSpace. See axom::allocate and axom::reallocate. Also see setAllocatorID(). @param [i[ isVerbose */ - DistributedClosestPointImpl(RuntimePolicy runtimePolicy, - int allocatorID, - bool isVerbose) - : m_runtimePolicy(runtimePolicy) - , m_isVerbose(isVerbose) - , m_sqDistanceThreshold(std::numeric_limits::max()) - , m_allocatorID(allocatorID) - , m_mpiComm(MPI_COMM_NULL) - , m_rank(-1) - , m_nranks(-1) + DistributedClosestPointExec(int allocatorID, bool isVerbose) + : DistributedClosestPointImpl(allocatorID, isVerbose) , m_objectPtCoords(0, 0, allocatorID) , m_objectPtDomainIds(0, 0, allocatorID) { @@ -368,61 +613,10 @@ class DistributedClosestPointImpl setMpiCommunicator(MPI_COMM_WORLD); } - /** - * \brief Set the MPI communicator. - */ - void setMpiCommunicator(MPI_Comm mpiComm) - { - m_mpiComm = mpiComm; - MPI_Comm_rank(m_mpiComm, &m_rank); - MPI_Comm_size(m_mpiComm, &m_nranks); - } - - /** - * \brief Sets the threshold for the query - * - * \param [in] threshold Ignore distances greater than this value. - */ - void setSquaredDistanceThreshold(double sqThreshold) - { - SLIC_ERROR_IF(sqThreshold < 0.0, - "Squared distance-threshold must be non-negative."); - m_sqDistanceThreshold = sqThreshold; - } + int getDimension() const override { return DIM; } - /*! @brief Sets the allocator ID to the default associated with the - execution policy - */ - void setAllocatorID(int allocatorID) - { - SLIC_ASSERT(allocatorID != axom::INVALID_ALLOCATOR_ID); - // TODO: If appropriate, how to check for compatibility with runtime policy? - m_allocatorID = allocatorID; - } - - void setOutputSwitches(bool outputRank, - bool outputIndex, - bool outputDistance, - bool outputCoords, - bool outputDomainIndex) - { - m_outputRank = outputRank; - m_outputIndex = outputIndex; - m_outputDistance = outputDistance; - m_outputCoords = outputCoords; - m_outputDomainIndex = outputDomainIndex; - } - -public: - /** - * Import object mesh points from the object blueprint mesh into internal memory. - * - * \param [in] mdMeshNode The blueprint mesh containing the object points. - * \param [in] topologyName Name of the blueprint topology in \a mdMeshNode. - * \note This function currently supports mesh blueprints with the "point" topology - */ void importObjectPoints(const conduit::Node& mdMeshNode, - const std::string& topologyName) + const std::string& topologyName) override { // TODO: See if some of the copies in this method can be optimized out. @@ -493,113 +687,33 @@ class DistributedClosestPointImpl m_objectPtDomainIds = axom::Array(domIds, m_allocatorID); } - /// Predicate to check if the BVH tree has been initialized - bool isBVHTreeInitialized() const - { - switch(m_runtimePolicy) - { - case RuntimePolicy::seq: - return m_bvh_seq.get() != nullptr; - -#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP - case RuntimePolicy::omp: - return m_bvh_omp.get() != nullptr; -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_CUDA - case RuntimePolicy::cuda: - return m_bvh_cuda.get() != nullptr; -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_HIP - case RuntimePolicy::hip: - return m_bvh_hip.get() != nullptr; -#endif - } - - return false; - } - - /// Generates the BVH tree for the classes execution space - bool generateBVHTree() + bool generateBVHTree() override { // Delegates to generateBVHTreeImpl<> which uses // the execution space templated bvh tree - SLIC_ASSERT_MSG(!isBVHTreeInitialized(), "BVH tree already initialized"); + SLIC_ASSERT_MSG(!m_bvh, "BVH tree already initialized"); // In case user changed the allocator after setObjectMesh, // move the object point data to avoid repetitive page faults. if(m_objectPtCoords.getAllocatorID() != m_allocatorID) { PointArray tmpPoints(m_objectPtCoords, m_allocatorID); - m_objectPtCoords.swap(tmpPoints); - } - - switch(m_runtimePolicy) - { - case RuntimePolicy::seq: - m_bvh_seq = std::make_unique(); - return generateBVHTreeImpl(m_bvh_seq.get()); - -#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP - case RuntimePolicy::omp: - m_bvh_omp = std::make_unique(); - return generateBVHTreeImpl(m_bvh_omp.get()); -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_CUDA - case RuntimePolicy::cuda: - m_bvh_cuda = std::make_unique(); - return generateBVHTreeImpl(m_bvh_cuda.get()); -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_HIP - case RuntimePolicy::hip: - m_bvh_hip = std::make_unique(); - return generateBVHTreeImpl(m_bvh_hip.get()); -#endif + m_objectPtCoords.swap(tmpPoints); } - // Fail safe -- we should never reach this line! - SLIC_ERROR("Failed to initialize the BVH tree"); - - return false; + m_bvh = std::make_unique(); + return generateBVHTreeImpl(m_bvh.get()); } /// Get local copy of all ranks BVH root bounding boxes. void gatherBVHRoots() { SLIC_ASSERT_MSG( - isBVHTreeInitialized(), + m_bvh, "BVH tree must be initialized before calling 'gatherBVHRoots"); - BoxType local_bb; - switch(m_runtimePolicy) - { - case RuntimePolicy::seq: - local_bb = m_bvh_seq->getBounds(); - break; - -#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP - case RuntimePolicy::omp: - local_bb = m_bvh_omp->getBounds(); - break; -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_CUDA - case RuntimePolicy::cuda: - local_bb = m_bvh_cuda->getBounds(); - break; -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_HIP - case RuntimePolicy::hip: - local_bb = m_bvh_hip->getBounds(); - break; -#endif - } - + BoxType local_bb = m_bvh->getBounds(); gatherBoundingBoxes(local_bb, m_objectPartitionBbs); } @@ -654,178 +768,6 @@ class DistributedClosestPointImpl return rval; } - /*! - * Copy parts of query mesh partition to a conduit::Node for - * computation and communication. - * queryNode must be a blueprint multidomain mesh. - */ - void node_copy_query_to_xfer(conduit::Node& queryNode, - conduit::Node& xferNode, - const std::string& topologyName) const - { - xferNode["homeRank"] = m_rank; - xferNode["is_first"] = 1; - - const bool isMultidomain = - conduit::blueprint::mesh::is_multi_domain(queryNode); - const auto domainCount = - conduit::blueprint::mesh::number_of_domains(queryNode); - conduit::Node& xferDoms = xferNode["xferDoms"]; - for(conduit::index_t domainNum = 0; domainNum < domainCount; ++domainNum) - { - auto& queryDom = isMultidomain ? queryNode.child(domainNum) : queryNode; - - const std::string coordsetName = - queryDom - .fetch_existing( - axom::fmt::format("topologies/{}/coordset", topologyName)) - .as_string(); - const std::string& domName = queryDom.name(); - conduit::Node& xferDom = xferDoms[domName]; - conduit::Node& queryCoords = - queryDom.fetch_existing(fmt::format("coordsets/{}", coordsetName)); - conduit::Node& queryCoordsValues = queryCoords.fetch_existing("values"); - - const int dim = internal::extractDimension(queryCoordsValues); - const int qPtCount = internal::extractSize(queryCoordsValues); - xferDom["qPtCount"] = qPtCount; - xferDom["dim"] = dim; - - copy_components_to_interleaved(queryCoordsValues, xferDom["coords"]); - - constexpr bool isInt32 = std::is_same::value; - auto dtype = - isInt32 ? conduit::DataType::int32() : conduit::DataType::int64(); - dtype.set_number_of_elements(qPtCount); - xferDom["cp_index"].set_dtype(dtype); - xferDom["cp_rank"].set_dtype(dtype); - xferDom["cp_domain_index"].set_dtype(dtype); - xferDom["debug/cp_distance"].set_dtype(conduit::DataType::float64(qPtCount)); - xferDom["cp_coords"].set_dtype(conduit::DataType::float64(dim * qPtCount)); - } - } - - /// Copy xferNode back to query mesh partition. - void node_copy_xfer_to_query(conduit::Node& xferNode, - conduit::Node& queryNode, - const std::string& topologyName) const - { - const bool isMultidomain = - conduit::blueprint::mesh::is_multi_domain(queryNode); - const auto domainCount = - conduit::blueprint::mesh::number_of_domains(queryNode); - conduit::Node& xferDoms = xferNode.fetch_existing("xferDoms"); - SLIC_ASSERT(xferDoms.number_of_children() == domainCount); - for(conduit::index_t domainNum = 0; domainNum < domainCount; ++domainNum) - { - auto& queryDom = isMultidomain ? queryNode.child(domainNum) : queryNode; - conduit::Node& xferDom = xferDoms.child(domainNum); - conduit::Node& fields = queryDom.fetch_existing("fields"); - - conduit::Node genericHeaders; - genericHeaders["association"] = "vertex"; - genericHeaders["topology"] = topologyName; - - if(m_outputRank) - { - auto& src = xferDom.fetch_existing("cp_rank"); - auto& dst = fields["cp_rank"]; - dst.set_node(genericHeaders); - dst["values"].move(src); - } - - if(m_outputIndex) - { - auto& src = xferDom.fetch_existing("cp_index"); - auto& dst = fields["cp_index"]; - dst.set_node(genericHeaders); - dst["values"].move(src); - } - - if(m_outputDomainIndex) - { - auto& src = xferDom.fetch_existing("cp_domain_index"); - auto& dst = fields["cp_domain_index"]; - dst.set_node(genericHeaders); - dst["values"].move(src); - } - - if(m_outputDistance) - { - auto& src = xferDom.fetch_existing("debug/cp_distance"); - auto& dst = fields["cp_distance"]; - dst.set_node(genericHeaders); - dst["values"].move(src); - } - - if(m_outputCoords) - { - auto& dst = fields["cp_coords"]; - dst.set_node(genericHeaders); - auto& dstValues = dst["values"]; - copy_interleaved_to_components(xferDom.fetch_existing("cp_coords"), - dstValues); - } - } - } - - /* - Special copy from coordinates (in a format that's not - necessarily interleaved) to a 1D array of interleaved values). - If coordinates are already interleaved, copy pointer. - */ - void copy_components_to_interleaved(conduit::Node& components, - conduit::Node& interleaved) const - { - const int dim = internal::extractDimension(components); - const int qPtCount = internal::extractSize(components); - bool interleavedSrc = conduit::blueprint::mcarray::is_interleaved(components); - if(interleavedSrc) - { - interleaved.set_external(internal::getPointer(components.child(0)), - dim * qPtCount); - } - else - { - // Copy from component-wise src to 1D-interleaved dst. - interleaved.reset(); - interleaved.set_dtype(conduit::DataType::float64(dim * qPtCount)); - for(int d = 0; d < dim; ++d) - { - auto src = components.child(d).as_float64_array(); - double* dst = interleaved.as_float64_ptr() + d; - for(int i = 0; i < qPtCount; ++i) - { - dst[i * dim] = src[i]; - } - } - } - } - - /* - Special copy from 1D interleaved coordinate values back to - component-wise storage. - This is a nop if they point to the same data. - */ - void copy_interleaved_to_components(const conduit::Node& interleaved, - conduit::Node& components) const - { - const int qPtCount = interleaved.dtype().number_of_elements() / DIM; - components.reset(); - // Copy from 1D-interleaved src to component-wise dst. - for(int d = 0; d < DIM; ++d) - { - const double* src = interleaved.as_float64_ptr() + d; - auto& dstNode = components.append(); - dstNode.set_dtype(conduit::DataType(interleaved.dtype().id(), qPtCount)); - double* dst = dstNode.as_float64_ptr(); - for(int i = 0; i < qPtCount; ++i) - { - dst[i] = src[i * DIM]; - } - } - } - /** * \brief Implementation of the user-facing * DistributedClosestPoint::computeClosestPoints() method. @@ -836,10 +778,10 @@ class DistributedClosestPointImpl * using check_send_requests(). */ void computeClosestPoints(conduit::Node& queryMesh, - const std::string& topologyName) const + const std::string& topologyName) const override { SLIC_ASSERT_MSG( - isBVHTreeInitialized(), + m_bvh, "BVH tree must be initialized before calling 'computeClosestPoints"); std::map> xferNodes; @@ -860,7 +802,7 @@ class DistributedClosestPointImpl { conduit::Node& xferNode = *xferNodes[m_rank]; - computeLocalClosestPointsByPolicy(xferNode); + computeLocalClosestPoints(xferNode); } const auto& myObjectBb = m_objectPartitionBbs[m_rank]; @@ -924,10 +866,10 @@ class DistributedClosestPointImpl // Receive the next xferNode std::shared_ptr recvXferNodePtr = std::make_shared(); - relay::mpi::recv_using_schema(*recvXferNodePtr, - MPI_ANY_SOURCE, - tag, - m_mpiComm); + conduit::relay::mpi::recv_using_schema(*recvXferNodePtr, + MPI_ANY_SOURCE, + tag, + m_mpiComm); const int homeRank = recvXferNodePtr->fetch_existing("homeRank").as_int(); --remainingRecvs; @@ -940,7 +882,7 @@ class DistributedClosestPointImpl } else { - computeLocalClosestPointsByPolicy(xferNode); + computeLocalClosestPoints(xferNode); isendRequests.emplace_back(conduit::relay::mpi::Request()); auto& isendRequest = isendRequests.back(); @@ -969,35 +911,6 @@ class DistributedClosestPointImpl } private: - /// Distance search using local object partition and xferNode. - void computeLocalClosestPointsByPolicy(conduit::Node& xferNode) const - { - switch(m_runtimePolicy) - { - case RuntimePolicy::seq: - computeLocalClosestPoints(m_bvh_seq.get(), xferNode); - break; - -#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP - case RuntimePolicy::omp: - computeLocalClosestPoints(m_bvh_omp.get(), xferNode); -#endif - break; - -#ifdef AXOM_RUNTIME_POLICY_USE_CUDA - case RuntimePolicy::cuda: - computeLocalClosestPoints(m_bvh_cuda.get(), xferNode); -#endif - break; - -#ifdef AXOM_RUNTIME_POLICY_USE_HIP - case RuntimePolicy::hip: - computeLocalClosestPoints(m_bvh_hip.get(), xferNode); -#endif - break; - } - } - /** Determine the next rank (in ring order) with an object partition close to the query points in xferNode. The intent is to send @@ -1025,58 +938,11 @@ class DistributedClosestPointImpl return -1; } - /// Wait for some non-blocking sends (if any) to finish. - void check_send_requests(std::list& isendRequests, - bool atLeastOne) const - { - std::vector reqs; - for(auto& isr : isendRequests) - { - reqs.push_back(isr.m_request); - } - - int inCount = static_cast(reqs.size()); - int outCount = 0; - std::vector indices(reqs.size(), -1); - if(atLeastOne) - { - MPI_Waitsome(inCount, - reqs.data(), - &outCount, - indices.data(), - MPI_STATUSES_IGNORE); - } - else - { - MPI_Testsome(inCount, - reqs.data(), - &outCount, - indices.data(), - MPI_STATUSES_IGNORE); - } - indices.resize(outCount); - - auto reqIter = isendRequests.begin(); - int prevIdx = 0; - for(const int idx : indices) - { - for(; prevIdx < idx; ++prevIdx) - { - ++reqIter; - } - reqIter = isendRequests.erase(reqIter); - ++prevIdx; - } - } - // Note: following should be private, but nvcc complains about lambdas in private scope public: /// Templated implementation of generateBVHTree function - template bool generateBVHTreeImpl(BVHTreeType* bvh) { - using ExecSpace = typename BVHTreeType::ExecSpaceType; - SLIC_ASSERT(bvh != nullptr); const int npts = m_objectPtCoords.size(); @@ -1097,11 +963,8 @@ class DistributedClosestPointImpl return (result == spin::BVH_BUILD_OK); } - template - void computeLocalClosestPoints(const BVHTreeType* bvh, - conduit::Node& xferNode) const + void computeLocalClosestPoints(conduit::Node& xferNode) const { - using ExecSpace = typename BVHTreeType::ExecSpaceType; using axom::primal::squared_distance; // Note: There is some additional computation the first time this function @@ -1179,9 +1042,9 @@ class DistributedClosestPointImpl cp_rank.fill(-1); cp_idx.fill(-1); cp_domidx.fill(-1); - const PointType nowhere(std::numeric_limits::signaling_NaN()); + const PointType nowhere(axom::numeric_limits::signaling_NaN()); cp_pos.fill(nowhere); - cp_dist.fill(std::numeric_limits::signaling_NaN()); + cp_dist.fill(axom::numeric_limits::signaling_NaN()); } auto query_inds = cp_idx.view(); auto query_doms = cp_domidx.view(); @@ -1196,19 +1059,23 @@ class DistributedClosestPointImpl if(hasObjectPoints) { // Get a device-useable iterator - auto it = bvh->getTraverser(); + auto it = m_bvh->getTraverser(); const int rank = m_rank; - double* sqDistThresh = axom::allocate( + axom::Array sqDistThresh_host( 1, - axom::execution_space::allocatorID()); - *sqDistThresh = m_sqDistanceThreshold; + 1, + axom::execution_space::allocatorID()); + sqDistThresh_host[0] = m_sqDistanceThreshold; + axom::Array sqDistThresh_device = + axom::Array(sqDistThresh_host, m_allocatorID); + auto sqDistThresh_device_view = sqDistThresh_device.view(); auto ptCoordsView = m_objectPtCoords.view(); auto ptDomainIdsView = m_objectPtDomainIds.view(); - AXOM_PERF_MARK_SECTION( - "ComputeClosestPoints", + { + AXOM_ANNOTATE_SCOPE("ComputeClosestPoints"); axom::for_all( qPtCount, AXOM_LAMBDA(std::int32_t idx) mutable { @@ -1244,7 +1111,8 @@ class DistributedClosestPointImpl auto traversePredicate = [&](const PointType& p, const BoxType& bb) -> bool { auto sqDist = squared_distance(p, bb); - return sqDist <= curr_min.sqDist && sqDist <= sqDistThresh[0]; + return sqDist <= curr_min.sqDist && + sqDist <= sqDistThresh_device_view[0]; }; // Traverse the tree, searching for the point with minimum distance. @@ -1264,9 +1132,8 @@ class DistributedClosestPointImpl query_min_dist[idx] = sqrt(curr_min.sqDist); } } - });); - - axom::deallocate(sqDistThresh); + }); + } } axom::copy(cpIndexes.data(), @@ -1299,21 +1166,6 @@ class DistributedClosestPointImpl } private: - RuntimePolicy m_runtimePolicy; - bool m_isVerbose {false}; - double m_sqDistanceThreshold; - int m_allocatorID; - MPI_Comm m_mpiComm; - bool m_mpiCommIsPrivate; - int m_rank; - int m_nranks; - - bool m_outputRank = true; - bool m_outputIndex = true; - bool m_outputDistance = true; - bool m_outputCoords = true; - bool m_outputDomainIndex = true; - /*! @brief Object point coordindates array. @@ -1328,20 +1180,8 @@ class DistributedClosestPointImpl */ BoxArray m_objectPartitionBbs; - std::unique_ptr m_bvh_seq; - -#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP - std::unique_ptr m_bvh_omp; -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_CUDA - std::unique_ptr m_bvh_cuda; -#endif - -#ifdef AXOM_RUNTIME_POLICY_USE_HIP - std::unique_ptr m_bvh_hip; -#endif -}; // DistributedClosestPointImpl + std::unique_ptr m_bvh; +}; // DistributedClosestPointExec } // namespace internal diff --git a/src/axom/quest/detail/MarchingCubesImpl.hpp b/src/axom/quest/detail/MarchingCubesImpl.hpp index eb46623177..02c1f336fc 100644 --- a/src/axom/quest/detail/MarchingCubesImpl.hpp +++ b/src/axom/quest/detail/MarchingCubesImpl.hpp @@ -13,12 +13,12 @@ #include "axom/core/execution/execution_space.hpp" #include "axom/slic/interface/slic_macros.hpp" -#include "axom/quest/ArrayIndexer.hpp" +#include "axom/core/MDMapping.hpp" #include "axom/quest/MeshViewUtil.hpp" #include "axom/quest/detail/MarchingCubesSingleDomain.hpp" #include "axom/primal/geometry/Point.hpp" #include "axom/primal/constants.hpp" -#include "axom/mint/execution/internal/structured_exec.hpp" +#include "axom/core/execution/nested_for_exec.hpp" #include "axom/fmt.hpp" namespace axom @@ -45,7 +45,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase public: using Point = axom::primal::Point; using MIdx = axom::StackArray; - using Indexer = axom::ArrayIndexer; + using MDMapper = axom::MDMapping; using FacetIdType = int; using LoopPolicy = typename execution_space::loop_policy; using ReducePolicy = typename execution_space::reduce_policy; @@ -65,10 +65,10 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase axom::Array& caseIdsFlat, axom::Array& crossingFlags, axom::Array& scannedFlags, - axom::Array& facetIncrs) + axom::Array& facetIncrs) : m_allocatorID(allocatorID) , m_caseIds() - , m_caseIdsIndexer() + , m_caseIdsMDMapper() , m_caseIdsFlat(caseIdsFlat) , m_crossingFlags(crossingFlags) , m_scannedFlags(scannedFlags) @@ -101,7 +101,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase const std::string& maskFieldName) override { // Time this due to potentially slow memory allocation - AXOM_PERF_MARK_FUNCTION("MarchingCubesImpl::initialize"); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::initialize"); clearDomain(); SLIC_ASSERT(conduit::blueprint::mesh::topology::dims(dom.fetch_existing( @@ -124,9 +124,9 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase ? MarchingCubesDataParallelism::hybridParallel #if defined(AXOM_USE_OPENMP) && defined(AXOM_USE_RAJA) : std::is_same::value - ? MarchingCubesDataParallelism::hybridParallel + ? MarchingCubesDataParallelism::hybridParallel #endif - : MarchingCubesDataParallelism::fullParallel; + : MarchingCubesDataParallelism::fullParallel; m_dataParallelism = dataPar; @@ -150,6 +150,8 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase m_contourVal = contourVal; } + void setMaskValue(int maskVal) override { m_maskVal = maskVal; } + /*! @brief Implementation of virtual markCrossings. @@ -158,20 +160,20 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase */ void markCrossings() override { - AXOM_PERF_MARK_FUNCTION("MarchingCubesImpl::markCrossings"); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::markCrossings"); m_caseIdsFlat.resize(m_mvu.getCellCount(), 0); m_caseIdsFlat.fill(0); // Choose caseIds stride order to match function stride order. - Indexer fcnIndexer(m_fcnView.strides()); - m_caseIdsIndexer.initializeShape(m_bShape, fcnIndexer.slowestDirs()); + MDMapper fcnMDMapper(m_fcnView.strides()); + m_caseIdsMDMapper.initializeShape(m_bShape, fcnMDMapper.slowestDirs()); m_caseIds = axom::ArrayView( m_caseIdsFlat.data(), m_bShape, - m_caseIdsIndexer.strides()); - SLIC_ASSERT_MSG(Indexer(m_caseIds.strides()).getStrideOrder() == - fcnIndexer.getStrideOrder(), + m_caseIdsMDMapper.strides()); + SLIC_ASSERT_MSG(MDMapper(m_caseIds.strides()).getStrideOrder() == + fcnMDMapper.getStrideOrder(), "Mismatched order is inefficient."); markCrossings_dim(); @@ -181,14 +183,14 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase template typename std::enable_if::type markCrossings_dim() { - MarkCrossings_Util mcu(m_caseIds, m_fcnView, m_maskView, m_contourVal); + MarkCrossings_Util mcu(m_caseIds, m_fcnView, m_maskView, m_contourVal, m_maskVal); - auto order = m_caseIdsIndexer.getStrideOrder(); + auto order = m_caseIdsMDMapper.getStrideOrder(); #if defined(AXOM_USE_RAJA) RAJA::RangeSegment jRange(0, m_bShape[1]); RAJA::RangeSegment iRange(0, m_bShape[0]); using EXEC_POL = - typename axom::mint::internal::structured_exec::loop2d_policy; + typename axom::internal::nested_for_exec::loop2d_policy; if(int(order) & int(axom::ArrayStrideOrder::COLUMN)) { RAJA::kernel( @@ -233,16 +235,16 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase template typename std::enable_if::type markCrossings_dim() { - MarkCrossings_Util mcu(m_caseIds, m_fcnView, m_maskView, m_contourVal); + MarkCrossings_Util mcu(m_caseIds, m_fcnView, m_maskView, m_contourVal, m_maskVal); - auto order = m_caseIdsIndexer.getStrideOrder(); + auto order = m_caseIdsMDMapper.getStrideOrder(); // order ^= axom::ArrayStrideOrder::BOTH; // Pick wrong ordering to test behavior. #if defined(AXOM_USE_RAJA) RAJA::RangeSegment kRange(0, m_bShape[2]); RAJA::RangeSegment jRange(0, m_bShape[1]); RAJA::RangeSegment iRange(0, m_bShape[0]); using EXEC_POL = - typename axom::mint::internal::structured_exec::loop3d_policy; + typename axom::internal::nested_for_exec::loop3d_policy; if(int(order) & int(axom::ArrayStrideOrder::COLUMN)) { RAJA::kernel( @@ -300,14 +302,17 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase axom::ArrayView fcnView; axom::ArrayView maskView; double contourVal; + int maskVal; MarkCrossings_Util(axom::ArrayView& caseIds, axom::ArrayView& fcnView_, axom::ArrayView& maskView_, - double contourVal_) + double contourVal_, + int maskVal_) : caseIdsView(caseIds) , fcnView(fcnView_) , maskView(maskView_) , contourVal(contourVal_) + , maskVal(maskVal_) { } //!@brief Compute the case index into cases2D or cases3D. @@ -329,7 +334,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase AXOM_HOST_DEVICE inline typename std::enable_if::type computeCaseId(axom::IndexType i, axom::IndexType j) const { - const bool useZone = maskView.empty() || bool(maskView(i, j)); + const bool useZone = maskView.empty() || (maskView(i, j) == maskVal); if(useZone) { // clang-format off @@ -348,7 +353,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase AXOM_HOST_DEVICE inline typename std::enable_if::type computeCaseId(axom::IndexType i, axom::IndexType j, axom::IndexType k) const { - const bool useZone = maskView.empty() || bool(maskView(i, j, k)); + const bool useZone = maskView.empty() || (maskView(i, j, k) == maskVal); if(useZone) { // clang-format off @@ -369,24 +374,24 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase void scanCrossings() override { - AXOM_PERF_MARK_FUNCTION("MarchingCubesImpl::scanCrossings"); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings"); if(m_dataParallelism == axom::quest::MarchingCubesDataParallelism::hybridParallel) { - AXOM_PERF_MARK_SECTION("MarchingCubesImpl::scanCrossings:hybridParallel", - scanCrossings_hybridParallel();); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings:hybridParallel"); + scanCrossings_hybridParallel(); } else if(m_dataParallelism == axom::quest::MarchingCubesDataParallelism::fullParallel) { - AXOM_PERF_MARK_SECTION("MarchingCubesImpl::scanCrossings:fullParallel", - scanCrossings_fullParallel();); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings:fullParallel"); + scanCrossings_fullParallel(); } } void allocateIndexLists() { - AXOM_PERF_MARK_FUNCTION("MarchingCubesImpl::allocateIndexLists"); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::allocateIndexLists"); m_crossingParentIds.resize(m_crossingCount, 0); m_crossingCases.resize(m_crossingCount, 0); m_facetIncrs.resize(m_crossingCount, 0); @@ -407,8 +412,8 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase m_scannedFlags.resize(1 + m_mvu.getCellCount(), 0); auto crossingFlagsView = m_crossingFlags.view(); - AXOM_PERF_MARK_SECTION( - "MarchingCubesImpl::scanCrossings:set_flags", + { + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings:set_flags"); axom::for_all( 0, parentCellCount, @@ -416,22 +421,26 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase auto numContourCells = num_contour_cells(caseIdsView.flatIndex(parentCellId)); crossingFlagsView[parentCellId] = bool(numContourCells); - });); + }); + } m_scannedFlags.fill(0, 1, 0); - AXOM_PERF_MARK_SECTION( - "MarchingCubesImpl::scanCrossings:scan_flags", + + { + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings:scan_flags"); #if defined(AXOM_USE_RAJA) RAJA::inclusive_scan( RAJA::make_span(m_crossingFlags.data(), parentCellCount), RAJA::make_span(m_scannedFlags.data() + 1, parentCellCount), RAJA::operators::plus {}); + #else - for(axom::IndexType n = 0; n < parentCellCount; ++n) { + for(axom::IndexType n = 0; n < parentCellCount; ++n) + { m_scannedFlags[n + 1] = m_scannedFlags[n] + m_crossingFlags[n]; } #endif - ); + } axom::copy(&m_crossingCount, m_scannedFlags.data() + m_scannedFlags.size() - 1, @@ -446,21 +455,22 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase auto crossingCasesView = m_crossingCases.view(); auto facetIncrsView = m_facetIncrs.view(); - AXOM_PERF_MARK_SECTION( - "MarchingCubesImpl::scanCrossings:set_incrs", - auto loopBody = - AXOM_LAMBDA(axom::IndexType parentCellId) { - if(scannedFlagsView[parentCellId] != scannedFlagsView[1 + parentCellId]) - { - auto crossingId = scannedFlagsView[parentCellId]; - auto caseId = caseIdsView.flatIndex(parentCellId); - auto facetIncr = num_contour_cells(caseId); - crossingParentIdsView[crossingId] = parentCellId; - crossingCasesView[crossingId] = caseId; - facetIncrsView[crossingId] = facetIncr; - } - }; - axom::for_all(0, parentCellCount, loopBody);); + { + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings:set_incrs"); + auto loopBody = AXOM_LAMBDA(axom::IndexType parentCellId) + { + if(scannedFlagsView[parentCellId] != scannedFlagsView[1 + parentCellId]) + { + auto crossingId = scannedFlagsView[parentCellId]; + auto caseId = caseIdsView.flatIndex(parentCellId); + auto facetIncr = num_contour_cells(caseId); + crossingParentIdsView[crossingId] = parentCellId; + crossingCasesView[crossingId] = caseId; + facetIncrsView[crossingId] = facetIncr; + } + }; + axom::for_all(0, parentCellCount, loopBody); + } // // Prefix-sum the facets counts to get first facet id for each crossing @@ -468,19 +478,21 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase // m_firstFacetIds.fill(0, 1, 0); - AXOM_PERF_MARK_SECTION( - "MarchingCubesImpl::scanCrossings:scan_incrs", + + { + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::scanCrossings:scan_incrs"); #if defined(AXOM_USE_RAJA) RAJA::inclusive_scan( RAJA::make_span(m_facetIncrs.data(), m_crossingCount), RAJA::make_span(m_firstFacetIds.data() + 1, m_crossingCount), RAJA::operators::plus {}); #else - for(axom::IndexType n = 0; n < parentCellCount; ++n) { + for(axom::IndexType n = 0; n < parentCellCount; ++n) + { m_firstFacetIds[n + 1] = m_firstFacetIds[n] + m_facetIncrs[n]; } #endif - ); + } axom::copy(&m_facetCount, m_firstFacetIds.data() + m_firstFacetIds.size() - 1, @@ -584,7 +596,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase void computeFacets() override { - AXOM_PERF_MARK_FUNCTION("MarchingCubesImpl::computeFacets"); + AXOM_ANNOTATE_SCOPE("MarchingCubesImpl::computeFacets"); const auto firstFacetIdsView = m_firstFacetIds.view(); const auto crossingParentIdsView = m_crossingParentIds.view(); const auto crossingCasesView = m_crossingCases.view(); @@ -595,7 +607,10 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase axom::ArrayView facetParentIdsView = m_facetParentIds; const axom::IndexType facetIndexOffset = m_facetIndexOffset; - ComputeFacets_Util cfu(m_contourVal, m_caseIdsIndexer, m_fcnView, m_coordsViews); + ComputeFacets_Util cfu(m_contourVal, + m_caseIdsMDMapper, + m_fcnView, + m_coordsViews); auto gen_for_parent_cell = AXOM_LAMBDA(axom::IndexType crossingId) { @@ -641,17 +656,17 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase struct ComputeFacets_Util { double contourVal; - axom::ArrayIndexer indexer; + axom::MDMapping mapping; axom::ArrayView fcnView; axom::StackArray, DIM> coordsViews; ComputeFacets_Util( double contourVal_, - const axom::ArrayIndexer& parentIndexer_, + const axom::MDMapping& parentMDMapper, const axom::ArrayView& fcnView_, const axom::StackArray, DIM> coordsViews_) : contourVal(contourVal_) - , indexer(parentIndexer_) + , mapping(parentMDMapper) , fcnView(fcnView_) , coordsViews(coordsViews_) { } @@ -665,7 +680,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase const auto& x = coordsViews[0]; const auto& y = coordsViews[1]; - const auto c = indexer.toMultiIndex(parentCellId); + const auto c = mapping.toMultiIndex(parentCellId); const auto& i = c[0]; const auto& j = c[1]; @@ -691,7 +706,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase const auto& y = coordsViews[1]; const auto& z = coordsViews[2]; - const auto c = indexer.toMultiIndex(parentCellId); + const auto c = mapping.toMultiIndex(parentCellId); const auto& i = c[0]; const auto& j = c[1]; const auto& k = c[2]; @@ -928,11 +943,11 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase @brief Crossing case for each computational mesh cell. This is a multidim view into 1D data from m_caseIdsFlat, - set up with help from m_caseIdsIndexer. + set up with help from m_caseIdsMDMapper. */ axom::ArrayView m_caseIds; /*! - @brief Multidim indexer to handle data ordering in + @brief Multidim mapping to handle data ordering in m_caseIdsFlat. We want caseIds ordering to match m_fcnView, but Array @@ -940,7 +955,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase the order, we put caseIds in a 1D array and construct a multidim view with the ordering we want. */ - axom::ArrayIndexer m_caseIdsIndexer; + axom::MDMapping m_caseIdsMDMapper; // Array references refer to shared Arrays in MarchingCubes. @@ -954,7 +969,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase axom::Array& m_scannedFlags; //!@brief Number of surface mesh facets added by each crossing. - axom::Array& m_facetIncrs; + axom::Array& m_facetIncrs; //!@brief Number of parent cells crossing the contour surface. axom::IndexType m_crossingCount = 0; @@ -976,6 +991,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase static constexpr std::uint8_t CELL_CORNER_COUNT = (DIM == 3) ? 8 : 4; double m_contourVal = 0.0; + int m_maskVal = 1; axom::StackArray emptyShape() { @@ -988,7 +1004,7 @@ class MarchingCubesImpl : public MarchingCubesSingleDomain::ImplBase } }; -} // end namespace marching_cubes -} // end namespace detail -} // end namespace quest -} // end namespace axom +} // namespace marching_cubes +} // namespace detail +} // namespace quest +} // namespace axom diff --git a/src/axom/quest/detail/MarchingCubesSingleDomain.hpp b/src/axom/quest/detail/MarchingCubesSingleDomain.hpp index 007e3ce7dd..ceb73c2fd5 100644 --- a/src/axom/quest/detail/MarchingCubesSingleDomain.hpp +++ b/src/axom/quest/detail/MarchingCubesSingleDomain.hpp @@ -108,6 +108,15 @@ class MarchingCubesSingleDomain if(m_impl) m_impl->setContourValue(m_contourVal); } + void setMaskValue(double maskVal) + { + m_maskVal = maskVal; + if(m_impl) + { + m_impl->setMaskValue(m_maskVal); + } + } + // Methods trivially delegated to implementation. void markCrossings() { m_impl->markCrossings(); } void scanCrossings() { m_impl->scanCrossings(); } @@ -155,6 +164,7 @@ class MarchingCubesSingleDomain virtual void setFunctionField(const std::string &fcnFieldName) = 0; virtual void setContourValue(double contourVal) = 0; + virtual void setMaskValue(int maskVal) = 0; virtual void setDataParallelism(MarchingCubesDataParallelism dataPar) = 0; @@ -194,6 +204,7 @@ class MarchingCubesSingleDomain MarchingCubesDataParallelism::byPolicy; double m_contourVal = 0.0; + int m_maskVal = 1; axom::ArrayView m_facetNodeIds; axom::ArrayView m_facetNodeCoords; axom::ArrayView m_facetParentIds; @@ -231,6 +242,7 @@ class MarchingCubesSingleDomain std::string m_maskPath; double m_contourVal = 0.0; + int m_maskVal = 1; std::unique_ptr m_impl; diff --git a/src/axom/quest/detail/MeshTester_detail.hpp b/src/axom/quest/detail/MeshTester_detail.hpp index 2a453138ee..18af756c8f 100644 --- a/src/axom/quest/detail/MeshTester_detail.hpp +++ b/src/axom/quest/detail/MeshTester_detail.hpp @@ -16,7 +16,6 @@ // RAJA includes #if defined(AXOM_USE_RAJA) #include "RAJA/RAJA.hpp" - #include "axom/mint/execution/internal/structured_exec.hpp" #endif // Acceleration data structure includes diff --git a/src/axom/quest/examples/CMakeLists.txt b/src/axom/quest/examples/CMakeLists.txt index 550f8d5cc1..4841fa0fe5 100644 --- a/src/axom/quest/examples/CMakeLists.txt +++ b/src/axom/quest/examples/CMakeLists.txt @@ -22,6 +22,24 @@ axom_add_executable( FOLDER axom/quest/examples ) +if(AXOM_ENABLE_TESTS AND AXOM_DATA_DIR AND CALIPER_FOUND) + set(_input_file "${AXOM_DATA_DIR}/quest/sphere_binary.stl") + + if(AXOM_ENABLE_MPI) # this test requires MPI when available + set(_num_ranks 1) # (but only 1 rank) + else() # but can otherwise be run without MPI + unset(_num_ranks) + endif() + + axom_add_test( + NAME quest_containment_sphere_ex + COMMAND quest_containment_driver_ex + --input ${_input_file} + --caliper report + NUM_MPI_TASKS ${_num_ranks} + ) +endif() + # BVH two pass example -------------------------------------------------------- if (RAJA_FOUND AND UMPIRE_FOUND) axom_add_executable( @@ -31,6 +49,33 @@ if (RAJA_FOUND AND UMPIRE_FOUND) DEPENDS_ON ${quest_example_depends} FOLDER axom/quest/examples ) + + # Add unit tests + if(AXOM_ENABLE_TESTS AND AXOM_DATA_DIR) + + # Run the quest_bvh_two_pass example with different raja policies + + set(input_file "${AXOM_DATA_DIR}/quest/unit_cube.stl") + + set (_policies "seq") + blt_list_append(TO _policies ELEMENTS "omp" IF AXOM_ENABLE_OPENMP) + blt_list_append(TO _policies ELEMENTS "cuda" IF AXOM_ENABLE_CUDA) + blt_list_append(TO _policies ELEMENTS "hip" IF AXOM_ENABLE_HIP) + + foreach(_policy ${_policies}) + + set(_testname "quest_bvh_two_pass_example_${_policy}") + axom_add_test( + NAME ${_testname} + COMMAND quest_bvh_two_pass_ex + --file ${input_file} + --exec_space ${_policy} + ) + + set_tests_properties(${_testname} PROPERTIES + PASS_REGULAR_EXPRESSION "Found 4 actual collisions") + endforeach() + endif() endif() # Read ProE example ----------------------------------------------------------- @@ -143,7 +188,7 @@ if(AXOM_ENABLE_MPI AND MFEM_FOUND AND MFEM_USE_MPI NUM_MPI_TASKS ${_nranks}) # background: 3500; balls: ~373; jacks: ~230; air ~2897 set_tests_properties(${_testname} PROPERTIES - PASS_REGULAR_EXPRESSION "Volume of material 'air' is 2895.") + PASS_REGULAR_EXPRESSION "Volume of material 'air' is 2,?895.") set(_testname quest_shaping_driver_ex_sampling_ball_impact) axom_add_test( @@ -200,7 +245,7 @@ if(AXOM_ENABLE_MPI AND MFEM_FOUND AND MFEM_USE_MPI # bbox volume: 12^3 = 1728; sphere(r=5): ~523.6; sphere(r=2): 33.5 # expected analytic volume when fully resolved: ~1237.9 set_tests_properties(${_testname} PROPERTIES - PASS_REGULAR_EXPRESSION "Volume of material 'void' is 1239.") + PASS_REGULAR_EXPRESSION "Volume of material 'void' is 1,?239.") set(_testname quest_shaping_driver_ex_sampling_plane) axom_add_test( @@ -215,7 +260,7 @@ if(AXOM_ENABLE_MPI AND MFEM_FOUND AND MFEM_USE_MPI # expected volume when fully resolved: 182,209,421.5 # actual value is accurate to about 1% at coarse resolution set_tests_properties(${_testname} PROPERTIES - PASS_REGULAR_EXPRESSION "Volume of material 'air' is 182227963") + PASS_REGULAR_EXPRESSION "Volume of material 'air' is 182,?227,?963") endif() endif() @@ -274,7 +319,7 @@ if(AXOM_ENABLE_MPI AND AXOM_ENABLE_SIDRE AND HDF5_FOUND) --no-random-spacing --check-results --policy ${_pol} - --object-file dcp_object_mesh_2d_${_pol}_${_mesh} + --object-file dcp_object_mesh_${_ndim}d_${_pol}_${_mesh} --distance-file dcp_closest_point_2d_${_pol}_${_mesh} NUM_MPI_TASKS ${_nranks}) if(${_pol} STREQUAL "omp") @@ -514,3 +559,15 @@ if (ENABLE_FORTRAN) endif() endif() endif() + +# Quest winding number example ------------------------------------------------ + +if( MFEM_FOUND) + axom_add_executable( + NAME quest_winding_number_ex + SOURCES quest_winding_number.cpp + OUTPUT_DIR ${EXAMPLE_OUTPUT_DIRECTORY} + DEPENDS_ON axom mfem cli11 fmt + FOLDER axom/quest/examples + ) +endif() diff --git a/src/axom/quest/examples/containment_driver.cpp b/src/axom/quest/examples/containment_driver.cpp index a53dac5657..4606b33ab7 100644 --- a/src/axom/quest/examples/containment_driver.cpp +++ b/src/axom/quest/examples/containment_driver.cpp @@ -27,7 +27,6 @@ #include #include #include -#include // for setprecision() namespace mint = axom::mint; namespace primal = axom::primal; @@ -72,6 +71,7 @@ class ContainmentDriver #ifdef AXOM_USE_C2C void loadContourMesh(const std::string& inputFile, int segmentsPerKnotSpan) { + AXOM_ANNOTATE_SCOPE("load c2c"); quest::C2CReader reader; reader.setFileName(inputFile); reader.read(); @@ -94,6 +94,7 @@ class ContainmentDriver void loadSTLMesh(const std::string& inputFile) { + AXOM_ANNOTATE_SCOPE("load stl"); quest::STLReader reader; reader.setFileName(inputFile); reader.read(); @@ -110,6 +111,7 @@ class ContainmentDriver /// Computes the bounding box of the surface mesh void computeBounds() { + AXOM_ANNOTATE_SCOPE("compute bounds"); SLIC_ASSERT(m_surfaceMesh != nullptr); GeometricBoundingBox meshBB; @@ -147,6 +149,7 @@ class ContainmentDriver void initializeInOutOctree() { + AXOM_ANNOTATE_SCOPE("generate octree"); m_octree = new InOutOctreeType(m_meshBB, m_surfaceMesh); m_octree->generateIndex(); } @@ -159,6 +162,9 @@ class ContainmentDriver bool isBatched, bool shouldOutputMeshes) { + AXOM_ANNOTATE_SCOPE( + axom::fmt::format("test containment regular grid resolution {}", gridRes)); + const double* low = m_queryBB.getMin().data(); const double* high = m_queryBB.getMax().data(); mint::UniformMesh* umesh = (this->dimension() == 2) @@ -189,16 +195,18 @@ class ContainmentDriver : batchedPointContainment3D(umesh, timer); } - SLIC_INFO(axom::fmt::format( - "\tQuerying {}^{} containment field took {} seconds (@ {} " - "queries per second)", - gridRes, - DIM, - timer.elapsed(), - nnodes / timer.elapsed())); + SLIC_INFO( + axom::fmt::format(axom::utilities::locale(), + "\tQuerying {}^{} containment field took {:.3Lf} " + "seconds (@ {:.0Lf} queries per second)", + gridRes, + DIM, + timer.elapsed(), + nnodes / timer.elapsed())); if(shouldOutputMeshes) { + AXOM_ANNOTATE_SCOPE("write vtk"); std::string fname = axom::fmt::format("gridContainment_{}.vtk", gridRes); mint::write_vtk(umesh, fname); } @@ -333,8 +341,10 @@ class ContainmentDriver { SLIC_ASSERT(m_surfaceMesh != nullptr); - SLIC_INFO("Mesh has " << m_surfaceMesh->getNumberOfNodes() << " nodes and " - << m_surfaceMesh->getNumberOfCells() << " cells."); + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "Mesh has {:L} nodes and {:L} cells.", + m_surfaceMesh->getNumberOfNodes(), + m_surfaceMesh->getNumberOfCells())); SLIC_INFO("Mesh bounding box: " << m_meshBB); SpacePt pt; @@ -405,8 +415,10 @@ class ContainmentDriver // Log the results const int nVerts = m_surfaceMesh->getNumberOfNodes(); - SLIC_INFO( - axom::fmt::format("Mesh has {} vertices and {} cells.", nVerts, nCells)); + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "Mesh has {:L} vertices and {:L} cells.", + nVerts, + nCells)); if(dimension() == 3) { @@ -485,6 +497,7 @@ struct Input int samplesPerKnotSpan {25}; std::vector queryBoxMins; std::vector queryBoxMaxs; + std::string annotationMode {"none"}; private: bool m_verboseOutput {false}; @@ -566,7 +579,16 @@ struct Input ->capture_default_str() ->check(axom::CLI::PositiveNumber); - app.get_formatter()->column_width(45); +#ifdef AXOM_USE_CALIPER + app.add_option("--caliper", annotationMode) + ->description( + "caliper annotation mode. Valid options include 'none' and 'report'. " + "Use 'help' to see full list.") + ->capture_default_str() + ->check(axom::utilities::ValidCaliperMode); +#endif + + app.get_formatter()->column_width(48); // could throw an exception app.parse(argc, argv); @@ -579,6 +601,8 @@ struct Input //------------------------------------------------------------------------------ int main(int argc, char** argv) { + axom::utilities::raii::MPIWrapper mpi_raii_wrapper(argc, argv); + axom::slic::SimpleLogger logger; // slic::debug::checksAreErrors = true; @@ -595,14 +619,22 @@ int main(int argc, char** argv) return app.exit(e); } + axom::utilities::raii::AnnotationsWrapper annotations_raii_wrapper( + params.annotationMode); + + AXOM_ANNOTATE_BEGIN("quest containment example"); + const bool is2D = params.isInput2D(); ContainmentDriver<2> driver2D; ContainmentDriver<3> driver3D; /// Load mesh file - SLIC_INFO(axom::fmt::format("{:*^80}", " Loading the mesh ")); - SLIC_INFO("Reading file: " << params.inputFile << "..."); + SLIC_INFO(axom::fmt::format("{:-^80}", " Loading the mesh ")); + SLIC_INFO(axom::fmt::format("Reading file: '{}'...", params.inputFile)); + + AXOM_ANNOTATE_METADATA("dimension", is2D ? 2 : 3, ""); + AXOM_ANNOTATE_BEGIN("init"); if(is2D) { @@ -626,7 +658,7 @@ int main(int argc, char** argv) } /// Create octree over mesh's bounding box - SLIC_INFO(axom::fmt::format("{:*^80}", " Generating the octree ")); + SLIC_INFO(axom::fmt::format("{:-^80}", " Generating the octree ")); if(is2D) { driver2D.initializeInOutOctree(); @@ -642,8 +674,11 @@ int main(int argc, char** argv) mint::write_vtk(driver3D.getSurfaceMesh(), "meldedTriMesh.vtk"); } + AXOM_ANNOTATE_END("init"); + AXOM_ANNOTATE_BEGIN("query"); + /// Query the octree over mesh's bounding box - SLIC_INFO(axom::fmt::format("{:*^80}", " Querying the octree ")); + SLIC_INFO(axom::fmt::format("{:-^80}", " Querying the octree ")); if(is2D) { driver2D.initializeQueryBox(params.queryBoxMins, params.queryBoxMaxs); @@ -671,5 +706,11 @@ int main(int argc, char** argv) } } + AXOM_ANNOTATE_END("query"); + SLIC_INFO(axom::fmt::format("{:-^80}", "")); + axom::slic::flushStreams(); + + AXOM_ANNOTATE_END("quest containment example"); + return 0; } diff --git a/src/axom/quest/examples/point_in_cell_benchmark.cpp b/src/axom/quest/examples/point_in_cell_benchmark.cpp index 4384a9f6cb..1a2726aed4 100644 --- a/src/axom/quest/examples/point_in_cell_benchmark.cpp +++ b/src/axom/quest/examples/point_in_cell_benchmark.cpp @@ -186,6 +186,11 @@ void benchmark_point_in_cell(mfem::Mesh& mesh, const Arguments& args) const int nbins = args.num_bins; const bool verifyPoints = args.should_verify_points; + // Get ids of necessary allocators + constexpr bool on_device = axom::execution_space::onDevice(); + const int host_allocator = axom::execution_space::allocatorID(); + const int device_allocator = axom::execution_space::allocatorID(); + BoxType meshBb; { mfem::Vector meshMin, meshMax; @@ -195,13 +200,13 @@ void benchmark_point_in_cell(mfem::Mesh& mesh, const Arguments& args) } SLIC_DEBUG("Mesh bounding box " << meshBb); - axom::Array pts(npts, npts, axom::getDefaultAllocatorID()); + axom::Array pts_h(npts, npts, host_allocator); // Generate random points utilities::Timer timer(true); for(int i = 0; i < npts; i++) { - pts[i] = get_rand_pt(meshBb); + pts_h[i] = get_rand_pt(meshBb); } SLIC_INFO(axom::fmt::format(axom::utilities::locale(), "Constructed {:L} random points in {} s.", @@ -222,10 +227,16 @@ void benchmark_point_in_cell(mfem::Mesh& mesh, const Arguments& args) timer.elapsed())); // Run query - axom::Array outCellIds(npts, npts, axom::getDefaultAllocatorID()); - axom::Array outIsoParams(npts, npts, axom::getDefaultAllocatorID()); + axom::Array outCellIds_d(npts, npts, device_allocator); + axom::Array outIsoParams_d(npts, npts, device_allocator); + + auto outCellIds_v = outCellIds_d.view(); + auto outIsoParams_v = outIsoParams_d.view(); + + axom::Array pts_d = axom::Array(pts_h, device_allocator); + timer.start(); - query.locatePoints(pts.view(), outCellIds.data(), outIsoParams.data()); + query.locatePoints(pts_d.view(), outCellIds_v.data(), outIsoParams_v.data()); double time = timer.elapsed(); SLIC_INFO( axom::fmt::format(axom::utilities::locale(), @@ -234,6 +245,14 @@ void benchmark_point_in_cell(mfem::Mesh& mesh, const Arguments& args) time, npts / time)); + // Copy back to host + axom::Array outCellIds_h = on_device + ? axom::Array(outCellIds_d, host_allocator) + : std::move(outCellIds_d); + axom::Array outIsoParams_h = on_device + ? axom::Array(outIsoParams_d, host_allocator) + : std::move(outIsoParams_d); + // Verify the results by reconstructing physical points from refrerence coordinates if(verifyPoints) { @@ -244,24 +263,24 @@ void benchmark_point_in_cell(mfem::Mesh& mesh, const Arguments& args) for(int i = 0; i < npts; ++i) { - if(outCellIds[i] != NO_CELL) + if(outCellIds_h[i] != NO_CELL) { PointType reconstructed; - query.reconstructPoint(outCellIds[i], - outIsoParams[i].data(), + query.reconstructPoint(outCellIds_h[i], + outIsoParams_h[i].data(), reconstructed.data()); - if(primal::squared_distance(pts[i], reconstructed) > EPS) + if(primal::squared_distance(pts_h[i], reconstructed) > EPS) { ++num_wrong; SLIC_DEBUG(axom::fmt::format( "Incorrect reconstruction: Original point {}; " "reconstructed point {} found in cell {} w/ isoparametric " "coordinates {}; distance between these is {}", - pts[i], + pts_h[i], reconstructed[i], - outCellIds[i], - outIsoParams[i], - sqrt(primal::squared_distance(pts[i], reconstructed)))); + outCellIds_h[i], + outIsoParams_h[i], + sqrt(primal::squared_distance(pts_h[i], reconstructed)))); } else { @@ -271,7 +290,7 @@ void benchmark_point_in_cell(mfem::Mesh& mesh, const Arguments& args) else { ++num_not_found; - SLIC_DEBUG(axom::fmt::format("Did not reconstruct point {}", pts[i])); + SLIC_DEBUG(axom::fmt::format("Did not reconstruct point {}", pts_h[i])); } } @@ -323,13 +342,6 @@ int main(int argc, char** argv) return retval; } -#ifdef AXOM_USE_GPU - if(args.exec_space == ExecPolicy::GPU) - { - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - } -#endif - if(args.verbosity >= 0) { slic::setLoggingMsgLevel(slic::message::Debug); diff --git a/src/axom/quest/examples/quest_bvh_two_pass.cpp b/src/axom/quest/examples/quest_bvh_two_pass.cpp index 2efae9d5f1..54f227b0e2 100644 --- a/src/axom/quest/examples/quest_bvh_two_pass.cpp +++ b/src/axom/quest/examples/quest_bvh_two_pass.cpp @@ -390,21 +390,6 @@ int main(int argc, char** argv) finalize_logger(); return retval; } -#ifdef AXOM_USE_CUDA - if(args.exec_space == ExecPolicy::CUDA) - { - using GPUExec = axom::CUDA_EXEC<256>; - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - } -#endif -#ifdef AXOM_USE_HIP - if(args.exec_space == ExecPolicy::HIP) - { - using GPUExec = axom::HIP_EXEC<256>; - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - } -#endif - std::unique_ptr surface_mesh; // Read file diff --git a/src/axom/quest/examples/quest_candidates_example.cpp b/src/axom/quest/examples/quest_candidates_example.cpp index 932fe5a494..4da5867493 100644 --- a/src/axom/quest/examples/quest_candidates_example.cpp +++ b/src/axom/quest/examples/quest_candidates_example.cpp @@ -116,6 +116,7 @@ struct Input int resolution {0}; bool verboseOutput {false}; RuntimePolicy policy {RuntimePolicy::seq}; + std::string annotationMode {"none"}; void parse(int argc, char** argv, axom::CLI::App& app); bool isVerbose() const { return verboseOutput; } @@ -175,6 +176,15 @@ void Input::parse(int argc, char** argv, axom::CLI::App& app) ->capture_default_str() ->check(axom::CLI::IsMember {Input::s_validMethods}); +#ifdef AXOM_USE_CALIPER + app.add_option("--caliper", annotationMode) + ->description( + "caliper annotation mode. Valid options include 'none' and 'report'. " + "Use 'help' to see full list.") + ->capture_default_str() + ->check(axom::utilities::ValidCaliperMode); +#endif + app.get_formatter()->column_width(40); app.parse(argc, argv); // Could throw an exception @@ -202,18 +212,18 @@ void Input::parse(int argc, char** argv, axom::CLI::App& app) : policy == #endif #ifdef AXOM_RUNTIME_POLICY_USE_CUDA - RuntimePolicy::cuda - ? "cuda" - : policy == + RuntimePolicy::cuda + ? "cuda" + : policy == #endif #ifdef AXOM_RUNTIME_POLICY_USE_HIP - RuntimePolicy::hip - ? "hip" - : policy == + RuntimePolicy::hip + ? "hip" + : policy == #endif - RuntimePolicy::seq - ? "seq" - : "policy not valid")); + RuntimePolicy::seq + ? "seq" + : "policy not valid")); } const std::set Input::s_validMethods({ @@ -248,9 +258,23 @@ struct HexMesh BoundingBox m_meshBoundingBox; }; +template HexMesh loadBlueprintHexMesh(const std::string& mesh_path, bool verboseOutput = false) { + AXOM_ANNOTATE_SCOPE("load Blueprint hexahedron mesh"); + + using HexArray = axom::Array; + using BBoxArray = axom::Array; + constexpr bool on_device = axom::execution_space::onDevice(); + + // Get ids of necessary allocators + const int host_allocator = + axom::getUmpireResourceAllocatorID(umpire::resource::Host); + const int kernel_allocator = on_device + ? axom::getUmpireResourceAllocatorID(umpire::resource::Device) + : axom::execution_space::allocatorID(); + HexMesh hexMesh; // Load Blueprint mesh into Conduit node @@ -292,37 +316,83 @@ HexMesh loadBlueprintHexMesh(const std::string& mesh_path, } // extract hexes into an axom::Array - int* connectivity = n_load[0]["topologies/topo/elements/connectivity"].value(); + auto x_vals_h = + axom::ArrayView(n_load[0]["coordsets/coords/values/x"].value(), + num_nodes); + auto y_vals_h = + axom::ArrayView(n_load[0]["coordsets/coords/values/y"].value(), + num_nodes); + auto z_vals_h = + axom::ArrayView(n_load[0]["coordsets/coords/values/z"].value(), + num_nodes); + + // Move xyz values onto device + axom::Array x_vals_d = on_device + ? axom::Array(x_vals_h, kernel_allocator) + : axom::Array(); + auto x_vals_view = on_device ? x_vals_d.view() : x_vals_h; + + axom::Array y_vals_d = on_device + ? axom::Array(y_vals_h, kernel_allocator) + : axom::Array(); + auto y_vals_view = on_device ? y_vals_d.view() : y_vals_h; + + axom::Array z_vals_d = on_device + ? axom::Array(z_vals_h, kernel_allocator) + : axom::Array(); + auto z_vals_view = on_device ? z_vals_d.view() : z_vals_h; + + // Move connectivity information onto device + auto connectivity_h = axom::ArrayView( + n_load[0]["topologies/topo/elements/connectivity"].value(), + connectivity_size); + + axom::Array connectivity_d = on_device + ? axom::Array(connectivity_h, kernel_allocator) + : axom::Array(); + auto connectivity_view = on_device ? connectivity_d.view() : connectivity_h; + + // Initialize hex elements and bounding boxes + const int numCells = connectivity_size / HEX_OFFSET; - double* x_vals = n_load[0]["coordsets/coords/values/x"].value(); - double* y_vals = n_load[0]["coordsets/coords/values/y"].value(); - double* z_vals = n_load[0]["coordsets/coords/values/z"].value(); + hexMesh.m_hexes = HexArray(numCells, numCells, kernel_allocator); + auto m_hexes_v = (hexMesh.m_hexes).view(); - const int numCells = connectivity_size / HEX_OFFSET; - hexMesh.m_hexes.reserve(numCells); - HexMesh::Hexahedron hex; - axom::Array hexPoints(HEX_OFFSET); + hexMesh.m_hexBoundingBoxes = BBoxArray(numCells, numCells, kernel_allocator); + auto m_hexBoundingBoxes_v = (hexMesh.m_hexBoundingBoxes).view(); - for(int i = 0; i < numCells; ++i) - { - for(int j = 0; j < HEX_OFFSET; j++) - { - int offset = i * HEX_OFFSET; - hexPoints[j] = HexMesh::Point({x_vals[connectivity[offset + j]], - y_vals[connectivity[offset + j]], - z_vals[connectivity[offset + j]]}); - } - hex = HexMesh::Hexahedron(hexPoints); - hexMesh.m_hexes.emplace_back(hex); - } + axom::for_all( + numCells, + AXOM_LAMBDA(axom::IndexType icell) { + HexMesh::Hexahedron hex; + HexMesh::Point hexPoints[HEX_OFFSET]; + for(int j = 0; j < HEX_OFFSET; j++) + { + int offset = icell * HEX_OFFSET; + hexPoints[j] = + HexMesh::Point({x_vals_view[connectivity_view[offset + j]], + y_vals_view[connectivity_view[offset + j]], + z_vals_view[connectivity_view[offset + j]]}); + } + hex = HexMesh::Hexahedron(hexPoints[0], + hexPoints[1], + hexPoints[2], + hexPoints[3], + hexPoints[4], + hexPoints[5], + hexPoints[6], + hexPoints[7]); + m_hexes_v[icell] = hex; + m_hexBoundingBoxes_v[icell] = axom::primal::compute_bounding_box(hex); + }); - // compute and store hex bounding boxes and mesh bounding box - hexMesh.m_hexBoundingBoxes.reserve(numCells); - for(const auto& hex : hexMesh.hexes()) + // Initialize mesh's bounding box on the host + BBoxArray hexBoundingBoxes_h = on_device + ? BBoxArray(hexMesh.m_hexBoundingBoxes, host_allocator) + : hexMesh.m_hexBoundingBoxes; + for(const auto& hexbb : hexBoundingBoxes_h) { - hexMesh.m_hexBoundingBoxes.emplace_back( - axom::primal::compute_bounding_box(hex)); - hexMesh.m_meshBoundingBox.addBox(hexMesh.m_hexBoundingBoxes.back()); + hexMesh.m_meshBoundingBox.addBox(hexbb); } SLIC_INFO( @@ -336,21 +406,21 @@ HexMesh loadBlueprintHexMesh(const std::string& mesh_path, // Append mesh nodes for(int i = 0; i < num_nodes; i++) { - mesh->appendNode(x_vals[i], y_vals[i], z_vals[i]); + mesh->appendNode(x_vals_h[i], y_vals_h[i], z_vals_h[i]); } // Append mesh cells for(int i = 0; i < numCells; i++) { const axom::IndexType cell[] = { - connectivity[i * HEX_OFFSET], - connectivity[(i * HEX_OFFSET) + 1], - connectivity[(i * HEX_OFFSET) + 2], - connectivity[(i * HEX_OFFSET) + 3], - connectivity[(i * HEX_OFFSET) + 4], - connectivity[(i * HEX_OFFSET) + 5], - connectivity[(i * HEX_OFFSET) + 6], - connectivity[(i * HEX_OFFSET) + 7], + connectivity_h[i * HEX_OFFSET], + connectivity_h[(i * HEX_OFFSET) + 1], + connectivity_h[(i * HEX_OFFSET) + 2], + connectivity_h[(i * HEX_OFFSET) + 3], + connectivity_h[(i * HEX_OFFSET) + 4], + connectivity_h[(i * HEX_OFFSET) + 5], + connectivity_h[(i * HEX_OFFSET) + 6], + connectivity_h[(i * HEX_OFFSET) + 7], }; mesh->appendCell(cell); @@ -358,12 +428,7 @@ HexMesh loadBlueprintHexMesh(const std::string& mesh_path, // Write out to vtk for test viewing SLIC_INFO("Writing out Blueprint mesh to test.vtk for debugging..."); - axom::utilities::Timer timer(true); axom::mint::write_vtk(mesh, "test.vtk"); - timer.stop(); - SLIC_INFO(axom::fmt::format( - "Writing out Blueprint mesh to test.vtk took {:4.3} seconds.", - timer.elapsedTimeInSec())); delete mesh; mesh = nullptr; @@ -373,21 +438,18 @@ HexMesh loadBlueprintHexMesh(const std::string& mesh_path, } // end of loadBlueprintHexMesh template -axom::Array findCandidatesBVH(const HexMesh& insertMesh, +std::vector findCandidatesBVH(const HexMesh& insertMesh, const HexMesh& queryMesh) { - axom::utilities::Timer timer; - timer.start(); + AXOM_ANNOTATE_BEGIN("initializing BVH"); SLIC_INFO("Running BVH candidates algorithm in execution Space: " << axom::execution_space::name()); - using HexArray = axom::Array; - using BBoxArray = axom::Array; using IndexArray = axom::Array; constexpr bool on_device = axom::execution_space::onDevice(); - axom::Array candidatePairs; + std::vector candidatePairs; // Get ids of necessary allocators const int host_allocator = @@ -396,42 +458,19 @@ axom::Array findCandidatesBVH(const HexMesh& insertMesh, ? axom::getUmpireResourceAllocatorID(umpire::resource::Device) : axom::execution_space::allocatorID(); - // Copy the insert-BVH hexes to the device, if necessary - // Either way, insert_hexes_v will be a view w/ data in the correct space - auto& insert_hexes_h = insertMesh.hexes(); - HexArray insert_hexes_d = - on_device ? HexArray(insert_hexes_h, kernel_allocator) : HexArray(); - - // Copy the insert-BVH bboxes to the device, if necessary - // Either way, insert_bbox_v will be a view w/ data in the correct space - auto& insert_bbox_h = insertMesh.hexBoundingBoxes(); - BBoxArray insert_bbox_d = - on_device ? BBoxArray(insert_bbox_h, kernel_allocator) : BBoxArray(); - auto insert_bbox_v = on_device ? insert_bbox_d.view() : insert_bbox_h.view(); - - // Copy the query-BVH hexes to the device, if necessary - // Either way, query_hexes_v will be a view w/ data in the correct space - auto& query_hexes_h = queryMesh.hexes(); - HexArray query_hexes_d = - on_device ? HexArray(query_hexes_h, kernel_allocator) : HexArray(); - - // Copy the query-BVH bboxes to the device, if necessary - // Either way, bbox_v will be a view w/ data in the correct space - auto& query_bbox_h = queryMesh.hexBoundingBoxes(); - BBoxArray query_bbox_d = - on_device ? BBoxArray(query_bbox_h, kernel_allocator) : BBoxArray(); - auto query_bbox_v = on_device ? query_bbox_d.view() : query_bbox_h.view(); + // Get the insert and query bounding boxes + auto insert_bbox_v = (insertMesh.hexBoundingBoxes()).view(); + auto query_bbox_v = (queryMesh.hexBoundingBoxes()).view(); // Initialize a BVH tree over the insert mesh bounding boxes axom::spin::BVH<3, ExecSpace, double> bvh; bvh.setAllocatorID(kernel_allocator); bvh.initialize(insert_bbox_v, insert_bbox_v.size()); - timer.stop(); - SLIC_INFO(axom::fmt::format("0: Initializing BVH took {:4.3} seconds.", - timer.elapsedTimeInSec())); + SLIC_INFO(axom::fmt::format("0: Initialized BVH.")); + AXOM_ANNOTATE_END("initializing BVH"); // Search for candidate bounding boxes of hexes to query; - timer.start(); + AXOM_ANNOTATE_BEGIN("query candidates"); IndexArray offsets_d(query_bbox_v.size(), query_bbox_v.size(), kernel_allocator); IndexArray counts_d(query_bbox_v.size(), query_bbox_v.size(), kernel_allocator); IndexArray candidates_d(0, 0, kernel_allocator); @@ -444,11 +483,10 @@ axom::Array findCandidatesBVH(const HexMesh& insertMesh, query_bbox_v.size(), query_bbox_v); - timer.stop(); - SLIC_INFO(axom::fmt::format( - "1: Querying candidate bounding boxes took {:4.3} seconds.", - timer.elapsedTimeInSec())); - timer.start(); + SLIC_INFO(axom::fmt::format("1: Queried candidate bounding boxes.")); + AXOM_ANNOTATE_END("query candidates"); + + AXOM_ANNOTATE_BEGIN("write candidate pairs"); // Initialize candidate pairs on device. auto candidates_v = candidates_d.view(); @@ -474,13 +512,12 @@ axom::Array findCandidatesBVH(const HexMesh& insertMesh, } }); - timer.stop(); - SLIC_INFO(axom::fmt::format( - "2: Initializing candidate pairs (on device) took {:4.3} seconds.", - timer.elapsedTimeInSec())); - timer.start(); + SLIC_INFO(axom::fmt::format("2: Initialized candidate pairs (on device).")); + AXOM_ANNOTATE_END("write candidate pairs"); // copy pairs back to host and into return array + AXOM_ANNOTATE_BEGIN("copy pairs to host"); + IndexArray candidates_h[2] = { on_device ? IndexArray(firstPair_d, host_allocator) : IndexArray(), on_device ? IndexArray(secondPair_d, host_allocator) : IndexArray()}; @@ -488,16 +525,14 @@ axom::Array findCandidatesBVH(const HexMesh& insertMesh, auto candidate1_h_v = on_device ? candidates_h[0].view() : firstPair_d.view(); auto candidate2_h_v = on_device ? candidates_h[1].view() : secondPair_d.view(); - for(int idx = 0; idx < candidates_v.size(); ++idx) + candidatePairs.reserve(candidates_v.size()); + for(axom::IndexType idx = 0; idx < candidates_v.size(); ++idx) { candidatePairs.emplace_back( std::make_pair(candidate1_h_v[idx], candidate2_h_v[idx])); } - timer.stop(); - SLIC_INFO( - axom::fmt::format("3: Moving candidate pairs to host took {:4.3} seconds.", - timer.elapsedTimeInSec())); + SLIC_INFO(axom::fmt::format("3: Moved candidate pairs to host.")); SLIC_INFO(axom::fmt::format(axom::utilities::locale(), R"(Stats for query @@ -510,25 +545,23 @@ axom::Array findCandidatesBVH(const HexMesh& insertMesh, queryMesh.numHexes(), 1.0 * insertMesh.numHexes() * queryMesh.numHexes(), candidatePairs.size())); + AXOM_ANNOTATE_END("copy pairs to host"); return candidatePairs; } // end of findCandidatesBVH for Blueprint Meshes template -axom::Array findCandidatesImplicit(const HexMesh& insertMesh, +std::vector findCandidatesImplicit(const HexMesh& insertMesh, const HexMesh& queryMesh, int resolution) { - axom::utilities::Timer timer; - timer.start(); + AXOM_ANNOTATE_BEGIN("initializing implicit grid"); - axom::Array candidatePairs; + std::vector candidatePairs; SLIC_INFO("Running Implicit Grid candidates algorithm in execution Space: " << axom::execution_space::name()); - using HexArray = axom::Array; - using BBoxArray = axom::Array; using IndexArray = axom::Array; constexpr bool on_device = axom::execution_space::onDevice(); @@ -539,35 +572,13 @@ axom::Array findCandidatesImplicit(const HexMesh& insertMesh, ? axom::getUmpireResourceAllocatorID(umpire::resource::Device) : axom::execution_space::allocatorID(); - // Copy the insert hexes to the device, if necessary - // Either way, insert_hexes_v will be a view w/ data in the correct space - auto& insert_hexes_h = insertMesh.hexes(); - HexArray insert_hexes_d = - on_device ? HexArray(insert_hexes_h, kernel_allocator) : HexArray(); - - // Copy the insert bboxes to the device, if necessary - // Either way, insert_bbox_v will be a view w/ data in the correct space - auto& insert_bbox_h = insertMesh.hexBoundingBoxes(); - BBoxArray insert_bbox_d = - on_device ? BBoxArray(insert_bbox_h, kernel_allocator) : BBoxArray(); - auto insert_bbox_v = on_device ? insert_bbox_d.view() : insert_bbox_h.view(); + // Get the insert and query bounding boxes + auto insert_bbox_v = (insertMesh.hexBoundingBoxes()).view(); + auto query_bbox_v = (queryMesh.hexBoundingBoxes()).view(); // Bounding box of entire insert mesh HexMesh::BoundingBox insert_mesh_bbox_h = insertMesh.meshBoundingBox(); - // Copy the query hexes to the device, if necessary - // Either way, query_hexes_v will be a view w/ data in the correct space - auto& query_hexes_h = queryMesh.hexes(); - HexArray query_hexes_d = - on_device ? HexArray(query_hexes_h, kernel_allocator) : HexArray(); - - // Copy the query bboxes to the device, if necessary - // Either way, bbox_v will be a view w/ data in the correct space - auto& query_bbox_h = queryMesh.hexBoundingBoxes(); - BBoxArray query_bbox_d = - on_device ? BBoxArray(query_bbox_h, kernel_allocator) : BBoxArray(); - auto query_bbox_v = on_device ? query_bbox_d.view() : query_bbox_h.view(); - // If given resolution is less than one, use the cube root of the // number of hexes if(resolution < 1) @@ -582,12 +593,10 @@ axom::Array findCandidatesImplicit(const HexMesh& insertMesh, insertMesh.numHexes(), kernel_allocator); gridIndex.insert(insertMesh.numHexes(), insert_bbox_v.data()); - timer.stop(); - SLIC_INFO( - axom::fmt::format("0: Initializing Implicit Grid took {:4.3} seconds.", - timer.elapsedTimeInSec())); + SLIC_INFO(axom::fmt::format("0: Initialized Implicit Grid.")); + AXOM_ANNOTATE_END("initializing implicit grid"); - timer.start(); + AXOM_ANNOTATE_BEGIN("query candidates"); IndexArray offsets_d(query_bbox_v.size(), query_bbox_v.size(), kernel_allocator); IndexArray counts_d(query_bbox_v.size(), query_bbox_v.size(), kernel_allocator); @@ -627,11 +636,10 @@ axom::Array findCandidatesImplicit(const HexMesh& insertMesh, totalCandidatePairs += count; }); - timer.stop(); - SLIC_INFO(axom::fmt::format( - "1: Querying candidate bounding boxes took {:4.3} seconds.", - timer.elapsedTimeInSec())); - timer.start(); + SLIC_INFO(axom::fmt::format("1: Queried candidate bounding boxes.")); + AXOM_ANNOTATE_END("query candidates"); + + AXOM_ANNOTATE_BEGIN("write candidate pairs"); // Generate offsets from the counts // (Note: exclusive scan for offsets in candidate array @@ -677,14 +685,11 @@ axom::Array findCandidatesImplicit(const HexMesh& insertMesh, grid_device.visitCandidates(query_bbox_v[icell], fillCandidates); }); - timer.stop(); - - SLIC_INFO(axom::fmt::format( - "2: Initializing candidate pairs (on device) took {:4.3} seconds.", - timer.elapsedTimeInSec())); + SLIC_INFO(axom::fmt::format("2: Initialized candidate pairs (on device).")); + AXOM_ANNOTATE_END("write candidate pairs"); // copy results back to host and into return vector - timer.start(); + AXOM_ANNOTATE_BEGIN("copy pairs to host"); IndexArray candidates_h[2] = { on_device ? IndexArray(firstPair_d, host_allocator) : IndexArray(), @@ -693,17 +698,14 @@ axom::Array findCandidatesImplicit(const HexMesh& insertMesh, auto candidate1_h_v = on_device ? candidates_h[0].view() : firstPair_d.view(); auto candidate2_h_v = on_device ? candidates_h[1].view() : secondPair_d.view(); - for(int idx = 0; idx < totalCandidatePairs; ++idx) + candidatePairs.reserve(totalCandidatePairs.get()); + for(axom::IndexType idx = 0; idx < totalCandidatePairs.get(); ++idx) { candidatePairs.emplace_back( std::make_pair(candidate1_h_v[idx], candidate2_h_v[idx])); } - timer.stop(); - - SLIC_INFO( - axom::fmt::format("3: Moving candidate pairs to host took {:4.3} seconds.", - timer.elapsedTimeInSec())); + SLIC_INFO(axom::fmt::format("3: Moved candidate pairs to host.")); SLIC_INFO(axom::fmt::format(axom::utilities::locale(), R"(Stats for query @@ -716,6 +718,7 @@ axom::Array findCandidatesImplicit(const HexMesh& insertMesh, queryMesh.numHexes(), 1.0 * insertMesh.numHexes() * queryMesh.numHexes(), candidatePairs.size())); + AXOM_ANNOTATE_END("copy pairs to host"); return candidatePairs; } @@ -739,7 +742,11 @@ int main(int argc, char** argv) } } - axom::utilities::Timer timer(true); + axom::utilities::raii::AnnotationsWrapper annotation_raii_wrapper( + params.annotationMode); + AXOM_ANNOTATE_SCOPE("quest candidates example"); + + AXOM_ANNOTATE_BEGIN("load Blueprint meshes"); // Update the logging level based on verbosity flag axom::slic::setLoggingMsgLevel(params.isVerbose() ? axom::slic::message::Debug @@ -749,24 +756,72 @@ int main(int argc, char** argv) SLIC_INFO(axom::fmt::format("Reading Blueprint file to insert: '{}'...\n", params.mesh_file_first)); - HexMesh insert_mesh = - loadBlueprintHexMesh(params.mesh_file_first, params.isVerbose()); + HexMesh insert_mesh; + + switch(params.policy) + { +#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP + case RuntimePolicy::omp: + insert_mesh = + loadBlueprintHexMesh(params.mesh_file_first, params.isVerbose()); + break; +#endif +#ifdef AXOM_RUNTIME_POLICY_USE_CUDA + case RuntimePolicy::cuda: + insert_mesh = loadBlueprintHexMesh(params.mesh_file_first, + params.isVerbose()); + break; +#endif +#ifdef AXOM_RUNTIME_POLICY_USE_HIP + case RuntimePolicy::hip: + insert_mesh = + loadBlueprintHexMesh(params.mesh_file_first, params.isVerbose()); + break; +#endif + default: // RuntimePolicy::seq + insert_mesh = + loadBlueprintHexMesh(params.mesh_file_first, params.isVerbose()); + break; + } // Load Blueprint mesh for querying spatial index SLIC_INFO(axom::fmt::format("Reading Blueprint file to query: '{}'...\n", params.mesh_file_second)); - HexMesh query_mesh = - loadBlueprintHexMesh(params.mesh_file_second, params.isVerbose()); + HexMesh query_mesh; - timer.stop(); + switch(params.policy) + { +#ifdef AXOM_RUNTIME_POLICY_USE_OPENMP + case RuntimePolicy::omp: + query_mesh = loadBlueprintHexMesh(params.mesh_file_second, + params.isVerbose()); + break; +#endif +#ifdef AXOM_RUNTIME_POLICY_USE_CUDA + case RuntimePolicy::cuda: + query_mesh = loadBlueprintHexMesh(params.mesh_file_second, + params.isVerbose()); + break; +#endif +#ifdef AXOM_RUNTIME_POLICY_USE_HIP + case RuntimePolicy::hip: + query_mesh = loadBlueprintHexMesh(params.mesh_file_second, + params.isVerbose()); + break; +#endif + default: // RuntimePolicy::seq + query_mesh = loadBlueprintHexMesh(params.mesh_file_second, + params.isVerbose()); + break; + } - SLIC_INFO(axom::fmt::format("Reading in Blueprint files took {:4.3} seconds.", - timer.elapsedTimeInSec())); + SLIC_INFO(axom::fmt::format("Finished reading in Blueprint files.")); + AXOM_ANNOTATE_END("load Blueprint meshes"); + AXOM_ANNOTATE_BEGIN("find candidates"); // Check for candidates; results are returned as an array of index pairs - axom::Array candidatePairs; - timer.start(); + std::vector candidatePairs; if(params.method == "bvh") { @@ -825,10 +880,7 @@ int main(int argc, char** argv) break; } } - timer.stop(); - SLIC_INFO(axom::fmt::format("Computing candidates took {:4.3} seconds.", - timer.elapsedTimeInSec())); SLIC_INFO(axom::fmt::format(axom::utilities::locale(), "Mesh had {:L} candidates pairs", candidatePairs.size())); @@ -856,12 +908,13 @@ int main(int argc, char** argv) std::ofstream outf("candidates.txt"); outf << candidatePairs.size() << " candidate pairs:" << std::endl; - for(int i = 0; i < candidatePairs.size(); ++i) + for(unsigned long i = 0; i < candidatePairs.size(); ++i) { outf << candidatePairs[i].first << " " << candidatePairs[i].second << std::endl; } } + AXOM_ANNOTATE_END("find candidates"); return 0; } diff --git a/src/axom/quest/examples/quest_distributed_distance_query_example.cpp b/src/axom/quest/examples/quest_distributed_distance_query_example.cpp index 6a02cb258a..0deeb72f39 100644 --- a/src/axom/quest/examples/quest_distributed_distance_query_example.cpp +++ b/src/axom/quest/examples/quest_distributed_distance_query_example.cpp @@ -11,6 +11,7 @@ // Axom includes #include "axom/config.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/primal.hpp" #include "axom/sidre.hpp" @@ -35,7 +36,6 @@ // C/C++ includes #include -#include #include #include #include @@ -79,7 +79,7 @@ struct Input RuntimePolicy policy {RuntimePolicy::seq}; - double distThreshold {std::numeric_limits::max()}; + double distThreshold {axom::numeric_limits::max()}; bool checkResults {false}; @@ -767,7 +767,7 @@ class ObjectMeshWrapper void saveMesh(const std::string& filename = "object_mesh") { SLIC_INFO( - banner(axom::fmt::format("Saving particle mesh '{}' to disk", filename))); + banner(axom::fmt::format("Saving object mesh '{}' to disk", filename))); m_objectMesh.saveMesh(filename); } @@ -1195,8 +1195,8 @@ void computeDistancesAndDirections(BlueprintParticleMesh& queryMesh, using PointType = primal::Point; using IndexSet = slam::PositionSet<>; - PointType nowhere(std::numeric_limits::signaling_NaN()); - const double nodist = std::numeric_limits::signaling_NaN(); + PointType nowhere(axom::numeric_limits::signaling_NaN()); + const double nodist = axom::numeric_limits::signaling_NaN(); queryMesh.registerNodalScalarField(distanceField); queryMesh.registerNodalVectorField(directionField); @@ -1325,20 +1325,20 @@ int main(int argc, char** argv) //--------------------------------------------------------------------------- // Memory resource. For testing, choose device memory if appropriate. //--------------------------------------------------------------------------- - const std::string umpireResourceName = params.policy == RuntimePolicy::seq - ? "HOST" - : + const std::string umpireResourceName = + params.policy == RuntimePolicy::seq ? "HOST" : #if defined(AXOM_RUNTIME_POLICY_USE_OPENMP) - params.policy == RuntimePolicy::omp ? "HOST" : + params.policy == RuntimePolicy::omp ? "HOST" + : #endif #if defined(UMPIRE_ENABLE_DEVICE) "DEVICE" #elif defined(UMPIRE_ENABLE_UM) - "UM" + "UM" #elif defined(UMPIRE_ENABLE_PINNED) - "PINNED" + "PINNED" #else - "HOST" + "HOST" #endif ; auto& rm = umpire::ResourceManager::getInstance(); @@ -1489,13 +1489,13 @@ int main(int argc, char** argv) SLIC_INFO(axom::fmt::format( "Initialization with policy {} took {{avg:{}, min:{}, max:{}}} seconds", - params.policy, + axom::runtime_policy::s_policyToName.at(params.policy), sumInit / num_ranks, minInit, maxInit)); SLIC_INFO(axom::fmt::format( "Query with policy {} took {{avg:{}, min:{}, max:{}}} seconds", - params.policy, + axom::runtime_policy::s_policyToName.at(params.policy), sumQuery / num_ranks, minQuery, maxQuery)); diff --git a/src/axom/quest/examples/quest_marching_cubes_example.cpp b/src/axom/quest/examples/quest_marching_cubes_example.cpp index fb847068c9..3527c5e90a 100644 --- a/src/axom/quest/examples/quest_marching_cubes_example.cpp +++ b/src/axom/quest/examples/quest_marching_cubes_example.cpp @@ -23,11 +23,11 @@ // Axom includes #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/primal.hpp" #include "axom/mint/mesh/UnstructuredMesh.hpp" -#include "axom/mint/execution/internal/structured_exec.hpp" -#include "axom/quest/ArrayIndexer.hpp" +#include "axom/core/MDMapping.hpp" #include "axom/quest/MarchingCubes.hpp" #include "axom/quest/MeshViewUtil.hpp" #include "axom/sidre.hpp" @@ -50,7 +50,6 @@ // C/C++ includes #include -#include #include #include #include @@ -105,6 +104,10 @@ struct Input int objectRepCount = 1; // Contour generation count for each MarchingCubes objects. int contourGenCount = 1; + // Number of masking cycles. + int maskCount = 1; + + std::string annotationMode {"none"}; private: bool _verboseOutput {false}; @@ -204,6 +207,22 @@ struct Input "Number of contour repetitions to run for each MarchingCubes object") ->capture_default_str(); + app.add_option("--maskCount", maskCount) + ->description( + "Group the cells using this many masking groups to test masking " + "(default to 1).") + ->capture_default_str() + ->check(axom::CLI::Range(1, std::numeric_limits::max())); + +#ifdef AXOM_USE_CALIPER + app.add_option("--caliper", annotationMode) + ->description( + "caliper annotation mode. Valid options include 'none' and 'report'. " + "Use 'help' to see full list.") + ->capture_default_str() + ->check(axom::utilities::ValidCaliperMode); +#endif + app.get_formatter()->column_width(60); // could throw an exception @@ -547,7 +566,7 @@ struct BlueprintStructuredMesh template void moveMeshDataToNewMemorySpace(const std::string& path, int allocId) { - AXOM_PERF_MARK_FUNCTION("moveMeshDataToNewMemorySpace"); // For reference + AXOM_ANNOTATE_SCOPE("moveMeshDataToNewMemorySpace"); for(auto& dom : _mdMesh.children()) { moveConduitDataToNewMemorySpace(dom, path, allocId); @@ -636,6 +655,8 @@ void printTimingStats(axom::utilities::Timer& t, const std::string& description) /// Write blueprint mesh to disk void saveMesh(const conduit::Node& mesh, const std::string& filename) { + AXOM_ANNOTATE_SCOPE("save mesh (conduit)"); + #ifdef AXOM_USE_MPI conduit::relay::mpi::io::blueprint::save_mesh(mesh, filename, @@ -649,6 +670,8 @@ void saveMesh(const conduit::Node& mesh, const std::string& filename) /// Write blueprint mesh to disk void saveMesh(const sidre::Group& mesh, const std::string& filename) { + AXOM_ANNOTATE_SCOPE("save mesh (sidre)"); + conduit::Node tmpMesh; mesh.createNativeLayout(tmpMesh); { @@ -743,9 +766,13 @@ struct ContourTestBase int runTest(BlueprintStructuredMesh& computationalMesh) { + AXOM_ANNOTATE_SCOPE("runTest"); + // Conduit data is in host memory, move to devices for testing. if(s_allocatorId != axom::execution_space::allocatorID()) { + AXOM_ANNOTATE_SCOPE("move mesh to device memory"); + const std::string axes[3] = {"x", "y", "z"}; for(int d = 0; d < DIM; ++d) { @@ -759,6 +786,9 @@ struct ContourTestBase axom::fmt::format("fields/{}/values", strategy->functionName()), s_allocatorId); } + computationalMesh.moveMeshDataToNewMemorySpace( + axom::fmt::format("fields/{}/values", "mask"), + s_allocatorId); } #if defined(AXOM_USE_UMPIRE) @@ -768,6 +798,8 @@ struct ContourTestBase */ if(!computationalMesh.empty()) { + AXOM_ANNOTATE_SCOPE("move mesh from unified memory"); + std::string resourceName = "HOST"; umpire::ResourceManager& rm = umpire::ResourceManager::getInstance(); for(const auto& strategy : m_testStrategies) @@ -818,7 +850,7 @@ struct ContourTestBase auto& mc = *mcPtr; // Clear and set MarchingCubes object for a "new" mesh. - mc.setMesh(computationalMesh.asConduitNode(), "mesh"); + mc.setMesh(computationalMesh.asConduitNode(), "mesh", "mask"); #ifdef AXOM_USE_MPI MPI_Barrier(MPI_COMM_WORLD); @@ -837,7 +869,11 @@ struct ContourTestBase for(const auto& strategy : m_testStrategies) { mc.setFunctionField(strategy->functionName()); - mc.computeIsocontour(params.contourVal); + for(int iMask = 0; iMask < params.maskCount; ++iMask) + { + mc.setMaskValue(iMask); + mc.computeIsocontour(params.contourVal); + } m_strategyFacetPrefixSum.push_back(mc.getContourFacetCount()); } } @@ -854,6 +890,8 @@ struct ContourTestBase // Return conduit data to host memory. if(s_allocatorId != axom::execution_space::allocatorID()) { + AXOM_ANNOTATE_SCOPE("copy mesh back to host memory"); + const std::string axes[3] = {"x", "y", "z"}; for(int d = 0; d < DIM; ++d) { @@ -867,13 +905,21 @@ struct ContourTestBase axom::fmt::format("fields/{}/values", strategy->functionName()), axom::execution_space::allocatorID()); } + computationalMesh.moveMeshDataToNewMemorySpace( + axom::fmt::format("fields/{}/values", "mask"), + axom::execution_space::allocatorID()); } // Put contour mesh in a mint object for error checking and output. + AXOM_ANNOTATE_BEGIN("error checking"); + + AXOM_ANNOTATE_BEGIN("convert to mint mesh"); std::string sidreGroupName = "contour_mesh"; sidre::DataStore objectDS; // While awaiting fix for PR #1271, don't use Sidre storage in contourMesh. - sidre::Group* meshGroup = objectDS.getRoot()->createGroup(sidreGroupName); + auto* meshGroup = objectDS.getRoot()->createGroup(sidreGroupName); + AXOM_UNUSED_VAR(meshGroup); // variable is only referenced in debug configs + axom::mint::UnstructuredMesh contourMesh( DIM, DIM == 2 ? mint::CellType::SEGMENT : mint::CellType::TRIANGLE); @@ -894,6 +940,7 @@ struct ContourTestBase facetDomainIds); SLIC_ASSERT(mc.getContourFacetCount() == 0); } + AXOM_ANNOTATE_END("convert to mint mesh"); int localErrCount = 0; if(params.checkResults) @@ -915,6 +962,7 @@ struct ContourTestBase saveMesh(*contourMesh.getSidreGroup(), outputName); SLIC_INFO(axom::fmt::format("Wrote contour mesh to {}", outputName)); } + AXOM_ANNOTATE_END("error checking"); objectDS.getRoot()->destroyGroupAndData(sidreGroupName); @@ -943,6 +991,8 @@ struct ContourTestBase void computeNodalDistance(BlueprintStructuredMesh& bpMesh, ContourTestStrategy& strat) { + AXOM_ANNOTATE_SCOPE("computeNodalDistance"); + SLIC_ASSERT(bpMesh.dimension() == DIM); for(int domId = 0; domId < bpMesh.domainCount(); ++domId) { @@ -970,12 +1020,15 @@ struct ContourTestBase populateNodalDistance(coordsViews, fieldView, strat); } } + template typename std::enable_if::type populateNodalDistance( const axom::StackArray, DIM>& coordsViews, axom::ArrayView& fieldView, ContourTestStrategy& strat) { + AXOM_ANNOTATE_SCOPE("populateNodalDistance 2D"); + const auto& fieldShape = fieldView.shape(); for(int d = 0; d < DIM; ++d) { @@ -1002,6 +1055,8 @@ struct ContourTestBase axom::ArrayView& fieldView, ContourTestStrategy& strat) { + AXOM_ANNOTATE_SCOPE("populateNodalDistance 3D"); + const auto& fieldShape = fieldView.shape(); for(int d = 0; d < DIM; ++d) { @@ -1024,6 +1079,43 @@ struct ContourTestBase } } } + + void addMaskField(BlueprintStructuredMesh& bpMesh) + { + std::string maskFieldName = "mask"; + axom::StackArray zeros; + for(int d = 0; d < DIM; ++d) + { + zeros[d] = 0; + } + for(axom::IndexType domId = 0; domId < bpMesh.domainCount(); ++domId) + { + auto domainView = bpMesh.getDomainView(domId); + auto cellCount = domainView.getCellCount(); + auto slowestDirs = + domainView.getConstCoordsViews()[0].mapping().slowestDirs(); + axom::StackArray fastestDirs; + for(int d = 0; d < DIM; ++d) + { + fastestDirs[d] = slowestDirs[DIM - 1 - d]; + } + domainView.createField(maskFieldName, + "element", + conduit::DataType::c_int(cellCount), + zeros, + zeros, + fastestDirs); + auto maskView = domainView.template getFieldView(maskFieldName); + int maskCount = params.maskCount; + axom::for_all( + 0, + cellCount, + AXOM_LAMBDA(axom::IndexType cellId) { + maskView.flatIndex(cellId) = (cellId % maskCount); + }); + } + } + void computeNodalDistance(BlueprintStructuredMesh& bpMesh) { for(auto& strategy : m_testStrategies) @@ -1042,6 +1134,7 @@ struct ContourTestBase double contourVal, const std::string& diffField = {}) { + AXOM_ANNOTATE_SCOPE("checkContourSurface"); double* diffPtr = nullptr; if(!diffField.empty()) { @@ -1147,6 +1240,8 @@ struct ContourTestBase BlueprintStructuredMesh& computationalMesh, axom::mint::UnstructuredMesh& contourMesh) { + AXOM_ANNOTATE_SCOPE("checkContourCellLimits"); + int errCount = 0; auto parentCellIdView = get_parent_cell_id_view(contourMesh); @@ -1176,15 +1271,14 @@ struct ContourTestBase } // Indexers to translate between flat and multidim indices. - axom::Array> indexers(domainCount); + axom::Array> mappings(domainCount); for(int d = 0; d < domainCount; ++d) { axom::StackArray domShape; computationalMesh.domainLengths(d, domShape); - indexers[d].initializeShape( + mappings[d].initializeShape( domShape, - axom::ArrayIndexer(allCoordsViews[d][0].strides()) - .slowestDirs()); + axom::MDMapping(allCoordsViews[d][0].strides()).slowestDirs()); } auto elementGreaterThan = [](const axom::primal::Vector& a, @@ -1215,7 +1309,7 @@ struct ContourTestBase axom::IndexType parentCellId = parentCellIdView[iContourCell]; axom::StackArray parentCellIdx = - indexers[contiguousIndex].toMultiIndex(parentCellId); + mappings[contiguousIndex].toMultiIndex(parentCellId); axom::StackArray upperIdx = parentCellIdx; addToStackArray(upperIdx, 1); @@ -1286,6 +1380,8 @@ struct ContourTestBase BlueprintStructuredMesh& computationalMesh, axom::mint::UnstructuredMesh& contourMesh) { + AXOM_ANNOTATE_SCOPE("checkCellsContainingContour"); + int errCount = 0; auto parentCellIdView = get_parent_cell_id_view(contourMesh); @@ -1317,8 +1413,7 @@ struct ContourTestBase */ axom::Array> fcnViews( domainCount); - axom::Array> cellIndexers( - domainCount); + axom::Array> cellIndexers(domainCount); axom::Array> hasContours(domainCount); for(axom::IndexType domId = 0; domId < domainCount; ++domId) { @@ -1376,16 +1471,16 @@ struct ContourTestBase strategy.functionName(), false); - axom::ArrayIndexer cellIndexer( + axom::MDMapping cellMDMapper( domLengths, - axom::ArrayIndexer(fcnView.strides())); + axom::MDMapping(fcnView.strides())); axom::StackArray parentCellIdx = - cellIndexer.toMultiIndex(parentCellId); + cellMDMapper.toMultiIndex(parentCellId); // Compute min and max function values in the cell. - double minFcnValue = std::numeric_limits::max(); - double maxFcnValue = std::numeric_limits::min(); + double minFcnValue = axom::numeric_limits::max(); + double maxFcnValue = axom::numeric_limits::min(); constexpr short int cornerCount = (1 << DIM); // Number of nodes in a cell. for(short int cornerId = 0; cornerId < cornerCount; ++cornerId) @@ -1553,20 +1648,20 @@ int allocatorIdToTest(axom::runtime_policy::Policy policy) : #if defined(AXOM_RUNTIME_POLICY_USE_OPENMP) policy == RuntimePolicy::omp - ? axom::detail::getAllocatorID() - : + ? axom::detail::getAllocatorID() + : #endif #if defined(AXOM_RUNTIME_POLICY_USE_CUDA) - policy == RuntimePolicy::cuda - ? axom::detail::getAllocatorID() - : + policy == RuntimePolicy::cuda + ? axom::detail::getAllocatorID() + : #endif #if defined(AXOM_RUNTIME_POLICY_USE_HIP) - policy == RuntimePolicy::hip - ? axom::detail::getAllocatorID() - : + policy == RuntimePolicy::hip + ? axom::detail::getAllocatorID() + : #endif - axom::INVALID_ALLOCATOR_ID; + axom::INVALID_ALLOCATOR_ID; #else int allocatorID = axom::getDefaultAllocatorID(); #endif @@ -1661,6 +1756,8 @@ int testNdimInstance(BlueprintStructuredMesh& computationalMesh) contourTest.computeNodalDistance(computationalMesh); + contourTest.addMaskField(computationalMesh); + if(params.isVerbose()) { computationalMesh.printMeshInfo(); @@ -1703,14 +1800,9 @@ int testNdimInstance(BlueprintStructuredMesh& computationalMesh) //------------------------------------------------------------------------------ int main(int argc, char** argv) { -#ifdef AXOM_USE_MPI - MPI_Init(&argc, &argv); - MPI_Comm_rank(MPI_COMM_WORLD, &myRank); - MPI_Comm_size(MPI_COMM_WORLD, &numRanks); -#else - numRanks = 1; - myRank = 0; -#endif + axom::utilities::raii::MPIWrapper mpi_raii_wrapper(argc, argv); + myRank = mpi_raii_wrapper.my_rank(); + numRanks = mpi_raii_wrapper.num_ranks(); initializeLogger(); //slic::setAbortOnWarning(true); @@ -1740,12 +1832,18 @@ int main(int argc, char** argv) exit(retval); } + axom::utilities::raii::AnnotationsWrapper annotation_raii_wrapper( + params.annotationMode); + AXOM_ANNOTATE_SCOPE("quest marching cubes example"); + s_allocatorId = allocatorIdToTest(params.policy); //--------------------------------------------------------------------------- // Load computational mesh. //--------------------------------------------------------------------------- + AXOM_ANNOTATE_BEGIN("load mesh"); BlueprintStructuredMesh computationalMesh(params.meshFile, "mesh"); + AXOM_ANNOTATE_END("load mesh"); SLIC_INFO_IF( params.isVerbose(), @@ -1836,9 +1934,6 @@ int main(int argc, char** argv) #endif finalizeLogger(); -#ifdef AXOM_USE_MPI - MPI_Finalize(); -#endif return errCount != 0; } diff --git a/src/axom/quest/examples/quest_winding_number.cpp b/src/axom/quest/examples/quest_winding_number.cpp new file mode 100644 index 0000000000..c55c38a8aa --- /dev/null +++ b/src/axom/quest/examples/quest_winding_number.cpp @@ -0,0 +1,306 @@ +// Copyright (c) 2017-2024, Lawrence Livermore National Security, LLC and +// other Axom Project Developers. See the top-level LICENSE file for details. +// +// SPDX-License-Identifier: (BSD-3-Clause) + +/*! + * \file quest_winding_number.cpp + * \brief Example that computes the winding number of a grid of points + * against a collection of 2D parametric rational curves. + * Supports MFEM meshes in the cubic positive Bernstein basis or the (rational) + * NURBS basis. + */ + +#include "axom/config.hpp" +#include "axom/core.hpp" +#include "axom/slic.hpp" +#include "axom/primal.hpp" +#include "axom/quest.hpp" + +#include "axom/CLI11.hpp" +#include "axom/fmt.hpp" + +#include "mfem.hpp" + +namespace primal = axom::primal; +using Point2D = primal::Point; +using BezierCurve2D = primal::BezierCurve; +using BoundingBox2D = primal::BoundingBox; + +/*! + * Given an mfem mesh, convert element with id \a elem_id to a (rational) BezierCurve + * \pre Assumes the elements of the mfem mesh are in the positive (Bernstein) + * basis, or in the NURBS basis + */ +BezierCurve2D segment_to_curve(const mfem::Mesh* mesh, int elem_id) +{ + const auto* fes = mesh->GetNodes()->FESpace(); + const auto* fec = fes->FEColl(); + + const bool isBernstein = + dynamic_cast(fec) != nullptr; + const bool isNURBS = + dynamic_cast(fec) != nullptr; + + SLIC_ERROR_IF( + !(isBernstein || isNURBS), + "MFEM mesh elements must be in either the Bernstein or NURBS basis"); + + const int NE = isBernstein ? mesh->GetNE() : fes->GetNURBSext()->GetNP(); + SLIC_ERROR_IF(NE < elem_id, + axom::fmt::format("Mesh does not have {} elements", elem_id)); + + const int order = + isBernstein ? fes->GetOrder(elem_id) : mesh->NURBSext->GetOrders()[elem_id]; + SLIC_ERROR_IF(order != 3, + axom::fmt::format( + "This example currently requires the input mfem mesh to " + "contain cubic elements, but the order of element {} is {}", + elem_id, + order)); + + mfem::Array dofs; + mfem::Array vdofs; + + mfem::Vector dvec; + mfem::Vector v; + + fes->GetElementDofs(elem_id, dofs); + fes->GetElementVDofs(elem_id, vdofs); + mesh->GetNodes()->GetSubVector(vdofs, v); + + // Currently hard-coded for 3rd order. This can easily be extended to arbitrary order + axom::Array points(4, 4); + if(isBernstein) + { + points[0] = Point2D {v[0], v[0 + 4]}; + points[1] = Point2D {v[2], v[2 + 4]}; + points[2] = Point2D {v[3], v[3 + 4]}; + points[3] = Point2D {v[1], v[1 + 4]}; + + return BezierCurve2D(points, fec->GetOrder()); + } + else // isNURBS + { + // temporary assumption is that there are no interior knots + // i.e. the NURBS curve is essentially a rational Bezier curve + + points[0] = Point2D {v[0], v[0 + 4]}; + points[1] = Point2D {v[1], v[1 + 4]}; + points[2] = Point2D {v[2], v[2 + 4]}; + points[3] = Point2D {v[3], v[3 + 4]}; + + fes->GetNURBSext()->GetWeights().GetSubVector(dofs, dvec); + axom::Array weights {dvec[0], dvec[1], dvec[2], dvec[3]}; + + return BezierCurve2D(points, weights, fec->GetOrder()); + } +} + +bool check_mesh_valid(const mfem::Mesh* mesh) +{ + const auto* fes = mesh->GetNodes()->FESpace(); + if(fes == nullptr) + { + SLIC_WARNING("MFEM mesh finite element space was null"); + return false; + } + + const auto* fec = fes->FEColl(); + if(fec == nullptr) + { + SLIC_WARNING("MFEM mesh finite element collection was null"); + return false; + } + + const bool isBernstein = + dynamic_cast(fec) != nullptr; + const bool isNURBS = + dynamic_cast(fec) != nullptr; + const bool isValidFEC = isBernstein || isNURBS; + + // TODO: Convert from Lagrange to Bernstein, if/when necessary + if(!isValidFEC) + { + SLIC_WARNING( + "Example only currently supports 1D NURBS meshes " + "or meshes with nodes in the Bernstein basis"); + return false; + } + + if(fes->GetVDim() != 2) + { + SLIC_WARNING("Example only currently supports 2D meshes"); + return false; + } + + const int NE = isBernstein ? mesh->GetNE() : fes->GetNURBSext()->GetNP(); + int order = -1; + if(isBernstein) + { + order = NE > 0 ? fes->GetOrder(0) : 3; + } + else // isNURBS + { + //SLIC_INFO("nurbsext order :" << mesh->NURBSext->GetOrder()); + order = NE > 0 ? mesh->NURBSext->GetOrders()[0] : 3; + } + + if(order != 3) + { + SLIC_WARNING(axom::fmt::format( + "This example currently requires the input mfem mesh to contain cubic " + "elements, but the provided mesh has order {}", + order)); + return false; + } + + return true; +} + +int main(int argc, char** argv) +{ + axom::slic::SimpleLogger raii_logger; + + axom::CLI::App app { + "Load mesh containing collection of curves" + " and optionally generate a query mesh of winding numbers."}; + + std::string inputFile; + std::string outputPrefix = {"winding"}; + + bool verbose {false}; + + // Query mesh parameters + std::vector boxMins; + std::vector boxMaxs; + std::vector boxResolution; + int queryOrder {1}; + + app.add_option("-i,--input", inputFile) + ->description("MFEM mesh containing contours (1D segments)") + ->required() + ->check(axom::CLI::ExistingFile); + + app.add_option("-o,--output-prefix", outputPrefix) + ->description( + "Prefix for output 2D query mesh (in MFEM format) mesh containing " + "winding number calculations") + ->capture_default_str(); + + app.add_flag("-v,--verbose", verbose, "verbose output")->capture_default_str(); + + auto* query_mesh_subcommand = + app.add_subcommand("query_mesh") + ->description("Options for setting up a query mesh") + ->fallthrough(); + query_mesh_subcommand->add_option("--min", boxMins) + ->description("Min bounds for box mesh (x,y)") + ->expected(2) + ->required(); + query_mesh_subcommand->add_option("--max", boxMaxs) + ->description("Max bounds for box mesh (x,y)") + ->expected(2) + ->required(); + query_mesh_subcommand->add_option("--res", boxResolution) + ->description("Resolution of the box mesh (i,j)") + ->expected(2) + ->required(); + query_mesh_subcommand->add_option("--order", queryOrder) + ->description("polynomial order of the query mesh") + ->check(axom::CLI::PositiveNumber); + + CLI11_PARSE(app, argc, argv); + + mfem::Mesh mesh(inputFile); + SLIC_INFO( + axom::fmt::format("Curve mesh has a topological dimension of {}d, " + "has {} vertices and {} elements", + mesh.Dimension(), + mesh.GetNV(), + mesh.GetNE())); + + if(!check_mesh_valid(&mesh)) + { + return 1; + } + + axom::Array segments; + axom::Array curves; + + // Loop through mesh elements, retaining the (curved) 1D segments + for(int i = 0; i < mesh.GetNE(); ++i) + { + auto* el = mesh.GetElement(i); + if(el->GetGeometryType() == mfem::Geometry::SEGMENT) + { + segments.push_back(i); + } + } + + // Extract the curves and compute their bounding boxes along the way + BoundingBox2D bbox; + for(int i = 0; i < segments.size(); ++i) + { + auto curve = segment_to_curve(&mesh, i); + SLIC_INFO_IF(verbose, axom::fmt::format("Element {}: {}", i, curve)); + + bbox.addBox(curve.boundingBox()); + + curves.emplace_back(std::move(curve)); + } + + SLIC_INFO(axom::fmt::format("Curve mesh bounding box: {}", bbox)); + + // Early return if user didn't set up a query mesh + if(boxMins.empty()) + { + return 0; + } + + // Generate a Cartesian (high order) mesh for the query points + const auto query_res = primal::NumericArray(boxResolution.data()); + const auto query_box = + BoundingBox2D(Point2D(boxMins.data()), Point2D(boxMaxs.data())); + + auto query_mesh = std::unique_ptr( + axom::quest::util::make_cartesian_mfem_mesh_2D(query_box, + query_res, + queryOrder)); + auto fec = mfem::H1_FECollection(queryOrder, 2); + auto fes = mfem::FiniteElementSpace(query_mesh.get(), &fec, 1); + auto winding = mfem::GridFunction(&fes); + auto inout = mfem::GridFunction(&fes); + auto nodes_fes = query_mesh->GetNodalFESpace(); + + // Query the winding numbers at each degree of freedom (DoF) of the query mesh. + // The loop below independently checks (and adaptively refines) every curve for each query points. + // A more efficient algorithm can de defined that caches the refined curves to avoid + // extra refinements. We will add this in a follow-up PR. + for(int nidx = 0; nidx < nodes_fes->GetNDofs(); ++nidx) + { + Point2D q; + query_mesh->GetNode(nidx, q.data()); + + double wn {}; + for(const auto& c : curves) + { + wn += axom::primal::winding_number(q, c); + } + + winding[nidx] = wn; + inout[nidx] = std::round(wn); + } + + // Save the query mesh and fields to disk using a format that can be viewed in VisIt + mfem::VisItDataCollection windingDC(outputPrefix, query_mesh.get()); + windingDC.RegisterField("winding", &winding); + windingDC.RegisterField("inout", &inout); + windingDC.Save(); + + SLIC_INFO(axom::fmt::format("Outputting generated mesh '{}' to '{}'", + windingDC.GetCollectionName(), + axom::utilities::filesystem::getCWD())); + + return 0; +} \ No newline at end of file diff --git a/src/axom/quest/examples/shaping_driver.cpp b/src/axom/quest/examples/shaping_driver.cpp index 396dcecaaa..77badcd544 100644 --- a/src/axom/quest/examples/shaping_driver.cpp +++ b/src/axom/quest/examples/shaping_driver.cpp @@ -84,6 +84,7 @@ struct Input int refinementLevel {7}; double weldThresh {1e-9}; double percentError {-1.}; + std::string annotationMode {"none"}; std::string backgroundMaterial; @@ -223,6 +224,15 @@ struct Input ->transform( axom::CLI::CheckedTransformer(methodMap, axom::CLI::ignore_case)); +#ifdef AXOM_USE_CALIPER + app.add_option("--caliper", annotationMode) + ->description( + "caliper annotation mode. Valid options include 'none' and 'report'. " + "Use 'help' to see full list.") + ->capture_default_str() + ->check(axom::utilities::ValidCaliperMode); +#endif + // use either an input mesh file or a simple inline Cartesian mesh { auto* mesh_file = @@ -374,7 +384,8 @@ void printMeshInfo(mfem::Mesh* mesh, const std::string& prefixMessage = "") { case 2: SLIC_INFO(axom::fmt::format( - "{} mesh has {} elements and (approximate) bounding box {}", + axom::utilities::locale(), + "{} mesh has {:L} elements and (approximate) bounding box {}", prefixMessage, numElements, primal::BoundingBox(primal::Point(mins.GetData()), @@ -382,7 +393,8 @@ void printMeshInfo(mfem::Mesh* mesh, const std::string& prefixMessage = "") break; case 3: SLIC_INFO(axom::fmt::format( - "{} mesh has {} elements and (approximate) bounding box {}", + axom::utilities::locale(), + "{} mesh has {:L} elements and (approximate) bounding box {}", prefixMessage, numElements, primal::BoundingBox(primal::Point(mins.GetData()), @@ -440,15 +452,8 @@ void finalizeLogger() //------------------------------------------------------------------------------ int main(int argc, char** argv) { -#ifdef AXOM_USE_MPI - MPI_Init(&argc, &argv); - int my_rank, num_ranks; - MPI_Comm_rank(MPI_COMM_WORLD, &my_rank); - MPI_Comm_size(MPI_COMM_WORLD, &num_ranks); -#else - int my_rank = 0; - int num_ranks = 1; -#endif + axom::utilities::raii::MPIWrapper mpi_raii_wrapper(argc, argv); + const int my_rank = mpi_raii_wrapper.my_rank(); initializeLogger(); @@ -478,12 +483,21 @@ int main(int argc, char** argv) exit(retval); } + axom::utilities::raii::AnnotationsWrapper annotations_raii_wrapper( + params.annotationMode); + + AXOM_ANNOTATE_BEGIN("quest shaping example"); + AXOM_ANNOTATE_BEGIN("init"); + //--------------------------------------------------------------------------- // Load the klee shape file and extract some information //--------------------------------------------------------------------------- try { + AXOM_ANNOTATE_SCOPE("read Klee shape set"); params.shapeSet = klee::readShapeSet(params.shapeFile); + + slic::flushStreams(); } catch(klee::KleeError& error) { @@ -517,6 +531,7 @@ int main(int argc, char** argv) "the C2C library"); #endif + AXOM_ANNOTATE_BEGIN("load mesh"); //--------------------------------------------------------------------------- // Load the computational mesh //--------------------------------------------------------------------------- @@ -537,11 +552,13 @@ int main(int argc, char** argv) : new mfem::Mesh(*originalMeshDC->GetMesh()); shapingDC.SetMesh(shapingMesh); } + AXOM_ANNOTATE_END("load mesh"); printMeshInfo(shapingDC.GetMesh(), "After loading"); //--------------------------------------------------------------------------- // Initialize the shaping query object //--------------------------------------------------------------------------- + AXOM_ANNOTATE_BEGIN("setup shaping problem"); quest::Shaper* shaper = nullptr; switch(params.shapingMethod) { @@ -604,6 +621,7 @@ int main(int argc, char** argv) //--------------------------------------------------------------------------- if(auto* samplingShaper = dynamic_cast(shaper)) { + AXOM_ANNOTATE_SCOPE("import initial volume fractions"); std::map initial_grid_functions; // Generate a background material (w/ volume fractions set to 1) if user provided a name @@ -634,17 +652,23 @@ int main(int argc, char** argv) // Project provided volume fraction grid functions as quadrature point data samplingShaper->importInitialVolumeFractions(initial_grid_functions); } + AXOM_ANNOTATE_END("setup shaping problem"); + AXOM_ANNOTATE_END("init"); //--------------------------------------------------------------------------- // Process each of the shapes //--------------------------------------------------------------------------- SLIC_INFO(axom::fmt::format("{:=^80}", "Sampling InOut fields for shapes")); + AXOM_ANNOTATE_BEGIN("shaping"); for(const auto& shape : params.shapeSet.getShapes()) { - std::string shapeFormat = shape.getGeometry().getFormat(); - SLIC_INFO( - axom::fmt::format("{:-^80}", - axom::fmt::format("Shape format is {}", shapeFormat))); + const std::string shapeFormat = shape.getGeometry().getFormat(); + SLIC_INFO(axom::fmt::format( + "{:-^80}", + axom::fmt::format("Processing shape '{}' of material '{}' (format '{}')", + shape.getName(), + shape.getMaterial(), + shapeFormat))); // Load the shape from file. This also applies any transformations. shaper->loadShape(shape); @@ -666,10 +690,12 @@ int main(int argc, char** argv) shaper->finalizeShapeQuery(); slic::flushStreams(); } + AXOM_ANNOTATE_END("shaping"); //--------------------------------------------------------------------------- // After shaping in all shapes, generate/adjust the material volume fractions //--------------------------------------------------------------------------- + AXOM_ANNOTATE_BEGIN("adjust"); SLIC_INFO( axom::fmt::format("{:=^80}", "Generating volume fraction fields for materials")); @@ -694,14 +720,26 @@ int main(int argc, char** argv) const double volume = shaper->allReduceSum(*gf * vol_form); - SLIC_INFO( - axom::fmt::format("Volume of material '{}' is {}", mat_name, volume)); + SLIC_INFO(axom::fmt::format(axom::utilities::locale(), + "Volume of material '{}' is {:.6Lf}", + mat_name, + volume)); } } + AXOM_ANNOTATE_END("adjust"); //--------------------------------------------------------------------------- // Save meshes and fields //--------------------------------------------------------------------------- + if(params.isVerbose()) + { + if(auto* samplingShaper = dynamic_cast(shaper)) + { + SLIC_INFO(axom::fmt::format("{:-^80}", "")); + samplingShaper->printRegisteredFieldNames(" -- after shaping"); + } + } + #ifdef MFEM_USE_MPI shaper->getDC()->Save(); #endif @@ -711,10 +749,12 @@ int main(int argc, char** argv) //--------------------------------------------------------------------------- // Cleanup and exit //--------------------------------------------------------------------------- + SLIC_INFO(axom::fmt::format("{:-^80}", "")); + slic::flushStreams(); + + AXOM_ANNOTATE_END("quest shaping example"); + finalizeLogger(); -#ifdef AXOM_USE_MPI - MPI_Finalize(); -#endif return 0; } diff --git a/src/axom/quest/interface/internal/QuestHelpers.cpp b/src/axom/quest/interface/internal/QuestHelpers.cpp index 33b8317bd3..0ba10465c3 100644 --- a/src/axom/quest/interface/internal/QuestHelpers.cpp +++ b/src/axom/quest/interface/internal/QuestHelpers.cpp @@ -6,6 +6,7 @@ #include "axom/quest/interface/internal/QuestHelpers.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/mint/mesh/UnstructuredMesh.hpp" // Quest includes @@ -519,8 +520,8 @@ void compute_mesh_bounds(const mint::Mesh* mesh, double* lo, double* hi) // STEP 0: initialize lo,hi for(int i = 0; i < ndims; ++i) { - lo[i] = std::numeric_limits::max(); - hi[i] = std::numeric_limits::lowest(); + lo[i] = axom::numeric_limits::max(); + hi[i] = axom::numeric_limits::lowest(); } // END for all dimensions // STEP 1: compute lo,hi diff --git a/src/axom/quest/readers/C2CReader.cpp b/src/axom/quest/readers/C2CReader.cpp index f4a898016e..9740cfd740 100644 --- a/src/axom/quest/readers/C2CReader.cpp +++ b/src/axom/quest/readers/C2CReader.cpp @@ -978,7 +978,11 @@ void C2CReader::getLinearMeshNonUniform( FILE* fthresh = fopen("threshold.curve", "wt"); fprintf(fthresh, "# threshold\n"); #endif - int contourCount = -1; + + int contourCount {-1}; + + // clang complains about contourCount (-Wunused-but-set-variable); since we want keep it, let's mark it + AXOM_UNUSED_VAR(contourCount); // Iterate over the contours and linearize each of them. std::vector S; @@ -986,7 +990,7 @@ void C2CReader::getLinearMeshNonUniform( for(const auto& nurbs : m_nurbsData) { NURBSInterpolator interpolator(nurbs, m_vertexWeldThreshold); - contourCount++; + ++contourCount; #ifdef AXOM_DEBUG_WRITE_ERROR_CURVES fprintf(ferr, "# contour%d\n", contourCount); #endif diff --git a/src/axom/quest/tests/CMakeLists.txt b/src/axom/quest/tests/CMakeLists.txt index 95042c29d5..d450d5fa4e 100644 --- a/src/axom/quest/tests/CMakeLists.txt +++ b/src/axom/quest/tests/CMakeLists.txt @@ -15,7 +15,6 @@ set(quest_tests quest_pro_e_reader.cpp quest_stl_reader.cpp quest_vertex_weld.cpp - quest_array_indexer.cpp ) blt_list_append(TO quest_tests diff --git a/src/axom/quest/tests/quest_discretize.cpp b/src/axom/quest/tests/quest_discretize.cpp index c4b6b10120..312b3a2ccf 100644 --- a/src/axom/quest/tests/quest_discretize.cpp +++ b/src/axom/quest/tests/quest_discretize.cpp @@ -195,9 +195,18 @@ void run_degen_segment_tests() // We don't know what order they'll be in, but we do know how many octahedra // will be in each generation. - axom::Array polyline(2, - 2, - axom::execution_space::allocatorID()); + int allocID = axom::execution_space::allocatorID(); + + // Use unified memory for frequent movement between device operations + // and value checking on host +#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) + if(axom::execution_space::onDevice()) + { + allocID = axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + } +#endif + + axom::Array polyline(2, 2, allocID); polyline[0] = {0., 0.}; polyline[1] = {0., 0.}; @@ -227,6 +236,8 @@ void run_degen_segment_tests() template void segment_test(const char* label, axom::Array& polyline, int len) { + int hostAllocID = axom::execution_space::allocatorID(); + SCOPED_TRACE(label); // Test each of the three generations. @@ -247,14 +258,18 @@ void segment_test(const char* label, axom::Array& polyline, int len) axom::Array handcut; discretized_segment(polyline[0], polyline[1], handcut); - axom::Array generated; + axom::Array generatedDevice; int octcount = 0; axom::quest::discretize(polyline, len, generations, - generated, + generatedDevice, octcount); + // Copy generated back to host + axom::Array generated = + axom::Array(generatedDevice, hostAllocID); + EXPECT_TRUE( check_generation(handcut, generated, generation, 0, ZEROTH_GEN_COUNT)); generation += 1; @@ -275,9 +290,18 @@ void segment_test(const char* label, axom::Array& polyline, int len) template void run_single_segment_tests() { - axom::Array polyline(2, - 2, - axom::execution_space::allocatorID()); + int allocID = axom::execution_space::allocatorID(); + + // Use unified memory for frequent movement between device operations + // and value checking on host +#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) + if(axom::execution_space::onDevice()) + { + allocID = axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + } +#endif + + axom::Array polyline(2, 2, allocID); polyline[0] = Point2D {0.5, 0.}; polyline[1] = Point2D {1.8, 0.8}; @@ -305,6 +329,8 @@ void multi_segment_test(const char* label, axom::Array& polyline, int l { SCOPED_TRACE(label); + int hostAllocID = axom::execution_space::allocatorID(); + // Test each of the three generations. constexpr int generations = 2; @@ -318,14 +344,18 @@ void multi_segment_test(const char* label, axom::Array& polyline, int l int generation = 0; - axom::Array generated; + axom::Array generatedDevice; int octcount = 0; axom::quest::discretize(polyline, len, generations, - generated, + generatedDevice, octcount); + // Copy generated back to host + axom::Array generated = + axom::Array(generatedDevice, hostAllocID); + int segcount = len - 1; axom::Array handcut(segcount * TOTAL_COUNT); @@ -367,10 +397,19 @@ void multi_segment_test(const char* label, axom::Array& polyline, int l template void run_multi_segment_tests() { + int allocID = axom::execution_space::allocatorID(); + + //Use unified memory for frequent movement between device operations + // and value checking on host +#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) + if(axom::execution_space::onDevice()) + { + allocID = axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + } +#endif + constexpr int pointcount = 5; - axom::Array polyline(pointcount, - pointcount, - axom::execution_space::allocatorID()); + axom::Array polyline(pointcount, pointcount, allocID); polyline[0] = Point2D {1.0, 0.5}; polyline[1] = Point2D {1.6, 0.3}; diff --git a/src/axom/quest/tests/quest_intersection_shaper.cpp b/src/axom/quest/tests/quest_intersection_shaper.cpp index 10d7373331..95809d2d41 100644 --- a/src/axom/quest/tests/quest_intersection_shaper.cpp +++ b/src/axom/quest/tests/quest_intersection_shaper.cpp @@ -502,7 +502,7 @@ void IntersectionWithErrorTolerances(const std::string &filebase, // Clean up files. for(const auto &filename : filenames) { - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } } diff --git a/src/axom/quest/tests/quest_mesh_view_util.cpp b/src/axom/quest/tests/quest_mesh_view_util.cpp index 9769e0e5fe..be1666d2ca 100644 --- a/src/axom/quest/tests/quest_mesh_view_util.cpp +++ b/src/axom/quest/tests/quest_mesh_view_util.cpp @@ -17,7 +17,6 @@ #include "axom/core.hpp" #include "axom/slic.hpp" #include "axom/primal.hpp" - #include "axom/quest/ArrayIndexer.hpp" #include "axom/quest/MeshViewUtil.hpp" #include "axom/core/Types.hpp" diff --git a/src/axom/quest/tests/quest_point_in_cell_mfem.cpp b/src/axom/quest/tests/quest_point_in_cell_mfem.cpp index fff5f72c5a..89128df774 100644 --- a/src/axom/quest/tests/quest_point_in_cell_mfem.cpp +++ b/src/axom/quest/tests/quest_point_in_cell_mfem.cpp @@ -14,6 +14,7 @@ #include "axom/config.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/mint.hpp" #include "axom/primal.hpp" #include "axom/spin.hpp" @@ -195,7 +196,7 @@ class PointInCellTest : public ::testing::Test // compute minimal local mesh size mfem::Vector h0(fespace->GetNDofs()); - h0 = std::numeric_limits::infinity(); + h0 = axom::numeric_limits::infinity(); { mfem::Array dofs; for(int i = 0; i < fespace->GetNE(); i++) diff --git a/src/axom/quest/tests/quest_pro_e_reader.cpp b/src/axom/quest/tests/quest_pro_e_reader.cpp index 52f21f00d9..aec4297285 100644 --- a/src/axom/quest/tests/quest_pro_e_reader.cpp +++ b/src/axom/quest/tests/quest_pro_e_reader.cpp @@ -4,6 +4,7 @@ // SPDX-License-Identifier: (BSD-3-Clause) #include "axom/core/utilities/FileUtilities.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/mint/utils/vtk_utils.hpp" // for write_vtk #include "axom/quest/readers/ProEReader.hpp" #include "axom/slic.hpp" @@ -91,7 +92,7 @@ TEST(quest_pro_e_reader, read_to_invalid_mesh) EXPECT_DEATH_IF_SUPPORTED(reader.getMesh(&hexmesh), IGNORE_OUTPUT); // STEP 4: remove Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -132,17 +133,17 @@ TEST(quest_pro_e_reader, read_pro_e) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -186,17 +187,17 @@ TEST(quest_pro_e_reader, read_pro_e_invbbox) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -242,17 +243,17 @@ TEST(quest_pro_e_reader, read_pro_e_bbox_all) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -299,17 +300,17 @@ TEST(quest_pro_e_reader, read_pro_e_bbox_some) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -356,17 +357,17 @@ TEST(quest_pro_e_reader, read_pro_e_bbox_some_incl) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -415,17 +416,17 @@ TEST(quest_pro_e_reader, read_pro_e_external) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary Pro/E file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } #ifdef AXOM_DATA_DIR @@ -434,7 +435,7 @@ TEST(quest_pro_e_reader, cup_pro_e) { constexpr int NUM_NODES = 171; constexpr int NUM_TETS = 574; - constexpr double EPS = std::numeric_limits::epsilon(); + constexpr double EPS = axom::numeric_limits::epsilon(); // STEP 0: Get Pro/E cup example file for testing namespace fs = axom::utilities::filesystem; diff --git a/src/axom/quest/tests/quest_pro_e_reader_parallel.cpp b/src/axom/quest/tests/quest_pro_e_reader_parallel.cpp index fcc9f1912b..e6a8c441fe 100644 --- a/src/axom/quest/tests/quest_pro_e_reader_parallel.cpp +++ b/src/axom/quest/tests/quest_pro_e_reader_parallel.cpp @@ -5,6 +5,8 @@ #include "axom/config.hpp" +#include "axom/core/NumericLimits.hpp" + #include "axom/slic.hpp" #include "axom/quest/readers/PProEReader.hpp" @@ -106,13 +108,13 @@ TEST(quest_pro_e_reader_parallel, read_file) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // // STEP 4: remove temporary Pro/E file @@ -173,13 +175,13 @@ TEST(quest_pro_e_reader_parallel, read_file_bbox) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // // STEP 4: remove temporary Pro/E file @@ -240,13 +242,13 @@ TEST(quest_pro_e_reader_parallel, read_file_bbox_incl) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // // STEP 4: remove temporary Pro/E file diff --git a/src/axom/quest/tests/quest_sampling_shaper.cpp b/src/axom/quest/tests/quest_sampling_shaper.cpp index 641b7144be..dd0bac59f2 100644 --- a/src/axom/quest/tests/quest_sampling_shaper.cpp +++ b/src/axom/quest/tests/quest_sampling_shaper.cpp @@ -67,7 +67,7 @@ class ScopedTemporaryFile ~ScopedTemporaryFile() { - axom::utilities::filesystem::removeFile(m_filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(m_filename), 0); } const std::string& getFileName() const { return m_filename; } diff --git a/src/axom/quest/tests/quest_signed_distance.cpp b/src/axom/quest/tests/quest_signed_distance.cpp index ec6d2b7e8a..484cfa1f84 100644 --- a/src/axom/quest/tests/quest_signed_distance.cpp +++ b/src/axom/quest/tests/quest_signed_distance.cpp @@ -4,6 +4,7 @@ // SPDX-License-Identifier: (BSD-3-Clause) #include "axom/config.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/mint.hpp" #include "axom/primal.hpp" @@ -128,7 +129,7 @@ TEST(quest_signed_distance, sphere_test) double l1norm = 0.0; double l2norm = 0.0; - double linf = std::numeric_limits::min(); + double linf = axom::numeric_limits::min(); for(int inode = 0; inode < nnodes; ++inode) { @@ -236,7 +237,7 @@ TEST(quest_signed_distance, sphere_test_with_normals) double l1norm = 0.0; double l2norm = 0.0; - double linf = std::numeric_limits::min(); + double linf = axom::numeric_limits::min(); for(int inode = 0; inode < nnodes; ++inode) { @@ -311,8 +312,19 @@ void run_vectorized_sphere_test() { using PointType = primal::Point; - const int curr_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + int host_allocator = axom::execution_space::allocatorID(); + int kernel_allocator = axom::execution_space::allocatorID(); + + //Use unified memory on device +#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) + if(axom::execution_space::onDevice()) + { + kernel_allocator = + axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + } +#endif + + axom::setDefaultAllocator(kernel_allocator); constexpr double l1norm_expected = 6.7051997372579715; constexpr double l2norm_expected = 2.5894400431865519; @@ -358,15 +370,26 @@ void run_vectorized_sphere_test() double l1norm = 0.0; double l2norm = 0.0; - double linf = std::numeric_limits::min(); + double linf = axom::numeric_limits::min(); - PointType* queryPts = axom::allocate(nnodes); + axom::Array queryPts = + axom::Array(nnodes, nnodes, host_allocator); for(int inode = 0; inode < nnodes; inode++) { umesh->getNode(inode, queryPts[inode].data()); } - signed_distance.computeDistances(nnodes, queryPts, phi_computed); + // Copy query points to device + axom::Array queryPtsDevice = + axom::Array(queryPts, kernel_allocator); + double* phi_computed_device = axom::allocate(nnodes, kernel_allocator); + + signed_distance.computeDistances(nnodes, + queryPtsDevice.view(), + phi_computed_device); + + // Copy output to host + axom::copy(phi_computed, phi_computed_device, nnodes * sizeof(double)); for(int inode = 0; inode < nnodes; ++inode) { @@ -399,12 +422,12 @@ void run_vectorized_sphere_test() EXPECT_NEAR(l2norm_expected, l2norm, TOL); EXPECT_NEAR(linf_expected, linf, TOL); - axom::deallocate(queryPts); + axom::deallocate(phi_computed_device); delete surface_mesh; delete umesh; - axom::setDefaultAllocator(curr_allocator); + axom::setDefaultAllocator(host_allocator); SLIC_INFO("Done."); } @@ -454,8 +477,13 @@ TEST(quest_signed_distance, sphere_vec_device_custom_alloc) using PointType = primal::Point; - const int curr_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int host_allocator = + axom::getUmpireResourceAllocatorID(umpire::resource::Host); + constexpr bool on_device = axom::execution_space::onDevice(); + const int kernel_allocator = on_device + ? axom::getUmpireResourceAllocatorID(umpire::resource::Unified) + : axom::execution_space::allocatorID(); + axom::setDefaultAllocator(kernel_allocator); constexpr double l1norm_expected = 6.7051997372579715; constexpr double l2norm_expected = 2.5894400431865519; @@ -525,15 +553,25 @@ TEST(quest_signed_distance, sphere_vec_device_custom_alloc) double l1norm = 0.0; double l2norm = 0.0; - double linf = std::numeric_limits::min(); + double linf = axom::numeric_limits::min(); - PointType* queryPts = axom::allocate(nnodes); + axom::Array queryPts = + axom::Array(nnodes, nnodes, host_allocator); for(int inode = 0; inode < nnodes; inode++) { umesh->getNode(inode, queryPts[inode].data()); } - signed_distance.computeDistances(nnodes, queryPts, phi_computed); + // Copy query points to device + axom::Array queryPtsDevice(queryPts, kernel_allocator); + double* phi_computed_device = axom::allocate(nnodes, kernel_allocator); + + signed_distance.computeDistances(nnodes, + queryPtsDevice.view(), + phi_computed_device); + + // Copy output to host + axom::copy(phi_computed, phi_computed_device, nnodes * sizeof(double)); for(int inode = 0; inode < nnodes; ++inode) { @@ -566,13 +604,12 @@ TEST(quest_signed_distance, sphere_vec_device_custom_alloc) EXPECT_NEAR(l2norm_expected, l2norm, TOL); EXPECT_NEAR(linf_expected, linf, TOL); - axom::deallocate(queryPts); + axom::deallocate(phi_computed_device); delete surface_mesh; delete umesh; - axom::setDefaultAllocator(curr_allocator); - + axom::setDefaultAllocator(host_allocator); SLIC_INFO("Done."); } #endif // defined(AXOM_USE_GPU) && defined(AXOM_USE_RAJA) diff --git a/src/axom/quest/tests/quest_signed_distance_interface.cpp b/src/axom/quest/tests/quest_signed_distance_interface.cpp index b94851a0c9..53554b0aea 100644 --- a/src/axom/quest/tests/quest_signed_distance_interface.cpp +++ b/src/axom/quest/tests/quest_signed_distance_interface.cpp @@ -6,6 +6,7 @@ // Axom utils #include "axom/config.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/mint.hpp" #include "axom/primal.hpp" #include "axom/slic.hpp" @@ -232,7 +233,7 @@ void check_analytic_plane(bool use_shared = false) EXPECT_FALSE(quest::signed_distance_initialized()); #ifdef REMOVE_FILES - axom::utilities::filesystem::removeFile(file); + EXPECT_EQ(axom::utilities::filesystem::removeFile(file), 0); #endif } @@ -372,7 +373,7 @@ TEST(quest_signed_distance_interface, initialize) // remove temp STL file #ifdef REMOVE_FILES - axom::utilities::filesystem::removeFile(fileName); + EXPECT_EQ(axom::utilities::filesystem::removeFile(fileName), 0); #endif } @@ -480,7 +481,7 @@ TEST(quest_signed_distance_interface, analytic_sphere) // STEP 4: Compute signed distance double l1norm = 0.0; double l2norm = 0.0; - double linf = std::numeric_limits::min(); + double linf = axom::numeric_limits::min(); axom::IndexType nnodes = umesh->getNumberOfNodes(); for(axom::IndexType inode = 0; inode < nnodes; ++inode) { @@ -577,7 +578,7 @@ TEST(quest_signed_distance_interface, analytic_sphere_with_closest_pt_and_normal // STEP 4: Compute signed distance double l1norm = 0.0; double l2norm = 0.0; - double linf = std::numeric_limits::min(); + double linf = axom::numeric_limits::min(); axom::IndexType nnodes = umesh->getNumberOfNodes(); for(axom::IndexType inode = 0; inode < nnodes; ++inode) { diff --git a/src/axom/quest/tests/quest_stl_reader.cpp b/src/axom/quest/tests/quest_stl_reader.cpp index 071ad2805c..9db3fd5540 100644 --- a/src/axom/quest/tests/quest_stl_reader.cpp +++ b/src/axom/quest/tests/quest_stl_reader.cpp @@ -6,6 +6,7 @@ #include "axom/quest/readers/STLReader.hpp" #include "axom/mint/mesh/UnstructuredMesh.hpp" #include "axom/slic.hpp" +#include "axom/core/NumericLimits.hpp" // gtest includes #include "gtest/gtest.h" @@ -14,7 +15,6 @@ #include #include #include -#include // namespace aliases namespace mint = axom::mint; @@ -82,7 +82,7 @@ TEST(quest_stl_reader_DeathTest, read_to_invalid_mesh) EXPECT_DEATH_IF_SUPPORTED(reader.getMesh(&hexmesh), IGNORE_OUTPUT); // STEP 4: remove STL file - axom::utilities::filesystem::removeFile(filename); + EXPECT_EQ(axom::utilities::filesystem::removeFile(filename), 0); } //------------------------------------------------------------------------------ @@ -133,13 +133,13 @@ TEST(quest_stl_reader, read_stl) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary STL file @@ -192,13 +192,13 @@ TEST(quest_stl_reader, read_stl_external) { EXPECT_NEAR(x[inode], x_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(y[inode], y_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); EXPECT_NEAR(z[inode], z_expected[inode], - std::numeric_limits::epsilon()); + axom::numeric_limits::epsilon()); } // END for all nodes // STEP 4: remove temporary STL file diff --git a/src/axom/sidre/CMakeLists.txt b/src/axom/sidre/CMakeLists.txt index bddbaff2f4..fac6704b9f 100644 --- a/src/axom/sidre/CMakeLists.txt +++ b/src/axom/sidre/CMakeLists.txt @@ -146,9 +146,3 @@ endif() if(AXOM_ENABLE_EXAMPLES) add_subdirectory(examples) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX sidre - EXCLUDES sidre/examples/lulesh2) diff --git a/src/axom/sidre/core/Array.hpp b/src/axom/sidre/core/Array.hpp index 7a1877cdc3..52ba8ec195 100644 --- a/src/axom/sidre/core/Array.hpp +++ b/src/axom/sidre/core/Array.hpp @@ -571,7 +571,9 @@ inline void Array::dynamicRealloc(axom::IndexType new_num_elements) "Resize ratio of " << this->m_resize_ratio << " doesn't support dynamic resizing"); - IndexType new_capacity = new_num_elements * this->m_resize_ratio + 0.5; + IndexType new_capacity = axom::utilities::max( + this->capacity() * this->getResizeRatio() + 0.5, + new_num_elements); const IndexType block_size = this->blockSize(); const IndexType remainder = new_capacity % block_size; if(remainder != 0) diff --git a/src/axom/sidre/core/Group.cpp b/src/axom/sidre/core/Group.cpp index ed5901c319..8fbef37b13 100644 --- a/src/axom/sidre/core/Group.cpp +++ b/src/axom/sidre/core/Group.cpp @@ -37,18 +37,6 @@ namespace sidre // support path syntax. const char Group::s_path_delimiter = '/'; -// Initialization of static members holding I/O protocol strings -const std::vector Group::s_io_protocols = { -#ifdef AXOM_USE_HDF5 - "sidre_hdf5", - "conduit_hdf5", -#endif - "sidre_json", - "sidre_conduit_json", - "conduit_bin", - "conduit_json", - "json"}; - /////////////////////////////////////////////////////////////////////////////// // // Private utility functions to cast ItemCollections to (named) MapCollections. @@ -1407,49 +1395,49 @@ Group* Group::copyGroup(Group* group) /* ************************************************************************* * - * Create a deep copy of given Group and make it a child of this Group. + * Create a deep copy of given Group and make the copy a child of this Group. * * The deep copy of a Group will copy the group hierarchy and deep copy * all Views within the hierarchy. * ************************************************************************* */ -Group* Group::deepCopyGroup(Group* group, int allocID) +Group* Group::deepCopyGroup(Group* srcGroup, int allocID) { allocID = getValidAllocatorID(allocID); - if(group == nullptr || hasChildGroup(group->getName())) + if(srcGroup == nullptr || hasChildGroup(srcGroup->getName())) { SLIC_CHECK_MSG( - group != nullptr, + srcGroup != nullptr, SIDRE_GROUP_LOG_PREPEND << "Null pointer provided, no Group to copy."); - if(group != nullptr) + if(srcGroup != nullptr) { - SLIC_CHECK_MSG(!hasChildGroup(group->getName()), + SLIC_CHECK_MSG(!hasChildGroup(srcGroup->getName()), SIDRE_GROUP_LOG_PREPEND << "Invalid copy operation. Group already has " - << "a child named '" << group->getName() << "'."); + << "a child named '" << srcGroup->getName() << "'."); } return nullptr; } - Group* res = createGroup(group->getName()); + Group* dstGroup = createGroup(srcGroup->getName()); // copy child Groups to new Group - for(auto& grp : group->groups()) + for(auto& grp : srcGroup->groups()) { - res->deepCopyGroup(&grp, allocID); + dstGroup->deepCopyGroup(&grp, allocID); } // copy Views to new Group - for(auto& view : group->views()) + for(auto& view : srcGroup->views()) { - res->deepCopyView(&view, allocID); + dstGroup->deepCopyView(&view, allocID); } - return res; + return dstGroup; } /* diff --git a/src/axom/sidre/core/Group.hpp b/src/axom/sidre/core/Group.hpp index 1743675741..a9383f5bef 100644 --- a/src/axom/sidre/core/Group.hpp +++ b/src/axom/sidre/core/Group.hpp @@ -156,6 +156,17 @@ class Group */ static const std::vector& getValidIOProtocols() { + static const std::vector s_io_protocols = { +#ifdef AXOM_USE_HDF5 + "sidre_hdf5", + "conduit_hdf5", +#endif + "sidre_json", + "sidre_conduit_json", + "conduit_bin", + "conduit_json", + "json"}; + return s_io_protocols; } @@ -1274,7 +1285,7 @@ class Group /*! * \brief Create a deep copy of Group hierarchy rooted at given Group and - * make it a child of this Group. + * make the copy a child of this Group. * * Note that all Views in the Group hierarchy are deep copied as well. * @@ -1290,12 +1301,12 @@ class Group * If given Group pointer is null or Group already has a child Group with * same name as given Group, method is a no-op. * - * \sa deepCopyGroup + * \sa copyGroup * * \return pointer to the new copied Group object or nullptr if a Group * is not copied into this Group. */ - Group* deepCopyGroup(Group* group, int allocID = INVALID_ALLOCATOR_ID); + Group* deepCopyGroup(Group* srcGroup, int allocID = INVALID_ALLOCATOR_ID); //@} @@ -1928,9 +1939,6 @@ class Group #ifdef AXOM_USE_UMPIRE int m_default_allocator_id; #endif - - // Collection of the valid I/O protocols for save and load. - AXOM_SIDRE_EXPORT static const std::vector s_io_protocols; }; } /* end namespace sidre */ diff --git a/src/axom/sidre/core/View.cpp b/src/axom/sidre/core/View.cpp index 18a8a05fed..f0aade8831 100644 --- a/src/axom/sidre/core/View.cpp +++ b/src/axom/sidre/core/View.cpp @@ -114,6 +114,54 @@ View* View::allocate(TypeID type, IndexType num_elems, int allocID) return this; } +/* + ************************************************************************* + * + * Allocate data for view with type and shape. + * + ************************************************************************* + */ +View* View::allocate(TypeID type, int ndims, const IndexType* shape, int allocID) +{ + allocID = getValidAllocatorID(allocID); + + SLIC_CHECK_MSG( + ndims > 0, + SIDRE_VIEW_LOG_PREPEND << "Could not allocate: ndim is non-positive."); + + SLIC_CHECK_MSG(type != NO_TYPE_ID, + SIDRE_VIEW_LOG_PREPEND + << "Could not allocate: Data type was 'NO_TYPE_ID'."); + + SLIC_CHECK_MSG(shape != nullptr, + SIDRE_VIEW_LOG_PREPEND + << "Could not allocate: specified shape is nullptr."); + + IndexType num_elems = 1; + if(shape != nullptr) + { + for(int d = 0; d < ndims; ++d) + { + SLIC_CHECK_MSG( + shape[d] > 0, + SIDRE_VIEW_LOG_PREPEND << "Could not allocate: shape is non-positive."); + num_elems *= shape[d]; + if(num_elems <= 0) + { + break; + } + } + } + + if(ndims > 0 && shape != nullptr && num_elems > 0 && type != NO_TYPE_ID) + { + describe(type, ndims, shape); + allocate(allocID); + } + + return this; +} + /* ************************************************************************* * @@ -935,6 +983,14 @@ void View::describe(TypeID type, IndexType num_elems) */ void View::describe(TypeID type, int ndims, const IndexType* shape) { + SLIC_CHECK_MSG(shape != nullptr, + SIDRE_VIEW_LOG_PREPEND + << "Could not allocate: specified shape is nullptr."); + if(shape == nullptr) + { + return; + } + IndexType num_elems = 0; if(ndims > 0) { @@ -987,6 +1043,14 @@ void View::describeShape() */ void View::describeShape(int ndims, const IndexType* shape) { + SLIC_CHECK_MSG(shape != nullptr, + SIDRE_VIEW_LOG_PREPEND + << "Could not allocate: specified shape is nullptr."); + if(shape == nullptr) + { + return; + } + m_shape.clear(); for(int i = 0; i < ndims; i++) { @@ -1053,10 +1117,13 @@ void View::deepCopyView(View* copy, int allocID) const if(isDescribed()) { - copy->describe(m_schema.dtype()); if(hasBuffer() || m_state == EXTERNAL) { - copy->allocate(getTypeID(), getNumElements(), allocID); + copy->allocate(getTypeID(), getNumDimensions(), m_shape.data(), allocID); + } + else + { + copy->describe(getTypeID(), getNumDimensions(), m_shape.data()); } } diff --git a/src/axom/sidre/core/View.hpp b/src/axom/sidre/core/View.hpp index 7d9572b022..e4bf9cf165 100644 --- a/src/axom/sidre/core/View.hpp +++ b/src/axom/sidre/core/View.hpp @@ -367,6 +367,20 @@ class View IndexType num_elems, int allocID = INVALID_ALLOCATOR_ID); + /*! + * \brief Allocate data for view given type and shape. + * + * \note The allocate() method (above) describes conditions where View + * allocation is allowed. If the conditions are not met, + * type is NO_TYPE_ID, or ndims < 0, or shape is nullptr, + * or any element of shape < 0, this method does nothing. + * + * If shape is nullptr, this is a no-op. + * + * \return pointer to this View object. + */ + View* allocate(TypeID type, int ndims, const IndexType* shape, int allocID); + /*! * \brief Allocate data for view described by a Conduit data type object. * @@ -432,7 +446,7 @@ class View * If data view already has a buffer, or it is an external view, * a scalar view, or a string view, this method does nothing. * - * If data view already has a buffer and buff is NULL, the attached + * If data view already has a buffer and buff is nullptr, the attached * buffer will be detached. After the view is detached from the * buffer, if the buffer has no views attached to it, then it will * be destroyed. @@ -456,10 +470,19 @@ class View /*! * \brief Describe the data view and attach Buffer object. * + * If shape is nullptr, this is a no-op. + * * \return pointer to this View object. */ View* attachBuffer(TypeID type, int ndims, const IndexType* shape, Buffer* buff) { + SLIC_CHECK_MSG(shape != nullptr, + SIDRE_VIEW_LOG_PREPEND + << "Could not allocate: specified shape is nullptr."); + if(shape == nullptr) + { + return this; + } describe(type, ndims, shape); attachBuffer(buff); return this; @@ -708,7 +731,7 @@ class View * Data is undescribed (i.e., view is opaque) until an apply methods * is called on the view. * - * If external_ptr is NULL, the view will be EMPTY. + * If external_ptr is nullptr, the view will be EMPTY. * Any existing description is unchanged. * * \return pointer to this View object. @@ -718,7 +741,7 @@ class View /*! * \brief Set view to hold described external data. * - * If external_ptr is NULL, the view will be EMPTY. + * If external_ptr is nullptr, the view will be EMPTY. * * \return pointer to this View object. */ @@ -732,7 +755,9 @@ class View /*! * \brief Set view to hold described external data. * - * If external_ptr is NULL, the view will be EMPTY. + * If external_ptr is nullptr, the view will be EMPTY. + * + * If shape is nullptr, this is a no-op. * * \return pointer to this View object. */ @@ -741,6 +766,15 @@ class View const IndexType* shape, void* external_ptr) { + SLIC_CHECK_MSG( + shape != nullptr, + SIDRE_VIEW_LOG_PREPEND + << "Could not set external data ptr: specified shape is nullptr."); + if(shape == nullptr) + { + return this; + } + describe(type, ndims, shape); setExternalDataPtr(external_ptr); return this; @@ -1321,13 +1355,14 @@ class View * \brief Describe a data view with given type, number of dimensions, and * number of elements per dimension. * - * * \attention If view has been previously described, this operation will * re-describe the view. To have the new description take effect, * the apply() method must be called. * * If given type of NO_TYPE_ID, or number of dimensions or total * number of elements < 0, or view is opaque, method does nothing. + * + * If shape is nullptr, this is a no-op. */ void describe(TypeID type, int ndims, const IndexType* shape); @@ -1350,6 +1385,8 @@ class View /*! * \brief Set the shape to be a ndims dimensions with shape. + * + * If shape is nullptr, this is a no-op. */ void describeShape(int ndims, const IndexType* shape); diff --git a/src/axom/sidre/examples/sidre_stressgroups.cpp b/src/axom/sidre/examples/sidre_stressgroups.cpp index b56b791f47..82b4fd0cf3 100644 --- a/src/axom/sidre/examples/sidre_stressgroups.cpp +++ b/src/axom/sidre/examples/sidre_stressgroups.cpp @@ -11,6 +11,7 @@ #include "axom/sidre.hpp" #include +#include #include using axom::sidre::DataStore; @@ -77,7 +78,9 @@ int main(int argc, char* argv[]) names[i] = sstr.str();; } */ - std::random_shuffle(names.begin(), names.end()); + std::random_device rd; + std::mt19937 g(rd()); + std::shuffle(names.begin(), names.end(), g); axom::utilities::Timer create_timer(true); for(size_t i = 0; i < num_groups; ++i) @@ -87,7 +90,7 @@ int main(int argc, char* argv[]) create_timer.stop(); std::cout << "Create time " << create_timer.elapsed() << ".\n"; - std::random_shuffle(names.begin(), names.end()); + std::shuffle(names.begin(), names.end(), g); axom::utilities::Timer query_timer(true); for(size_t i = 0; i < num_groups; ++i) @@ -100,7 +103,7 @@ int main(int argc, char* argv[]) query_timer.stop(); std::cout << "Query time " << query_timer.elapsed() << ".\n"; - std::random_shuffle(names.begin(), names.end()); + std::shuffle(names.begin(), names.end(), g); axom::utilities::Timer destroy_timer(true); for(size_t i = 0; i < num_groups; ++i) @@ -117,7 +120,7 @@ int main(int argc, char* argv[]) int num_shuffles = num_groups / 100; for(int j = 0; j < num_shuffles; ++j) { - std::random_shuffle(names.begin(), names.end()); + std::shuffle(names.begin(), names.end(), g); mixed_timer.start(); for(int i = 0; i < 100; ++i) diff --git a/src/axom/sidre/tests/sidre_mcarray.cpp b/src/axom/sidre/tests/sidre_mcarray.cpp index eb9e714d78..23a39c0c93 100644 --- a/src/axom/sidre/tests/sidre_mcarray.cpp +++ b/src/axom/sidre/tests/sidre_mcarray.cpp @@ -34,7 +34,14 @@ axom::IndexType calc_new_capacity(MCArray& v, axom::IndexType increase) axom::IndexType new_num_tuples = (v.size() / num_components) + increase; if((new_num_tuples * num_components) > v.capacity()) { - return new_num_tuples * v.getResizeRatio() + 0.5; + axom::IndexType new_capacity = v.capacity() * v.getResizeRatio() + 0.5; + axom::IndexType remainder = new_capacity % num_components; + if(remainder > 0) + { + new_capacity += num_components - remainder; + } + return axom::utilities::max(new_capacity / num_components, + new_num_tuples); } return v.capacity() / num_components; diff --git a/src/axom/sidre/tests/sidre_types_C.cpp b/src/axom/sidre/tests/sidre_types_C.cpp index 2c8c90ce2b..6ed8f43066 100644 --- a/src/axom/sidre/tests/sidre_types_C.cpp +++ b/src/axom/sidre/tests/sidre_types_C.cpp @@ -5,9 +5,8 @@ #include "gtest/gtest.h" -#include - #include "axom/core/Types.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/sidre.hpp" using axom::sidre::DataType; @@ -24,21 +23,21 @@ template void testTypesForEquality() { // check if both are integral types - bool com_is_int = std::numeric_limits::is_integer; - bool sid_is_int = std::numeric_limits::is_integer; + bool com_is_int = axom::numeric_limits::is_integer; + bool sid_is_int = axom::numeric_limits::is_integer; EXPECT_EQ(com_is_int, sid_is_int); // check if both are signed (or both are unsigned) - bool com_is_signed = std::numeric_limits::is_signed; - bool sid_is_signed = std::numeric_limits::is_signed; + bool com_is_signed = axom::numeric_limits::is_signed; + bool sid_is_signed = axom::numeric_limits::is_signed; EXPECT_EQ(com_is_signed, sid_is_signed); // check that both have same number of bytes EXPECT_EQ(sizeof(CommonType), sizeof(SidreType)); // check that both have same number of digits - EXPECT_EQ(std::numeric_limits::digits, - std::numeric_limits::digits); + EXPECT_EQ(axom::numeric_limits::digits, + axom::numeric_limits::digits); } } // namespace diff --git a/src/axom/sidre/tests/sidre_view.cpp b/src/axom/sidre/tests/sidre_view.cpp index 4ccd1202d2..a210a72f99 100644 --- a/src/axom/sidre/tests/sidre_view.cpp +++ b/src/axom/sidre/tests/sidre_view.cpp @@ -1828,6 +1828,30 @@ TEST(sidre_view, clear_view) //------------------------------------------------------------------------------ +TEST(sidre_view, deep_copy_shape) +{ + DataStore* ds = new DataStore(); + Group* root = ds->getRoot(); + Group* groupA = root->createGroup("groupA"); + Group* groupB = root->createGroup("groupB"); + + { + const IndexType shapeA[3] = {3, 2, 5}; + View* viewA = groupA->createViewWithShape("array3d", INT_ID, 3, shapeA); + View* viewB = groupB->deepCopyView(viewA); + IndexType shapeB[3] = {-1, -1, -1}; + viewB->getShape(3, shapeB); + EXPECT_EQ(viewB->getNumDimensions(), 3); + EXPECT_EQ(shapeB[0], shapeA[0]); + EXPECT_EQ(shapeB[1], shapeA[1]); + EXPECT_EQ(shapeB[2], shapeA[2]); + } + + delete ds; +} + +//------------------------------------------------------------------------------ + #ifdef AXOM_USE_UMPIRE class UmpireTest : public ::testing::TestWithParam diff --git a/src/axom/slam/BivariateMap.hpp b/src/axom/slam/BivariateMap.hpp index 6afe7cd6fd..eb33188c7e 100644 --- a/src/axom/slam/BivariateMap.hpp +++ b/src/axom/slam/BivariateMap.hpp @@ -83,7 +83,7 @@ template , typename StrPol = policies::StrideOne, - typename IfacePol = policies::VirtualInterface> + typename IfacePol = policies::ConcreteInterface> class BivariateMap : public policies::MapInterface, public StrPol @@ -97,6 +97,8 @@ class BivariateMap using SetPosition = typename BSet::PositionType; using SetElement = typename BSet::ElementType; + using ElementShape = typename StridePolicyType::ShapeType; + using SetType = typename slam::RangeSet::ConcreteSet; using MapType = Map; using OrderedSetType = typename BSet::SubsetType; @@ -109,14 +111,21 @@ class BivariateMap using BivariateMapType = BivariateMap; template - class BivariateMapIterator; - using iterator = BivariateMapIterator; - using const_iterator = BivariateMapIterator; + class FlatIterator; + using iterator = FlatIterator; + using const_iterator = FlatIterator; + + template + class RangeIterator; + using range_iterator = RangeIterator; + using const_range_iterator = RangeIterator; using SubMapType = SubMap; using ConstSubMapType = const SubMap; using SubMapIterator = typename SubMapType::iterator; using ConstSubMapIterator = typename ConstSubMapType::iterator; + using SubMapRangeIterator = typename SubMapType::range_iterator; + using ConstSubMapRangeIterator = typename ConstSubMapType::range_iterator; using NullBivariateSetType = NullBivariateSet; @@ -173,19 +182,18 @@ class BivariateMap * \param bSet (Optional) Pointer to the BivariateSet. * \param defaultValue (Optional) The default value used to initialize the * entries of the map. - * \param stride (Optional) The stride, or number of component, of the - * map. + * \param shape (Optional) The number of components in the map. * * \note When using a compile time StridePolicy, \a stride must be equal to * \a StridePolicy::stride(), when provided. */ BivariateMap(const BivariateSetType* bSet = &s_nullBiSet, DataType defaultValue = DataType(), - SetPosition stride = StridePolicyType::DEFAULT_VALUE, + ElementShape shape = StridePolicyType::DefaultSize(), int allocatorID = axom::getDefaultAllocatorID()) - : StridePolicyType(stride) + : StridePolicyType(shape) , m_bset(bSet) - , m_map(SetType(bSet->size()), defaultValue, stride, allocatorID) + , m_map(SetType(bSet->size()), defaultValue, shape, allocatorID) { } /// \overload @@ -195,11 +203,11 @@ class BivariateMap std::is_base_of::value>::type> BivariateMap(const UBSet& bSet, DataType defaultValue = DataType(), - SetPosition stride = StridePolicyType::DEFAULT_VALUE, + ElementShape shape = StridePolicyType::DefaultSize(), int allocatorID = axom::getDefaultAllocatorID()) - : StridePolicyType(stride) + : StridePolicyType(shape) , m_bset(bSet) - , m_map(SetType(bSet->size()), defaultValue, stride, allocatorID) + , m_map(SetType(bSet->size()), defaultValue, shape, allocatorID) { static_assert(std::is_same::value, "Argument set is of a more-derived type than the Map's set " @@ -213,18 +221,18 @@ class BivariateMap * * \param bSet A reference to the map's associated bivariate set * \param data The data buffer to set the map's data to. - * \param stride (Optional) The stride. The number of DataType that - * each element in the set will be mapped to. + * \param shape (Optional) The number of DataType that each element in the + * set will be mapped to. * When using a \a RuntimeStridePolicy, the default is 1. * \note When using a compile time StridePolicy, \a stride must be equal to * \a stride(), when provided. */ BivariateMap(const BivariateSetType* bSet, typename MapType::OrderedMap data, - SetPosition stride = StridePolicyType::DEFAULT_VALUE) - : StridePolicyType(stride) + ElementShape shape = StridePolicyType::DefaultSize()) + : StridePolicyType(shape) , m_bset(bSet) - , m_map(SetType(bSet->size()), data, stride) + , m_map(SetType(bSet->size()), data, shape) { } /** @@ -233,8 +241,8 @@ class BivariateMap * * \param bSet A reference to the map's associated bivariate set * \param data The data buffer to set the map's data to. - * \param stride (Optional) The stride. The number of DataType that - * each element in the set will be mapped to. + * \param shape (Optional) The number of DataType that each element in the + * set will be mapped to. * When using a \a RuntimeStridePolicy, the default is 1. * \note When using a compile time StridePolicy, \a stride must be equal to * \a stride(), when provided. @@ -246,10 +254,10 @@ class BivariateMap std::is_base_of::value>::type> BivariateMap(const UBSet& bSet, typename MapType::OrderedMap data, - SetPosition stride = StridePolicyType::DEFAULT_VALUE) - : StridePolicyType(stride) + ElementShape shape = StridePolicyType::DefaultSize()) + : StridePolicyType(shape) , m_bset(bSet) - , m_map(SetType(bSet.size()), data, stride) + , m_map(SetType(bSet.size()), data, shape) { static_assert(std::is_same::value, "Argument set is of a more-derived type than the Map's set " @@ -319,6 +327,7 @@ class BivariateMap return ConstSubMapType(this, s, hasInd); } + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE SubMapType operator()(SetPosition firstIdx) { #ifndef AXOM_DEVICE_CODE @@ -337,20 +346,43 @@ class BivariateMap * \pre `0 <= s2 < size(s1)` * \pre `0 <= comp < numComp()` */ + template AXOM_HOST_DEVICE ConstValueType operator()(SetPosition s1, SetPosition s2, - SetPosition comp = 0) const + ComponentIndex... comp) const { auto idx = flatIndex(s1, s2); - return useCompIndexing() ? m_map(idx, comp) : m_map[idx]; + return flatValue(idx, comp...); } + template AXOM_HOST_DEVICE ValueType operator()(SetPosition s1, SetPosition s2, - SetPosition comp = 0) + ComponentIndex... comp) { auto idx = flatIndex(s1, s2); - return useCompIndexing() ? m_map(idx, comp) : m_map[idx]; + return flatValue(idx, comp...); + } + + /** + * \brief Access the value associated with the given FlatIndex into the + * BivariateSet and the component index. + * + * \pre `0 <= flatIndex < size()` + * \pre `0 <= comp < numComp()` + */ + template + AXOM_HOST_DEVICE ConstValueType flatValue(SetPosition flatIndex, + ComponentIndex... comp) const + { + return m_map(flatIndex, comp...); + } + + template + AXOM_HOST_DEVICE ValueType flatValue(SetPosition flatIndex, + ComponentIndex... comp) + { + return m_map(flatIndex, comp...); } /** @@ -366,9 +398,10 @@ class BivariateMap * \warning For sparse BivariateSet type, this function may have to do a * linear search and can be slow. */ + template AXOM_HOST_DEVICE ConstPointerType findValue(SetPosition s1, SetPosition s2, - SetPosition comp = 0) const + ComponentIndex... comp) const { SetPosition i = set()->findElementFlatIndex(s1, s2); if(i == BivariateSetType::INVALID_POS) @@ -376,12 +409,13 @@ class BivariateMap //the BivariateSet does not contain this index pair return nullptr; } - return &(m_map(i, comp)); + return &(m_map(i, comp...)); } + template AXOM_HOST_DEVICE PointerType findValue(SetPosition s1, SetPosition s2, - SetPosition comp = 0) + ComponentIndex... comp) { SetPosition i = set()->findElementFlatIndex(s1, s2); if(i == BivariateSetType::INVALID_POS) @@ -389,7 +423,7 @@ class BivariateMap //the BivariateSet does not contain this index pair return nullptr; } - return &(m_map(i, comp)); + return &(m_map(i, comp...)); } /// @} @@ -432,16 +466,6 @@ class BivariateMap /// @} protected: - /** - * \brief Compile time predicate to check if we should use component indexing - * - * \note Intended to help optimize internal indexing - */ - AXOM_HOST_DEVICE constexpr bool useCompIndexing() const - { - return !(StrPol::IS_COMPILE_TIME && StrPol::DEFAULT_VALUE == 1); - } - /** * \brief Utility function to determine if submaps should use indirection * when finding the set indices of their elements. @@ -456,222 +480,85 @@ class BivariateMap } public: - /** - * \class BivariateMapIterator - * \brief An iterator type for a BivariateMap, iterating via its - * ElementFlatIndex. - * - * This iterator class traverses the BivariateMap using its ElementFlatIndex. - * In addition to m_pos from IteratorBase, this class also keeps track of the - * iterator's first index (firstIdx), second dense index (secondIdx), and the - * second sparse index (secondSparseIdx). The advance() function is - * implemented to update those three additional indices. - */ - template - class BivariateMapIterator - : public IteratorBase, SetPosition> - { - private: - using iterator_category = std::random_access_iterator_tag; - using value_type = DataType; - using difference_type = SetPosition; - - using IterBase = IteratorBase; - using IterBase::m_pos; - using iter = BivariateMapIterator; - - public: - using DataRefType = std::conditional_t; - using BivariateMapPtr = - std::conditional_t; - - using PositionType = SetPosition; - static constexpr PositionType INVALID_POS = -2; - - public: - /** - * \brief Construct a new BivariateMap Iterator given an ElementFlatIndex - */ - BivariateMapIterator(BivariateMapPtr sMap, PositionType pos) - : IterBase(pos) - , m_map(sMap) - , firstIdx(INVALID_POS) - , secondIdx(INVALID_POS) - , secondSparseIdx(INVALID_POS) - { - find_indices(pos); - } - - bool operator==(const iter& other) const - { - return (m_map == other.m_map) && (m_pos == other.m_pos); - } - bool operator!=(const iter& other) const { return !operator==(other); } - - /** - * \brief Returns the current iterator value. If the BivariateMap has - * multiple components, this will return the first component. - * To access the other components, use iter(comp) - */ - DataRefType operator*() { return (*m_map)(firstIdx, secondIdx, 0); } - - /** - * \brief Returns the iterator's value at the specified component. - * Returns the first component if comp_idx is not specified. - * \param comp_idx (Optional) Zero-based index of the component. - */ - DataRefType operator()(PositionType comp_idx = 0) - { - return (*m_map)(firstIdx, secondIdx, comp_idx); - } - - /** \brief Returns the first component value after n increments. */ - DataRefType operator[](PositionType n) { return *(this->operator+(n)); } - - /** - * \brief Return the value at the iterator's position. Same as operator() - */ - DataRefType value(PositionType comp = 0) - { - return (*m_map)(firstIdx, secondIdx, comp); - } - - /** - * \brief return the current iterator's first index into the BivariateSet - */ - PositionType firstIndex() const { return firstIdx; } - - /** - * \brief return the current iterator's second index (DenseIndex) - * into the BivariateSet - */ - PositionType secondIndex() const { return m_map->set()->at(m_pos); } - - /** \brief Returns the number of components per element in the map. */ - PositionType numComp() const { return m_map->numComp(); } - - private: - /** Given the ElementFlatIndex, search for and update the other indices. - * This function does not depend on the three indices to be correct. */ - void find_indices(PositionType pos) - { - if(pos < 0 || pos > m_map->totalSize()) - { - firstIdx = INVALID_POS; - secondIdx = INVALID_POS; - secondSparseIdx = INVALID_POS; - return; - } - else if(pos == m_map->totalSize()) - { - firstIdx = m_map->firstSetSize(); - secondIdx = 0; - secondSparseIdx = 0; - return; - } - - firstIdx = 0; - PositionType beginIdx = 0; - while(beginIdx + m_map->set()->size(firstIdx) <= pos) - { - beginIdx += m_map->set()->size(firstIdx); - firstIdx++; - } + /** BivariateMap iterator functions */ + AXOM_HOST_DEVICE iterator begin() { return iterator(this, 0); } - SLIC_ASSERT(firstIdx < m_map->firstSetSize()); - secondIdx = m_map->set()->at(pos); - secondSparseIdx = pos - beginIdx; - } + AXOM_HOST_DEVICE iterator end() + { + return iterator(this, totalSize() * numComp()); + } - /* recursive helper function for advance(n) to update the three indices. - * This is an updating function, which assumes the pre-advance state is - * valid, i.e. the three indices were correct prior to advance(n). - * It will recurse as many times as the change in firstIdx. */ - void advance_helper(PositionType n, PositionType idx1, PositionType idx2) - { - const BivariateSetType* set = m_map->set(); - if(idx2 + n < 0) - { - advance_helper(n + (idx2 + 1), idx1 - 1, set->size(idx1 - 1) - 1); - } - else if(idx2 + n >= set->size(idx1)) - { - advance_helper(n - (set->size(idx1) - idx2), idx1 + 1, 0); - } - else - { - firstIdx = idx1; - secondSparseIdx = idx2 + n; - secondIdx = m_map->set()->at(m_pos); - } - } + AXOM_HOST_DEVICE const_iterator begin() const + { + return const_iterator(this, 0); + } - protected: - /** Implementation of advance() as required by IteratorBase. - * It updates the three other indices as well. */ - void advance(PositionType n) - { - m_pos += n; - PositionType size = m_map->totalSize(); + AXOM_HOST_DEVICE const_iterator end() const + { + return const_iterator(this, totalSize() * numComp()); + } - if(firstIdx == INVALID_POS) - { //iterator was in an invalid position. search for the indices. - find_indices(m_pos); - } - else if(m_pos == size) - { - firstIdx = m_map->firstSetSize(); - secondIdx = 0; - secondSparseIdx = 0; - } - else if(m_pos < 0 || m_pos > size) - { - firstIdx = INVALID_POS; - secondIdx = INVALID_POS; - secondSparseIdx = INVALID_POS; - } - else - { - advance_helper(n, firstIdx, secondSparseIdx); - } - } + AXOM_HOST_DEVICE range_iterator set_begin() + { + return range_iterator(this, 0); + } - private: - BivariateMapPtr m_map; - PositionType firstIdx; - PositionType secondIdx; - PositionType secondSparseIdx; - }; + AXOM_HOST_DEVICE range_iterator set_end() + { + return range_iterator(this, totalSize()); + } -public: - /** BivariateMap iterator functions */ - AXOM_HOST_DEVICE iterator begin() { return iterator(this, 0); } - AXOM_HOST_DEVICE iterator end() { return iterator(this, totalSize()); } - AXOM_HOST_DEVICE const_iterator begin() const + AXOM_HOST_DEVICE const_range_iterator set_begin() const { - return const_iterator(this, 0); + return const_range_iterator(this, 0); } - AXOM_HOST_DEVICE const_iterator end() const + + AXOM_HOST_DEVICE const_range_iterator set_end() const { - return const_iterator(this, totalSize()); + return const_range_iterator(this, totalSize()); } /** Iterator via Submap */ AXOM_HOST_DEVICE SubMapIterator begin(int i) { return (*this)(i).begin(); } + AXOM_HOST_DEVICE SubMapIterator end(int i) { return (*this)(i).end(); } + AXOM_HOST_DEVICE ConstSubMapIterator begin(int i) const { return (*this)(i).begin(); } + AXOM_HOST_DEVICE ConstSubMapIterator end(int i) const { return (*this)(i).end(); } + AXOM_HOST_DEVICE SubMapRangeIterator set_begin(int i) + { + return (*this)(i).set_begin(); + } + + AXOM_HOST_DEVICE SubMapRangeIterator set_end(int i) + { + return (*this)(i).set_end(); + } + + AXOM_HOST_DEVICE ConstSubMapRangeIterator set_begin(int i) const + { + return (*this)(i).set_begin(); + } + + AXOM_HOST_DEVICE ConstSubMapRangeIterator set_end(int i) const + { + return (*this)(i).set_end(); + } + public: AXOM_HOST_DEVICE const BivariateSetType* set() const { return m_bset.get(); } - const MapType* getMap() const { return &m_map; } - MapType* getMap() { return &m_map; } + + AXOM_HOST_DEVICE const MapType* getMap() const { return &m_map; } + + AXOM_HOST_DEVICE MapType* getMap() { return &m_map; } bool isValid(bool verboseOutput = false) const { @@ -684,19 +571,23 @@ class BivariateMap /** \brief Returns the BivariateSet size. */ AXOM_HOST_DEVICE SetPosition size() const { return set()->size(); } + /** \brief Returns the BivariateSet size. */ - SetPosition totalSize() const { return set()->size(); } + AXOM_HOST_DEVICE SetPosition totalSize() const { return set()->size(); } SetPosition firstSetSize() const { return set()->firstSetSize(); } + AXOM_HOST_DEVICE SetPosition secondSetSize() const { return set()->secondSetSize(); } + /** \brief Returns the number of the BivariateSet ordered pairs with * the given first set index. */ SetPosition size(SetPosition s) const { return set()->size(s); } + /** \brief Return the number of components of the map */ - SetPosition numComp() const { return StrPol::stride(); } + AXOM_HOST_DEVICE SetPosition numComp() const { return StrPol::stride(); } /// @} @@ -750,6 +641,210 @@ template ::NullBivariateSetType const BivariateMap::s_nullBiSet; +/** + * \class BivariateMapIterator + * \brief An iterator type for a BivariateMap, iterating via its + * ElementFlatIndex. + * + * This iterator class iterates over all elements in the associated map. + */ +template +template +class BivariateMap::FlatIterator + : public IteratorBase, SetPosition> +{ +private: + using IterBase = IteratorBase, SetPosition>; + using iterator_category = std::random_access_iterator_tag; + using value_type = DataType; + using reference = DataType&; + using pointer = DataType*; + using difference_type = SetPosition; + + using iter = FlatIterator; + +public: + using DataRefType = std::conditional_t; + using BivariateMapPtr = + std::conditional_t; + + using PositionType = SetPosition; + static constexpr PositionType INVALID_POS = -2; + +public: + /** + * \brief Construct a new BivariateMap Iterator given an ElementFlatIndex + */ + AXOM_HOST_DEVICE FlatIterator(BivariateMapPtr sMap, PositionType pos) + : IterBase(pos) + , m_map(sMap) + , m_bsetIterator(m_map->set(), pos / m_map->numComp()) + { } + + /** + * \brief Returns the current map element pointed to by the iterator. + */ + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE DataRefType operator*() const + { + return m_map->flatValue(m_bsetIterator.flatIndex(), compIndex()); + } + + AXOM_HOST_DEVICE pointer operator->() const { return &(*this); } + + /** + * \brief return the current iterator's first index into the BivariateSet + */ + PositionType firstIndex() const { return m_bsetIterator.firstIndex(); } + + /** + * \brief return the current iterator's second index (DenseIndex) + * into the BivariateSet + */ + PositionType secondIndex() const { return m_bsetIterator.secondIndex(); } + + /// \brief return the current iterator's component index + PositionType compIndex() const { return this->m_pos % numComp(); } + + /** \brief Returns the number of components per element in the map. */ + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE PositionType numComp() const { return m_map->numComp(); } + +protected: + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE void advance(IndexType n) + { + this->m_pos += n; + // Advance associated bset iterator. + auto oldBsetIndex = m_bsetIterator.flatIndex(); + auto newBsetIndex = this->m_pos / numComp(); + m_bsetIterator += (newBsetIndex - oldBsetIndex); + } + +private: + BivariateMapPtr m_map; + typename BivariateSetType::IteratorType m_bsetIterator; +}; + +/** + * \class BivariateMap::RangeIterator + * + * \brief An iterator type for a BivariateMap, iterating over elements in an + * associated BivariateSet. + * + * Unlike the FlatIterator, which iterates over all map elements, the + * RangeIterator may point to a range of elements in the case of non-unit + * stride. + */ +template +template +class BivariateMap::RangeIterator + : public IteratorBase, SetPosition> +{ +public: + using IterBase = IteratorBase, SetPosition>; + + using MapIterator = typename MapType::template MapRangeIterator; + + using iterator_category = std::random_access_iterator_tag; + using value_type = typename MapIterator::value_type; + using reference = typename MapIterator::reference; + using pointer = typename MapIterator::pointer; + using difference_type = SetPosition; + +public: + using DataRefType = typename MapIterator::DataRefType; + using BivariateMapPtr = + std::conditional_t; + + using PositionType = SetPosition; + static constexpr PositionType INVALID_POS = -2; + +public: + /*! + * \brief Construct a new BivariateMap Iterator given an ElementFlatIndex + */ + AXOM_HOST_DEVICE RangeIterator(BivariateMapPtr sMap, PositionType pos) + : IterBase(pos) + , m_map(sMap) + , m_mapIterator(m_map->getMap()->set_begin() + pos) + , m_bsetIterator(m_map->set(), pos) + { } + + /*! + * \brief Returns the range of elements pointed to by this iterator. + */ + AXOM_HOST_DEVICE reference operator*() const { return *m_mapIterator; } + + AXOM_HOST_DEVICE pointer operator->() const + { + return m_mapIterator.operator->(); + } + + /*! + * \brief Returns the iterator's value at the given component index. + * + * \pre `sizeof(compIdx) == StridePolicy::NumDims` + * \pre `0 <= compIdx[idim] < shape()[idim]` + */ + AXOM_SUPPRESS_HD_WARN + template + AXOM_HOST_DEVICE DataRefType operator()(ComponentIndex... comp_idx) const + { + return value(comp_idx...); + } + + /** \brief Returns the first component value after n increments. */ + DataRefType operator[](PositionType n) const { return *(this->operator+(n)); } + + /*! + * \brief Return the value at the iterator's position for a given component + * index. Same as operator() + */ + template + AXOM_HOST_DEVICE DataRefType value(ComponentIndex... comp) const + { + return m_mapIterator(comp...); + } + + /** + * \brief return the current iterator's first index into the BivariateSet + */ + PositionType firstIndex() const { return m_bsetIterator.firstIndex(); } + + /** + * \brief return the current iterator's second index (DenseIndex) + * into the BivariateSet + */ + PositionType secondIndex() const { return m_bsetIterator.secondIndex(); } + + /** + * \brief Return the current iterator's flat bivariate index. + */ + AXOM_HOST_DEVICE PositionType flatIndex() const + { + return m_mapIterator.flatIndex(); + } + + /** \brief Returns the number of components per element in the map. */ + PositionType numComp() const { return m_map->numComp(); } + +protected: + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE void advance(IndexType n) + { + this->m_pos += n; + // Advance associated bset iterator. + m_bsetIterator += n; + m_mapIterator += n; + } + +private: + BivariateMapPtr m_map; + typename MapType::template MapRangeIterator m_mapIterator; + typename BivariateSetType::IteratorType m_bsetIterator; +}; + } // end namespace slam } // end namespace axom diff --git a/src/axom/slam/BivariateSet.hpp b/src/axom/slam/BivariateSet.hpp index 0156928fd8..ef78ff5190 100644 --- a/src/axom/slam/BivariateSet.hpp +++ b/src/axom/slam/BivariateSet.hpp @@ -28,6 +28,9 @@ namespace axom { namespace slam { +template +struct BivariateSetIterator; + /** * \class BivariateSet * @@ -95,6 +98,7 @@ class BivariateSet policies::ArrayViewIndirection>; using RangeSetType = RangeSet; + using IteratorType = BivariateSetIterator; public: static const PositionType INVALID_POS = PositionType(-1); @@ -209,7 +213,9 @@ class BivariateSet { return getSize(m_set1); } + /** \brief Size of the second set. */ + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE inline PositionType secondSetSize() const { return getSize(m_set2); @@ -217,11 +223,12 @@ class BivariateSet /** \brief Returns pointer to the first set. */ const FirstSetType* getFirstSet() const { return m_set1; } + /** \brief Returns pointer to the second set. */ const SecondSetType* getSecondSet() const { return m_set2; } /** \brief Returns the element at the given FlatIndex \a pos */ - virtual ElementType at(PositionType pos) const = 0; + AXOM_HOST_DEVICE virtual ElementType at(PositionType pos) const = 0; /** * \brief A set of elements with the given first set index. @@ -232,11 +239,24 @@ class BivariateSet */ virtual SubsetType getElements(PositionType s1) const = 0; + /*! + * \brief Return an iterator to the first pair of set elements in the + * relation. + */ + IteratorType begin() const { return IteratorType(this, 0); } + + /*! + * \brief Return an iterator to one past the last pair of set elements in the + * relation. + */ + IteratorType end() const { return IteratorType(this, size()); } + virtual bool isValid(bool verboseOutput = false) const; private: virtual void verifyPosition(PositionType s1, PositionType s2) const = 0; + AXOM_SUPPRESS_HD_WARN template AXOM_HOST_DEVICE typename std::enable_if::value, PositionType>::type @@ -278,6 +298,57 @@ bool BivariateSet::isValid(bool verboseOutput) const return m_set1->isValid(verboseOutput) && m_set2->isValid(verboseOutput); } +/*! + * \class BivariateSetIterator + * + * \brief Implements a forward iterator concept on a BivariateSet type. + */ +template +struct BivariateSetIterator + : public IteratorBase, + typename BivariateSetType::PositionType> +{ +public: + using IndexType = typename BivariateSetType::PositionType; + using BaseType = + IteratorBase, IndexType>; + using difference_type = IndexType; + using value_type = std::pair; + using reference = value_type&; + using pointer = value_type*; + using iterator_category = std::forward_iterator_tag; + + AXOM_HOST_DEVICE BivariateSetIterator(const BivariateSetType* bset, + IndexType flatPos = 0) + : BaseType(flatPos) + , m_bset(bset) + { } + + std::pair operator*() const + { + // Going from flat index to second index is always free for a StaticRelation. + return {firstIndex(), secondIndex()}; + } + + /// \brief Return the first set index pointed to by this iterator. + IndexType firstIndex() const { return m_bset->flatToFirstIndex(flatIndex()); } + + /// \brief Return the second set index pointed to by this iterator. + IndexType secondIndex() const + { + return m_bset->flatToSecondIndex(flatIndex()); + } + + /// \brief Return the flat iteration index of this iterator. + AXOM_HOST_DEVICE IndexType flatIndex() const { return this->m_pos; } + +protected: + AXOM_HOST_DEVICE void advance(IndexType n) { this->m_pos += n; } + +private: + const BivariateSetType* m_bset; +}; + /** * \class NullBivariateSet * @@ -305,6 +376,7 @@ class NullBivariateSet : public BivariateSet return PositionType(); } + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE PositionType findElementFlatIndex(PositionType s1, PositionType s2) const override { @@ -327,12 +399,16 @@ class NullBivariateSet : public BivariateSet return PositionType(); } + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE RangeSetType elementRangeSet(PositionType) const override { return RangeSetType(); } - ElementType at(PositionType) const override { return PositionType(); } + AXOM_HOST_DEVICE ElementType at(PositionType) const override + { + return PositionType(); + } AXOM_HOST_DEVICE PositionType size() const override { return PositionType(); } diff --git a/src/axom/slam/CMakeLists.txt b/src/axom/slam/CMakeLists.txt index f25056ae2e..fb54c2abd4 100644 --- a/src/axom/slam/CMakeLists.txt +++ b/src/axom/slam/CMakeLists.txt @@ -112,14 +112,3 @@ endif() if (AXOM_ENABLE_EXAMPLES) add_subdirectory(examples) endif() - - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks( - PREFIX slam - EXCLUDES - slam/examples/lulesh2.0.3 - slam/examples/tinyHydro ) - diff --git a/src/axom/slam/Map.hpp b/src/axom/slam/Map.hpp index 2d4c56b356..f214ea6711 100644 --- a/src/axom/slam/Map.hpp +++ b/src/axom/slam/Map.hpp @@ -25,6 +25,7 @@ #include "axom/slam/NullSet.hpp" #include "axom/core/IteratorBase.hpp" +#include "axom/core/RangeAdapter.hpp" #include "axom/slam/policies/StridePolicies.hpp" #include "axom/slam/policies/IndirectionPolicies.hpp" @@ -67,7 +68,7 @@ template , typename StrPol = policies::StrideOne, - typename IfacePol = policies::VirtualInterface> + typename IfacePol = policies::ConcreteInterface> class Map : public StrPol, public policies::MapInterface { @@ -83,17 +84,25 @@ class Map : public StrPol, using SetElement = typename SetType::ElementType; static const NullSet s_nullSet; + using ElementShape = typename StridePolicyType::ShapeType; + using ValueType = typename IndirectionPolicy::IndirectionResult; using ConstValueType = typename IndirectionPolicy::ConstIndirectionResult; class MapBuilder; // types for iterator + template class MapIterator; - using const_iterator = MapIterator; + using const_iterator = MapIterator; using const_iterator_pair = std::pair; - using iterator = const_iterator; - using iterator_pair = const_iterator_pair; + using iterator = MapIterator; + using iterator_pair = std::pair; + + template + class MapRangeIterator; + using const_range_iterator = MapRangeIterator; + using range_iterator = MapRangeIterator; public: using ConcreteMap = Map; @@ -142,8 +151,8 @@ class Map : public StrPol, * \param theSet (Optional) A pointer to the map's set * \param defaultValue (Optional) If given, every entry in the map will be * initialized using defaultValue - * \param stride (Optional) The stride. The number of DataType that - * each element in the set will be mapped to. + * \param shape (Optional) The number of DataType that each element in the + * set will be mapped to. * When using a \a RuntimeStridePolicy, the default is 1. * \note When using a compile time StridePolicy, \a stride must be equal to * \a stride(), when provided. @@ -151,9 +160,9 @@ class Map : public StrPol, Map(const SetType* theSet = policies::EmptySetTraits::emptySet(), DataType defaultValue = DataType(), - SetPosition stride = StridePolicyType::DEFAULT_VALUE, + ElementShape shape = StridePolicyType::DefaultSize(), int allocatorID = axom::getDefaultAllocatorID()) - : StridePolicyType(stride) + : StridePolicyType(shape) , m_set(theSet) { m_data = @@ -167,9 +176,9 @@ class Map : public StrPol, !std::is_abstract::value && std::is_base_of::value>::type> Map(const USet& theSet, DataType defaultValue = DataType(), - SetPosition stride = StridePolicyType::DEFAULT_VALUE, + ElementShape shape = StridePolicyType::DefaultSize(), int allocatorID = axom::getDefaultAllocatorID()) - : StridePolicyType(stride) + : StridePolicyType(shape) , m_set(theSet) { static_assert(std::is_same::value, @@ -186,8 +195,8 @@ class Map : public StrPol, * * \param theSet A reference to the map's set * \param data Pointer to the externally-owned data - * \param stride (Optional) The stride. The number of DataType that - * each element in the set will be mapped to. + * \param shape (Optional) The number of DataType that each element in the + * set will be mapped to. * When using a \a RuntimeStridePolicy, the default is 1. * \note When using a compile time StridePolicy, \a stride must be equal to * \a stride(), when provided. @@ -198,8 +207,8 @@ class Map : public StrPol, !std::is_abstract::value && std::is_base_of::value>::type> Map(const USet& theSet, OrderedMap data, - SetPosition stride = StridePolicyType::DEFAULT_VALUE) - : StridePolicyType(stride) + ElementShape shape = StridePolicyType::DefaultSize()) + : StridePolicyType(shape) , m_set(theSet) , m_data(std::move(data)) { @@ -250,7 +259,7 @@ class Map : public StrPol, #ifndef AXOM_DEVICE_CODE verifyPositionImpl(setIndex); #endif - return IndirectionPolicy::getConstIndirection(m_data, setIndex); + return *IndirectionPolicy::getConstIndirection(m_data, setIndex); } AXOM_HOST_DEVICE ValueType operator[](SetPosition setIndex) @@ -258,7 +267,22 @@ class Map : public StrPol, #ifndef AXOM_DEVICE_CODE verifyPositionImpl(setIndex); #endif - return IndirectionPolicy::getIndirection(m_data, setIndex); + return *IndirectionPolicy::getIndirection(m_data, setIndex); + } + + /** + * \brief Access the value associated with the given position in the set. + */ + AXOM_HOST_DEVICE ConstValueType operator()(SetPosition setIdx) const + { + // TODO: validate that runtime stride is 1-D with value 1? + return value(setIdx, 0); + } + + /// \overload + AXOM_HOST_DEVICE ValueType operator()(SetPosition setIdx) + { + return value(setIdx, 0); } /** @@ -266,27 +290,80 @@ class Map : public StrPol, * the component index. * * \pre `0 <= setIdx < size()` - * \pre `0 <= comp < numComp()` + * \pre `sizeof(compIdx) == StridePolicy::NumDims` + * \pre `0 <= compIdx[idim] < shape()[idim]` */ + template AXOM_HOST_DEVICE ConstValueType operator()(SetPosition setIdx, - SetPosition comp = 0) const + ComponentPos... compIdx) const + { + return value(setIdx, compIdx...); + } + + /// \overload + template + AXOM_HOST_DEVICE ValueType operator()(SetPosition setIdx, + ComponentPos... compIdx) + { + return value(setIdx, compIdx...); + } + + AXOM_HOST_DEVICE ConstValueType value(SetPosition setIdx) const { + return value(setIdx, 0); + } + + AXOM_HOST_DEVICE ValueType value(SetPosition setIdx) + { + return value(setIdx, 0); + } + + /** + * \brief Access the value associated with the given position in the set and + * the component index. + * + * \pre `0 <= setIdx < size()` + * \pre `sizeof(compIdx) == StridePolicy::NumDims` + * \pre `0 <= compIdx[idim] < shape()[idim]` + */ + template + AXOM_HOST_DEVICE ConstValueType value(SetPosition setIdx, + ComponentPos... compIdx) const + { + static_assert( + sizeof...(ComponentPos) == StridePolicyType::NumDims, + "Invalid number of components provided for given Map's StridePolicy"); + static_assert( + axom::detail::all_types_are_integral::value, + "Map::value(...): index parameter pack must all be integral types."); #ifndef AXOM_DEVICE_CODE - verifyPositionImpl(setIdx, comp); + verifyPositionImpl(setIdx, compIdx...); #endif - SetPosition setIndex = setIdx * StridePolicyType::stride() + comp; - return IndirectionPolicy::getConstIndirection(m_data, setIndex); + SetPosition elemIndex = setIdx * StridePolicyType::stride(); + elemIndex += componentOffset(compIdx...); + return *IndirectionPolicy::getConstIndirection(m_data, elemIndex); } - AXOM_HOST_DEVICE ValueType operator()(SetPosition setIdx, SetPosition comp = 0) + /// \overload + template + AXOM_HOST_DEVICE ValueType value(SetPosition setIdx, ComponentPos... compIdx) { + static_assert( + sizeof...(ComponentPos) == StridePolicyType::NumDims, + "Invalid number of components provided for given Map's StridePolicy"); + static_assert( + axom::detail::all_types_are_integral::value, + "Map::value(...): index parameter pack must all be integral types."); #ifndef AXOM_DEVICE_CODE - verifyPositionImpl(setIdx, comp); + verifyPositionImpl(setIdx, compIdx...); #endif - SetPosition setIndex = setIdx * StridePolicyType::stride() + comp; - return IndirectionPolicy::getIndirection(m_data, setIndex); + SetPosition elemIndex = setIdx * StridePolicyType::stride(); + elemIndex += componentOffset(compIdx...); + return *IndirectionPolicy::getIndirection(m_data, elemIndex); } + SetElement index(IndexType idx) const { return set()->at(idx); } + /// @} /// \name Map cardinality functions @@ -297,6 +374,7 @@ class Map : public StrPol, * * The total storage size for the map's values is `size() * numComp()` */ + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE SetPosition size() const { return !policies::EmptySetTraits::isEmpty(m_set.get()) @@ -310,6 +388,19 @@ class Map : public StrPol, */ SetPosition numComp() const { return StridePolicyType::stride(); } + /** + * \brief Returns the shape of the component values associated with each + * element. + * + * For one-dimensional strides, equivalent to stride(); otherwise, returns + * an N-dimensional array with the number of values in each sub-component + * index. + */ + AXOM_HOST_DEVICE ElementShape shape() const + { + return StridePolicyType::shape(); + } + /// @} /// \name Map modifying functions for all entries @@ -393,8 +484,64 @@ class Map : public StrPol, DataType m_defaultValue = DataType(); }; +public: + /** + * \class MapIterator + * \brief An iterator type for a map. Each increment operation advances the + * iterator to the element at the next flat index. + */ + template + class MapIterator : public IteratorBase, SetPosition> + { + public: + using DataRefType = std::conditional_t; + using DataType = std::remove_reference_t; + + using iterator_category = std::random_access_iterator_tag; + using value_type = DataType; + using reference = DataRefType; + using pointer = value_type*; + using difference_type = SetPosition; + + using IterBase = IteratorBase; + using MapConstPtr = std::conditional_t; + using iter = MapIterator; + using PositionType = SetPosition; + using IterBase::m_pos; + + public: + MapIterator(PositionType pos, MapConstPtr oMap) : IterBase(pos), m_map(oMap) + { } + + /** + * \brief Returns the current iterator value. + */ + AXOM_HOST_DEVICE reference operator*() const { return (*m_map)[m_pos]; } + + AXOM_HOST_DEVICE pointer operator->() const { return &(*this); } + + /// \brief Returns the set element mapped by this iterator. + SetElement index() const + { + return m_map->index(this->m_pos / m_map->numComp()); + } + + /// \brief Returns the component index pointed to by this iterator. + PositionType compIndex() const { return m_pos % m_map->numComp(); } + + /// \brief Returns the flat index pointed to by this iterator. + SetPosition flatIndex() const { return this->m_pos; } + + protected: + /** Implementation of advance() as required by IteratorBase */ + AXOM_HOST_DEVICE void advance(PositionType n) { m_pos += n; } + + private: + MapConstPtr m_map; + }; + /** - * \class MapIterator + * \class MapRangeIterator * \brief An iterator type for a map. * Each increment operation advances the iterator to the next set * element. @@ -409,58 +556,155 @@ class Map : public StrPol, * the currently pointed to element (where 0 <= j < numComp()).\n * For example: `iter[off]` is the same as `(iter+off)(0)` */ - class MapIterator : public IteratorBase + template + class MapRangeIterator + : public IteratorBase, SetPosition> { public: + using IterBase = IteratorBase; + using MapConstPtr = std::conditional_t; + + using DataRefType = std::conditional_t; + using DataType = std::remove_reference_t; + + using PositionType = SetPosition; + using StrideIndexType = typename StridePolicyType::IndexType; + constexpr static int Dims = StridePolicyType::NumDims; + + // Type traits to satisfy LegacyRandomAccessIterator concept using iterator_category = std::random_access_iterator_tag; - using value_type = DataType; + using value_type = axom::ArrayView; + using reference = const value_type&; + using pointer = const value_type*; using difference_type = SetPosition; - using IterBase = IteratorBase; - using iter = MapIterator; - using PositionType = SetPosition; - using IterBase::m_pos; + private: + AXOM_HOST_DEVICE static StackArray fetchDims( + StrideIndexType shape) + { + return {0, shape}; + } + AXOM_HOST_DEVICE static StackArray fetchDims( + const StackArray shape) + { + StackArray dims; + for(int idim = 0; idim < Dims; idim++) + { + dims[idim + 1] = shape[idim]; + } + return dims; + } public: - MapIterator(PositionType pos, Map* oMap) : IterBase(pos), m_mapPtr(oMap) { } + AXOM_HOST_DEVICE MapRangeIterator(MapConstPtr oMap, PositionType pos) + : IterBase(pos) + , m_map(oMap) + { + StackArray dataDims = fetchDims(oMap->shape()); + dataDims[0] = m_map->size(); + m_mapData = + axom::ArrayView(m_map->data_ptr(), dataDims); + m_currRange = m_mapData[pos]; + } /** - * \brief Returns the current iterator value. If the map has multiple - * components, this will return the first component. To access - * the other components, use iter(comp) + * \brief Returns the current iterator value. */ - DataType& operator*() { return (*m_mapPtr)(m_pos, 0); } + AXOM_HOST_DEVICE reference operator*() const { return m_currRange; } + + AXOM_HOST_DEVICE pointer operator->() const { return &m_currRange; } /** * \brief Returns the iterator's value at the specified component. * Returns the first component if comp_idx is not specified. - * \param comp_idx (Optional) Zero-based index of the component. + * \param comp_idx Zero-based index of the component. */ - DataType& operator()(SetPosition comp_idx = 0) + template + AXOM_HOST_DEVICE DataRefType operator()(ComponentIndex... comp_idx) const + { + return value(comp_idx...); + } + template + AXOM_HOST_DEVICE DataRefType value(ComponentIndex comp_idx) const + { + static_assert(Dims == 1, + "Map::RangeIterator::value(): incorrect number of indexes " + "for the component dimensionality."); + static_assert(std::is_integral::value, + "Map::RangeIterator::value(): index must be an integral " + "type."); + return m_currRange[comp_idx]; + } + template + AXOM_HOST_DEVICE DataRefType value(ComponentIndex... comp_idx) const { - return (*m_mapPtr)(m_pos, comp_idx); + static_assert(sizeof...(ComponentIndex) == Dims, + "Map::RangeIterator::value(): incorrect number of indexes " + "for the component dimensionality."); + static_assert(axom::detail::all_types_are_integral::value, + "Map::RangeIterator::value(...): index parameter pack must " + "all be integral types."); + return m_currRange(comp_idx...); } + value_type operator[](PositionType n) const { return *(*this + n); } - /** \brief Returns the first component value after n increments. */ - const DataType& operator[](PositionType n) const { return *(*this + n); } + /// \brief Returns the set element mapped by this iterator. + SetElement index() const { return m_map->index(this->m_pos); } - DataType& operator[](PositionType n) { return *(*this + n); } + /// \brief Returns the flat index pointed to by this iterator. + AXOM_HOST_DEVICE SetPosition flatIndex() const { return this->m_pos; } /** \brief Returns the number of components per element in the Map. */ - PositionType numComp() const { return m_mapPtr->stride(); } + PositionType numComp() const { return m_map->stride(); } protected: /** Implementation of advance() as required by IteratorBase */ - void advance(PositionType n) { m_pos += n; } + AXOM_HOST_DEVICE void advance(PositionType n) + { + this->m_pos += n; + m_currRange = m_mapData[this->m_pos]; + } - protected: - Map* m_mapPtr; + private: + MapConstPtr m_map; + axom::ArrayView m_mapData; + value_type m_currRange; }; public: // Functions related to iteration - MapIterator begin() { return MapIterator(0, this); } - MapIterator end() { return MapIterator(size(), this); } - const_iterator_pair range() const { return std::make_pair(begin(), end()); } + iterator begin() { return iterator(0, this); } + iterator end() { return iterator(size() * StridePolicyType::stride(), this); } + const_iterator begin() const { return const_iterator(0, this); } + const_iterator end() const + { + return const_iterator(size() * StridePolicyType::stride(), this); + } + + RangeAdapter range() const + { + return RangeAdapter {begin(), end()}; + } + + AXOM_HOST_DEVICE range_iterator set_begin() + { + return range_iterator(this, 0); + } + AXOM_HOST_DEVICE range_iterator set_end() + { + return range_iterator(this, size()); + } + AXOM_HOST_DEVICE const_range_iterator set_begin() const + { + return const_range_iterator(this, 0); + } + AXOM_HOST_DEVICE const_range_iterator set_end() const + { + return const_range_iterator(this, size()); + } + RangeAdapter set_elements() + { + return RangeAdapter {set_begin(), set_end()}; + } public: /** @@ -484,8 +728,9 @@ class Map : public StrPol, << idx << " but map's data has size " << m_data.size()); } + template inline void verifyPositionImpl(SetPosition AXOM_DEBUG_PARAM(setIdx), - SetPosition AXOM_DEBUG_PARAM(compIdx)) const + ComponentIndex AXOM_DEBUG_PARAM(compIdx)) const { SLIC_ASSERT_MSG( setIdx >= 0 && setIdx < size() && compIdx >= 0 && compIdx < numComp(), @@ -494,6 +739,51 @@ class Map : public StrPol, << " with " << numComp() << " components."); } + template + inline void verifyPositionImpl(SetPosition AXOM_DEBUG_PARAM(setIdx), + ComponentIndex... AXOM_DEBUG_PARAM(compIdx)) const + { +#ifdef AXOM_DEBUG + ElementShape indexArray {{compIdx...}}; + bool validIndexes = true; + for(int dim = 0; dim < StridePolicyType::NumDims; dim++) + { + validIndexes = validIndexes && (indexArray[dim] >= 0); + validIndexes = validIndexes && (indexArray[dim] < this->shape()[dim]); + } + std::string invalid_message = fmt::format( + "Attempted to access element at ({}, {}) but map's set has size {} with " + "component shape ({})", + setIdx, + fmt::join(indexArray, ", "), + size(), + fmt::join(this->shape(), ", ")); + SLIC_ASSERT_MSG(setIdx >= 0 && setIdx < size() && validIndexes, + invalid_message); +#endif + } + + template + AXOM_HOST_DEVICE inline SetPosition componentOffset( + ComponentIndex componentIndex) const + { + return componentIndex; + } + + template + AXOM_HOST_DEVICE inline SetPosition componentOffset( + ComponentIndex... componentIndex) const + { + ElementShape indexArray {{componentIndex...}}; + ElementShape strides = StridePolicyType::strides(); + SetPosition offset = 0; + for(int dim = 0; dim < StridePolicyType::NumDims; dim++) + { + offset += indexArray[dim] * strides[dim]; + } + return offset; + } + // setStride function should not be called after constructor is called. // This (should) override the StridePolicy setStride(s) function. void setStride(SetPosition AXOM_UNUSED_PARAM(str)) @@ -519,6 +809,16 @@ class Map : public StrPol, "Not enough elements in buffer passed to Map constructor."); } + AXOM_HOST_DEVICE typename IndirectionPolicy::ConstResultPtr data_ptr() const + { + return IndirectionPolicy::getConstIndirection(m_data); + } + + AXOM_HOST_DEVICE typename IndirectionPolicy::ResultPtr data_ptr() + { + return IndirectionPolicy::getIndirection(m_data); + } + private: SetContainer<> m_set; OrderedMap m_data; diff --git a/src/axom/slam/MapBase.hpp b/src/axom/slam/MapBase.hpp index 603f742fed..3201f89cd4 100644 --- a/src/axom/slam/MapBase.hpp +++ b/src/axom/slam/MapBase.hpp @@ -39,6 +39,7 @@ class MapBase using SetPosition = SetPositionType; public: + AXOM_HOST_DEVICE virtual ~MapBase() {}; /** diff --git a/src/axom/slam/OrderedSet.hpp b/src/axom/slam/OrderedSet.hpp index 267b0b9c9b..9d19595767 100644 --- a/src/axom/slam/OrderedSet.hpp +++ b/src/axom/slam/OrderedSet.hpp @@ -406,9 +406,11 @@ struct OrderedSet protected: /** Implementation of advance() as required by IteratorBase */ + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE void advance(PositionType n) { m_pos += n * stride(); } private: + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE inline const PositionType stride() const { return m_orderedSet.StrideType::stride(); @@ -420,7 +422,7 @@ struct OrderedSet } private: - OrderedSet m_orderedSet; + OrderedSet::ConcreteSet m_orderedSet; }; public: // Functions related to iteration @@ -480,6 +482,8 @@ struct OrderedSet { return SizePolicyType::size(); } + + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE inline bool empty() const { return SizePolicyType::empty(); } bool isValid(bool verboseOutput = false) const; diff --git a/src/axom/slam/ProductSet.hpp b/src/axom/slam/ProductSet.hpp index 36d2ba995a..35895d5a45 100644 --- a/src/axom/slam/ProductSet.hpp +++ b/src/axom/slam/ProductSet.hpp @@ -13,6 +13,7 @@ #ifndef SLAM_PRODUCT_SET_H_ #define SLAM_PRODUCT_SET_H_ +#include "axom/core/IteratorBase.hpp" #include "axom/slam/BivariateSet.hpp" #include "axom/slam/RangeSet.hpp" @@ -54,6 +55,8 @@ class ProductSet final using ElementType = typename BaseType::ElementType; using ProductSetType = ProductSet; + using IteratorType = BivariateSetIterator; + private: template struct RowSet @@ -223,7 +226,10 @@ class ProductSet final return m_rowSet.get(this->secondSetSize()); } - ElementType at(PositionType pos) const { return pos % this->secondSetSize(); } + AXOM_HOST_DEVICE ElementType at(PositionType pos) const + { + return pos % this->secondSetSize(); + } AXOM_HOST_DEVICE PositionType size() const { @@ -232,6 +238,18 @@ class ProductSet final PositionType size(PositionType) const { return this->secondSetSize(); } + /*! + * \brief Return an iterator to the first pair of set elements in the + * relation. + */ + IteratorType begin() const { return IteratorType(this, 0); } + + /*! + * \brief Return an iterator to one past the last pair of set elements in the + * relation. + */ + IteratorType end() const { return IteratorType(this, size()); } + AXOM_HOST_DEVICE RangeSetType elementRangeSet(PositionType pos1) const { const auto sz = this->secondSetSize(); diff --git a/src/axom/slam/RelationSet.hpp b/src/axom/slam/RelationSet.hpp index 4dc35e8b30..b14680390a 100644 --- a/src/axom/slam/RelationSet.hpp +++ b/src/axom/slam/RelationSet.hpp @@ -58,6 +58,8 @@ class RelationSet final using BaseType::INVALID_POS; + using IteratorType = BivariateSetIterator; + public: using ConcreteSet = RelationSet; @@ -177,6 +179,7 @@ class RelationSet final * * \return pos2 The to-set index. */ + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE PositionType flatToSecondIndex(PositionType flatIndex) const { if(flatIndex < 0 || flatIndex > size()) @@ -219,9 +222,12 @@ class RelationSet final */ SubsetType getElements(PositionType s1) const { return (*m_relation)[s1]; } - ElementType at(PositionType pos) const + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE ElementType at(PositionType pos) const { +#ifndef AXOM_DEVICE_CODE RelationSet::verifyPosition(pos); +#endif return m_relation->relationData()[pos]; } @@ -244,6 +250,18 @@ class RelationSet final */ PositionType size(PositionType pos) const { return m_relation->size(pos); } + /*! + * \brief Return an iterator to the first pair of set elements in the + * relation. + */ + IteratorType begin() const { return IteratorType(this, 0); } + + /*! + * \brief Return an iterator to one past the last pair of set elements in the + * relation. + */ + IteratorType end() const { return IteratorType(this, totalSize()); } + bool isValid(bool verboseOutput = false) const { if(m_relation == nullptr) @@ -264,6 +282,7 @@ class RelationSet final //but still implemented due to the function being virtual //(and can be called from base ptr) // KW -- made this public to use from BivariateMap + AXOM_SUPPRESS_HD_WARN AXOM_HOST_DEVICE PositionType size() const { return PositionType(m_relation->relationData().size()); diff --git a/src/axom/slam/SubMap.hpp b/src/axom/slam/SubMap.hpp index 60a711dd85..344e56acc5 100644 --- a/src/axom/slam/SubMap.hpp +++ b/src/axom/slam/SubMap.hpp @@ -52,7 +52,7 @@ namespace slam template - typename InterfacePolicy = policies::VirtualInterface> + typename InterfacePolicy = policies::ConcreteInterface> class SubMap : public policies::MapInterface, public SuperMapType::StridePolicyType @@ -69,16 +69,23 @@ class SubMap using StridePolicyType = typename SuperMapType::StridePolicyType; using IndirectionPolicyType = typename SuperMapType::IndirectionPolicy; + using ElementShape = typename StridePolicyType::ShapeType; + using MapType = Map; using SubsetBuilder = typename SubsetType::SetBuilder; //iterator type aliases - class SubMapIterator; - using iterator = SubMapIterator; + class Iterator; + using iterator = Iterator; + using const_iterator = Iterator; using iterator_pair = std::pair; + class RangeIterator; + using const_range_iterator = RangeIterator; + using range_iterator = RangeIterator; + using ValueType = typename IndirectionPolicyType::IndirectionResult; using ConstValueType = typename IndirectionPolicyType::ConstIndirectionResult; @@ -98,7 +105,7 @@ class SubMap AXOM_HOST_DEVICE SubMap(SuperMapType* supermap, SubsetType subset_idxset, bool indicesHaveIndirection = true) - : StridePolicyType(supermap->stride()) + : StridePolicyType(*supermap) , m_superMap(supermap) , m_subsetIdx(subset_idxset) , m_indicesHaveIndirection(indicesHaveIndirection) @@ -116,9 +123,11 @@ class SubMap * element, where `setIndex = i * numComp() + j`. * \pre 0 <= idx < size() * numComp() */ - DataRefType operator[](IndexType idx) const + AXOM_HOST_DEVICE DataRefType operator[](IndexType idx) const { +#ifndef AXOM_DEVICE_CODE verifyPositionImpl(idx); +#endif IndexType flat_idx = getMapCompFlatIndex(idx); return (*m_superMap)[flat_idx]; } @@ -130,14 +139,19 @@ class SubMap * \pre `0 <= idx < size()` * \pre `0 <= comp < numComp()` */ - AXOM_HOST_DEVICE DataRefType operator()(IndexType idx, IndexType comp = 0) const + template + AXOM_HOST_DEVICE DataRefType operator()(IndexType idx, + ComponentIndex... comp) const { + static_assert( + axom::detail::all_types_are_integral::value, + "SubMap::operator(): index parameter pack must all be integral types."); #ifndef AXOM_DEVICE_CODE - verifyPositionImpl(idx, comp); + verifyPositionImpl(idx, comp...); #endif SLIC_ASSERT_MSG(m_superMap != nullptr, "Submap's super map was null."); - - return (*m_superMap)[getMapElemFlatIndex(idx) * numComp() + comp]; + IndexType elemBegin = getMapElemFlatIndex(idx) * numComp(); + return (*m_superMap)[elemBegin + componentOffset(comp...)]; } /** @@ -147,15 +161,17 @@ class SubMap * \pre `0 <= idx < size()` * \pre `0 <= comp < numComp()` */ - DataRefType value(IndexType idx, IndexType comp = 0) const + template + AXOM_HOST_DEVICE DataRefType value(IndexType idx, ComponentIndex... comp) const { - return operator()(idx, comp); + return operator()(idx, comp...); } /** * \brief Return the set element in the SuperMap at the given subset index */ - IndexType index(IndexType idx) const + AXOM_SUPPRESS_HD_WARN + AXOM_HOST_DEVICE IndexType index(IndexType idx) const { return m_indicesHaveIndirection ? m_superMap->set()->at(m_subsetIdx[idx]) : idx; @@ -168,7 +184,7 @@ class SubMap /// /** \brief returns the size of the SubMap */ - AXOM_HOST_DEVICE IndexType size() const { return m_subsetIdx.size(); } + AXOM_HOST_DEVICE axom::IndexType size() const { return m_subsetIdx.size(); } /** \brief returns the number of components (aka. stride) of the SubMap */ AXOM_HOST_DEVICE IndexType numComp() const @@ -189,6 +205,7 @@ class SubMap } private: //helper functions + friend class RangeIterator; /** * \brief Get the ElementFlatIndex into the SuperMap given the subset's index. */ @@ -201,7 +218,7 @@ class SubMap * \brief Get the ComponentFlatIndex into the SuperMap given the subset's * ComponentFlatIndex. This is used only with bracket [] access */ - IndexType getMapCompFlatIndex(IndexType idx) const + AXOM_HOST_DEVICE IndexType getMapCompFlatIndex(IndexType idx) const { IndexType comp = numComp(); IndexType s = idx % comp; @@ -227,8 +244,9 @@ class SubMap } /** Checks the ElementFlatIndex and the component index is valid */ + template void verifyPositionImpl(SetPosition AXOM_DEBUG_PARAM(idx), - SetPosition AXOM_DEBUG_PARAM(comp)) const + ComponentIndex AXOM_DEBUG_PARAM(comp)) const { SLIC_ASSERT_MSG( idx >= 0 && idx < m_subsetIdx.size() && comp >= 0 && comp < numComp(), @@ -237,69 +255,72 @@ class SubMap << m_subsetIdx.size() << " with " << numComp() << " component"); } -public: - /** - * \class SubMapIterator - * \brief An iterator for SubMap, based on MapIterator - * - * \see MapIterator + /** Checks the ElementFlatIndex and the component index is valid */ + template + void verifyPositionImpl(SetPosition AXOM_DEBUG_PARAM(idx), + ComponentIndex... AXOM_DEBUG_PARAM(comp)) const + { +#ifdef AXOM_DEBUG + ElementShape indexArray {{comp...}}; + bool validIndexes = true; + for(int dim = 0; dim < StridePolicyType::NumDims; dim++) + { + validIndexes = validIndexes && (indexArray[dim] >= 0); + validIndexes = validIndexes && (indexArray[dim] < m_superMap->shape()[dim]); + } + std::string invalid_message = fmt::format( + "Attempted to access element {} component ({}), but SubMap's data has " + "size {} with component shape ({})", + idx, + fmt::join(indexArray, ", "), + m_subsetIdx.size(), + fmt::join(m_superMap->shape(), ", ")); + SLIC_ASSERT_MSG(idx >= 0 && idx < m_subsetIdx.size() && validIndexes, + invalid_message); +#endif + } + + /*! + * \brief Computes the flat indexing offset for a given component. */ - class SubMapIterator : public IteratorBase + AXOM_HOST_DEVICE inline SetPosition componentOffset() const + { + return SetPosition {}; + } + template + AXOM_HOST_DEVICE inline SetPosition componentOffset( + ComponentIndex componentIndex) const + { + return componentIndex; + } + + template + AXOM_HOST_DEVICE inline SetPosition componentOffset( + ComponentIndex... componentIndex) const { - public: - using iterator_category = std::random_access_iterator_tag; - using value_type = DataType; - using difference_type = SetPosition; - - using IterBase = IteratorBase; - using IterBase::m_pos; - using iter = SubMapIterator; - using PositionType = SetPosition; - - AXOM_HOST_DEVICE SubMapIterator(PositionType pos, SubMap sMap) - : IterBase(pos) - , m_submap(sMap) - { } - - /** - * \brief Returns the current iterator value. If the SubMap has multiple - * components, this will return the first component. To access - * the other components, use iter(comp) - */ - AXOM_HOST_DEVICE DataRefType operator*() { return m_submap(m_pos, 0); } - - /** - * \brief Returns the iterator's value at the specified component. - * Returns the first component if comp_idx is not specified. - * \param comp_idx (Optional) Zero-based index of the component. - */ - DataRefType operator()(IndexType comp = 0) { return m_submap(m_pos, comp); } - - /** \brief Returns the first component value after n increments. */ - DataRefType operator[](PositionType n) { return *(*this + n); } - - /** \brief Same as operator() */ - DataRefType value(IndexType comp = 0) { return m_submap(m_pos, comp); } - - /** \brief Returns the Set element at the iterator's position */ - IndexType index() { return m_submap.index(m_pos); } - - /** \brief Returns the number of component per element in the SubMap. */ - PositionType numComp() const { return m_submap.numComp(); } - - protected: - /* Implementation of advance() as required by IteratorBase */ - AXOM_HOST_DEVICE void advance(PositionType pos) { m_pos += pos; } - - private: - SubMap m_submap; - }; + ElementShape indexArray {{componentIndex...}}; + ElementShape strides = StridePolicyType::strides(); + SetPosition offset = 0; + for(int dim = 0; dim < StridePolicyType::NumDims; dim++) + { + offset += indexArray[dim] * strides[dim]; + } + return offset; + } public: // Functions related to iteration AXOM_HOST_DEVICE iterator begin() const { return iterator(0, *this); } AXOM_HOST_DEVICE iterator end() const { - return iterator(m_subsetIdx.size(), *this); + return iterator(m_subsetIdx.size() * numComp(), *this); + } + AXOM_HOST_DEVICE range_iterator set_begin() const + { + return range_iterator(0, *this); + } + AXOM_HOST_DEVICE range_iterator set_end() const + { + return range_iterator(m_subsetIdx.size(), *this); } protected: //Member variables @@ -356,6 +377,162 @@ bool SubMap::isValid(bool verboseOutput) return isValid; } +/** + * \class SubMap::Iterator + * \brief An iterator for SubMap, based on MapIterator + * + * \see MapIterator + */ +template +class SubMap::Iterator + : public IteratorBase +{ +public: + using iterator_category = std::random_access_iterator_tag; + using value_type = DataType; + using reference = DataRefType; + using pointer = DataType*; + using difference_type = SetPosition; + + using IterBase = IteratorBase; + using IterBase::m_pos; + using iter = Iterator; + using PositionType = SetPosition; + + AXOM_HOST_DEVICE Iterator(PositionType pos, const SubMap& sMap) + : IterBase(pos) + , m_submap(sMap) + { } + + /// \brief Returns the current iterator value. + AXOM_HOST_DEVICE DataRefType operator*() const { return m_submap[m_pos]; } + + pointer operator->() const { return &(*this); } + + /** \brief Returns the first component value after n increments. */ + DataRefType operator[](PositionType n) const { return *(*this + n); } + + /** \brief Returns the Set element at the iterator's position */ + IndexType index() const { return m_submap.index(m_pos / m_submap.numComp()); } + + /// \brief Returns the component index pointed to by this iterator. + PositionType compIndex() const { return m_pos % m_submap.numComp(); } + + /// \brief Returns the flat index pointed to by this iterator. + SetPosition flatIndex() const { return this->m_pos; } + + /** \brief Returns the number of component per element in the SubMap. */ + PositionType numComp() const { return m_submap.numComp(); } + +protected: + /* Implementation of advance() as required by IteratorBase */ + AXOM_HOST_DEVICE void advance(PositionType pos) { m_pos += pos; } + +private: + SubMap m_submap; +}; + +/** + * \class SubMap::RangeIterator + * \brief An iterator for SubMap, based on MapIterator + * + * \see MapIterator + */ +template +class SubMap::RangeIterator + : public IteratorBase +{ +private: +public: + using IterBase = IteratorBase; + using IterBase::m_pos; + using iter = Iterator; + using PositionType = SetPosition; + +private: + using MapRangeIterator = + std::conditional_t::value, + typename SuperMapType::const_range_iterator, + typename SuperMapType::range_iterator>; + +public: + // Type traits to satisfy LegacyRandomAccessIterator concept + using iterator_category = typename MapRangeIterator::iterator_category; + using value_type = typename MapRangeIterator::value_type; + using reference = typename MapRangeIterator::reference; + using pointer = typename MapRangeIterator::pointer; + using difference_type = SetPosition; + + AXOM_HOST_DEVICE PositionType getParentPosition(PositionType subset_pos) + { + PositionType subsetEnd = m_submap.m_subsetIdx.size() - 1; + // End element is one past the last subset element. + PositionType parentIndex = m_submap.m_subsetIdx[subsetEnd] + 1; + if(subset_pos < m_submap.m_subsetIdx.size()) + { + parentIndex = m_submap.m_subsetIdx[subset_pos]; + } + return parentIndex; + } + +public: + AXOM_HOST_DEVICE RangeIterator(PositionType pos, const SubMap& sMap) + : IterBase(pos) + , m_submap(sMap) + , m_mapIter(m_submap.m_superMap, getParentPosition(pos)) + { } + + /// \brief Returns the current iterator value. + AXOM_HOST_DEVICE reference operator*() const { return (*m_mapIter); } + + AXOM_HOST_DEVICE pointer operator->() const { return m_mapIter.operator->(); } + + template + AXOM_HOST_DEVICE DataRefType operator()(ComponentIndex... comp_idx) const + { + return m_mapIter(comp_idx...); + } + + template + AXOM_HOST_DEVICE DataRefType value(ComponentIndex... comp_idx) const + { + return m_mapIter.value(comp_idx...); + } + + value_type operator[](PositionType n) const { return *(*this + n); } + + /// \brief Returns the set element mapped by this iterator. + SetElement index() const { return m_submap.index(this->m_pos); } + + /*! + * \brief Returns the flat index in the original map pointed to by this + * iterator. + */ + SetPosition flatIndex() const { return m_mapIter.flatIndex(); } + + /// \brief Returns the index into the submap pointed to by this iterator. + SetPosition submapIndex() const { return this->m_pos; } + + /** \brief Returns the number of components per element in the Map. */ + PositionType numComp() const { return m_mapIter.numComp(); } + +protected: + /** Implementation of advance() as required by IteratorBase */ + AXOM_HOST_DEVICE void advance(PositionType n) + { + PositionType currIndex = m_mapIter.flatIndex(); + PositionType nextIndex = getParentPosition(this->m_pos + n); + // Move original iterator. + m_mapIter += (nextIndex - currIndex); + + this->m_pos += n; + } + +private: + SubMap m_submap; + MapRangeIterator m_mapIter; +}; + } // end namespace slam } // end namespace axom diff --git a/src/axom/slam/policies/IndirectionPolicies.hpp b/src/axom/slam/policies/IndirectionPolicies.hpp index 4ab9c87d3b..939e0d4f92 100644 --- a/src/axom/slam/policies/IndirectionPolicies.hpp +++ b/src/axom/slam/policies/IndirectionPolicies.hpp @@ -34,6 +34,7 @@ #include "axom/core/Macros.hpp" #include "axom/core/Array.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic/interface/slic.hpp" namespace axom @@ -63,6 +64,8 @@ struct IndexedIndirection : public BasePolicy using typename BasePolicy::ConstIndirectionResult; using typename BasePolicy::IndirectionResult; + using ConstResultPtr = std::remove_reference_t*; + using ResultPtr = std::remove_reference_t*; using typename BasePolicy::IndirectionBufferType; using typename BasePolicy::IndirectionConstRefType; @@ -77,22 +80,22 @@ struct IndexedIndirection : public BasePolicy bool verboseOutput = false) const; template - AXOM_HOST_DEVICE static inline std::enable_if_t - getIndirection(IndirectionRefType buf, PositionType pos) + AXOM_HOST_DEVICE static inline std::enable_if_t + getIndirection(IndirectionRefType buf, PositionType pos = 0) { - return buf[pos]; + return &buf[pos]; } template - AXOM_HOST_DEVICE static inline std::enable_if_t - getConstIndirection(IndirectionConstRefType buf, PositionType pos) + AXOM_HOST_DEVICE static inline std::enable_if_t + getConstIndirection(IndirectionConstRefType buf, PositionType pos = 0) { - return buf[pos]; + return &buf[pos]; } template - AXOM_HOST_DEVICE static inline std::enable_if_t - getIndirection(IndirectionRefType buf, PositionType pos) + AXOM_HOST_DEVICE static inline std::enable_if_t + getIndirection(IndirectionRefType buf, PositionType pos = 0) { #ifdef AXOM_DEVICE_CODE SLIC_ASSERT_MSG( @@ -106,14 +109,16 @@ struct IndexedIndirection : public BasePolicy #elif defined(__HIP_DEVICE_COMPILE__) abort(); #endif -#endif + return nullptr; +#else // Always return a value. - return buf[pos]; + return &buf[pos]; +#endif } template - AXOM_HOST_DEVICE static inline std::enable_if_t - getConstIndirection(IndirectionConstRefType buf, PositionType pos) + AXOM_HOST_DEVICE static inline std::enable_if_t + getConstIndirection(IndirectionConstRefType buf, PositionType pos = 0) { #ifdef AXOM_DEVICE_CODE SLIC_ASSERT_MSG( @@ -127,9 +132,11 @@ struct IndexedIndirection : public BasePolicy #elif defined(__HIP_DEVICE_COMPILE__) abort(); #endif -#endif + return nullptr; +#else // Always return a value. - return buf[pos]; + return &buf[pos]; +#endif } AXOM_HOST_DEVICE inline ConstIndirectionResult indirection(PositionType pos) const @@ -137,7 +144,7 @@ struct IndexedIndirection : public BasePolicy #ifndef AXOM_DEVICE_CODE checkIndirection(pos); #endif - return IndexedIndirection::getConstIndirection(BasePolicy::data(), pos); + return *IndexedIndirection::getConstIndirection(BasePolicy::data(), pos); } AXOM_HOST_DEVICE inline IndirectionResult indirection(PositionType pos) @@ -145,7 +152,7 @@ struct IndexedIndirection : public BasePolicy #ifndef AXOM_DEVICE_CODE checkIndirection(pos); #endif - return IndexedIndirection::getIndirection(BasePolicy::data(), pos); + return *IndexedIndirection::getIndirection(BasePolicy::data(), pos); } AXOM_HOST_DEVICE inline ConstIndirectionResult operator()(PositionType pos) const @@ -301,7 +308,7 @@ struct CArrayIndirectionBase constexpr PositionType size() const { - return std::numeric_limits::max(); + return axom::numeric_limits::max(); } private: diff --git a/src/axom/slam/policies/PolicyTraits.hpp b/src/axom/slam/policies/PolicyTraits.hpp index 9e790c1f7f..ec64b40081 100644 --- a/src/axom/slam/policies/PolicyTraits.hpp +++ b/src/axom/slam/policies/PolicyTraits.hpp @@ -52,15 +52,6 @@ struct StrideToSize, IntType, VAL> using SizeType = CompileTimeSize; }; -/** - * \brief Specialization of StrideToSize trait for a StrideOne type - */ -template -struct StrideToSize, IntType> -{ - using SizeType = CompileTimeSize::DEFAULT_VALUE>; -}; - /** * \brief Type traits for null sets. * diff --git a/src/axom/slam/policies/StridePolicies.hpp b/src/axom/slam/policies/StridePolicies.hpp index d023303448..641e8207f4 100644 --- a/src/axom/slam/policies/StridePolicies.hpp +++ b/src/axom/slam/policies/StridePolicies.hpp @@ -51,12 +51,24 @@ struct RuntimeStride public: static const IntType DEFAULT_VALUE = IntType(1); static const bool IS_COMPILE_TIME = false; + constexpr static int NumDims = 1; + + using IndexType = IntType; + using ShapeType = IntType; + + static constexpr IntType DefaultSize() { return DEFAULT_VALUE; } AXOM_HOST_DEVICE RuntimeStride(IntType stride = DEFAULT_VALUE) : m_stride(stride) { } + /// \brief Returns the stride between consecutive elements. AXOM_HOST_DEVICE inline IntType stride() const { return m_stride; } + /*! + * \brief Returns the shape of the inner data for a given stride. + * This only has meaning when used with Map-based types. + */ + AXOM_HOST_DEVICE inline IntType shape() const { return m_stride; } AXOM_HOST_DEVICE inline IntType& stride() { return m_stride; } void setStride(IntType str) { m_stride = str; } @@ -81,6 +93,12 @@ struct CompileTimeStride { static const IntType DEFAULT_VALUE = INT_VAL; static const bool IS_COMPILE_TIME = true; + constexpr static int NumDims = 1; + + using IndexType = IntType; + using ShapeType = IntType; + + static constexpr IntType DefaultSize() { return DEFAULT_VALUE; } AXOM_HOST_DEVICE CompileTimeStride(IntType val = DEFAULT_VALUE) { @@ -88,6 +106,7 @@ struct CompileTimeStride } AXOM_HOST_DEVICE inline IntType stride() const { return INT_VAL; } + AXOM_HOST_DEVICE inline IntType shape() const { return INT_VAL; } inline IntType operator()() const { return stride(); } AXOM_HOST_DEVICE void setStride(IntType AXOM_DEBUG_PARAM(val)) @@ -107,32 +126,60 @@ struct CompileTimeStride * \brief A policy class for a set with stride one (i.e. the default stride) */ template -struct StrideOne +using StrideOne = CompileTimeStride; + +/** + * \brief A policy class for a set with multi-dimensional stride. Assumed + * layout is row-major. + */ +template +struct MultiDimStride { - static const IntType DEFAULT_VALUE; - static const bool IS_COMPILE_TIME = true; + using IndexType = IntType; + using ShapeType = StackArray; + constexpr static int NumDims = Dims; - /** - * This constructor only exists to allow the derived class to not have - * to specialize for when the stride is known at compile time - */ - AXOM_HOST_DEVICE StrideOne(IntType val = DEFAULT_VALUE) { setStride(val); } + static ShapeType DefaultSize() + { + ShapeType array; + for(int i = 0; i < Dims; i++) + { + array[i] = 1; + } + return array; + } - AXOM_HOST_DEVICE inline const IntType stride() const { return DEFAULT_VALUE; } - inline const IntType operator()() const { return stride(); } + AXOM_HOST_DEVICE MultiDimStride(StackArray shape) + : m_shape(shape) + { + m_strides[Dims - 1] = 1; + for(int i = Dims - 2; i >= 0; i--) + { + m_strides[i] = m_strides[i + 1] * m_shape[i + 1]; + } + } - AXOM_HOST_DEVICE void setStride(IntType AXOM_DEBUG_PARAM(val)) + /// \brief Returns the "flat" stride of all the subcomponents. + AXOM_HOST_DEVICE inline IntType stride() const { - SLIC_ASSERT_MSG( - val == DEFAULT_VALUE, - "slam::StrideOne policy -- tried to set a stride-one StridePolicy" - << " with value (" << val << "), but should always be 1."); + return m_shape[0] * m_strides[0]; } - inline bool isValid(bool) const { return true; } -}; -template -const IntType StrideOne::DEFAULT_VALUE = IntType {1}; + inline IntType operator()() const { return stride(); } + inline IntType& operator()() { return stride(); } + + /// \brief Returns the strides for each indexing dimension. + AXOM_HOST_DEVICE inline ShapeType strides() const { return m_strides; } + /*! + * \brief Returns the multi-dimensional shape of the inner data. + * This only has meaning when used with Map-based types. + */ + AXOM_HOST_DEVICE inline ShapeType shape() const { return m_shape; } + +private: + ShapeType m_shape; + ShapeType m_strides; +}; /// \} diff --git a/src/axom/slam/tests/slam_map_BivariateMap.cpp b/src/axom/slam/tests/slam_map_BivariateMap.cpp index fb4b398fad..7ebed71bcd 100644 --- a/src/axom/slam/tests/slam_map_BivariateMap.cpp +++ b/src/axom/slam/tests/slam_map_BivariateMap.cpp @@ -370,34 +370,63 @@ void constructAndTestBivariateMapIterator(int stride) } } - SLIC_INFO("Checking the elements with SubMap iterator."); + SLIC_INFO("Checking the elements with SubMap flat iterator."); for(auto idx1 = 0; idx1 < m.firstSetSize(); ++idx1) { int idx2 = 0; + int compIdx = 0; auto begin_iter = m.begin(idx1); - for(auto iter = m.begin(idx1); iter != m.end(idx1); ++iter, ++idx2) + for(auto iter = m.begin(idx1); iter != m.end(idx1); ++iter) { - EXPECT_EQ(begin_iter[idx2], getVal(idx1, idx2)); - EXPECT_EQ(*iter, getVal(idx1, idx2)); - for(auto i = 0; i < iter.numComp(); i++) + EXPECT_EQ(*iter, getVal(idx1, idx2, compIdx)); + compIdx++; + if(compIdx == m.numComp()) { - EXPECT_EQ(iter(i), getVal(idx1, idx2, i)); + compIdx = 0; + idx2++; } } } - - SLIC_INFO("Checking the elements with BivariateMap iterator."); + SLIC_INFO("Checking the elements with BivariateMap flat iterator."); { auto iter = m.begin(); - auto begin_iter = m.begin(); - auto end_iter = m.end(); - auto inval_iter = end_iter + 1; - auto flat_idx = 0; + // auto flat_idx = 0; + + for(auto idx1 = 0; idx1 < m.firstSetSize(); ++idx1) + { + for(auto idx2 = 0; idx2 < m.secondSetSize(); ++idx2) + { + for(auto i = 0; i < stride; i++) + { + // Check validity of indexing + EXPECT_EQ(iter.firstIndex(), idx1); + EXPECT_EQ(iter.secondIndex(), idx2); + EXPECT_EQ(iter.compIndex(), i); + EXPECT_NE(iter, m.end()); + + // Check equality of values + DataType val = getVal(idx1, idx2, i); + EXPECT_EQ(val, *iter); + + iter++; + // flat_idx++; + } + } + } + } + + SLIC_INFO("Checking the elements with BivariateMap range iterator."); + { + auto iter = m.set_begin(); + //auto begin_iter = m.begin(); + //auto end_iter = m.end(); + //auto inval_iter = end_iter + 1; + // auto flat_idx = 0; for(auto idx1 = 0; idx1 < m.firstSetSize(); ++idx1) { for(auto idx2 = 0; idx2 < m.secondSetSize(); ++idx2) { - EXPECT_EQ(*iter, getVal(idx1, idx2, 0)); + EXPECT_EQ((*iter).size(), stride); EXPECT_EQ(iter.firstIndex(), idx1); EXPECT_EQ(iter.secondIndex(), idx2); for(auto i = 0; i < stride; i++) @@ -405,12 +434,13 @@ void constructAndTestBivariateMapIterator(int stride) DataType val = getVal(idx1, idx2, i); EXPECT_EQ(iter.value(i), val); EXPECT_EQ(iter(i), val); - EXPECT_EQ((begin_iter + flat_idx).value(i), val); - EXPECT_EQ((end_iter - (m.totalSize() - flat_idx)).value(i), val); - EXPECT_EQ((inval_iter - (m.totalSize() - flat_idx + 1)).value(i), val); + // Below disabled because we can't test these with just a forward access iterator + //EXPECT_EQ((begin_iter + flat_idx).value(i), val); + //EXPECT_EQ((end_iter - (m.totalSize() - flat_idx)).value(i), val); + //EXPECT_EQ((inval_iter - (m.totalSize() - flat_idx + 1)).value(i), val); } iter++; - flat_idx++; + // flat_idx++; } } } @@ -628,6 +658,15 @@ class slam_bivariate_map_templated : public ::testing::Test using CartesianMapType = slam::BivariateMap; + template + using NDStridePolicy = slam::policies::MultiDimStride; + template + using CartesianNDMapType = + slam::BivariateMap, InterfacePolicy>; + template + using RelationNDMapType = + slam::BivariateMap, InterfacePolicy>; + slam_bivariate_map_templated() : m_allocatorId(ExecTraits::getAllocatorId()) , m_unifiedAllocatorId(ExecTraits::getUnifiedAllocatorId()) @@ -635,8 +674,12 @@ class slam_bivariate_map_templated : public ::testing::Test void initializeAndTestCartesianMap(int stride); + void initializeAndTestCartesianMap(axom::StackArray shape); + void initializeAndTestRelationMap(int stride); + void initializeAndTestRelationMap(axom::StackArray shape); + protected: int m_allocatorId; int m_unifiedAllocatorId; @@ -752,6 +795,105 @@ void slam_bivariate_map_templated::initializeAndTestCartesianMap } } +//---------------------------------------------------------------------- +template +void slam_bivariate_map_templated::initializeAndTestCartesianMap( + axom::StackArray shape) +{ + using MapType = CartesianNDMapType<3>; + + // Create associated sets. + axom::Array sets(2, 2, m_unifiedAllocatorId); + sets[0] = ConcreteSetType(MAX_SET_SIZE1); + sets[1] = ConcreteSetType(MAX_SET_SIZE2); + + SLIC_INFO("Creating product set with size (" << MAX_SET_SIZE1 << ", " + << MAX_SET_SIZE2 << ")"); + ProductSetType prodSet(&sets[0], &sets[1]); + EXPECT_EQ(prodSet.size(), MAX_SET_SIZE1 * MAX_SET_SIZE2); + EXPECT_TRUE(prodSet.isValid()); + + int flatStride = shape[0] * shape[1] * shape[2]; + int strides[3] = {shape[1] * shape[2], shape[2], 1}; + + // Create array of elements to back the map. + m_allocatorId = ExecTraits::getAllocatorId(); + axom::IndexType backingSize = prodSet.size() * flatStride; + + RealData realBacking(backingSize, backingSize, m_unifiedAllocatorId); + + SLIC_INFO( + axom::fmt::format("\nCreating double map with shape ({}) on the ProductSet", + axom::fmt::join(shape, ", "))); + const MapType m(prodSet, realBacking.view(), shape); + + EXPECT_EQ(m.stride(), flatStride); + SLIC_INFO("\nSetting the elements."); + axom::for_all( + m.firstSetSize(), + AXOM_LAMBDA(int idx1) { + for(auto idx2 = 0; idx2 < m.secondSetSize(); idx2++) + { + for(int i = 0; i < shape[0]; i++) + for(int j = 0; j < shape[1]; j++) + for(int k = 0; k < shape[2]; k++) + { + int flatCompIdx = i * strides[0] + j * strides[1] + k * strides[2]; + m(idx1, idx2, i, j, k) = getVal(idx1, idx2, flatCompIdx); + } + } + }); + + SLIC_INFO("\nChecking the elements with findValue()."); + for(int idx1 = 0; idx1 < m.firstSetSize(); idx1++) + { + for(auto idx2 = 0; idx2 < m.secondSetSize(); idx2++) + { + int bsetIndex = idx1 * m.secondSetSize() + idx2; + for(int i = 0; i < shape[0]; i++) + for(int j = 0; j < shape[1]; j++) + for(int k = 0; k < shape[2]; k++) + { + int flatCompIdx = i * strides[0] + j * strides[1] + k * strides[2]; + int flatIdx = bsetIndex * flatStride; + flatIdx += flatCompIdx; + + double* ptr = m.findValue(idx1, idx2, i, j, k); + EXPECT_NE(ptr, nullptr); + EXPECT_DOUBLE_EQ(*ptr, getVal(idx1, idx2, flatCompIdx)); + // Test other access methods: + EXPECT_DOUBLE_EQ(*ptr, m.flatValue(bsetIndex, i, j, k)); + EXPECT_DOUBLE_EQ(*ptr, m(idx1, idx2, i, j, k)); + EXPECT_DOUBLE_EQ(*ptr, m[flatIdx]); + } + } + } + + SLIC_INFO("\nChecking the elements with BivariateMap range iterator."); + for(auto it = m.set_begin(); it != m.set_end(); ++it) + { + int idx1 = it.firstIndex(); + int idx2 = it.secondIndex(); + int flatIdx = it.flatIndex(); + + EXPECT_EQ(idx1, m.set()->flatToFirstIndex(flatIdx)); + EXPECT_EQ(idx2, m.set()->flatToSecondIndex(flatIdx)); + EXPECT_EQ(it.numComp(), m.stride()); + + for(int i = 0; i < shape[0]; i++) + for(int j = 0; j < shape[1]; j++) + for(int k = 0; k < shape[2]; k++) + { + int flatCompIdx = i * strides[0] + j * strides[1] + k * strides[2]; + double expected_value = getVal(idx1, idx2, flatCompIdx); + + EXPECT_DOUBLE_EQ(expected_value, (*it)(i, j, k)); + EXPECT_DOUBLE_EQ(expected_value, it(i, j, k)); + EXPECT_DOUBLE_EQ(expected_value, it.value(i, j, k)); + } + } +} + //---------------------------------------------------------------------- template void slam_bivariate_map_templated::initializeAndTestRelationMap( @@ -868,6 +1010,142 @@ void slam_bivariate_map_templated::initializeAndTestRelationMap( #endif } } +//---------------------------------------------------------------------- +template +void slam_bivariate_map_templated::initializeAndTestRelationMap( + axom::StackArray shape) +{ + using MapType = RelationNDMapType<3>; + + // Compute strides. + int flatStride = shape[0] * shape[1] * shape[2]; + int strides[3] = {shape[1] * shape[2], shape[2], 1}; + + // Create associated sets. + axom::Array sets(2, 2, m_unifiedAllocatorId); + sets[0] = ConcreteSetType(MAX_SET_SIZE1); + sets[1] = ConcreteSetType(MAX_SET_SIZE2); + + // Create a relation on the two sets. + SLIC_INFO("Creating static relation between two sets."); + axom::Array rel(1, 1, m_unifiedAllocatorId); + rel[0] = RelationType(&sets[0], &sets[1]); + axom::Array begin_vec(MAX_SET_SIZE1 + 1, + MAX_SET_SIZE1 + 1, + m_unifiedAllocatorId); + axom::Array index_vec(0, 0, m_unifiedAllocatorId); + + SetPosition curIdx = 0; + + for(auto i = 0; i < MAX_SET_SIZE1; ++i) + { + begin_vec[i] = curIdx; + if(MAX_SET_SIZE1 / 4 <= i && i <= MAX_SET_SIZE1 / 4 * 3) + { + for(auto j = MAX_SET_SIZE2 / 4; j < MAX_SET_SIZE2 / 4 * 3; ++j) + { + index_vec.push_back(j); + ++curIdx; + } + } + } + begin_vec[MAX_SET_SIZE1] = curIdx; + + rel[0].bindBeginOffsets(MAX_SET_SIZE1, begin_vec.view()); + rel[0].bindIndices(index_vec.size(), index_vec.view()); + + // RelationType* relPtr = &rel[0]; + + RelationSetType relSet(&rel[0]); + EXPECT_EQ(index_vec.size(), relSet.totalSize()); + EXPECT_TRUE(relSet.isValid()); + + // Create array of elements to back the map. + m_allocatorId = ExecTraits::getUnifiedAllocatorId(); + axom::IndexType backingSize = index_vec.size() * flatStride; + + RealData realBacking(backingSize, backingSize, m_allocatorId); + + SLIC_INFO( + axom::fmt::format("\nCreating double map with shape ({}) on the ProductSet", + axom::fmt::join(shape, ", "))); + const MapType m(relSet, realBacking.view(), shape); + + EXPECT_EQ(m.stride(), flatStride); + axom::for_all( + m.firstSetSize(), + AXOM_LAMBDA(int idx1) { + auto submap = m(idx1); + for(auto slot = 0; slot < submap.size(); slot++) + for(int i = 0; i < shape[0]; i++) + for(int j = 0; j < shape[1]; j++) + for(int k = 0; k < shape[2]; k++) + { + int idx2 = submap.index(slot); + int flatCompIdx = i * strides[0] + j * strides[1] + k * strides[2]; + submap(slot, i, j, k) = getVal(idx1, idx2, flatCompIdx); + } + }); + + SLIC_INFO("\nChecking the elements with findValue()."); + for(int idx1 = 0; idx1 < m.firstSetSize(); idx1++) + { + auto submap = m(idx1); + int slot = 0; + for(int idx2 = 0; idx2 < m.secondSetSize(); idx2++) + { + bool inRelation = submap.size() > slot && submap.index(slot) == idx2; + for(int i = 0; i < shape[0]; i++) + for(int j = 0; j < shape[1]; j++) + for(int k = 0; k < shape[2]; k++) + { + int flatCompIdx = i * strides[0] + j * strides[1] + k * strides[2]; + double expected_value = getVal(idx1, idx2, flatCompIdx); + + double* valuePtr = m.findValue(idx1, idx2, i, j, k); + if(inRelation) + { + // Test set-based indexing: (idx1, idx2) + EXPECT_NE(valuePtr, nullptr); + EXPECT_DOUBLE_EQ(expected_value, *valuePtr); + EXPECT_DOUBLE_EQ(expected_value, m(idx1, idx2, i, j, k)); + } + else + { + EXPECT_EQ(valuePtr, nullptr); + } + } + if(inRelation) + { + slot++; + } + } + } + + SLIC_INFO("\nChecking the elements with BivariateMap range iterator."); + for(auto it = m.set_begin(); it != m.set_end(); ++it) + { + int idx1 = it.firstIndex(); + int idx2 = it.secondIndex(); + int flatIdx = it.flatIndex(); + + EXPECT_EQ(idx1, m.set()->flatToFirstIndex(flatIdx)); + EXPECT_EQ(idx2, m.set()->flatToSecondIndex(flatIdx)); + EXPECT_EQ(it.numComp(), m.stride()); + + for(int i = 0; i < shape[0]; i++) + for(int j = 0; j < shape[1]; j++) + for(int k = 0; k < shape[2]; k++) + { + int flatCompIdx = i * strides[0] + j * strides[1] + k * strides[2]; + double expected_value = getVal(idx1, idx2, flatCompIdx); + + EXPECT_DOUBLE_EQ(expected_value, (*it)(i, j, k)); + EXPECT_DOUBLE_EQ(expected_value, it(i, j, k)); + EXPECT_DOUBLE_EQ(expected_value, it.value(i, j, k)); + } + } +} //---------------------------------------------------------------------- AXOM_TYPED_TEST(slam_bivariate_map_templated, constructAndTestProductSet) @@ -877,6 +1155,13 @@ AXOM_TYPED_TEST(slam_bivariate_map_templated, constructAndTestProductSet) this->initializeAndTestCartesianMap(3); } +//---------------------------------------------------------------------- +AXOM_TYPED_TEST(slam_bivariate_map_templated, constructAndTestProductSet3D) +{ + this->initializeAndTestCartesianMap({2, 3, 5}); + this->initializeAndTestCartesianMap({3, 5, 7}); +} + //---------------------------------------------------------------------- AXOM_TYPED_TEST(slam_bivariate_map_templated, constructAndTestRelationSet) { @@ -885,6 +1170,13 @@ AXOM_TYPED_TEST(slam_bivariate_map_templated, constructAndTestRelationSet) this->initializeAndTestRelationMap(3); } +//---------------------------------------------------------------------- +AXOM_TYPED_TEST(slam_bivariate_map_templated, constructAndTestRelationSet3D) +{ + this->initializeAndTestRelationMap({2, 3, 5}); + this->initializeAndTestRelationMap({3, 5, 7}); +} + } // namespace testing //---------------------------------------------------------------------- diff --git a/src/axom/slam/tests/slam_map_Map.cpp b/src/axom/slam/tests/slam_map_Map.cpp index 2a76edb221..dc13e4d933 100644 --- a/src/axom/slam/tests/slam_map_Map.cpp +++ b/src/axom/slam/tests/slam_map_Map.cpp @@ -285,15 +285,6 @@ TEST(slam_map, iterate) } } - //iter[n] access - { - IterType beginIter = m.begin(); - for(int idx = 0; idx < m.size(); idx++) - { - EXPECT_EQ(beginIter[idx], static_cast(idx * multFac)); - } - } - //iter1 - iter2 { IterType beginIter = m.begin(); @@ -314,7 +305,6 @@ void constructAndTestMapIteratorWithStride(int stride) { using RealMap = slam::Map, VecIndirection, StrideType>; - using MapIterator = typename RealMap::MapIterator; SetType s(MAX_SET_SIZE); @@ -335,11 +325,11 @@ void constructAndTestMapIteratorWithStride(int stride) double multFac2 = 1.010; { int idx = 0; - for(MapIterator iter = m.begin(); iter != m.end(); ++iter) + for(auto submap : m.set_elements()) { - for(auto idx2 = 0; idx2 < iter.numComp(); ++idx2) + for(auto idx2 = 0; idx2 < submap.size(); ++idx2) { - iter(idx2) = static_cast(idx * multFac + idx2 * multFac2); + submap[idx2] = static_cast(idx * multFac + idx2 * multFac2); } ++idx; } @@ -352,12 +342,11 @@ void constructAndTestMapIteratorWithStride(int stride) //iter++ access { int idx = 0; - for(MapIterator iter = m.begin(); iter != m.end(); iter++) + for(auto submap : m.set_elements()) { - EXPECT_EQ(*iter, static_cast(idx * multFac)); - for(auto idx2 = 0; idx2 < iter.numComp(); ++idx2) + for(auto idx2 = 0; idx2 < submap.size(); ++idx2) { - EXPECT_DOUBLE_EQ(iter(idx2), + EXPECT_DOUBLE_EQ(submap[idx2], static_cast(idx * multFac + idx2 * multFac2)); } idx++; @@ -468,12 +457,19 @@ class slam_map_templated : public ::testing::Test using RealData = axom::Array; using IndirectionPolicy = slam::policies::ArrayViewIndirection; - using StridePolicy = slam::policies::RuntimeStride; + using StridePolicy = slam::policies::RuntimeStride; using InterfacePolicy = slam::policies::ConcreteInterface; using RealMap = slam::Map; + template + using MDStridePolicy = slam::policies::MultiDimStride; + + template + using MultiDimMap = + slam::Map, InterfacePolicy>; + slam_map_templated() : m_allocatorId(ExecTraits::getAllocatorId()) , m_unifiedAllocatorId(ExecTraits::getUnifiedAllocatorId()) @@ -496,6 +492,29 @@ class slam_map_templated : public ::testing::Test m_realBacking = RealData(backingSize, backingSize, m_allocatorId); } + template + void initializeWithMultiDimStride(axom::StackArray shape) + { + // Create associated set. + m_set = ConcreteSetType(MAX_SET_SIZE); + + SLIC_INFO("\nCreating set of size " << m_set.size()); + + EXPECT_EQ(m_set.size(), MAX_SET_SIZE); + EXPECT_TRUE(m_set.isValid()); + + int stride = 1; + for(int dim = 0; dim < Dims; dim++) + { + stride *= shape[dim]; + } + + // Create array of elements to back the map. + axom::IndexType backingSize = m_set.size() * stride; + + m_realBacking = RealData(backingSize, backingSize, m_unifiedAllocatorId); + } + protected: int m_allocatorId; int m_unifiedAllocatorId; @@ -603,6 +622,163 @@ AXOM_TYPED_TEST(slam_map_templated, constructAndTestStride3) EXPECT_TRUE(validEntry); } } + +//---------------------------------------------------------------------- +AXOM_TYPED_TEST(slam_map_templated, constructAndTest2DStride) +{ + using ExecSpace = typename TestFixture::ExecSpace; + using MapType = typename TestFixture::template MultiDimMap<2>; + + const axom::StackArray shape = {3, 5}; + const axom::StackArray strides = {5, 1}; + int stride = 3 * 5; + this->initializeWithMultiDimStride(shape); + + SLIC_INFO("\nCreating double map with shape (3, 5) on the set "); + MapType m(this->m_set, this->m_realBacking.view(), shape); + + EXPECT_EQ(m.stride(), stride); + EXPECT_EQ(m.shape(), shape); + + SLIC_INFO("\nSetting the elements."); + const double multFac = 100.0001; + const double multFac2 = 1.00100; + const double multFac3 = 0.10010; + axom::for_all( + this->m_set.size(), + AXOM_LAMBDA(int index) { + for(int i = 0; i < shape[0]; i++) + { + for(int j = 0; j < shape[1]; j++) + { + m(index, i, j) = index * multFac + i * multFac2 + j * multFac3; + } + } + }); + + SLIC_INFO("\nChecking the elements."); + + for(int setIdx = 0; setIdx < this->m_set.size(); setIdx++) + { + for(int i = 0; i < shape[0]; i++) + { + for(int j = 0; j < shape[1]; j++) + { + double expectedValue = setIdx * multFac + i * multFac2 + j * multFac3; + EXPECT_DOUBLE_EQ(m(setIdx, i, j), expectedValue); + EXPECT_DOUBLE_EQ(m.value(setIdx, i, j), expectedValue); + + int flatIndex = i * strides[0] + j * strides[1]; + EXPECT_DOUBLE_EQ(m[setIdx * stride + flatIndex], expectedValue); + } + } + } + + SLIC_INFO("\nChecking iteration through range iterator."); + for(auto it = m.set_begin(); it != m.set_end(); ++it) + { + int setIdx = it.flatIndex(); + EXPECT_EQ(m.index(setIdx), it.index()); + EXPECT_EQ(it->shape(), shape); + EXPECT_EQ(it->size(), it.numComp()); + EXPECT_EQ(m.set_begin() + setIdx, it); + for(int i = 0; i < shape[0]; i++) + { + for(int j = 0; j < shape[1]; j++) + { + double expectedValue = setIdx * multFac + i * multFac2 + j * multFac3; + EXPECT_DOUBLE_EQ(expectedValue, (*it)(i, j)); + EXPECT_DOUBLE_EQ(expectedValue, it(i, j)); + EXPECT_DOUBLE_EQ(expectedValue, it.value(i, j)); + } + } + } +} +//---------------------------------------------------------------------- +AXOM_TYPED_TEST(slam_map_templated, constructAndTest3DStride) +{ + using ExecSpace = typename TestFixture::ExecSpace; + using MapType = typename TestFixture::template MultiDimMap<3>; + + const axom::StackArray shape = {2, 3, 4}; + const axom::StackArray strides = {12, 4, 1}; + int stride = 2 * 3 * 4; + this->initializeWithMultiDimStride(shape); + + SLIC_INFO("\nCreating double map with shape (2, 3, 4) on the set "); + MapType m(this->m_set, this->m_realBacking.view(), shape); + + EXPECT_EQ(m.stride(), stride); + EXPECT_EQ(m.shape(), shape); + + SLIC_INFO("\nSetting the elements."); + const double multFac = 100.0001; + const double multFac2 = 1.00100; + const double multFac3 = 0.10010; + const double multFac4 = 0.01001; + axom::for_all( + this->m_set.size(), + AXOM_LAMBDA(int index) { + for(int i = 0; i < shape[0]; i++) + { + for(int j = 0; j < shape[1]; j++) + { + for(int k = 0; k < shape[2]; k++) + { + m(index, i, j, k) = + index * multFac + i * multFac2 + j * multFac3 + k * multFac4; + } + } + } + }); + + SLIC_INFO("\nChecking the elements."); + + for(int setIdx = 0; setIdx < this->m_set.size(); setIdx++) + { + for(int i = 0; i < shape[0]; i++) + { + for(int j = 0; j < shape[1]; j++) + { + for(int k = 0; k < shape[2]; k++) + { + double expectedValue = + setIdx * multFac + i * multFac2 + j * multFac3 + k * multFac4; + EXPECT_DOUBLE_EQ(m(setIdx, i, j, k), expectedValue); + EXPECT_DOUBLE_EQ(m.value(setIdx, i, j, k), expectedValue); + + int flatIndex = i * strides[0] + j * strides[1] + k * strides[2]; + EXPECT_DOUBLE_EQ(m[setIdx * stride + flatIndex], expectedValue); + } + } + } + } + + SLIC_INFO("\nChecking iteration through range iterator."); + for(auto it = m.set_begin(); it != m.set_end(); ++it) + { + int setIdx = it.flatIndex(); + EXPECT_EQ(m.index(setIdx), it.index()); + EXPECT_EQ(it->shape(), shape); + EXPECT_EQ(it->size(), it.numComp()); + EXPECT_EQ(m.set_begin() + setIdx, it); + for(int i = 0; i < shape[0]; i++) + { + for(int j = 0; j < shape[1]; j++) + { + for(int k = 0; k < shape[2]; k++) + { + double expectedValue = + setIdx * multFac + i * multFac2 + j * multFac3 + k * multFac4; + EXPECT_DOUBLE_EQ(expectedValue, (*it)(i, j, k)); + EXPECT_DOUBLE_EQ(expectedValue, it(i, j, k)); + EXPECT_DOUBLE_EQ(expectedValue, it.value(i, j, k)); + } + } + } + } +} + } // namespace testing //---------------------------------------------------------------------- diff --git a/src/axom/slam/tests/slam_map_SubMap.cpp b/src/axom/slam/tests/slam_map_SubMap.cpp index 7770bc44c8..9b2b5caa88 100644 --- a/src/axom/slam/tests/slam_map_SubMap.cpp +++ b/src/axom/slam/tests/slam_map_SubMap.cpp @@ -128,13 +128,12 @@ bool constructAndTestSubMap() // Check iterator's value access functions { - auto mapVal = it.value(); - EXPECT_EQ(mapVal, *it); - EXPECT_EQ(mapVal, it()); - EXPECT_EQ(mapVal, it[0]); + auto expectedValue = getValue(submapOffset + cnt); + EXPECT_EQ(expectedValue, *it); + EXPECT_EQ(expectedValue, it[0]); auto expVal = getValue(submapOffset + cnt); - EXPECT_EQ(expVal, mapVal); + EXPECT_EQ(expVal, expectedValue); } } } @@ -160,6 +159,20 @@ bool constructAndTestSubMap() EXPECT_EQ(ssm.value(idx), getValue(subset_indices[idx])); EXPECT_EQ(ssm.index(idx), s[subset_indices[idx]]); } + + SLIC_INFO("Checking the elements using SubMap range iterator."); + { + int cnt = 0; + for(auto it = ssm.set_begin(); it != ssm.set_end(); ++it, ++cnt) + { + auto expectedValue = getValue(subset_indices[cnt]); + EXPECT_EQ(expectedValue, (*it)[0]); + EXPECT_EQ(expectedValue, it(0)); + EXPECT_EQ(expectedValue, it.value(0)); + EXPECT_EQ(it.index(), s[subset_indices[cnt]]); + } + EXPECT_EQ(cnt, subset_indices.size()); + } } return true; } diff --git a/src/axom/slam/tests/slam_relation_StaticConstant.cpp b/src/axom/slam/tests/slam_relation_StaticConstant.cpp index 441ce4dae2..7839a4b2f3 100644 --- a/src/axom/slam/tests/slam_relation_StaticConstant.cpp +++ b/src/axom/slam/tests/slam_relation_StaticConstant.cpp @@ -104,8 +104,6 @@ void generateIncrementingRelations(SetPosition stride, VecType* offsets) { VecType& offsetsVec = *offsets; - SetPosition curIdx = SetPosition(); - for(SetPosition i = 0; i < FROMSET_SIZE; ++i) { EXPECT_EQ(elementCardinality(i), stride); @@ -113,7 +111,6 @@ void generateIncrementingRelations(SetPosition stride, VecType* offsets) for(SetPosition j = 0; j < elementCardinality(i); ++j) { offsetsVec.push_back(relationData(i, j)); - ++curIdx; } } } diff --git a/src/axom/slam/tests/slam_set_BivariateSet.cpp b/src/axom/slam/tests/slam_set_BivariateSet.cpp index 1169e086c3..1b5ae6c880 100644 --- a/src/axom/slam/tests/slam_set_BivariateSet.cpp +++ b/src/axom/slam/tests/slam_set_BivariateSet.cpp @@ -388,7 +388,7 @@ TYPED_TEST(BivariateSetTester, sizes) // Tests BivariateSet::getFirstSet(), getSecondSet(), getElements(idx) // and the ability to operate and iterate on the resulting sets -template +template void bSetTraverseTest(slam::BivariateSet* bset, bool shouldCheckMod) { const auto firstSetSize = bset->firstSetSize(); @@ -426,6 +426,63 @@ void bSetTraverseTest(slam::BivariateSet* bset, bool shouldCheckMod) } SLIC_INFO(sstr.str() << "}"); } + + SLIC_INFO( + "Flat traversal through virtual bivariate set:\n " + "----------------------"); + + { + std::stringstream sstr; + + // Iterate through the bivariate set as a list of indexes (i, j) in {S1, S2} + int flatIndex = 0; + for(auto bsetElem = bset->begin(); bsetElem != bset->end(); ++bsetElem) + { + EXPECT_EQ(flatIndex, bsetElem.flatIndex()); + EXPECT_EQ(flatIndex, + bset->findElementFlatIndex(bsetElem.firstIndex(), + bsetElem.secondIndex())); + EXPECT_EQ(bsetElem.firstIndex(), bset->flatToFirstIndex(flatIndex)); + EXPECT_EQ(bsetElem.secondIndex(), bset->flatToSecondIndex(flatIndex)); + + sstr << flatIndex << ": (" << firstSet->at(bsetElem.firstIndex()) << "," + << secondSet->at(bsetElem.secondIndex()) << "), "; + + flatIndex++; + } + + SLIC_INFO("{ " << sstr.str() << " }"); + } + + DerivedSetType* derivedSet = static_cast(bset); + + SLIC_INFO( + "Flat traversal through derived bivariate set:\n " + "----------------------"); + + { + std::stringstream sstr; + + // Iterate through the bivariate set as a list of indexes (i, j) in {S1, S2} + int flatIndex = 0; + for(auto bsetElem = derivedSet->begin(); bsetElem != derivedSet->end(); + ++bsetElem) + { + EXPECT_EQ(flatIndex, bsetElem.flatIndex()); + EXPECT_EQ(flatIndex, + derivedSet->findElementFlatIndex(bsetElem.firstIndex(), + bsetElem.secondIndex())); + EXPECT_EQ(bsetElem.firstIndex(), derivedSet->flatToFirstIndex(flatIndex)); + EXPECT_EQ(bsetElem.secondIndex(), derivedSet->flatToSecondIndex(flatIndex)); + + sstr << flatIndex << ": (" << firstSet->at(bsetElem.firstIndex()) << "," + << secondSet->at(bsetElem.secondIndex()) << "), "; + + flatIndex++; + } + + SLIC_INFO("{ " << sstr.str() << " }"); + } } TYPED_TEST(BivariateSetTester, traverse) @@ -443,7 +500,7 @@ TYPED_TEST(BivariateSetTester, traverse) EXPECT_TRUE(pset.isValid(true)); bool checkMod = false; - bSetTraverseTest(&pset, checkMod); + bSetTraverseTest(&pset, checkMod); } // Test traversal functions for a RelationSet @@ -458,7 +515,7 @@ TYPED_TEST(BivariateSetTester, traverse) EXPECT_TRUE(rset.isValid(true)); bool checkMod = true; - bSetTraverseTest(&rset, checkMod); + bSetTraverseTest(&rset, checkMod); } } diff --git a/src/axom/slic/CMakeLists.txt b/src/axom/slic/CMakeLists.txt index 31a7d8f598..4f939be076 100644 --- a/src/axom/slic/CMakeLists.txt +++ b/src/axom/slic/CMakeLists.txt @@ -100,8 +100,3 @@ endif() if (AXOM_ENABLE_TESTS) add_subdirectory(tests) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX slic) diff --git a/src/axom/slic/core/LogStream.cpp b/src/axom/slic/core/LogStream.cpp index 17e2efb5c0..42efc78bd9 100644 --- a/src/axom/slic/core/LogStream.cpp +++ b/src/axom/slic/core/LogStream.cpp @@ -69,6 +69,7 @@ std::string LogStream::getFormatedMessage(const std::string& msgLevel, const std::string& message, const std::string& tagName, const std::string& rank, + const std::string& rank_count, const std::string& fileName, int line) { @@ -79,6 +80,7 @@ std::string LogStream::getFormatedMessage(const std::string& msgLevel, this->replaceKey(msg, "", tagName); this->replaceKey(msg, "", fileName); this->replaceKey(msg, "", rank); + this->replaceKey(msg, "", rank_count); if(line != MSG_IGNORE_LINE) { diff --git a/src/axom/slic/core/LogStream.hpp b/src/axom/slic/core/LogStream.hpp index f69eb4218e..9f3b306381 100644 --- a/src/axom/slic/core/LogStream.hpp +++ b/src/axom/slic/core/LogStream.hpp @@ -58,7 +58,8 @@ class LogStream *
  • user-supplied tag
  • *
  • with the filename
  • *
  • with the line number
  • - *
  • with the MPI rank
  • + *
  • with the MPI rank(s)
  • + *
  • with the number of MPI ranks
  • *
  • date/time the message is logged
  • * * @@ -73,6 +74,7 @@ class LogStream * std::string( "* FILE=\n" ) + * std::string( "* LINE=\n" ) + * std::string( "* RANK=\n" ) + + * std::string( "* RANK_COUNT=\n" ) + * std::string( "***********************************\n" ); * \endcode */ @@ -151,6 +153,8 @@ class LogStream * \param [in] tagName user-supplied tag, may be MSG_IGNORE_TAG * \param [in] fileName filename where this message is logged, may be * MSG_IGNORE_FILE to ignore this field. + * \param [in] rank The MPI rank(s) that emitted this message + * \param [in] rank_count the number of MPI ranks that emitted this message * \param [in] line the line number within the file where the message is * logged. Likewise, may be set to MSG_IGNORE_LINE to ignore this field. * @@ -161,6 +165,7 @@ class LogStream const std::string& message, const std::string& tagName, const std::string& rank, + const std::string& rank_count, const std::string& fileName, int line); diff --git a/src/axom/slic/docs/sphinx/sections/architecture.rst b/src/axom/slic/docs/sphinx/sections/architecture.rst index 7b044f2be6..f2df63bc66 100644 --- a/src/axom/slic/docs/sphinx/sections/architecture.rst +++ b/src/axom/slic/docs/sphinx/sections/architecture.rst @@ -151,8 +151,14 @@ The list of keywords is summarized in the table below. | **** | A string tag associated with a given message, e.g., for| | | filtering during post-processing, etc. | +---------------------+--------------------------------------------------------+ -| **** | The MPI rank that emitted the message. Only applicable | -| | when the `Axom Toolkit`_ is compiled with MPI enabled | +| **** | The MPI rank(s) that emitted the message. | +| | Only applicable when Axom is compiled with MPI enabled | +| | and with MPI-aware :ref:`LogStream` instances, such as,| +| | the :ref:`SynchronizedStream` and | +| | :ref:`LumberjackStream`. | ++---------------------+--------------------------------------------------------+ +| **** | The number of MPI ranks that emitted the message. | +| | Only applicable when Axom is compiled with MPI enabled | | | and with MPI-aware :ref:`LogStream` instances, such as,| | | the :ref:`SynchronizedStream` and | | | :ref:`LumberjackStream`. | @@ -221,7 +227,7 @@ Generic Output Stream The :ref:`GenericOutputStream`, is a concrete implementation of the :ref:`LogStream` base class, that can be constructed by specifying: -#. A C++ ``std::ostream`` object instance, e.g., ``std::cout`, ``std::cerr`` for +#. A C++ ``std::ostream`` object instance, e.g., ``std::cout``, ``std::cerr`` for console output, or to a file by passing a C++ ``std::ofstream`` object, and, #. Optionally, a string that specifies the :ref:`logMessageFormat`. @@ -423,12 +429,13 @@ The ``MyStream`` class implements the ``LogStream::append()`` method of the int line, bool AXOM_UNUSED_PARAM(filtered_duplicates) ) { - assert( m_stream != nillptr ); + assert( m_stream != nullptr ); (*m_stream) << this->getFormatedMessage( message::getLevelAsString(msgLevel), message, tagName, "", + "", fileName, line ); } diff --git a/src/axom/slic/docs/sphinx/sections/getting_started.rst b/src/axom/slic/docs/sphinx/sections/getting_started.rst index 525c633e5c..640007d08f 100644 --- a/src/axom/slic/docs/sphinx/sections/getting_started.rst +++ b/src/axom/slic/docs/sphinx/sections/getting_started.rst @@ -168,7 +168,7 @@ The :ref:`GenericOutputStream`, takes two arguments in its constructor: will deallocate them when ``slic::finalize()`` is called. Step 5.1: Tagged Log Streams -^^^^^^^^^^^^^^^^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Slic has limited support for tags, where users can bind streams to user-defined tags. The bound streams only output messages with the diff --git a/src/axom/slic/examples/basic/lumberjack_logging.cpp b/src/axom/slic/examples/basic/lumberjack_logging.cpp index 1d0b8f5a02..c8d8e080bf 100644 --- a/src/axom/slic/examples/basic/lumberjack_logging.cpp +++ b/src/axom/slic/examples/basic/lumberjack_logging.cpp @@ -39,10 +39,15 @@ int main(int argc, char** argv) MPI_Comm_rank(MPI_COMM_WORLD, &rank); // Initialize SLIC - std::string format = std::string("\n") + - std::string("\t\n") + std::string("\tLEVEL=\n") + - std::string("\tRANKS=\n") + std::string("\tFILE=\n") + - std::string("\tLINE=\n"); + constexpr const char* format = R"( + +\t +\tLEVEL= +\tRANKS= +\tRANK_COUNT= +\tFILE= +\tLINE= +)"; slic::initialize(); // Set SLIC logging level and Lumberjack Logging stream diff --git a/src/axom/slic/streams/GenericOutputStream.cpp b/src/axom/slic/streams/GenericOutputStream.cpp index 39de7df769..175aaac59e 100644 --- a/src/axom/slic/streams/GenericOutputStream.cpp +++ b/src/axom/slic/streams/GenericOutputStream.cpp @@ -12,7 +12,12 @@ namespace axom { namespace slic { -GenericOutputStream::GenericOutputStream(std::ostream* os) : m_stream(os) { } +GenericOutputStream::GenericOutputStream(std::ostream* os) + : m_stream(os) + , m_file_name() + , m_opened(true) + , m_isOstreamOwnedBySLIC(false) +{ } //------------------------------------------------------------------------------ GenericOutputStream::GenericOutputStream(const std::string& stream) @@ -20,14 +25,23 @@ GenericOutputStream::GenericOutputStream(const std::string& stream) if(stream == "cout") { m_stream = &std::cout; + m_file_name = std::string(); + m_opened = true; + m_isOstreamOwnedBySLIC = false; } else if(stream == "cerr") { m_stream = &std::cerr; + m_file_name = std::string(); + m_opened = true; + m_isOstreamOwnedBySLIC = false; } else { - m_stream = new std::ofstream(stream); + m_stream = new std::ostringstream(); + m_file_name = stream; + m_opened = false; + m_isOstreamOwnedBySLIC = true; } } @@ -35,6 +49,9 @@ GenericOutputStream::GenericOutputStream(const std::string& stream) GenericOutputStream::GenericOutputStream(std::ostream* os, const std::string& format) : m_stream(os) + , m_file_name() + , m_opened(true) + , m_isOstreamOwnedBySLIC(false) { this->setFormatString(format); } @@ -53,7 +70,14 @@ GenericOutputStream::GenericOutputStream(const std::string& stream, } //------------------------------------------------------------------------------ -GenericOutputStream::~GenericOutputStream() { } +GenericOutputStream::~GenericOutputStream() +{ + if(m_isOstreamOwnedBySLIC) + { + delete m_stream; + m_stream = static_cast(nullptr); + } +} //------------------------------------------------------------------------------ void GenericOutputStream::append(message::Level msgLevel, @@ -74,15 +98,46 @@ void GenericOutputStream::append(message::Level msgLevel, message, tagName, "", + "", fileName, line); } //------------------------------------------------------------------------------ -void GenericOutputStream::outputLocal() { m_stream->flush(); } +void GenericOutputStream::openBeforeFlush() +{ + if(m_isOstreamOwnedBySLIC && !m_opened) + { + std::ostringstream* oss = dynamic_cast(m_stream); + if(oss != nullptr) + { + // Converting stream from ostringstream to ofstream and + // writing ostringstream's string buffer to ofstream + std::string buffer = oss->str(); + if(!buffer.empty()) + { + delete m_stream; + m_stream = new std::ofstream(m_file_name); + (*m_stream) << buffer; + m_opened = true; + } + } + } +} + +//------------------------------------------------------------------------------ +void GenericOutputStream::outputLocal() +{ + openBeforeFlush(); + m_stream->flush(); +} //------------------------------------------------------------------------------ -void GenericOutputStream::flush() { m_stream->flush(); } +void GenericOutputStream::flush() +{ + openBeforeFlush(); + m_stream->flush(); +} } /* namespace slic */ diff --git a/src/axom/slic/streams/GenericOutputStream.hpp b/src/axom/slic/streams/GenericOutputStream.hpp index 83ccf65fe7..64e017ff50 100644 --- a/src/axom/slic/streams/GenericOutputStream.hpp +++ b/src/axom/slic/streams/GenericOutputStream.hpp @@ -49,6 +49,9 @@ class GenericOutputStream : public LogStream * - "cerr" makes std::cerr the output stream * - Any other input will construct a std::ofstream associated with input * \param [in] stream the string to control type of stream created + * + * \note This constructor avoids creating an empty file if this + * GenericOutputStream never flushes a message. */ GenericOutputStream(const std::string& stream); @@ -57,13 +60,14 @@ class GenericOutputStream : public LogStream * message formatting. * \param [in] os pointer to a user-supplied ostream instance. * \param [in] format the format string. + * \pre os != NULL * \see LogStream::setFormatString for the format string. */ GenericOutputStream(std::ostream* os, const std::string& format); /*! * \brief Constructs a GenericOutputStream instance specified by the given - * string and message formatting. + * string and message formatting. * The string input determines the stream as follows: * - "cout" makes std::cout the output stream * - "cerr" makes std::cerr the output stream @@ -71,6 +75,9 @@ class GenericOutputStream : public LogStream * \param [in] stream the string to control type of stream created * \param [in] format the format string. * \see LogStream::setFormatString for the format string. + * + * \note This constructor avoids creating an empty file if this + * GenericOutputStream never flushes a message. */ GenericOutputStream(const std::string& stream, const std::string& format); @@ -100,12 +107,25 @@ class GenericOutputStream : public LogStream private: std::ostream* m_stream; + std::string m_file_name; + bool m_opened; + bool m_isOstreamOwnedBySLIC; /*! * \brief Default constructor. * \note Made private to prevent applications from using it. */ - GenericOutputStream() : m_stream(static_cast(nullptr)) {}; + GenericOutputStream() + : m_stream(static_cast(nullptr)) + , m_file_name() + , m_opened(false) + , m_isOstreamOwnedBySLIC(false) {}; + + /*! + * \brief Opens a file before flushing stream when GenericOutputStream + * has ownership of ostream to a file (std::string constructor) + */ + void openBeforeFlush(); DISABLE_COPY_AND_ASSIGNMENT(GenericOutputStream); DISABLE_MOVE_AND_ASSIGNMENT(GenericOutputStream); diff --git a/src/axom/slic/streams/LumberjackStream.cpp b/src/axom/slic/streams/LumberjackStream.cpp index c9353cc057..03285ae292 100644 --- a/src/axom/slic/streams/LumberjackStream.cpp +++ b/src/axom/slic/streams/LumberjackStream.cpp @@ -8,6 +8,7 @@ #include #include "axom/core/Macros.hpp" +#include "axom/core/utilities/StringUtilities.hpp" #include "axom/lumberjack/BinaryTreeCommunicator.hpp" #include "axom/lumberjack/Lumberjack.hpp" @@ -22,7 +23,10 @@ LumberjackStream::LumberjackStream(std::ostream* stream, MPI_Comm comm, int ranksLimit) : m_isLJOwnedBySLIC(false) + , m_isOstreamOwnedBySLIC(false) , m_stream(stream) + , m_file_name() + , m_opened(true) { this->initializeLumberjack(comm, ranksLimit); } @@ -33,7 +37,10 @@ LumberjackStream::LumberjackStream(std::ostream* stream, int ranksLimit, const std::string& format) : m_isLJOwnedBySLIC(false) + , m_isOstreamOwnedBySLIC(false) , m_stream(stream) + , m_file_name() + , m_opened(true) { this->initializeLumberjack(comm, ranksLimit); this->setFormatString(format); @@ -44,7 +51,10 @@ LumberjackStream::LumberjackStream(std::ostream* stream, axom::lumberjack::Lumberjack* lj) : m_lj(lj) , m_isLJOwnedBySLIC(false) + , m_isOstreamOwnedBySLIC(false) , m_stream(stream) + , m_file_name() + , m_opened(true) { } //------------------------------------------------------------------------------ @@ -53,11 +63,103 @@ LumberjackStream::LumberjackStream(std::ostream* stream, const std::string& format) : m_lj(lj) , m_isLJOwnedBySLIC(false) + , m_isOstreamOwnedBySLIC(false) , m_stream(stream) + , m_file_name() + , m_opened(true) { this->setFormatString(format); } +//------------------------------------------------------------------------------ +LumberjackStream::LumberjackStream(const std::string stream, + MPI_Comm comm, + int ranksLimit) +{ + this->initializeLumberjack(comm, ranksLimit); + + if(stream == "cout") + { + m_isOstreamOwnedBySLIC = false; + m_stream = &std::cout; + m_file_name = std::string(); + m_opened = true; + } + else if(stream == "cerr") + { + m_isOstreamOwnedBySLIC = false; + m_stream = &std::cerr; + m_file_name = std::string(); + m_opened = true; + } + else + { + m_isOstreamOwnedBySLIC = true; + m_stream = new std::ofstream(); + m_file_name = stream; + m_opened = false; + } +} + +//------------------------------------------------------------------------------ +LumberjackStream::LumberjackStream(const std::string stream, + MPI_Comm comm, + int ranksLimit, + const std::string& format) + : LumberjackStream::LumberjackStream(stream, comm, ranksLimit) +{ + // Fix newline and tab characters if needed + std::string format_fixed = axom::utilities::string::replaceAllInstances( + axom::utilities::string::replaceAllInstances(format, "\\n", "\n"), + "\\t", + "\t"); + this->setFormatString(format_fixed); +} + +//------------------------------------------------------------------------------ +LumberjackStream::LumberjackStream(const std::string stream, + axom::lumberjack::Lumberjack* lj) +{ + m_lj = lj; + m_isLJOwnedBySLIC = false; + + if(stream == "cout") + { + m_isOstreamOwnedBySLIC = false; + m_stream = &std::cout; + m_file_name = std::string(); + m_opened = true; + } + else if(stream == "cerr") + { + m_isOstreamOwnedBySLIC = false; + m_stream = &std::cerr; + m_file_name = std::string(); + m_opened = true; + } + else + { + m_isOstreamOwnedBySLIC = true; + m_stream = new std::ofstream(); + m_file_name = stream; + m_opened = false; + } +} + +//------------------------------------------------------------------------------ +LumberjackStream::LumberjackStream(const std::string stream, + axom::lumberjack::Lumberjack* lj, + const std::string& format) + : LumberjackStream::LumberjackStream(stream, lj) +{ + // Fix newline and tab characters if needed + std::string format_fixed = axom::utilities::string::replaceAllInstances( + axom::utilities::string::replaceAllInstances(format, "\\n", "\n"), + "\\t", + "\t"); + this->setFormatString(format_fixed); +} + //------------------------------------------------------------------------------ LumberjackStream::~LumberjackStream() { @@ -65,6 +167,12 @@ LumberjackStream::~LumberjackStream() { this->finalizeLumberjack(); } + + if(m_isOstreamOwnedBySLIC) + { + delete m_stream; + m_stream = static_cast(nullptr); + } } //------------------------------------------------------------------------------ @@ -139,22 +247,32 @@ void LumberjackStream::write(bool local) if(m_lj->isOutputNode() || local) { - std::vector messages = m_lj->getMessages(); - - const int nmessages = static_cast(messages.size()); - std::string rankString; - for(int i = 0; i < nmessages; ++i) + for(const auto* curr_message : m_lj->getMessages()) { - rankString = std::to_string(messages[i]->count()) + ": " + - messages[i]->stringOfRanks(); + if(curr_message == nullptr) + { + continue; + } + + if(m_isOstreamOwnedBySLIC && !m_opened) + { + std::ofstream* ofs = dynamic_cast(m_stream); + if(ofs != nullptr) + { + ofs->open(m_file_name); + m_opened = true; + } + } + (*m_stream) << this->getFormatedMessage( message::getLevelAsString( - static_cast(messages[i]->level())), - messages[i]->text(), - messages[i]->tag(), - rankString, - messages[i]->fileName(), - messages[i]->lineNumber()); + static_cast(curr_message->level())), + curr_message->text(), + curr_message->tag(), + curr_message->stringOfRanks(), + std::to_string(curr_message->count()), + curr_message->fileName(), + curr_message->lineNumber()); } m_stream->flush(); diff --git a/src/axom/slic/streams/LumberjackStream.hpp b/src/axom/slic/streams/LumberjackStream.hpp index 5bac899a46..794d116f36 100644 --- a/src/axom/slic/streams/LumberjackStream.hpp +++ b/src/axom/slic/streams/LumberjackStream.hpp @@ -17,6 +17,7 @@ // C/C++ includes #include // for std::ostream +#include // for ofstream // MPI #include // For MPI @@ -46,16 +47,131 @@ namespace slic class LumberjackStream : public LogStream { public: + /*! + * \brief Constructs a LumberjackStream instance with the given stream, + * MPI communicator, and rank limit. + * \param [in] stream pointer to a user-supplied ostream instance. + * \param [in] comm MPI communicator + * \param [in] ranksLimit limit on how many ranks are individually tracked per + * message + * \pre stream != NULL + */ LumberjackStream(std::ostream* stream, MPI_Comm comm, int ranksLimit); + + /*! + * \brief Constructs a LumberjackStream instance with the given stream, + * MPI communicator, rank limit, and message formatting. + * \param [in] stream pointer to a user-supplied ostream instance. + * \param [in] comm MPI communicator + * \param [in] ranksLimit limit on how many ranks are individually tracked per + * message + * \param [in] format the format string. + * \pre stream != NULL + * \see LogStream::setFormatString for the format string. + */ LumberjackStream(std::ostream* stream, MPI_Comm comm, int ranksLimit, const std::string& format); + + /*! + * \brief Constructs a LumberjackStream instance with the given stream + * and Lumberjack communicator. + * \param [in] stream pointer to a user-supplied ostream instance. + * \param [in] lj Lumberjack communicator + * \pre stream != NULL + */ LumberjackStream(std::ostream* stream, axom::lumberjack::Lumberjack* lj); + + /*! + * \brief Constructs a LumberjackStream instance with the given stream + * Lumberjack communicator, and message formatting. + * \param [in] stream pointer to a user-supplied ostream instance. + * \param [in] lj Lumberjack communicator + * \param [in] format the format string. + * \pre stream != NULL + */ LumberjackStream(std::ostream* stream, axom::lumberjack::Lumberjack* lj, const std::string& format); + /*! + * \brief Constructs a LumberjackStream instance specified by the given + * string, MPI communicator, and rank limit. + * The string input determines the stream as follows: + * - "cout" makes std::cout the output stream + * - "cerr" makes std::cerr the output stream + * - Any other input will construct a std::ofstream associated with input + * \param [in] stream the string to control type of stream created + * \param [in] comm MPI communicator + * \param [in] ranksLimit limit on how many ranks are individually tracked per + * message + * \pre stream != NULL + * + * \note This constructor avoids creating an empty file if this + * LumberjackStream never flushes a message. + */ + LumberjackStream(std::string stream, MPI_Comm comm, int ranksLimit); + + /*! + * \brief Constructs a LumberjackStream instance specified by the given + * string, MPI communicator, rank limit, and message formatting. + * The string input determines the stream as follows: + * - "cout" makes std::cout the output stream + * - "cerr" makes std::cerr the output stream + * - Any other input will construct a std::ofstream associated with input + * \param [in] stream the string to control type of stream created + * \param [in] comm MPI communicator + * \param [in] ranksLimit limit on how many ranks are individually tracked per + * message + * \param [in] format the format string. + * \pre stream != NULL + * \see LogStream::setFormatString for the format string. + * + * \note This constructor avoids creating an empty file if this + * LumberjackStream never flushes a message. + */ + LumberjackStream(std::string stream, + MPI_Comm comm, + int ranksLimit, + const std::string& format); + + /*! + * \brief Constructs a LumberjackStream instance specified by the given + * string and Lumberjack communicator. + * The string input determines the stream as follows: + * - "cout" makes std::cout the output stream + * - "cerr" makes std::cerr the output stream + * - Any other input will construct a std::ofstream associated with input + * \param [in] stream the string to control type of stream created + * \param [in] lj Lumberjack communicator + * \pre stream != NULL + * + * \note This constructor avoids creating an empty file if this + * LumberjackStream never flushes a message. + */ + LumberjackStream(std::string stream, axom::lumberjack::Lumberjack* lj); + + /*! + * \brief Constructs a LumberjackStream instance specified by the given + * string, Lumberjack communicator, and message formatting. + * The string input determines the stream as follows: + * - "cout" makes std::cout the output stream + * - "cerr" makes std::cerr the output stream + * - Any other input will construct a std::ofstream associated with input + * \param [in] stream the string to control type of stream created + * \param [in] lj Lumberjack communicator + * \param [in] format the format string. + * \pre stream != NULL + * \see LogStream::setFormatString for the format string. + * + * \note This constructor avoids creating an empty file if this + * LumberjackStream never flushes a message. + */ + LumberjackStream(std::string stream, + axom::lumberjack::Lumberjack* lj, + const std::string& format); + virtual ~LumberjackStream(); /*! @@ -136,7 +252,11 @@ class LumberjackStream : public LogStream axom::lumberjack::Lumberjack* m_lj; axom::lumberjack::Communicator* m_ljComm; bool m_isLJOwnedBySLIC; + bool m_isOstreamOwnedBySLIC; std::ostream* m_stream; + std::string m_file_name; + bool m_opened; + /// @} /*! diff --git a/src/axom/slic/streams/SynchronizedStream.cpp b/src/axom/slic/streams/SynchronizedStream.cpp index 12d00ed33c..818b756036 100644 --- a/src/axom/slic/streams/SynchronizedStream.cpp +++ b/src/axom/slic/streams/SynchronizedStream.cpp @@ -8,6 +8,7 @@ #include #include "axom/core/Macros.hpp" +#include "axom/core/utilities/StringUtilities.hpp" namespace axom { @@ -48,6 +49,9 @@ SynchronizedStream::SynchronizedStream(std::ostream* stream, MPI_Comm comm) : m_comm(comm) , m_cache(new MessageCache()) , m_stream(stream) + , m_file_name() + , m_isOstreamOwnedBySLIC(false) + , m_opened(false) { } //------------------------------------------------------------------------------ @@ -57,15 +61,66 @@ SynchronizedStream::SynchronizedStream(std::ostream* stream, : m_comm(comm) , m_cache(new MessageCache) , m_stream(stream) + , m_file_name() + , m_isOstreamOwnedBySLIC(false) + , m_opened(false) { this->setFormatString(format); } +//------------------------------------------------------------------------------ +SynchronizedStream::SynchronizedStream(const std::string stream, MPI_Comm comm) + : m_comm(comm) + , m_cache(new MessageCache) +{ + if(stream == "cout") + { + m_stream = &std::cout; + m_file_name = std::string(); + m_isOstreamOwnedBySLIC = false; + m_opened = true; + } + else if(stream == "cerr") + { + m_stream = &std::cerr; + m_file_name = std::string(); + m_isOstreamOwnedBySLIC = false; + m_opened = true; + } + else + { + m_stream = new std::ofstream(); + m_file_name = stream; + m_isOstreamOwnedBySLIC = true; + m_opened = false; + } +} + +//------------------------------------------------------------------------------ +SynchronizedStream::SynchronizedStream(const std::string stream, + MPI_Comm comm, + const std::string& format) + : SynchronizedStream::SynchronizedStream(stream, comm) +{ + // Fix newline and tab characters if needed + std::string format_fixed = axom::utilities::string::replaceAllInstances( + axom::utilities::string::replaceAllInstances(format, "\\n", "\n"), + "\\t", + "\t"); + this->setFormatString(format_fixed); +} + //------------------------------------------------------------------------------ SynchronizedStream::~SynchronizedStream() { delete m_cache; m_cache = static_cast(nullptr); + + if(m_isOstreamOwnedBySLIC) + { + delete m_stream; + m_stream = static_cast(nullptr); + } } //------------------------------------------------------------------------------ @@ -92,10 +147,25 @@ void SynchronizedStream::append(message::Level msgLevel, message, tagName, std::to_string(rank), + "1", fileName, line)); } +//------------------------------------------------------------------------------ +void SynchronizedStream::openBeforeFlush() +{ + if(m_isOstreamOwnedBySLIC && !m_opened && !m_cache->messages.empty()) + { + std::ofstream* ofs = dynamic_cast(m_stream); + if(ofs != nullptr) + { + ofs->open(m_file_name); + m_opened = true; + } + } +} + //------------------------------------------------------------------------------ void SynchronizedStream::outputLocal() { @@ -111,6 +181,8 @@ void SynchronizedStream::outputLocal() return; } + openBeforeFlush(); + // print messages for this rank m_cache->printMessages(m_stream); } @@ -130,6 +202,8 @@ void SynchronizedStream::flush() return; } + openBeforeFlush(); + // Collective flush int rank = -1; int nranks = 0; diff --git a/src/axom/slic/streams/SynchronizedStream.hpp b/src/axom/slic/streams/SynchronizedStream.hpp index 36a45b7750..fbe0c7c4ab 100644 --- a/src/axom/slic/streams/SynchronizedStream.hpp +++ b/src/axom/slic/streams/SynchronizedStream.hpp @@ -17,6 +17,7 @@ // C/C++ includes #include // for std::ostream +#include // for ofstream // MPI #include // For MPI @@ -43,11 +44,63 @@ namespace slic class SynchronizedStream : public LogStream { public: + /*! + * \brief Constructs a SynchronizedStream instance with the given stream + * and MPI communicator. + * \param [in] os pointer to a user-supplied ostream instance. + * \param [in] comm MPI communicator + * \pre stream != NULL + */ SynchronizedStream(std::ostream* stream, MPI_Comm comm); + + /*! + * \brief Constructs a SynchronizedStream instance with the given stream, + * MPI communicator, and message formatting. + * \param [in] os pointer to a user-supplied ostream instance. + * \param [in] comm MPI communicator + * \param [in] format the format string. + * \pre stream != NULL + * \see LogStream::setFormatString for the format string. + */ SynchronizedStream(std::ostream* stream, MPI_Comm comm, const std::string& format); + /*! + * \brief Constructs a SynchronizedStream instance specified by the given + * string, and MPI communicator. + * The string input determines the stream as follows: + * - "cout" makes std::cout the output stream + * - "cerr" makes std::cerr the output stream + * - Any other input will construct a std::ofstream associated with input + * \param [in] stream the string to control type of stream created + * \param [in] comm MPI communicator + * \pre stream != NULL + * \see LogStream::setFormatString for the format string. + * + * \note This constructor avoids creating an empty file if this + * SynchronizedStream never flushes a message. + */ + SynchronizedStream(std::string stream, MPI_Comm comm); + + /*! + * \brief Constructs a SynchronizedStream instance specified by the given + * string, MPI communicator, and message formatting. + * The string input determines the stream as follows: + * - "cout" makes std::cout the output stream + * - "cerr" makes std::cerr the output stream + * - Any other input will construct a std::ofstream associated with input + * \param [in] stream the string to control type of stream created + * \param [in] comm MPI communicator + * \param [in] format the format string. + * \pre stream != NULL + * \see LogStream::setFormatString for the format string. + * + * \note This constructor avoids creating an empty file if this + * SynchronizedStream never flushes a message. + */ + SynchronizedStream(std::string stream, MPI_Comm comm, const std::string& format); + virtual ~SynchronizedStream(); /*! @@ -102,8 +155,17 @@ class SynchronizedStream : public LogStream MPI_Comm m_comm; MessageCache* m_cache; std::ostream* m_stream; + std::string m_file_name; + bool m_isOstreamOwnedBySLIC; + bool m_opened; /// @} + /*! + * \brief Opens a file before flushing stream when SynchronizedStream + * has ownership of ostream to a file (std::string constructor) + */ + void openBeforeFlush(); + /*! * \brief Default constructor. Made private to prevent applications from * using it. Instead the constructor that passes the underlying MPI comm @@ -112,7 +174,9 @@ class SynchronizedStream : public LogStream SynchronizedStream() : m_comm(MPI_COMM_NULL) , m_cache(static_cast(nullptr)) - , m_stream(static_cast(nullptr)) {}; + , m_stream(static_cast(nullptr)) + , m_file_name() + , m_opened(false) {}; DISABLE_COPY_AND_ASSIGNMENT(SynchronizedStream); DISABLE_MOVE_AND_ASSIGNMENT(SynchronizedStream); diff --git a/src/axom/slic/tests/slic_macros.cpp b/src/axom/slic/tests/slic_macros.cpp index f5701c944f..620a5f37b2 100644 --- a/src/axom/slic/tests/slic_macros.cpp +++ b/src/axom/slic/tests/slic_macros.cpp @@ -5,6 +5,7 @@ // axom includes #include "axom/config.hpp" +#include "axom/core/utilities/FileUtilities.hpp" // slic includes #include "axom/slic/interface/slic.hpp" @@ -412,6 +413,72 @@ TEST(slic_macros, test_tagged_macros) EXPECT_TRUE(slic::internal::is_stream_empty()); } +//------------------------------------------------------------------------------ +TEST(slic_macros, test_macros_file_output) +{ + std::string msgfmt = ""; + + // GenericOutputStream(std::string stream) and + // GenericOutputStream(std::string stream, std::string format) constructors + // do not create a a file until macros called, then flushed + std::string no_fmt = "file_no_fmt.txt"; + std::string with_fmt = "file_with_fmt.txt"; + + slic::addStreamToAllMsgLevels(new slic::GenericOutputStream(no_fmt)); + slic::addStreamToAllMsgLevels(new slic::GenericOutputStream(with_fmt, msgfmt)); + + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + + // streams flushed with no buffered messages, no files created + slic::flushStreams(); + + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + + // message is buffered but not yet flushed, no files created + SLIC_INFO("Test"); + + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + + // message has been buffered and now flushed, files are created + slic::flushStreams(); + + EXPECT_TRUE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_TRUE(axom::utilities::filesystem::pathExists(with_fmt)); + + // Verify file contents + std::ifstream no_fmt_contents(no_fmt); + std::stringstream no_fmt_buffer; + no_fmt_buffer << no_fmt_contents.rdbuf(); + + std::string no_fmt_expected; + no_fmt_expected += "*****\n[INFO]\n\n Test \n\n "; + no_fmt_expected += __FILE__; + no_fmt_expected += "\n440\n****\n"; + + EXPECT_EQ(no_fmt_buffer.str(), no_fmt_expected); + + std::ifstream with_fmt_contents(with_fmt); + std::stringstream with_fmt_buffer; + with_fmt_buffer << with_fmt_contents.rdbuf(); + + EXPECT_EQ(with_fmt_buffer.str(), "Test"); + + no_fmt_contents.close(); + with_fmt_contents.close(); + + // Closes open file streams associated with Slic streams when destructors + // called during slic::finalize(). + // Windows _unlink file deletion fails if file is still in use. + slic::finalize(); + + // Cleanup generated files + EXPECT_EQ(axom::utilities::filesystem::removeFile(no_fmt), 0); + EXPECT_EQ(axom::utilities::filesystem::removeFile(with_fmt), 0); +} + //------------------------------------------------------------------------------ int main(int argc, char* argv[]) { diff --git a/src/axom/slic/tests/slic_macros_parallel.cpp b/src/axom/slic/tests/slic_macros_parallel.cpp index 01419f0d59..e9b7db50d9 100644 --- a/src/axom/slic/tests/slic_macros_parallel.cpp +++ b/src/axom/slic/tests/slic_macros_parallel.cpp @@ -6,6 +6,7 @@ #include "axom/config.hpp" #include "axom/core/utilities/Utilities.hpp" +#include "axom/core/utilities/FileUtilities.hpp" #include "axom/slic/interface/slic.hpp" #include "axom/slic/interface/slic_macros.hpp" @@ -154,8 +155,6 @@ class SlicMacrosParallel : public ::testing::TestWithParam MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Comm_size(MPI_COMM_WORLD, &nranks); - const int RLIMIT = 8; - // initialize slic slic::initialize(); slic::setLoggingMsgLevel(slic::message::Debug); @@ -203,6 +202,7 @@ class SlicMacrosParallel : public ::testing::TestWithParam int rank; int nranks; + const int RLIMIT = 8; }; //------------------------------------------------------------------------------ @@ -1010,6 +1010,173 @@ TEST_P(SlicMacrosParallel, test_check_macros) #endif } +//------------------------------------------------------------------------------ +TEST_P(SlicMacrosParallel, test_macros_file_output) +{ + EXPECT_TRUE(slic::internal::are_all_streams_empty()); + + std::string msgfmt = ""; + std::string no_fmt; + std::string with_fmt; + + if(GetParam() == "Synchronized") + { + // SynchronizedStream(std::string stream, MPI_Comm comm) and + // SynchronizedStream(std::string stream, MPI_Comm comm, std::string format) + // constructors do not create a a file until macros called, then flushed + + no_fmt = "file_ss_rank_" + std::to_string(rank) + "_no_fmt.txt"; + with_fmt = "file_ss_rank_" + std::to_string(rank) + "_with_fmt.txt"; + + slic::addStreamToAllMsgLevels( + new slic::SynchronizedStream(no_fmt, MPI_COMM_WORLD)); + + slic::addStreamToAllMsgLevels( + new slic::SynchronizedStream(with_fmt, MPI_COMM_WORLD, msgfmt)); + } + + else + { + // LumberjackStream(std::string stream, MPI_Comm comm, int ranksLimit) and + // LumberjackStream(std::string stream, MPI_Comm comm, int ranksLimit, + // std::string format) + // constructors do not create a a file until macros called, then flushed + + no_fmt = "file_lj_rank_" + std::to_string(rank) + "_no_fmt.txt"; + with_fmt = "file_lj_rank_" + std::to_string(rank) + "_with_fmt.txt"; + + slic::addStreamToAllMsgLevels( + new slic::LumberjackStream(no_fmt, MPI_COMM_WORLD, RLIMIT)); + + slic::addStreamToAllMsgLevels( + new slic::LumberjackStream(with_fmt, MPI_COMM_WORLD, RLIMIT, msgfmt)); + } + + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + + // streams flushed with no buffered messages, no files created + slic::flushStreams(); + + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + + // message is buffered but not yet flushed, no files created + SLIC_INFO("Test"); + + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + + // message has been buffered and now flushed, files are created + slic::flushStreams(); + + if(GetParam() == "Synchronized" || (GetParam() == "Lumberjack" && rank == 0)) + { + EXPECT_TRUE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_TRUE(axom::utilities::filesystem::pathExists(with_fmt)); + + // Verify file contents + std::ifstream no_fmt_contents(no_fmt); + std::stringstream no_fmt_buffer; + no_fmt_buffer << no_fmt_contents.rdbuf(); + no_fmt_contents.close(); + + std::string no_fmt_expected; + no_fmt_expected += "*****\n[INFO]\n\n Test \n\n "; + no_fmt_expected += __FILE__; + no_fmt_expected += "\n1065\n****\n"; + + EXPECT_EQ(no_fmt_buffer.str(), no_fmt_expected); + + std::ifstream with_fmt_contents(with_fmt); + std::stringstream with_fmt_buffer; + with_fmt_buffer << with_fmt_contents.rdbuf(); + with_fmt_contents.close(); + + EXPECT_EQ(with_fmt_buffer.str(), "Test"); + } + + else + { + // Expect non-output Lumberjack ranks to not create files + EXPECT_FALSE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_FALSE(axom::utilities::filesystem::pathExists(with_fmt)); + } + + // In case of an abort, outputLocal() is called. + // Expect non-output Lumberjack ranks to create files if possible + // (cannot guarantee all ranks will output before non-collective MPI Abort) + SLIC_INFO("Test outputLocalMessages()"); + slic::outputLocalMessages(); + + EXPECT_TRUE(axom::utilities::filesystem::pathExists(no_fmt)); + EXPECT_TRUE(axom::utilities::filesystem::pathExists(with_fmt)); + + if(GetParam() == "Synchronized" || (GetParam() == "Lumberjack" && rank == 0)) + { + // Verify file contents + std::ifstream no_fmt_output(no_fmt); + std::stringstream no_fmt_out_buf; + no_fmt_out_buf << no_fmt_output.rdbuf(); + no_fmt_output.close(); + + std::string no_fmt_output_expected; + no_fmt_output_expected += "*****\n[INFO]\n\n Test \n\n "; + no_fmt_output_expected += __FILE__; + no_fmt_output_expected += "\n1065\n****\n"; + no_fmt_output_expected += + "*****\n[INFO]\n\n Test outputLocalMessages() \n\n "; + no_fmt_output_expected += __FILE__; + no_fmt_output_expected += "\n1109\n****\n"; + + EXPECT_EQ(no_fmt_out_buf.str(), no_fmt_output_expected); + + std::ifstream with_fmt_output(with_fmt); + std::stringstream with_fmt_out_buf; + with_fmt_out_buf << with_fmt_output.rdbuf(); + with_fmt_output.close(); + + EXPECT_EQ(with_fmt_out_buf.str(), "TestTest outputLocalMessages()"); + } + + else + { + // Verify file contents + std::ifstream no_fmt_output(no_fmt); + std::stringstream no_fmt_out_buf; + no_fmt_out_buf << no_fmt_output.rdbuf(); + no_fmt_output.close(); + + std::string no_fmt_output_expected; + no_fmt_output_expected += + "*****\n[INFO]\n\n Test outputLocalMessages() \n\n "; + no_fmt_output_expected += __FILE__; + no_fmt_output_expected += "\n1109\n****\n"; + + EXPECT_EQ(no_fmt_out_buf.str(), no_fmt_output_expected); + + std::ifstream with_fmt_output(with_fmt); + std::stringstream with_fmt_out_buf; + with_fmt_out_buf << with_fmt_output.rdbuf(); + with_fmt_output.close(); + + EXPECT_EQ(with_fmt_out_buf.str(), "Test outputLocalMessages()"); + } + + // Closes open file streams associated with Slic streams when destructors + // called during slic::finalize(). + // Windows _unlink file deletion fails if file is still in use. + slic::finalize(); + + // Cleanup generated files + EXPECT_EQ(axom::utilities::filesystem::removeFile(no_fmt), 0); + EXPECT_EQ(axom::utilities::filesystem::removeFile(with_fmt), 0); + + // Clear out ostringstreams for other tests + slic::flushStreams(); + slic::internal::clear_streams(); +} + //------------------------------------------------------------------------------ const std::string parallel_streams[] = {"Synchronized", "Lumberjack"}; INSTANTIATE_TEST_SUITE_P(core_memory_management, diff --git a/src/axom/spin/BVH.hpp b/src/axom/spin/BVH.hpp index d5eec63ae7..767cd05afa 100644 --- a/src/axom/spin/BVH.hpp +++ b/src/axom/spin/BVH.hpp @@ -400,7 +400,7 @@ template int BVH::initialize(const BoxIndexable boxes, IndexType numBoxes) { - AXOM_PERF_MARK_FUNCTION("BVH::initialize"); + AXOM_ANNOTATE_SCOPE("BVH::initialize"); using IterBase = typename IteratorTraits::BaseType; @@ -409,8 +409,6 @@ int BVH::initialize(const BoxIndexable boxes, std::is_convertible::value, "Iterator must return objects convertible to primal::BoundingBox."); - using BoxType = primal::BoundingBox; - // STEP 1: Allocate a BVH, potentially deleting the existing BVH if it exists m_bvh.reset(new ImplType); @@ -464,7 +462,7 @@ void BVH::findPoints( IndexType numPts, PointIndexable pts) const { - AXOM_PERF_MARK_FUNCTION("BVH::findPoints"); + AXOM_ANNOTATE_SCOPE("BVH::findPoints"); using IterBase = typename IteratorTraits::BaseType; @@ -498,7 +496,7 @@ void BVH::findRays( IndexType numRays, RayIndexable rays) const { - AXOM_PERF_MARK_FUNCTION("BVH::findRays"); + AXOM_ANNOTATE_SCOPE("BVH::findRays"); using IterBase = typename IteratorTraits::BaseType; @@ -535,7 +533,7 @@ void BVH::findBoundingBoxes( IndexType numBoxes, BoxIndexable boxes) const { - AXOM_PERF_MARK_FUNCTION("BVH::findBoundingBoxes"); + AXOM_ANNOTATE_SCOPE("BVH::findBoundingBoxes"); using IterBase = typename IteratorTraits::BaseType; diff --git a/src/axom/spin/CMakeLists.txt b/src/axom/spin/CMakeLists.txt index 2eafefbcbc..9bbb089537 100644 --- a/src/axom/spin/CMakeLists.txt +++ b/src/axom/spin/CMakeLists.txt @@ -80,8 +80,3 @@ endif() if (AXOM_ENABLE_TESTS) add_subdirectory(tests) endif() - -#------------------------------------------------------------------------------ -# Add code checks -#------------------------------------------------------------------------------ -axom_add_code_checks(PREFIX spin) diff --git a/src/axom/spin/MortonIndex.hpp b/src/axom/spin/MortonIndex.hpp index ce9d8ad5ef..e23c98a71d 100644 --- a/src/axom/spin/MortonIndex.hpp +++ b/src/axom/spin/MortonIndex.hpp @@ -20,10 +20,10 @@ #include "axom/config.hpp" #include "axom/core/Types.hpp" #include "axom/core/Macros.hpp" // defines AXOM_STATIC_ASSERT +#include "axom/core/NumericLimits.hpp" #include "axom/primal/geometry/Point.hpp" #include -#include // for numeric_limits namespace { @@ -257,10 +257,10 @@ struct Mortonizer NDIM = 2, /*! The number of bits in a CoordType */ - COORD_BITS = std::numeric_limits::digits, + COORD_BITS = axom::numeric_limits::digits, /*! The number of bits in a MortonIndex */ - MORTON_BITS = std::numeric_limits::digits, + MORTON_BITS = axom::numeric_limits::digits, /*! The number of representable Morton bits per dimension */ MB_PER_DIM = MORTON_BITS / NDIM, @@ -399,10 +399,10 @@ struct Mortonizer NDIM = 3, /*! The number of bits in a CoordType */ - COORD_BITS = std::numeric_limits::digits, + COORD_BITS = axom::numeric_limits::digits, /*! The number of bits in a MortonIndex */ - MORTON_BITS = std::numeric_limits::digits, + MORTON_BITS = axom::numeric_limits::digits, /*! The number of representable morton bits per dimension */ MB_PER_DIM = MORTON_BITS / NDIM, diff --git a/src/axom/spin/OctreeBase.hpp b/src/axom/spin/OctreeBase.hpp index 3bf0e6ac16..9aae342063 100644 --- a/src/axom/spin/OctreeBase.hpp +++ b/src/axom/spin/OctreeBase.hpp @@ -12,6 +12,7 @@ #define AXOM_SPIN_OCTREE_BASE__HPP_ #include "axom/config.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic.hpp" #include "axom/slam.hpp" #include "axom/primal.hpp" @@ -140,7 +141,7 @@ class OctreeBase using GridVec = primal::Vector; using MAX_LEVEL_SIZE = - slam::policies::CompileTimeSize::digits>; + slam::policies::CompileTimeSize::digits>; using OctreeLevels = slam::OrderedSet; using OctreeLevelType = OctreeLevel; diff --git a/src/axom/spin/OctreeLevel.hpp b/src/axom/spin/OctreeLevel.hpp index 9cf43e79d3..f049f436cd 100644 --- a/src/axom/spin/OctreeLevel.hpp +++ b/src/axom/spin/OctreeLevel.hpp @@ -201,12 +201,22 @@ class OctreeLevel * \a increment(), \a equal() \a update(), \a pt() and \a data() */ template - class BlockIterator : public std::iterator + class BlockIterator { public: using GridPt = typename OctreeLevel::GridPt; using iter = BlockIterator; + // In C++17, inheriting from std::iterator was deprecated. + // We provide these typedefs for class BlockIterator to avoid inheriting + // from std::iterator and causing warnings for those compiling to C++17 + // or newer. + using value_type = DataType; + using difference_type = std::ptrdiff_t; + using pointer = DataType*; + using reference = DataType&; + using iterator_category = std::forward_iterator_tag; + BlockIterator(OctreeLevel* octLevel, bool begin = false) : m_octLevel(octLevel) { diff --git a/src/axom/spin/SparseOctreeLevel.hpp b/src/axom/spin/SparseOctreeLevel.hpp index b6f0731448..5756f2b3ee 100644 --- a/src/axom/spin/SparseOctreeLevel.hpp +++ b/src/axom/spin/SparseOctreeLevel.hpp @@ -9,6 +9,7 @@ #include "axom/config.hpp" #include "axom/core.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/primal/geometry/Point.hpp" @@ -72,7 +73,7 @@ struct BroodRepresentationTraits { #if defined(AXOM_USE_SPARSEHASH) const PointRepresenationType maxVal = - std::numeric_limits::max(); + axom::numeric_limits::max(); map.set_empty_key(maxVal); map.set_deleted_key(maxVal - 1); #else @@ -125,7 +126,7 @@ struct BroodRepresentationTraits::max(); + CoordType maxCoord = axom::numeric_limits::max(); GridPt maxPt(maxCoord); map.set_empty_key(maxPt); @@ -404,9 +405,9 @@ class SparseOctreeLevel : public OctreeLevel const BroodType brood(pt); ConstMapIter blockIt = m_map.find(brood.base()); - return (blockIt == m_map.end()) - ? BlockNotInTree - : (blockIt->second[brood.offset()].isLeaf()) ? LeafBlock : InternalBlock; + return (blockIt == m_map.end()) ? BlockNotInTree + : (blockIt->second[brood.offset()].isLeaf()) ? LeafBlock + : InternalBlock; } private: diff --git a/src/axom/spin/UniformGrid.hpp b/src/axom/spin/UniformGrid.hpp index d4469789cd..39ec3211f9 100644 --- a/src/axom/spin/UniformGrid.hpp +++ b/src/axom/spin/UniformGrid.hpp @@ -9,6 +9,7 @@ #include "axom/core/utilities/Utilities.hpp" #include "axom/core/execution/for_all.hpp" #include "axom/core/Array.hpp" +#include "axom/core/NumericLimits.hpp" #include "axom/slic/interface/slic.hpp" @@ -336,6 +337,7 @@ struct UniformGrid::QueryObject return sumOfBinSizes; } + AXOM_SUPPRESS_HD_WARN template AXOM_HOST_DEVICE void visitCandidates(const BoxType& bbox, Func&& evalFn) const { @@ -474,8 +476,8 @@ void UniformGrid::initialize( // get the global bounding box of all the objects #ifdef AXOM_USE_RAJA using reduce_pol = typename axom::execution_space::reduce_policy; - double infinity = std::numeric_limits::max(); - double neg_infinity = std::numeric_limits::lowest(); + double infinity = axom::numeric_limits::max(); + double neg_infinity = axom::numeric_limits::lowest(); using ReduceMin = RAJA::ReduceMin; using ReduceMax = RAJA::ReduceMax; diff --git a/src/axom/spin/internal/linear_bvh/RadixTree.hpp b/src/axom/spin/internal/linear_bvh/RadixTree.hpp index ac5e7b4613..43ffa8944b 100644 --- a/src/axom/spin/internal/linear_bvh/RadixTree.hpp +++ b/src/axom/spin/internal/linear_bvh/RadixTree.hpp @@ -7,9 +7,7 @@ #define AXOM_SPIN_RADIXTREE_HPP_ #include "axom/core/Array.hpp" - -#include "axom/core/utilities/AnnotationMacros.hpp" // for annotations - +#include "axom/core/AnnotationMacros.hpp" #include "axom/primal/geometry/BoundingBox.hpp" namespace axom @@ -46,7 +44,7 @@ struct RadixTree void allocate(std::int32_t size, int allocID) { - AXOM_PERF_MARK_FUNCTION("RadixTree::allocate"); + AXOM_ANNOTATE_SCOPE("RadixTree::allocate"); m_size = size; m_inner_size = m_size - 1; diff --git a/src/axom/spin/internal/linear_bvh/build_radix_tree.hpp b/src/axom/spin/internal/linear_bvh/build_radix_tree.hpp index 14c1c4e093..b86d606fad 100644 --- a/src/axom/spin/internal/linear_bvh/build_radix_tree.hpp +++ b/src/axom/spin/internal/linear_bvh/build_radix_tree.hpp @@ -10,22 +10,20 @@ #include "axom/core/execution/execution_space.hpp" #include "axom/core/execution/for_all.hpp" +#include "axom/core/AnnotationMacros.hpp" +#include "axom/core/utilities/Utilities.hpp" +#include "axom/core/utilities/BitUtilities.hpp" +#include "axom/core/NumericLimits.hpp" -#include "axom/core/utilities/AnnotationMacros.hpp" +#include "axom/slic/interface/slic.hpp" #include "axom/primal/geometry/BoundingBox.hpp" #include "axom/primal/geometry/Point.hpp" #include "axom/spin/internal/linear_bvh/RadixTree.hpp" - #include "axom/spin/MortonIndex.hpp" -#include "axom/core/utilities/Utilities.hpp" -#include "axom/core/utilities/BitUtilities.hpp" -#include "axom/slic/interface/slic.hpp" - #if defined(AXOM_USE_RAJA) - // RAJA includes #include "RAJA/RAJA.hpp" #endif @@ -94,7 +92,7 @@ void transform_boxes(const BoxIndexable boxes, std::int32_t size, FloatType scale_factor) { - AXOM_PERF_MARK_FUNCTION("transform_boxes"); + AXOM_ANNOTATE_SCOPE("transform_boxes"); for_all( size, @@ -113,15 +111,15 @@ primal::BoundingBox reduce( ArrayView> aabbs, std::int32_t size) { - AXOM_PERF_MARK_FUNCTION("reduce_abbs"); + AXOM_ANNOTATE_SCOPE("reduce_abbs"); #ifdef AXOM_USE_RAJA using reduce_policy = typename axom::execution_space::reduce_policy; primal::Point min_pt, max_pt; - FloatType infinity = std::numeric_limits::max(); - FloatType neg_infinity = std::numeric_limits::lowest(); + FloatType infinity = axom::numeric_limits::max(); + FloatType neg_infinity = axom::numeric_limits::lowest(); for(int dim = 0; dim < NDIMS; dim++) { @@ -161,7 +159,7 @@ void get_mcodes(ArrayView> aabbs, const primal::BoundingBox& bounds, const ArrayView mcodes) { - AXOM_PERF_MARK_FUNCTION("get_mcodes"); + AXOM_ANNOTATE_SCOPE("get_mcodes"); primal::Vector extent, inv_extent, min_coord; @@ -196,7 +194,7 @@ void array_counting(ArrayView iterator, const IntType& start, const IntType& step) { - AXOM_PERF_MARK_FUNCTION("array_counting"); + AXOM_ANNOTATE_SCOPE("array_counting"); for_all( size, @@ -216,7 +214,7 @@ void reorder(const ArrayView indices, std::int32_t size, int allocatorID) { - AXOM_PERF_MARK_FUNCTION("reorder"); + AXOM_ANNOTATE_SCOPE("reorder"); Array temp = Array(ArrayOptions::Uninitialized {}, size, size, allocatorID); @@ -243,15 +241,16 @@ void sort_mcodes(ArrayView mcodes, std::int32_t size, ArrayView iter) { - AXOM_PERF_MARK_FUNCTION("sort_mcodes"); + AXOM_ANNOTATE_SCOPE("sort_mcodes"); array_counting(iter, size, 0, 1); - AXOM_PERF_MARK_SECTION( - "raja_stable_sort", + { + AXOM_ANNOTATE_SCOPE("raja_stable_sort"); using EXEC_POL = typename axom::execution_space::loop_policy; RAJA::stable_sort_pairs(RAJA::make_span(mcodes.data(), size), - RAJA::make_span(iter.data(), size));); + RAJA::make_span(iter.data(), size)); + } } #else @@ -262,19 +261,18 @@ void sort_mcodes(Array& mcodes, std::int32_t size, const ArrayView iter) { - AXOM_PERF_MARK_FUNCTION("sort_mcodes"); + AXOM_ANNOTATE_SCOPE("sort_mcodes"); array_counting(iter, size, 0, 1); - AXOM_PERF_MARK_SECTION("cpu_sort", - - std::stable_sort(iter.begin(), - iter.begin() + size, - [&](std::int32_t i1, std::int32_t i2) { - return mcodes[i1] < mcodes[i2]; - }); + { + AXOM_ANNOTATE_SCOPE("cpu_sort"); - ); + std::stable_sort( + iter.begin(), + iter.begin() + size, + [&](std::int32_t i1, std::int32_t i2) { return mcodes[i1] < mcodes[i2]; }); + } const int allocID = axom::execution_space::allocatorID(); reorder(iter, mcodes, size, allocID); @@ -313,7 +311,7 @@ AXOM_HOST_DEVICE IntType delta(const IntType& a, template void build_tree(RadixTree& data) { - AXOM_PERF_MARK_FUNCTION("build_tree"); + AXOM_ANNOTATE_SCOPE("build_tree"); // http://research.nvidia.com/sites/default/files/publications/karras2012hpg_paper.pdf @@ -531,7 +529,7 @@ AXOM_HOST_DEVICE static inline int atomic_increment(int* addr) template void propagate_aabbs(RadixTree& data, int allocatorID) { - AXOM_PERF_MARK_FUNCTION("propagate_abbs"); + AXOM_ANNOTATE_SCOPE("propagate_abbs"); using BoxType = primal::BoundingBox; @@ -611,7 +609,7 @@ void build_radix_tree(const BoxIndexable boxes, FloatType scale_factor, int allocatorID) { - AXOM_PERF_MARK_FUNCTION("build_radix_tree"); + AXOM_ANNOTATE_SCOPE("build_radix_tree"); // sanity checks SLIC_ASSERT(size > 0); diff --git a/src/axom/spin/policy/LinearBVH.hpp b/src/axom/spin/policy/LinearBVH.hpp index 62a51f2656..25c155d683 100644 --- a/src/axom/spin/policy/LinearBVH.hpp +++ b/src/axom/spin/policy/LinearBVH.hpp @@ -7,11 +7,11 @@ #define AXOM_SPIN_POLICY_LINEARBVH_HPP_ // axom core includes -#include "axom/core/Types.hpp" // for fixed bitwidth types -#include "axom/core/execution/for_all.hpp" // for generic for_all() -#include "axom/core/memory_management.hpp" // for alloc()/free() - -#include "axom/core/utilities/AnnotationMacros.hpp" // for annotations +#include "axom/core/Types.hpp" +#include "axom/core/execution/for_all.hpp" +#include "axom/core/memory_management.hpp" +#include "axom/core/AnnotationMacros.hpp" +#include "axom/core/numerics/floating_point_limits.hpp" #include "axom/primal/geometry/BoundingBox.hpp" #include "axom/primal/geometry/Vector.hpp" @@ -23,10 +23,10 @@ #include "axom/spin/internal/linear_bvh/bvh_vtkio.hpp" // C/C++ includes -#include // for std::ofstream -#include // for std::ostringstream -#include // for std::string -#include // for std::vector +#include +#include +#include +#include namespace axom { @@ -78,8 +78,9 @@ class LinearBVHTraverser double sqDistL = primal::squared_distance(p, l.getCentroid()); // If the right bbox is not valid, return max. Otherwise, the invalid right // bbox might actually win when we should ignore it. - double sqDistR = r.isValid() ? primal::squared_distance(p, r.getCentroid()) - : std::numeric_limits::max(); + double sqDistR = r.isValid() + ? primal::squared_distance(p, r.getCentroid()) + : axom::numerics::floating_point_limits::max(); return sqDistL > sqDistR; }; @@ -192,7 +193,7 @@ class LinearBVH private: void allocate(std::int32_t size, int allocID) { - AXOM_PERF_MARK_FUNCTION("LinearBVH::allocate"); + AXOM_ANNOTATE_SCOPE("LinearBVH::allocate"); IndexType numInnerNodes = (size - 1) * 2; // Need to allocate this uninitialized, since primal::BoundingBox is // considered non-trivially-copyable on GCC 4.9.3 @@ -220,7 +221,7 @@ void LinearBVH::buildImpl(const BoxIndexable boxes, FloatType scaleFactor, int allocatorID) { - AXOM_PERF_MARK_FUNCTION("LinearBVH::buildImpl"); + AXOM_ANNOTATE_SCOPE("LinearBVH::buildImpl"); // STEP 1: Build a RadixTree consisting of the bounding boxes, sorted // by their corresponding morton code. @@ -252,45 +253,46 @@ void LinearBVH::buildImpl(const BoxIndexable boxes, const auto bvh_inner_nodes = m_inner_nodes.view(); const auto bvh_inner_node_children = m_inner_node_children.view(); - AXOM_PERF_MARK_SECTION("emit_bvh_parents", - for_all( - inner_size, - AXOM_LAMBDA(std::int32_t node) { - BoundingBoxType l_aabb, r_aabb; - - std::int32_t lchild = lchildren_ptr[node]; - if(lchild >= inner_size) - { - l_aabb = leaf_aabb_ptr[lchild - inner_size]; - lchild = -(lchild - inner_size + 1); - } - else - { - l_aabb = inner_aabb_ptr[lchild]; - // do the offset now - lchild *= 2; - } - - std::int32_t rchild = rchildren_ptr[node]; - if(rchild >= inner_size) - { - r_aabb = leaf_aabb_ptr[rchild - inner_size]; - rchild = -(rchild - inner_size + 1); - } - else - { - r_aabb = inner_aabb_ptr[rchild]; - // do the offset now - rchild *= 2; - } - - const std::int32_t out_offset = node * 2; - bvh_inner_nodes[out_offset + 0] = l_aabb; - bvh_inner_nodes[out_offset + 1] = r_aabb; - - bvh_inner_node_children[out_offset + 0] = lchild; - bvh_inner_node_children[out_offset + 1] = rchild; - });); + AXOM_ANNOTATE_BEGIN("emit_bvh_parents"); + for_all( + inner_size, + AXOM_LAMBDA(std::int32_t node) { + BoundingBoxType l_aabb, r_aabb; + + std::int32_t lchild = lchildren_ptr[node]; + if(lchild >= inner_size) + { + l_aabb = leaf_aabb_ptr[lchild - inner_size]; + lchild = -(lchild - inner_size + 1); + } + else + { + l_aabb = inner_aabb_ptr[lchild]; + // do the offset now + lchild *= 2; + } + + std::int32_t rchild = rchildren_ptr[node]; + if(rchild >= inner_size) + { + r_aabb = leaf_aabb_ptr[rchild - inner_size]; + rchild = -(rchild - inner_size + 1); + } + else + { + r_aabb = inner_aabb_ptr[rchild]; + // do the offset now + rchild *= 2; + } + + const std::int32_t out_offset = node * 2; + bvh_inner_nodes[out_offset + 0] = l_aabb; + bvh_inner_nodes[out_offset + 1] = r_aabb; + + bvh_inner_node_children[out_offset + 0] = lchild; + bvh_inner_node_children[out_offset + 1] = rchild; + }); + AXOM_ANNOTATE_END("emit_bvh_parents"); m_leaf_nodes = std::move(radix_tree.m_leafs); @@ -308,7 +310,7 @@ axom::Array LinearBVH::findCandidatesImp int allocatorID) const { - AXOM_PERF_MARK_FUNCTION("LinearBVH::findCandidatesImpl"); + AXOM_ANNOTATE_SCOPE("LinearBVH::findCandidatesImpl"); SLIC_ERROR_IF(offsets.size() != numObjs, "offsets length not equal to numObjs"); @@ -330,95 +332,63 @@ axom::Array LinearBVH::findCandidatesImp using reduce_pol = typename axom::execution_space::reduce_policy; RAJA::ReduceSum total_count_reduce(0); - AXOM_PERF_MARK_SECTION( - "PASS[1]:count_traversal", - for_all( - numObjs, - AXOM_LAMBDA(IndexType i) { - std::int32_t count = 0; - PrimitiveType primitive {objs[i]}; - - auto leafAction = [&count](std::int32_t AXOM_UNUSED_PARAM(current_node), - const std::int32_t* AXOM_UNUSED_PARAM( - leaf_nodes)) { count++; }; - - lbvh::bvh_traverse(inner_nodes, - inner_node_children, - leaf_nodes, - primitive, - predicate, - leafAction, - noTraversePref); - - counts[i] = count; - total_count_reduce += count; - });); - - // STEP 2: exclusive scan to get offsets in candidate array for each query + AXOM_ANNOTATE_BEGIN("PASS[1]:count_traversal"); + for_all( + numObjs, + AXOM_LAMBDA(IndexType i) { + std::int32_t count = 0; + PrimitiveType primitive {objs[i]}; + + auto leafAction = + [&count](std::int32_t AXOM_UNUSED_PARAM(current_node), + const std::int32_t* AXOM_UNUSED_PARAM(leaf_nodes)) { count++; }; + + lbvh::bvh_traverse(inner_nodes, + inner_node_children, + leaf_nodes, + primitive, + predicate, + leafAction, + noTraversePref); + + counts[i] = count; + total_count_reduce += count; + }); + AXOM_ANNOTATE_END("PASS[1]:count_traversal"); + + // STEP 2: exclusive scan to get offsets in candidate array for each query + AXOM_ANNOTATE_BEGIN("exclusive_scan"); // Intel oneAPI compiler segfaults with OpenMP RAJA scan #ifdef __INTEL_LLVM_COMPILER using exec_policy = typename axom::execution_space::loop_policy; #else using exec_policy = typename axom::execution_space::loop_policy; #endif - AXOM_PERF_MARK_SECTION( - "exclusive_scan", - RAJA::exclusive_scan(RAJA::make_span(counts.data(), numObjs), - RAJA::make_span(offsets.data(), numObjs), - RAJA::operators::plus {});); - + RAJA::exclusive_scan(RAJA::make_span(counts.data(), numObjs), + RAJA::make_span(offsets.data(), numObjs), + RAJA::operators::plus {}); + AXOM_ANNOTATE_END("exclusive_scan"); IndexType total_candidates = total_count_reduce.get(); // STEP 3: allocate memory for all candidates - axom::Array candidates; - { - AXOM_PERF_MARK_FUNCTION("allocate_candidates"); - candidates = - axom::Array(total_candidates, total_candidates, allocatorID); - } + AXOM_ANNOTATE_BEGIN("allocate_candidates"); + auto candidates = + axom::Array(total_candidates, total_candidates, allocatorID); + AXOM_ANNOTATE_END("allocate_candidates"); const auto candidates_v = candidates.view(); // STEP 4: fill in candidates for each point - AXOM_PERF_MARK_SECTION("PASS[2]:fill_traversal", - for_all( - numObjs, - AXOM_LAMBDA(IndexType i) { - std::int32_t offset = offsets[i]; - - PrimitiveType obj {objs[i]}; - auto leafAction = [&offset, candidates_v]( - std::int32_t current_node, - const std::int32_t* leafs) { - candidates_v[offset] = leafs[current_node]; - offset++; - }; - - lbvh::bvh_traverse(inner_nodes, - inner_node_children, - leaf_nodes, - obj, - predicate, - leafAction, - noTraversePref); - });); - return candidates; -#else // CPU-only and no RAJA: do single traversal - AXOM_UNUSED_VAR(allocatorID); + AXOM_ANNOTATE_BEGIN("PASS[2]:fill_traversal"); + for_all( + numObjs, + AXOM_LAMBDA(IndexType i) { + std::int32_t offset = offsets[i]; - axom::Array search_candidates; - int current_offset = 0; - - // STEP 1: do single-pass traversal with std::vector for candidates - AXOM_PERF_MARK_SECTION( - "PASS[1]:fill_traversal", for_all(numObjs, [&](IndexType i) { - int matching_leaves = 0; PrimitiveType obj {objs[i]}; - offsets[i] = current_offset; - - auto leafAction = [&](std::int32_t current_node, const std::int32_t* leafs) { - search_candidates.emplace_back(leafs[current_node]); - matching_leaves++; - current_offset++; + auto leafAction = [&offset, candidates_v](std::int32_t current_node, + const std::int32_t* leafs) { + candidates_v[offset] = leafs[current_node]; + offset++; }; lbvh::bvh_traverse(inner_nodes, @@ -428,8 +398,39 @@ axom::Array LinearBVH::findCandidatesImp predicate, leafAction, noTraversePref); - counts[i] = matching_leaves; - });); + }); + AXOM_ANNOTATE_END("PASS[2]:fill_traversal"); + + return candidates; +#else // CPU-only and no RAJA: do single traversal + AXOM_UNUSED_VAR(allocatorID); + + axom::Array search_candidates; + int current_offset = 0; + + // STEP 1: do single-pass traversal with std::vector for candidates + AXOM_ANNOTATE_BEGIN("PASS[1]:fill_traversal"); + for_all(numObjs, [&](IndexType i) { + int matching_leaves = 0; + PrimitiveType obj {objs[i]}; + offsets[i] = current_offset; + + auto leafAction = [&](std::int32_t current_node, const std::int32_t* leafs) { + search_candidates.emplace_back(leafs[current_node]); + matching_leaves++; + current_offset++; + }; + + lbvh::bvh_traverse(inner_nodes, + inner_node_children, + leaf_nodes, + obj, + predicate, + leafAction, + noTraversePref); + counts[i] = matching_leaves; + }); + AXOM_ANNOTATE_END("PASS[1]:fill_traversal"); SLIC_ASSERT(current_offset == static_cast(search_candidates.size())); @@ -501,4 +502,4 @@ void LinearBVH::writeVtkFileImpl( } // namespace policy } // namespace spin } // namespace axom -#endif /* AXOM_SPIN_POLICY_LINEARBVH_HPP_ */ +#endif // AXOM_SPIN_POLICY_LINEARBVH_HPP_ diff --git a/src/axom/spin/tests/spin_bvh.cpp b/src/axom/spin/tests/spin_bvh.cpp index d62de37cf7..bf0a96c86e 100644 --- a/src/axom/spin/tests/spin_bvh.cpp +++ b/src/axom/spin/tests/spin_bvh.cpp @@ -83,33 +83,25 @@ void dump_ray(const std::string& file, * a corresponding centroid. * * \param [in] mesh pointer to the mesh object. - * \param [out] aabbs array of bounding boxes + * \param [out] aabbs ArrayView of bounding boxes * * \note The intent of this method is to generate synthetic input test data * to test the functionality of the BVH. * - * \warning This method allocates aabbs internally. The caller is responsible - * for properly deallocating aabbs. - * - * \pre aabbs == nullptr - * \post aabbs != nullptr */ template void generate_aabbs(const mint::Mesh* mesh, - primal::BoundingBox*& aabbs) + axom::ArrayView>& aabbs) { - // sanity checks - EXPECT_TRUE(aabbs == nullptr); + // sanity check EXPECT_EQ(NDIMS, mesh->getDimension()); - using BoxType = typename primal::BoundingBox; - // calculate some constants constexpr int nodes_per_dim = 1 << NDIMS; - // allocate output arrays + // Check array is expected size const IndexType ncells = mesh->getNumberOfCells(); - aabbs = axom::allocate(ncells); + EXPECT_TRUE(aabbs.size() == ncells); using exec_policy = axom::SEQ_EXEC; mint::for_all_cells( @@ -129,9 +121,6 @@ void generate_aabbs(const mint::Mesh* mesh, aabbs[cellIdx].clear(); aabbs[cellIdx].addBox(range); }); - - // post-condition sanity checks - EXPECT_TRUE(aabbs != nullptr); } //------------------------------------------------------------------------------ @@ -142,27 +131,21 @@ void generate_aabbs(const mint::Mesh* mesh, * a corresponding centroid. * * \param [in] mesh pointer to the mesh object. - * \param [out] aabbs array of bounding boxes + * \param [out] aabbs ArrayView of bounding boxes * \param [out] c buffer to store the cell centroids * * \note The intent of this method is to generate synthetic input test data * to test the functionality of the BVH. * - * \warning This method allocates aabbs internally. The caller is responsible - * for properly deallocating aabbs. - * - * \pre aabbs == nullptr * \pre c != nullptr - * - * \post aabbs != nullptr */ template -void generate_aabbs_and_centroids(const mint::Mesh* mesh, - primal::BoundingBox*& aabbs, - primal::Point* c) +void generate_aabbs_and_centroids( + const mint::Mesh* mesh, + axom::ArrayView>& aabbs, + primal::Point* c) { - // sanity checks - EXPECT_TRUE(aabbs == nullptr); + // sanity check EXPECT_TRUE(c != nullptr); // calculate some constants @@ -173,9 +156,7 @@ void generate_aabbs_and_centroids(const mint::Mesh* mesh, EXPECT_EQ(NDIMS, mesh->getDimension()); - // allocate output arrays - const IndexType ncells = mesh->getNumberOfCells(); - aabbs = axom::allocate(ncells); + // initialize output arrays using exec_policy = axom::SEQ_EXEC; mint::for_all_cells( @@ -210,9 +191,6 @@ void generate_aabbs_and_centroids(const mint::Mesh* mesh, aabbs[cellIdx] = range; }); - - // post-condition sanity checks - EXPECT_TRUE(aabbs != nullptr); } //------------------------------------------------------------------------------ @@ -230,17 +208,21 @@ void check_build_bvh2d() using BoxType = typename primal::BoundingBox; using PointType = typename primal::Point; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); - BoxType* boxes = axom::allocate(2); + axom::Array boxes(2, 2, hostAllocatorID); boxes[0] = BoxType {PointType(0.), PointType(1.)}; boxes[1] = BoxType {PointType(1.), PointType(2.)}; spin::BVH bvh; + // Copy boxes to device + axom::Array boxesDevice(boxes, deviceAllocatorID); + bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(boxes, NUM_BOXES); + bvh.initialize(boxesDevice.view(), NUM_BOXES); int allocatorID = bvh.getAllocatorID(); EXPECT_EQ(allocatorID, axom::execution_space::allocatorID()); @@ -252,9 +234,6 @@ void check_build_bvh2d() EXPECT_NEAR(bounds.getMin()[idim], 0.0, EPS); EXPECT_NEAR(bounds.getMax()[idim], 2.0, EPS); } - - axom::deallocate(boxes); - axom::setDefaultAllocator(current_allocator); } //------------------------------------------------------------------------------ @@ -272,17 +251,21 @@ void check_build_bvh3d() using BoxType = typename primal::BoundingBox; using PointType = typename primal::Point; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); - BoxType* boxes = axom::allocate(2); + axom::Array boxes(2, 2, hostAllocatorID); boxes[0] = BoxType {PointType(0.), PointType(1.)}; boxes[1] = BoxType {PointType(1.), PointType(2.)}; spin::BVH bvh; + // Copy boxes to device + axom::Array boxesDevice(boxes, deviceAllocatorID); + bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(boxes, NUM_BOXES); + bvh.initialize(boxesDevice.view(), NUM_BOXES); int allocatorID = bvh.getAllocatorID(); EXPECT_EQ(allocatorID, axom::execution_space::allocatorID()); @@ -294,9 +277,6 @@ void check_build_bvh3d() EXPECT_NEAR(bounds.getMin()[idim], 0.0, EPS); EXPECT_NEAR(bounds.getMax()[idim], 2.0, EPS); } - - axom::deallocate(boxes); - axom::setDefaultAllocator(current_allocator); } //------------------------------------------------------------------------------ @@ -309,14 +289,15 @@ void check_find_bounding_boxes3d() using BoxType = typename primal::BoundingBox; using PointType = typename primal::Point; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); // setup query bounding boxes: both boxes have lower left min at // (-1.0,-1.0,-1.0) but different upper right max. // The first bounding box is setup such that it intersects // 18 bounding boxes of the mesh. - BoxType* query_boxes = axom::allocate(N); + axom::Array query_boxes(N, N, hostAllocatorID); query_boxes[0].clear(); query_boxes[1].clear(); @@ -331,14 +312,19 @@ void check_find_bounding_boxes3d() double hi[NDIMS] = {3.0, 3.0, 3.0}; mint::UniformMesh mesh(lo, hi, 4, 4, 4); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs(&mesh, aabbs); - EXPECT_TRUE(aabbs != nullptr); + axom::Array aabbs(ncells, ncells, hostAllocatorID); + auto aabbs_view = aabbs.view(); + generate_aabbs(&mesh, aabbs_view); + EXPECT_TRUE(aabbs.data() != nullptr); + + // Move aabbs to device + axom::Array aabbs_device(aabbs, deviceAllocatorID); + auto aabbs_device_view = aabbs_device.view(); // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_device_view, ncells); // check BVH bounding box BoxType bounds = bvh.getBounds(); @@ -350,14 +336,31 @@ void check_find_bounding_boxes3d() } // traverse the BVH to find the candidates for all the bounding boxes - axom::Array offsets(N); - axom::Array counts(N); - axom::Array candidates; - bvh.findBoundingBoxes(offsets, counts, candidates, N, query_boxes); + axom::Array offsets_device(N, N, deviceAllocatorID); + axom::Array counts_device(N, N, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + axom::Array query_boxes_device(query_boxes, deviceAllocatorID); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + auto query_boxes_view = query_boxes_device.view(); + + bvh.findBoundingBoxes(offsets_view, + counts_view, + candidates_device, + N, + query_boxes_view); + + // Copy back to host + axom::Array counts(counts_device, hostAllocatorID); + axom::Array offsets(offsets_device, hostAllocatorID); + axom::Array candidates(candidates_device, hostAllocatorID); // flag cells that are found by the bounding box ID int* iblank = mesh.createField("iblank", mint::CELL_CENTERED); - mint::for_all_cells( + using mint_exec_policy = axom::SEQ_EXEC; + mint::for_all_cells( &mesh, AXOM_LAMBDA(IndexType cellIdx) { iblank[cellIdx] = -1; }); @@ -407,13 +410,6 @@ void check_find_bounding_boxes3d() EXPECT_EQ(iblank[i], DOES_NOT_INTERSECT_BB); } } // END for all mesh cells - - // deallocate - axom::deallocate(aabbs); - - axom::deallocate(query_boxes); - - axom::setDefaultAllocator(current_allocator); } //------------------------------------------------------------------------------ @@ -427,13 +423,14 @@ void check_find_bounding_boxes2d() using BoxType = typename primal::BoundingBox; using PointType = typename primal::Point; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); // setup query bounding boxes: both boxes are source at (-1.0,-1.0) but have // different max (upper right). The first box is setup to intersect six // bounding boxes of the mesh. - BoxType* query_boxes = axom::allocate(N); + axom::Array query_boxes(N, N, hostAllocatorID); query_boxes[0].clear(); query_boxes[1].clear(); @@ -448,14 +445,20 @@ void check_find_bounding_boxes2d() double hi[NDIMS] = {3.0, 3.0}; mint::UniformMesh mesh(lo, hi, 4, 4); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs(&mesh, aabbs); - EXPECT_TRUE(aabbs != nullptr); + axom::Array aabbs(ncells, ncells, hostAllocatorID); + auto aabbs_view = aabbs.view(); + generate_aabbs(&mesh, aabbs_view); + EXPECT_TRUE(aabbs.data() != nullptr); + + // Move aabbs to device + axom::Array aabbs_device = + axom::Array(aabbs, deviceAllocatorID); + auto aabbs_device_view = aabbs_device.view(); // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_device_view, ncells); // check BVH bounding box BoxType bounds = bvh.getBounds(); @@ -467,14 +470,31 @@ void check_find_bounding_boxes2d() } // traverse the BVH to find the candidates for all the bounding boxes - axom::Array offsets(N); - axom::Array counts(N); - axom::Array candidates; - bvh.findBoundingBoxes(offsets, counts, candidates, N, query_boxes); + axom::Array offsets_device(N, N, deviceAllocatorID); + axom::Array counts_device(N, N, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + axom::Array query_boxes_device(query_boxes, deviceAllocatorID); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + auto query_boxes_view = query_boxes_device.view(); + + bvh.findBoundingBoxes(offsets_view, + counts_view, + candidates_device, + N, + query_boxes_view); + + // Copy back to host + axom::Array counts(counts_device, hostAllocatorID); + axom::Array offsets(offsets_device, hostAllocatorID); + axom::Array candidates(candidates_device, hostAllocatorID); // flag cells that are found by the bounding box ID int* iblank = mesh.createField("iblank", mint::CELL_CENTERED); - mint::for_all_cells( + using mint_exec_policy = axom::SEQ_EXEC; + mint::for_all_cells( &mesh, AXOM_LAMBDA(IndexType cellIdx) { iblank[cellIdx] = -1; }); @@ -508,16 +528,9 @@ void check_find_bounding_boxes2d() } } // END for all mesh cells - - // deallocate - axom::deallocate(aabbs); - - axom::deallocate(query_boxes); - - axom::setDefaultAllocator(current_allocator); } -//------------------------------------------------------------------------------ +// //------------------------------------------------------------------------------ template void check_find_rays3d() { @@ -529,13 +542,14 @@ void check_find_rays3d() using PointType = typename primal::Point; using VectorType = typename primal::Vector; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); // setup query rays: both rays are source at (-1.0,-1.0) but point in // opposite directions. The first ray is setup such that it intersects // three bounding boxes of the mesh. - RayType* query_rays = axom::allocate(N); + axom::Array query_rays(N, N, hostAllocatorID); query_rays[0] = RayType {PointType {-1.0, -1.0, -1.0}, VectorType {1.0, 1.0, 1.0}}; query_rays[1] = @@ -552,14 +566,20 @@ void check_find_rays3d() double hi[NDIMS] = {3.0, 3.0, 3.0}; mint::UniformMesh mesh(lo, hi, 4, 4, 4); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs(&mesh, aabbs); - EXPECT_TRUE(aabbs != nullptr); + axom::Array aabbs(ncells, ncells, hostAllocatorID); + auto aabbs_view = aabbs.view(); + generate_aabbs(&mesh, aabbs_view); + EXPECT_TRUE(aabbs.data() != nullptr); + + // Move aabbs to device + axom::Array aabbs_device = + axom::Array(aabbs, deviceAllocatorID); + auto aabbs_device_view = aabbs_device.view(); // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_device_view, ncells); // check BVH bounding box BoxType bounds = bvh.getBounds(); @@ -570,15 +590,28 @@ void check_find_rays3d() EXPECT_NEAR(bounds.getMax()[idim], hi[idim], EPS); } - // traverse the BVH to find the candidates for all the centroids - axom::Array offsets(N); - axom::Array counts(N); - axom::Array candidates; - bvh.findRays(offsets, counts, candidates, N, query_rays); + // traverse the BVH to find the candidates for all the bounding boxes + axom::Array offsets_device(N, N, deviceAllocatorID); + axom::Array counts_device(N, N, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + axom::Array query_rays_device(query_rays, deviceAllocatorID); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + auto query_rays_view = query_rays_device.view(); + + bvh.findRays(offsets_view, counts_view, candidates_device, N, query_rays_view); + + // Copy back to host + axom::Array counts(counts_device, hostAllocatorID); + axom::Array offsets(offsets_device, hostAllocatorID); + axom::Array candidates(candidates_device, hostAllocatorID); // flag cells that are found by the ray ID int* iblank = mesh.createField("iblank", mint::CELL_CENTERED); - mint::for_all_cells( + using mint_exec_policy = axom::SEQ_EXEC; + mint::for_all_cells( &mesh, AXOM_LAMBDA(IndexType cellIdx) { iblank[cellIdx] = -1; }); @@ -629,16 +662,9 @@ void check_find_rays3d() EXPECT_EQ(iblank[i], DOES_NOT_INTERSECT_RAY); } } // END for all mesh cells - - // deallocate - axom::deallocate(aabbs); - - axom::deallocate(query_rays); - - axom::setDefaultAllocator(current_allocator); } -//------------------------------------------------------------------------------ +// //------------------------------------------------------------------------------ template void check_find_rays2d() @@ -651,13 +677,14 @@ void check_find_rays2d() using PointType = typename primal::Point; using VectorType = typename primal::Vector; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); // setup query rays: both rays are source at (-1.0,-1.0) but point in // opposite directions. The first ray is setup such that it intersects // seven bounding boxes of the mesh. - RayType* query_rays = axom::allocate(N); + axom::Array query_rays(N, N, hostAllocatorID); query_rays[0] = RayType {PointType {-1.0, -1.0}, VectorType {1.0, 1.0}}; query_rays[1] = RayType {PointType {-1.0, -1.0}, VectorType {-1.0, -1.0}}; @@ -682,14 +709,20 @@ void check_find_rays2d() double hi[NDIMS] = {3.0, 3.0}; mint::UniformMesh mesh(lo, hi, 4, 4); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs(&mesh, aabbs); - EXPECT_TRUE(aabbs != nullptr); + axom::Array aabbs(ncells, ncells, hostAllocatorID); + auto aabbs_view = aabbs.view(); + generate_aabbs(&mesh, aabbs_view); + EXPECT_TRUE(aabbs.data() != nullptr); + + // Move aabbs to device + axom::Array aabbs_device = + axom::Array(aabbs, deviceAllocatorID); + auto aabbs_device_view = aabbs_device.view(); // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_device_view, ncells); // check BVH bounding box BoxType bounds = bvh.getBounds(); @@ -700,15 +733,28 @@ void check_find_rays2d() EXPECT_NEAR(bounds.getMax()[idim], hi[idim], EPS); } - // traverse the BVH to find the candidates for all the centroids - axom::Array offsets(N); - axom::Array counts(N); - axom::Array candidates; - bvh.findRays(offsets, counts, candidates, N, query_rays); + // traverse the BVH to find the candidates for all the bounding boxes + axom::Array offsets_device(N, N, deviceAllocatorID); + axom::Array counts_device(N, N, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + axom::Array query_rays_device(query_rays, deviceAllocatorID); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + auto query_rays_view = query_rays_device.view(); + + bvh.findRays(offsets_view, counts_view, candidates_device, N, query_rays_view); + + // Copy back to host + axom::Array counts(counts_device, hostAllocatorID); + axom::Array offsets(offsets_device, hostAllocatorID); + axom::Array candidates(candidates_device, hostAllocatorID); // flag cells that are found by the ray ID int* iblank = mesh.createField("iblank", mint::CELL_CENTERED); - mint::for_all_cells( + using mint_exec_policy = axom::SEQ_EXEC; + mint::for_all_cells( &mesh, AXOM_LAMBDA(IndexType cellIdx) { iblank[cellIdx] = -1; }); @@ -746,13 +792,6 @@ void check_find_rays2d() } } // END for all mesh cells - - // deallocate - axom::deallocate(aabbs); - - axom::deallocate(query_rays); - - axom::setDefaultAllocator(current_allocator); } //------------------------------------------------------------------------------ @@ -777,8 +816,9 @@ void check_find_points3d() constexpr int NDIMS = 3; constexpr IndexType N = 4; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); using BoxType = typename primal::BoundingBox; using PointType = primal::Point; @@ -794,13 +834,20 @@ void check_find_points3d() PointType* centroids = reinterpret_cast(centroids_raw); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs_and_centroids(&mesh, aabbs, centroids); + axom::Array aabbs(ncells, ncells, hostAllocatorID); + auto aabbs_view = aabbs.view(); + generate_aabbs_and_centroids(&mesh, aabbs_view, centroids); + EXPECT_TRUE(aabbs.data() != nullptr); + + // Move aabbs to device + axom::Array aabbs_device = + axom::Array(aabbs, deviceAllocatorID); + auto aabbs_device_view = aabbs_device.view(); // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_device_view, ncells); BoxType bounds = bvh.getBounds(); @@ -810,11 +857,31 @@ void check_find_points3d() EXPECT_NEAR(bounds.getMax()[idim], hi[idim], EPS); } - // traverse the BVH to find the candidates for all the centroids - axom::Array offsets(ncells); - axom::Array counts(ncells); - axom::Array candidates; - bvh.findPoints(offsets, counts, candidates, ncells, centroids); + // traverse the BVH to find the candidates for all the bounding boxes + axom::Array offsets_device(ncells, ncells, deviceAllocatorID); + axom::Array counts_device(ncells, ncells, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + PointType* centroids_device = + axom::allocate(ncells, deviceAllocatorID); + axom::copy(centroids_device, centroids, ncells * sizeof(PointType)); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + ncells, + centroids_device); + + // Copy back to host + axom::Array counts = + axom::Array(counts_device, hostAllocatorID); + axom::Array offsets = + axom::Array(offsets_device, hostAllocatorID); + axom::Array candidates = + axom::Array(candidates_device, hostAllocatorID); spin::UniformGrid ug(lo, hi, res); @@ -835,16 +902,24 @@ void check_find_points3d() centroids[i][2] += OFFSET; } - bvh.findPoints(offsets, counts, candidates, ncells, centroids); + // Reallocate modified centroids on device + axom::copy(centroids_device, centroids, ncells * sizeof(PointType)); + + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + ncells, + centroids_device); + + // Copy back to host + counts = axom::Array(counts_device, hostAllocatorID); for(IndexType i = 0; i < ncells; ++i) { EXPECT_EQ(counts[i], 0); } - axom::deallocate(aabbs); - - axom::setDefaultAllocator(current_allocator); + axom::deallocate(centroids_device); } //------------------------------------------------------------------------------ @@ -869,8 +944,9 @@ void check_find_points2d() constexpr int NDIMS = 2; constexpr IndexType N = 4; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); using BoxType = typename primal::BoundingBox; using PointType = primal::Point; @@ -886,13 +962,20 @@ void check_find_points2d() PointType* centroids = reinterpret_cast(centroids_raw); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs_and_centroids(&mesh, aabbs, centroids); + axom::Array aabbs(ncells, ncells, hostAllocatorID); + auto aabbs_view = aabbs.view(); + generate_aabbs_and_centroids(&mesh, aabbs_view, centroids); + EXPECT_TRUE(aabbs.data() != nullptr); + + // Move aabbs to device + axom::Array aabbs_device = + axom::Array(aabbs, deviceAllocatorID); + auto aabbs_device_view = aabbs_device.view(); // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_device_view, ncells); BoxType bounds = bvh.getBounds(); @@ -902,11 +985,31 @@ void check_find_points2d() EXPECT_NEAR(bounds.getMax()[idim], hi[idim], EPS); } - // traverse the BVH to find the candidates for all the centroids - axom::Array offsets(ncells); - axom::Array counts(ncells); - axom::Array candidates; - bvh.findPoints(offsets, counts, candidates, ncells, centroids); + // traverse the BVH to find the candidates for all the bounding boxes + axom::Array offsets_device(ncells, ncells, deviceAllocatorID); + axom::Array counts_device(ncells, ncells, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + PointType* centroids_device = + axom::allocate(ncells, deviceAllocatorID); + axom::copy(centroids_device, centroids, ncells * sizeof(PointType)); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + ncells, + centroids_device); + + // Copy back to host + axom::Array counts = + axom::Array(counts_device, hostAllocatorID); + axom::Array offsets = + axom::Array(offsets_device, hostAllocatorID); + axom::Array candidates = + axom::Array(candidates_device, hostAllocatorID); spin::UniformGrid ug(lo, hi, res); @@ -926,16 +1029,24 @@ void check_find_points2d() centroids[i][1] += OFFSET; } - bvh.findPoints(offsets, counts, candidates, ncells, centroids); + // Reallocate modified centroids on device + axom::copy(centroids_device, centroids, ncells * sizeof(PointType)); + + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + ncells, + centroids_device); + + // Copy back to host + counts = axom::Array(counts_device, hostAllocatorID); for(IndexType i = 0; i < ncells; ++i) { EXPECT_EQ(counts[i], 0); } - axom::deallocate(aabbs); - - axom::setDefaultAllocator(current_allocator); + axom::deallocate(centroids_device); } //------------------------------------------------------------------------------ @@ -955,17 +1066,22 @@ void check_single_box2d() using BoxType = typename primal::BoundingBox; using PointType = primal::Point; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); // single bounding box in [0,1] x [0,1] - BoxType* boxes = axom::allocate(2); + axom::Array boxes(2, 2, hostAllocatorID); boxes[0] = BoxType {PointType(0.), PointType(1.)}; - // construct a BVH with a single box + // Move box to device + axom::Array boxes_device = + axom::Array(boxes, deviceAllocatorID); + + // construct the BVH with a single box spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(boxes, NUM_BOXES); + bvh.initialize(boxes_device.view(), NUM_BOXES); // check the bounds -- should match the bounds of the input bounding box BoxType bounds = bvh.getBounds(); @@ -980,13 +1096,31 @@ void check_single_box2d() // Should return one and only one candidate that corresponds to the // single bounding box. PointType centroid {0.5, 0.5}; - PointType* centroid_device = axom::allocate(1); + PointType* centroid_device = axom::allocate(1, deviceAllocatorID); axom::copy(centroid_device, ¢roid, sizeof(PointType)); - axom::Array offsets(NUM_BOXES); - axom::Array counts(NUM_BOXES); - axom::Array candidates; - bvh.findPoints(offsets, counts, candidates, NUM_BOXES, centroid_device); + axom::Array offsets_device(NUM_BOXES, NUM_BOXES, deviceAllocatorID); + axom::Array counts_device(NUM_BOXES, NUM_BOXES, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + NUM_BOXES, + centroid_device); + + // Copy back to host + axom::Array counts = + axom::Array(counts_device, hostAllocatorID); + axom::Array offsets = + axom::Array(offsets_device, hostAllocatorID); + axom::Array candidates = + axom::Array(candidates_device, hostAllocatorID); + EXPECT_EQ(counts[0], 1); EXPECT_EQ(0, candidates[offsets[0]]); @@ -994,14 +1128,18 @@ void check_single_box2d() centroid[0] += 10.0; centroid[1] += 10.0; axom::copy(centroid_device, ¢roid, sizeof(PointType)); - bvh.findPoints(offsets, counts, candidates, NUM_BOXES, centroid_device); + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + NUM_BOXES, + centroid_device); + + // Copy back to host + counts = axom::Array(counts_device, hostAllocatorID); EXPECT_EQ(counts[0], 0); axom::deallocate(centroid_device); - axom::deallocate(boxes); - - axom::setDefaultAllocator(current_allocator); } //------------------------------------------------------------------------------ @@ -1021,17 +1159,22 @@ void check_single_box3d() using BoxType = typename primal::BoundingBox; using PointType = primal::Point; - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); // single bounding box in [0,1] x [0,1] x [0,1] - BoxType* boxes = axom::allocate(2); + axom::Array boxes(2, 2, hostAllocatorID); boxes[0] = BoxType {PointType(0.), PointType(1.)}; - // construct a BVH with a single box + // Move box to device + axom::Array boxes_device = + axom::Array(boxes, deviceAllocatorID); + + // construct the BVH with a single box spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(boxes, NUM_BOXES); + bvh.initialize(boxes_device.view(), NUM_BOXES); // check the bounds -- should match the bounds of the input bounding box BoxType bounds = bvh.getBounds(); @@ -1046,13 +1189,30 @@ void check_single_box3d() // Should return one and only one candidate that corresponds to the // single bounding box. PointType centroid {0.5, 0.5, 0.5}; - PointType* centroid_device = axom::allocate(1); + PointType* centroid_device = axom::allocate(1, deviceAllocatorID); axom::copy(centroid_device, ¢roid, sizeof(PointType)); - axom::Array offsets(NUM_BOXES); - axom::Array counts(NUM_BOXES); - axom::Array candidates; - bvh.findPoints(offsets, counts, candidates, NUM_BOXES, centroid_device); + axom::Array offsets_device(NUM_BOXES, NUM_BOXES, deviceAllocatorID); + axom::Array counts_device(NUM_BOXES, NUM_BOXES, deviceAllocatorID); + axom::Array candidates_device(0, 0, deviceAllocatorID); + + // Create views of device arrays + auto offsets_view = offsets_device.view(); + auto counts_view = counts_device.view(); + + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + NUM_BOXES, + centroid_device); + + // Copy back to host + axom::Array counts = + axom::Array(counts_device, hostAllocatorID); + axom::Array offsets = + axom::Array(offsets_device, hostAllocatorID); + axom::Array candidates = + axom::Array(candidates_device, hostAllocatorID); EXPECT_EQ(counts[0], 1); EXPECT_EQ(0, candidates[offsets[0]]); @@ -1061,14 +1221,18 @@ void check_single_box3d() centroid[0] += 10.0; centroid[1] += 10.0; axom::copy(centroid_device, ¢roid, sizeof(PointType)); - bvh.findPoints(offsets, counts, candidates, NUM_BOXES, centroid_device); + bvh.findPoints(offsets_view, + counts_view, + candidates_device, + NUM_BOXES, + centroid_device); + + // Copy back to host + counts = axom::Array(counts_device, hostAllocatorID); EXPECT_EQ(counts[0], 0); axom::deallocate(centroid_device); - axom::deallocate(boxes); - - axom::setDefaultAllocator(current_allocator); } //------------------------------------------------------------------------------ @@ -1170,8 +1334,9 @@ void check_find_points_zip3d() PointType* centroids = reinterpret_cast(centroids_raw); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs_and_centroids(&mesh, aabbs, centroids); + axom::Array aabbs(ncells, ncells, current_allocator); + auto aabbs_view = aabbs.view(); + generate_aabbs_and_centroids(&mesh, aabbs_view, centroids); axom::Array xs(ncells, ncells); axom::Array ys(ncells, ncells); @@ -1189,7 +1354,7 @@ void check_find_points_zip3d() // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_view, ncells); BoxType bounds = bvh.getBounds(); @@ -1215,8 +1380,6 @@ void check_find_points_zip3d() EXPECT_EQ(donorCellIdx, candidates[offsets[i]]); } - axom::deallocate(aabbs); - axom::setDefaultAllocator(current_allocator); } @@ -1259,8 +1422,9 @@ void check_find_points_zip2d() PointType* centroids = reinterpret_cast(centroids_raw); const IndexType ncells = mesh.getNumberOfCells(); - BoxType* aabbs = nullptr; - generate_aabbs_and_centroids(&mesh, aabbs, centroids); + axom::Array aabbs(ncells, ncells, current_allocator); + auto aabbs_view = aabbs.view(); + generate_aabbs_and_centroids(&mesh, aabbs_view, centroids); axom::Array xs(ncells, ncells); axom::Array ys(ncells, ncells); @@ -1277,7 +1441,7 @@ void check_find_points_zip2d() // construct the BVH spin::BVH bvh; bvh.setScaleFactor(1.0); // i.e., no scaling - bvh.initialize(aabbs, ncells); + bvh.initialize(aabbs_view, ncells); BoxType bounds = bvh.getBounds(); @@ -1303,8 +1467,6 @@ void check_find_points_zip2d() EXPECT_EQ(donorCellIdx, candidates[offsets[i]]); } // END for all cell centroids - axom::deallocate(aabbs); - axom::setDefaultAllocator(current_allocator); } @@ -1365,6 +1527,10 @@ void bvh_compute_point_distances_2d(BVHType& bvh, constexpr int INVALID_ELEMENT_INDEX = -1; constexpr int FIRST_ELEMENT_INDEX = 0; + const int hostAllocatorID = + axom::execution_space::allocatorID(); + const int deviceAllocatorID = axom::execution_space::allocatorID(); + // Borrowed from DistibutedClosestPoint. struct MinCandidate { @@ -1376,37 +1542,49 @@ void bvh_compute_point_distances_2d(BVHType& bvh, // Initialize the BVH with the points. axom::IndexType npts = none ? 0 : points.size(); - BoxType* bboxes = - axom::allocate(npts ? npts : 1, // do not allocate 0 elements - axom::execution_space::allocatorID()); + // do not allocate 0 elements + axom::Array bboxes = npts + ? axom::Array(npts, npts, hostAllocatorID) + : axom::Array(1, 1, hostAllocatorID); for(axom::IndexType i = 0; i < npts; i++) { bboxes[i] = BoxType(points[i]); } - bvh.initialize(bboxes, npts); + + // Copy boxes to device + axom::Array bboxes_device = + axom::Array(bboxes, deviceAllocatorID); + + bvh.initialize(bboxes_device.view(), npts); // Call the BVH like the DistributedClosestPoint does. auto it = bvh.getTraverser(); // Make a results array to contain the data values we read. - axom::Array results(query_pts.size()); - axom::ArrayView results_view(results.data(), results.size()); + axom::Array results_device(query_pts.size(), + query_pts.size(), + deviceAllocatorID); + axom::ArrayView results_view = results_device.view(); // Loop over the query points. - axom::ArrayView pointsView(points.data(), points.size()); - axom::ArrayView query_pts_view(query_pts.data(), query_pts.size()); + axom::Array points_device = + axom::Array(points, deviceAllocatorID); + axom::ArrayView points_device_view = points_device.view(); + axom::Array query_pts_device = + axom::Array(query_pts, deviceAllocatorID); + axom::ArrayView query_pts_device_view = query_pts_device.view(); npts = query_pts.size(); axom::for_all( npts, AXOM_LAMBDA(std::int32_t idx) mutable { // Get the current query point. - auto qpt = query_pts_view[idx]; + auto qpt = query_pts_device_view[idx]; MinCandidate curr_min; auto checkMinDist = [&](std::int32_t current_node, const std::int32_t* leaf_nodes) { int candidate_idx = leaf_nodes[current_node]; - const PointType candidate_pt = pointsView[candidate_idx]; + const PointType candidate_pt = points_device_view[candidate_idx]; const double sq_dist = squared_distance(qpt, candidate_pt); if(sq_dist < curr_min.minSqDist) @@ -1429,25 +1607,21 @@ void bvh_compute_point_distances_2d(BVHType& bvh, results_view[idx] = curr_min.minElem; }); + // Copy results back to host + axom::Array results = axom::Array(results_device, hostAllocatorID); + // Make sure all of the indices we found are the expected value. int expected_idx = none ? INVALID_ELEMENT_INDEX : FIRST_ELEMENT_INDEX; for(axom::IndexType i = 0; i < results.size(); i++) { EXPECT_EQ(expected_idx, results[i]); } - - axom::deallocate(bboxes); } //------------------------------------------------------------------------------ template void check_0_or_1_bbox_2d() { - // Temporarily force the allocator for the ExecType so the query points as - // well as any other important allocations are available in that space. - const int current_allocator = axom::getDefaultAllocatorID(); - axom::setDefaultAllocator(axom::execution_space::allocatorID()); - // Make a 1 element array that we'll access from a BVH callback lambda. using PointType = axom::primal::Point; axom::Array src_pts; @@ -1464,8 +1638,6 @@ void check_0_or_1_bbox_2d() // 0 src points spin::BVH<2, ExecType, FloatType> bvh2; bvh_compute_point_distances_2d(bvh2, src_pts, query_pts, true); - - axom::setDefaultAllocator(current_allocator); } } /* end unnamed namespace */ diff --git a/src/axom/spin/tests/spin_implicit_grid.cpp b/src/axom/spin/tests/spin_implicit_grid.cpp index d1c0c706b6..c79640ca74 100644 --- a/src/axom/spin/tests/spin_implicit_grid.cpp +++ b/src/axom/spin/tests/spin_implicit_grid.cpp @@ -487,13 +487,14 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_pt_vectorized) GridT grid(bbox, &res, maxElts); - axom::Array objBox1(1, 1, kernelAllocID); + axom::Array objBox1(1, 1, hostAllocID); objBox1[0] = BBox {SpacePt {.15, .25, .05}, SpacePt {.45, .25, .35}}; - grid.insert(objBox1[0], 1); + axom::Array objBox1_device = axom::Array(objBox1, kernelAllocID); + grid.insert(objBox1_device[0], 1); { - axom::Array queryPts(9, 9, kernelAllocID); + axom::Array queryPts(9, 9, hostAllocID); // First three query points inside only obj1 queryPts[0] = objBox1[0].getMin(); @@ -512,13 +513,15 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_pt_vectorized) axom::Array count, offset, candidates; { + axom::Array queryPtsDevice = + axom::Array(queryPts, kernelAllocID); axom::Array countDevice(9, 9, kernelAllocID); axom::Array offsetDevice(9, 9, kernelAllocID); axom::Array candidatesDevice; // Run query against implicit grid grid.getCandidatesAsArray(9, - queryPts.data(), + queryPtsDevice.data(), offsetDevice, countDevice, candidatesDevice); @@ -529,8 +532,6 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_pt_vectorized) candidates = axom::Array(candidatesDevice, hostAllocID); } - // Copy results back to the host - // Test some points that are expected to match for(int i = 0; i < 5; ++i) { @@ -546,16 +547,18 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_pt_vectorized) } } - axom::Array objBox2(1, 1, kernelAllocID); + axom::Array objBox2(1, 1, hostAllocID); objBox2[0] = BBox {SpacePt {.75, .85, .85}, SpacePt(.85)}; - grid.insert(objBox2[0], 2); + axom::Array objBox2_device = axom::Array(objBox2, kernelAllocID); + grid.insert(objBox2_device[0], 2); - axom::Array objBox3(1, 1, kernelAllocID); + axom::Array objBox3(1, 1, hostAllocID); objBox3[0] = BBox {SpacePt {.85, .85, .75}, SpacePt(.95)}; - grid.insert(objBox3[0], 3); + axom::Array objBox3_device = axom::Array(objBox3, kernelAllocID); + grid.insert(objBox3_device[0], 3); { - axom::Array queryPts(3, 3, kernelAllocID); + axom::Array queryPts(3, 3, hostAllocID); // Should only be inside obj2 queryPts[0] = SpacePt {.75, .85, .85}; @@ -566,12 +569,14 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_pt_vectorized) axom::Array count, offset, candidates; { + axom::Array queryPtsDevice = + axom::Array(queryPts, kernelAllocID); axom::Array countDevice(3, 3, kernelAllocID); axom::Array offsetDevice(3, 3, kernelAllocID); axom::Array candidatesDevice; // Run query against implicit grid grid.getCandidatesAsArray(3, - queryPts.data(), + queryPtsDevice.data(), offsetDevice, countDevice, candidatesDevice); @@ -785,8 +790,18 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_box_vectorized) << axom::execution_space::name() << " execution space for boxes in " << DIM << "D"); - int kernelAllocID = axom::execution_space::allocatorID(); int hostAllocID = axom::execution_space::allocatorID(); + int kernelAllocID = axom::execution_space::allocatorID(); + int unifiedAllocID = axom::execution_space::allocatorID(); + +#if defined(AXOM_USE_GPU) && defined(AXOM_USE_UMPIRE) + if(axom::execution_space::onDevice()) + { + kernelAllocID = axom::getUmpireResourceAllocatorID(umpire::resource::Device); + unifiedAllocID = + axom::getUmpireResourceAllocatorID(umpire::resource::Unified); + } +#endif // Note: A 10 x 10 x 10 implicit grid in the unit cube. // Grid cells have a spacing of .1 along each dimension @@ -794,13 +809,15 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_box_vectorized) BBox bbox(SpacePt(0.), SpacePt(1.)); const int maxElts = 30; - GridT grid(bbox, &res, maxElts); + // Initialize Implicit Grid in unified memory. + // getCandidates() function not yet __host __device__ decorated + GridT grid(bbox, &res, maxElts, unifiedAllocID); const int i_max = DIM >= 1 ? grid.gridResolution()[0] : 1; const int j_max = DIM >= 2 ? grid.gridResolution()[1] : 1; const int k_max = DIM >= 3 ? grid.gridResolution()[2] : 1; - axom::Array BBoxes(maxElts, maxElts, kernelAllocID); - axom::Array queryPt(1, 1, kernelAllocID); + axom::Array BBoxes(maxElts, maxElts, hostAllocID); + axom::Array queryPt(1, 1, hostAllocID); // Add some boxes to the spatial index { @@ -835,8 +852,10 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_box_vectorized) } } - grid.insert(10 * DIM, BBoxes.data(), 0); + // Copy boxes to unified memory (for getCandidates() call) + axom::Array BBoxesDevice = axom::Array(BBoxes, unifiedAllocID); + grid.insert(10 * DIM, BBoxesDevice.data(), 0); // Check that each grid cell contains DIM objects for(int i = 0; i < i_max; ++i) { @@ -845,7 +864,9 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_box_vectorized) for(int k = 0; k < k_max; ++k) { queryPt[0] = SpacePt {i * .1 + .05, j * .1 + .05, k * .1 + .05}; - EXPECT_EQ(DIM, grid.getCandidates(queryPt[0]).count()); + axom::Array queryPtDevice = + axom::Array(queryPt, unifiedAllocID); + EXPECT_EQ(DIM, grid.getCandidates(queryPtDevice[0]).count()); } } } @@ -853,7 +874,7 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_box_vectorized) //// Run some queries constexpr int N_QUERIES = 8; - axom::Array queryBoxes(N_QUERIES, N_QUERIES, kernelAllocID); + axom::Array queryBoxes(N_QUERIES, N_QUERIES, hostAllocID); // Empty box -- covers no objects queryBoxes[0] = BBox {}; @@ -883,13 +904,15 @@ TYPED_TEST(ImplicitGridExecTest, get_candidates_box_vectorized) axom::Array offset, count, candidates; { + axom::Array queryBoxesDevice = + axom::Array(queryBoxes, kernelAllocID); axom::Array countDevice(N_QUERIES, N_QUERIES, kernelAllocID); axom::Array offsetDevice(N_QUERIES, N_QUERIES, kernelAllocID); axom::Array candidatesDevice; // Run query against implicit grid grid.getCandidatesAsArray(N_QUERIES, - queryBoxes.data(), + queryBoxesDevice.data(), offsetDevice, countDevice, candidatesDevice); diff --git a/src/axom/spin/tests/spin_morton.cpp b/src/axom/spin/tests/spin_morton.cpp index 1f1ed34d98..a82a0edeab 100644 --- a/src/axom/spin/tests/spin_morton.cpp +++ b/src/axom/spin/tests/spin_morton.cpp @@ -5,13 +5,14 @@ #include "gtest/gtest.h" +#include "axom/core/NumericLimits.hpp" + #include "axom/spin/MortonIndex.hpp" #include "axom/primal/geometry/Point.hpp" #include "axom/slic.hpp" #include -#include // Uncomment the line below for true randomized points #ifndef MORTON_TESTER_SHOULD_SEED @@ -36,7 +37,7 @@ CoordType randomInt(CoordType beg, CoordType end) if(range == 0) { - range = std::numeric_limits::max(); + range = axom::numeric_limits::max(); } return (std::rand() % range) + beg; @@ -65,7 +66,7 @@ TEST(spin_morton, test_max_set_bit) axom::spin::Mortonizer morton2; EXPECT_EQ(morton2.maxSetBit(0), 0); - int maxBit = std::numeric_limits::digits; + int maxBit = axom::numeric_limits::digits; for(int i = 0; i <= maxBit; ++i) { int val = 1 << i; @@ -135,7 +136,7 @@ void testMortonizer() int maxBits = axom::spin::Mortonizer::maxBitsPerCoord(); SLIC_INFO( - "\tMax bits per dimension: " << std::numeric_limits::digits); + "\tMax bits per dimension: " << axom::numeric_limits::digits); SLIC_INFO("\tMax unique bits per dimension: " << maxBits); int maxIter = std::min(1 << (maxBits - 1), MAX_ITER); diff --git a/src/cmake/AxomConfig.cmake b/src/cmake/AxomConfig.cmake index 6d4865b544..bcab515442 100644 --- a/src/cmake/AxomConfig.cmake +++ b/src/cmake/AxomConfig.cmake @@ -13,7 +13,7 @@ message(STATUS "Configuring Axom version ${AXOM_VERSION_FULL}") ## Add a definition to the generated config file for each library dependency ## (optional and built-in) that we might need to know about in the code. We ## check for vars of the form _FOUND or ENABLE_ -set(TPL_DEPS C2C CAMP CLI11 CONDUIT CUDA FMT HIP HDF5 LUA MFEM MPI OPENMP RAJA SCR SOL SPARSEHASH UMPIRE ) +set(TPL_DEPS ADIAK C2C CALIPER CAMP CLI11 CONDUIT CUDA FMT HIP HDF5 LUA MFEM MPI OPENMP RAJA SCR SOL SPARSEHASH UMPIRE ) foreach(dep ${TPL_DEPS}) if( ${dep}_FOUND OR ENABLE_${dep} ) set(AXOM_USE_${dep} TRUE ) @@ -35,11 +35,9 @@ foreach(comp ${AXOM_COMPONENTS_ENABLED}) endforeach() ## Add compile-time options to the config file -## Check for options of the form AXOM_ENABLE_