-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathcirrus_run_lorenz_all_compilers.yml
More file actions
56 lines (55 loc) · 2.31 KB
/
cirrus_run_lorenz_all_compilers.yml
File metadata and controls
56 lines (55 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: CIRRUS Run Lorenz 96 with MPI and All Compilers
on:
workflow_dispatch:
push:
branches:
- cirrus_actions
jobs:
# Job 1
build-run-lorenz_96-mpi-all-compilers:
# Runner instance OS
runs-on:
group: cirrus-4x8
# Define a matrix strategy for compilers
strategy:
matrix:
compiler: [gfortran, intel, ifx]
# Deploy container on top of runner instance
container:
image: hkershaw/dart-dep-external:4.2
steps:
- name: Checkout repo
uses: actions/checkout@v4
- 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 }}
# Steps to create Makefile template for the selected compiler
- name: Creating Makefile template for ${{ matrix.compiler }}
run: |
cd build_templates
sed -i 's|exec '\''make'\'', '\''-f'\'', \$opt_m if \$opt_x;|exec '\''make'\'', '\''-j'\'', '\''4'\'', '\''-f'\'', \$opt_m if \$opt_x;|' mkmf
case ${{ matrix.compiler }} in
gfortran)
cp mkmf.template.gfortran mkmf.template
echo 'FFLAGS = -g -Wuninitialized -Wunused -ffree-line-length-none -fbounds-check -fbacktrace -ffpe-trap=invalid,zero,overflow $(INCS)' >> mkmf.template
;;
intel)
cp mkmf.template.intel.linux mkmf.template
echo 'FFLAGS = -g -C -check noarg_temp_created -fpe0 -fp-model precise -ftrapuv -traceback -warn declarations,uncalled,unused $(INCS)' >> mkmf.template
;;
ifx)
cp mkmf.template.ifx.linux mkmf.template
echo 'FFLAGS = -g -C -check noarg_temp_created -fpe0 -fp-model precise -ftrapuv -traceback -warn declarations,uncalled,unused $(INCS)' >> mkmf.template
;;
esac
shell: bash
# Steps to compile and build lorenz_96 with mpi
- name: Building lorenz_96 model with mpi using ${{ matrix.compiler }}
run: |
cd models/lorenz_96/work
./quickbuild.sh
# Steps to run lorenz_96 filter program with mpi
- name: Running lorenz_96 filter program with mpi using ${{ matrix.compiler }}
run: |
cd models/lorenz_96/work
mpirun -n 4 ./filter
shell: bash