Thanks to visit codestin.com
Credit goes to github.com

Skip to content
19 changes: 15 additions & 4 deletions .github/actions/build_run_model/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ inputs:
type: boolean
required: true
default: true
use-mpif08:
description: 'specify whether to run program with MPIF08 or not'
type: boolean
required: true
default: false
mpi-n-tasks:
description: 'specify number of mpi tasks to run with program if mpi is used'
type: number
Expand All @@ -45,19 +50,25 @@ runs:
shell: bash
# Steps to compile and build model
- name: Building ${{ inputs.model }} model
if: ${{ inputs.use-mpif08 }}
run: |
cd ${{ inputs.models-directory }}/${{ inputs.model }}/work
./quickbuild.sh mpif08
shell: bash
if: ${{ !inputs.use-mpif08 }}
run: |
cd ${{ inputs.models-directory }}/${{ inputs.model }}/work
./quickbuild.sh
shell: bash
# Steps to run the specified run-program with mpi options
- name: Running ${{ inputs.model }} ${{ inputs.run-program }} program (use-mpi=true)
if: ${{ inputs.use-mpi }}
- name: Running ${{ inputs.model }} ${{ inputs.run-program }} program (use-mpi/mpif08=true)
if: ${{ inputs.use-mpi }} || ${{ inputs.use-mpif08 }}
run: |
cd ${{ inputs.models-directory }}/${{ inputs.model }}/work/
mpirun -n ${{ inputs.mpi-n-tasks }} --allow-run-as-root ./${{ inputs.run-program }} ${{ inputs.run-program-args }}
shell: bash
- name: Running ${{ inputs.model }} ${{ inputs.run-program }} program (use-mpi=false)
if: ${{ !inputs.use-mpi }}
- name: Running ${{ inputs.model }} ${{ inputs.run-program }} program (use-mpi/mpif08=false)
if: ${{ !inputs.use-mpi }} && ${{ !inputs.use-mpif08 }}
run: |
cd ${{ inputs.models-directory }}/${{ inputs.model }}/work/
./${{ inputs.run-program }} ${{ inputs.run-program-args }}
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/action_on_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
model: lorenz_96
run-program: ./filter
use-mpi: true
use-mpif08: false
mpi-n-tasks: 2

# Job 2
Expand All @@ -44,3 +45,24 @@ jobs:
model: lorenz_63
run-program: ./filter
use-mpi: false
use-mpif08: false

# Job 3
build-run-lorenz_84-mpif08:
runs-on: ubuntu-latest
container:
image: hkershaw/dart-dep:1.0
options: '--cap-add=SYS_PTRACE'
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Set checked out repo as a safe git directory
run: git config --global --add safe.directory /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}
- name: Build and run lorenz_84 with mpif08
uses: ./.github/actions/build_run_model
with:
model: lorenz_84
run-program: ./filter
use-mpi: false
use-mpif08: true
mpi-n-tasks: 2
3 changes: 3 additions & 0 deletions guide/contributors-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Contributors' guide
Contributing to DART
--------------------

THIS ADDITION IS JUST TO TEST GITHUB ACTIONS!!!
!!!!!!!!!!

This section describes how you can contribute your work to DART. Because DART
is an open-source project, your contributions are welcome. Many user-provided
contributions have widely benefited the earth science community.
Expand Down