-
Notifications
You must be signed in to change notification settings - Fork 25
123 lines (111 loc) · 3.81 KB
/
makefile.yml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Makefile CI
on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
# Manual dispatch for including all multiply kernels in matrix.
# We don't want this to run on every commit, but it's useful
# to be able to launch it manually
workflow_dispatch:
inputs:
multiply_kernel_test:
description: 'test all multiply kernels, instead of default only'
required: false
default: false
jobs:
build:
name: ${{matrix.fc}} -- ${{matrix.os}} -- ${{matrix.multiply_kernel}} multiply kernel -- ${{matrix.np}} processes -- ${{matrix.threads}} threads
runs-on: ${{matrix.os}}
env:
FC: ${{matrix.fc}}
F77: mpif77
OMP_NUM_THREADS: ${{matrix.threads}}
OPENBLAS_NUM_THREADS: 1
OMP_STACKSIZE: 100M
strategy:
fail-fast: false
matrix:
os:
# We could add ubuntu-latest but until 2024 it will be the same as 22.04
- ubuntu-22.04
fc:
# TODO: We could also build with `intel-oneapi-compiler-fortran`, it is available
# for installation from Intel through their apt repository.
- mpifort
np:
- 1
- 2
threads:
- 1
- 2
# TODO: Could be worth testing on `mpich` in addition to `openmpi-bin`. Both are
# available in apt
multiply_kernel:
- default
- gemm
- ompDoii
- ompDoik
- ompDoji
- ompDojk
- ompGemm
- ompGemm_m
# As a work-around, copy the multiply_kernel_test variable to the matrix and
# exclude non-default multiply kernels when it's false
# https://github.com/orgs/community/discussions/26253#discussioncomment-3250989
test_all_multiply_kernels:
- ${{github.event.inputs.multiply_kernel_test}}
exclude:
- test_all_multiply_kernels: false
multiply_kernel: gemm
- test_all_multiply_kernels: false
multiply_kernel: ompDoii
- test_all_multiply_kernels: false
multiply_kernel: ompDoik
- test_all_multiply_kernels: false
multiply_kernel: ompDoji
- test_all_multiply_kernels: false
multiply_kernel: ompDojk
- test_all_multiply_kernels: false
multiply_kernel: ompGemm
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Install Dependencies
run: |
sudo apt update
sudo apt install openmpi-bin libopenmpi-dev libfftw3-dev libblas3 liblapack3 libscalapack-openmpi-dev libxc-dev
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install python utilities
run: |
python -m pip install --upgrade pip
pip install pytest
pip install numpy
- name: Check compiler version
run: ${{matrix.fc}} --version
- name: Build
working-directory: ${{github.workspace}}/src
run: |
make -j ${{matrix.np}} SYSTEM=gha MULT_KERN=${{matrix.multiply_kernel}}
- name: Run test 001
working-directory: ${{github.workspace}}/testsuite/test_001_bulk_Si_1proc_Diag
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out
- name: Run test 002
working-directory: ${{github.workspace}}/testsuite/test_002_bulk_Si_1proc_OrderN
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out
- name: Run test 003
working-directory: ${{github.workspace}}/testsuite/test_003_bulk_BTO_polarisation
run: |
mpirun -np ${{matrix.np}} ../../bin/Conquest
cat Conquest_out
- name: Check test results
working-directory: ${{github.workspace}}/testsuite
run: pytest test_check_output.py