Skip to content

Print out the amount of GPU memory used at the end of each time step #308

Print out the amount of GPU memory used at the end of each time step

Print out the amount of GPU memory used at the end of each time step #308

Workflow file for this run

name: Build & Lint
# This runs the HIP Builds. CUDA builds can be reenabled by adding the CUDA
# container to the matrix and uncommenting the CUDA lines
on:
pull_request:
schedule:
- cron: "37 07 * * 1" # run every Monday at 07:37UTC. Crontab computed with crontab.guru
workflow_dispatch:
jobs:
Build:
name: >
Build & Lint:
${{ matrix.container.name }}
TYPE=${{ matrix.make-type }}
# if: ${{ false }} # If uncommented this line will disable this job
# Choose OS/Runner
runs-on: ubuntu-latest
container:
image: ${{matrix.container.link}}
defaults:
run:
shell: bash
# Matrix for different make types
strategy:
fail-fast: false
matrix:
make-type: [hydro, gravity, disk, particles, cosmology, mhd, dust]
# The CUDA container can be added with {name: "CUDA", link: "docker://chollahydro/cholla:cuda_github"}
container: [{name: "HIP",link: "docker://chollahydro/cholla:rocm_github"}]
# Setup environment variables
env:
CHOLLA_MAKE_TYPE: ${{ matrix.make-type }}
# Run the job itself
steps:
# Install required Tools
- uses: actions/checkout@v3
# Show versions
- name: Show MPI version
run: mpirun --version
- name: Show HDF5 config
run: |
h5cc -showconfig
- name: Git Safe Directory
run: |
git --version
git config --global --add safe.directory /__w/cholla/cholla
git config --global --add safe.directory '*'
# - name: Show CUDA and gcc version
# if: matrix.container.name == 'CUDA'
# run: |
# cc --version
# c++ --version
# nvcc -V
- name: Show HIP and hipcc version
if: matrix.container.name == 'HIP'
run: |
hipcc --version
hipconfig --full
# Perform Build
- name: Cholla setup
run: |
make clobber
source builds/run_tests.sh
setupTests -c gcc
echo "CHOLLA_ROOT = ${CHOLLA_ROOT}"
echo "CHOLLA_LAUNCH_COMMAND = ${CHOLLA_LAUNCH_COMMAND}"
echo "CHOLLA_ROOT=${CHOLLA_ROOT}" >> $GITHUB_ENV
echo "CHOLLA_LAUNCH_COMMAND=${CHOLLA_LAUNCH_COMMAND}" >> $GITHUB_ENV
echo "F_OFFLOAD=${F_OFFLOAD} >> $GITHUB_ENV
echo "CHOLLA_ENVSET=${CHOLLA_ENVSET} >> $GITHUB_ENV
- name: Build Cholla
run: |
source builds/run_tests.sh
buildCholla OPTIMIZE
- name: Build Tests
run: |
source builds/run_tests.sh
buildChollaTests
# Run Clang-tidy
# - name: Run clang-tidy
# if: matrix.container.name == 'CUDA'
# run: make tidy TYPE=${{ matrix.make-type }} CLANG_TIDY_ARGS="--warnings-as-errors=*"
# - name: Display tidy_results_cpp.log
# if: ${{ (matrix.container.name == 'CUDA') && (always()) }}
# run: cat tidy_results_cpp.log
# - name: Display tidy_results_c.log
# if: ${{ (matrix.container.name == 'CUDA') && (always()) }}
# run: cat tidy_results_c.log
# - name: Display tidy_results_gpu.log
# if: ${{ (matrix.container.name == 'CUDA') && (always()) }}
# run: cat tidy_results_gpu.log