diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml new file mode 100644 index 000000000..1e3a9488b --- /dev/null +++ b/.buildkite/pipeline.yml @@ -0,0 +1,59 @@ +env: + JULIA_VERSION: "1.9.4" + JULIA_MINOR_VERSION: "1.9" + JULIA_PATH: /var/lib/buildkite-agent/julia + DATADEPS_ALWAYS_ACCEPT: true + +steps: + - label: ":building_construction: initialize environment" + key: "init" + commands: + - "wget -N -P $JULIA_PATH https://julialang-s3.julialang.org/bin/linux/x64/$JULIA_MINOR_VERSION/julia-$JULIA_VERSION-linux-x86_64.tar.gz" + - "tar xf $JULIA_PATH/julia-$JULIA_VERSION-linux-x86_64.tar.gz -C $JULIA_PATH" + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia -O0 --color=yes --project -e 'using Pkg; Pkg.instantiate(; verbose=true)'" + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia -O0 --color=yes --project -e 'using Pkg; Pkg.build()'" + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia -O0 --color=yes --project -e 'using Pkg; Pkg.precompile()'" + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia -O0 --color=yes --project -e 'using Pkg; Pkg.status()'" + notify: + - github_commit_status: + context: "Initialise enviroment" + + - label: ":speedboat: GPU unit tests" + commands: + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia -O0 --color=yes --project -e 'using Pkg; Pkg.test()'" + depends_on: "init" + notify: + - github_commit_status: + context: "GPU tests" + + - label: ":rowboat: CPU unit tests" + env: + CUDA_VISIBLE_DEVICES: "-1" + commands: + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia -O0 --color=yes --project -e 'using Pkg; Pkg.test()'" + depends_on: "init" + notify: + - github_commit_status: + context: "CPU tests" + + - label: ":docusaurus: Documentation" + env: + CUDA_VISIBLE_DEVICES: "-1" + JULIA_DEBUG: "Documenter" + TMPDIR: "/var/lib/buildkite-agent/tmp" + commands: + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia --color=yes --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'" + - "$JULIA_PATH/julia-$JULIA_VERSION/bin/julia --color=yes --project=docs/ docs/make.jl" + depends_on: "init" + notify: + - github_commit_status: + context: "Documentation" + + - wait: ~ + continue_on_failure: true + + - label: ":skeleton-dance: clean up environment" + command: "rm -rf $JULIA_PATH" + notify: + - github_commit_status: + context: "Clean up" \ No newline at end of file diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml deleted file mode 100644 index 0ada82b0b..000000000 --- a/.github/workflows/documentation.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Documentation - -on: - push: - branches: - - main - tags: '*' - pull_request: - -env: - DATADEPS_ALWAYS_ACCEPT: true - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -jobs: - build: - permissions: - contents: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@latest - with: - version: '1.9' - - name: Install dependencies - run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' - - name: Build and deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token - DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key - run: JULIA_DEBUG=Documenter julia --color=yes --project=docs/ docs/make.jl diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index 47f1dcc6e..000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Tests -on: - push: - branches: - - main - pull_request: - branches: - - main - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} - -env: - DATADEPS_ALWAYS_ACCEPT: true - -jobs: - test: - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - version: - - '1.9' - os: - - ubuntu-latest - arch: - - x64 - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@v1 - with: - version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - - uses: actions/cache@v1 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 - - uses: julia-actions/julia-processcoverage@v1 - - uses: codecov/codecov-action@v2 - with: - file: lcov.info diff --git a/Project.toml b/Project.toml index d6fd60aa3..a36fa33b5 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "OceanBioME" uuid = "a49af516-9db8-4be4-be45-1dad61c5a376" authors = ["Jago Strong-Wright and contributors"] -version = "0.9.0" +version = "0.9.1" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/README.md b/README.md index c9fc9c8dc..736fb0dfe 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,13 @@ ![](OceanBioME_headerbar.jpg?raw=true) -[![Documentation](https://img.shields.io/badge/documentation-stable%20release-blue?style=flat-square)](https://oceanbiome.github.io/OceanBioME.jl/stable/) -[![Documentation](https://img.shields.io/badge/documentation-dev%20release-orange?style=flat-square)](https://oceanbiome.github.io/OceanBioME.jl/dev/) [![DOI](https://joss.theoj.org/papers/10.21105/joss.05669/status.svg)](https://doi.org/10.21105/joss.05669) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10038575.svg)](https://doi.org/10.5281/zenodo.10038575) [![MIT license](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://mit-license.org) [![ColPrac: Contributor's Guide on Collaborative Practices for Community Packages](https://img.shields.io/badge/ColPrac-Contributor's%20Guide-blueviolet)](https://github.com/SciML/ColPrac) -[![Testing](https://github.com/OceanBioME/OceanBioME.jl/actions/workflows/tests.yml/badge.svg)](https://github.com/OceanBioME/OceanBioME.jl/actions/workflows/tests.yml) +[![Documentation](https://img.shields.io/badge/documentation-stable%20release-blue?style=flat-square)](https://oceanbiome.github.io/OceanBioME.jl/stable/) +[![Documentation](https://img.shields.io/badge/documentation-dev%20release-orange?style=flat-square)](https://oceanbiome.github.io/OceanBioME.jl/dev/) +[![Testing build status](https://badge.buildkite.com/3d79ccbf2cba42de1d4e54a2f31cc6f99d377198bf63334d0d.svg)](https://buildkite.com/oceanbiome-dot-jl/gpu-tests) [![codecov](https://codecov.io/gh/OceanBioME/OceanBioME.jl/branch/main/graph/badge.svg?token=3DIW4R7N3R)](https://codecov.io/gh/OceanBioME/OceanBioME.jl) -[![Documentation](https://github.com/OceanBioME/OceanBioME.jl/actions/workflows/documentation.yml/badge.svg)](https://github.com/OceanBioME/OceanBioME.jl/actions/workflows/documentation.yml) # *Ocean* *Bio*geochemical *M*odelling *E*nvironment ## Description diff --git a/src/Light/2band.jl b/src/Light/2band.jl index 40ddc3929..36426d575 100644 --- a/src/Light/2band.jl +++ b/src/Light/2band.jl @@ -1,11 +1,9 @@ @kernel function update_TwoBandPhotosyntheticallyActiveRadiation!(PAR, grid, P, surface_PAR, t, PAR_model) i, j = @index(Global, NTuple) - LX, LY, _ = location(P) - k, k′ = domain_boundary_indices(RightBoundary(), grid.Nz) - X = z_boundary_node(i, j, k′, grid, LX(), LY()) + X = z_boundary_node(i, j, k′, grid, Center(), Center()) PAR⁰ = surface_PAR(X..., t)