-
Notifications
You must be signed in to change notification settings - Fork 53
131 lines (122 loc) · 4.7 KB
/
intel.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
124
125
126
127
128
129
130
131
name: Intel OneAPI
# Tests ParallelIO using Intel Compiler and IMPI library.
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
env:
CC: mpicc
FC: mpiifort
# Versions should match the github tag names
PNETCDF_VERSION: checkpoint.1.12.3
NETCDF_C_VERSION: v4.9.2
NETCDF_FORTRAN_VERSION: v4.6.1
HDF5_VERSION: hdf5_1_12_2
steps:
- uses: actions/checkout@v3
- name: Installs
run: |
set -x
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install libz-dev
echo "/opt/intel/oneapi/compiler/2023.2.1/linux/bin/intel64/" >> $GITHUB_PATH
- name: cache intel compiler
id: cache-intel
uses: actions/cache@v3
with:
path: /opt/intel/oneapi
key: intel-${{ runner.os }}
- name: Install Intel OneAPI
if: steps.cache-intel.outputs.cache-hit != 'true'
uses: ./.github/actions/intelcompilers
- name: Prep Intel OneAPI
if: steps.cache-intel.outputs.cache-hit == 'true'
run: |
source /opt/intel/oneapi/setvars.sh
printenv >> $GITHUB_ENV
- name: cache-hdf5
id: cache-hdf5
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/hdf5
key: hdf5-${{ runner.os }}-${{ env.HDF5_VERSION }}-impi
- name: build-hdf5
if: steps.cache-hdf5.outputs.cache-hit != 'true'
uses: ./.github/actions/buildhdf5
with:
install_prefix: ${GITHUB_WORKSPACE}/hdf5
enable_parallel: True
hdf5_version: ${{ env.HDF5_VERSION }}
mpi_path: /opt/intel/mpi
- name: cache netcdf C
id: cache-netcdf-c
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/netcdf-c
key: netcdf-c-${{ runner.os }}-${{ env.NETCDF_C_VERSION }}-impi-hdf5-${{ env.HDF5_VERSION }}
- name: cache netcdf Fortran
id: cache-netcdf-f
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/netcdf-f
key: netcdf-f-${{ runner.os }}-${{ env.NETCDF_FORTRAN_VERSION }}-impi-hdf5-${{ env.HDF5_VERSION }}
- name: prep netcdf-c
run: |
export PATH=$GITHUB_WORKSPACE/hdf5/bin:$GITHUB_WORKSPACE/netcdf/bin:$PATH
export LDFLAGS="$LDFLAGS -L$GITHUB_WORKSPACE/hdf5/lib -L/usr/lib/x86_64-linux-gnu/ -lcurl"
export CPPFLAGS="$CPPFLAGS -I$GITHUB_WORKSPACE/hdf5/include -I$GITHUB_WORKSPACE/netcdf/include"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/hdf5/lib:/usr/lib/x86_64-linux-gnu/:/opt/intel/oneapi/compiler/2023.2.1/linux/compiler/lib/intel64_lin/"
printenv >> $GITHUB_ENV
- name: build-netcdf-c
if: steps.cache-netcdf-c.outputs.cache-hit != 'true'
uses: ./.github/actions/buildnetcdf
with:
netcdf_version: ${{ env.NETCDF_C_VERSION }}
install_prefix: ${GITHUB_WORKSPACE}/netcdf-c
- name: Build NetCDF Fortran
if: steps.cache-netcdf-f.outputs.cache-hit != 'true'
uses: ./.github/actions/buildnetcdff
with:
netcdf_fortran_version: ${{ env.NETCDF_FORTRAN_VERSION }}
install_prefix: ${GITHUB_WORKSPACE}/netcdf-f
netcdf_c_path: ${GITHUB_WORKSPACE}/netcdf-c
- name: cache-pnetcdf
id: cache-pnetcdf
uses: actions/cache@v3
with:
path: ~/work/ParallelIO/ParallelIO/pnetcdf
key: pnetcdf-${{ runner.os }}-${{ env.PNETCDF_VERSION }}-impi-5
- name: Build PNetCDF
if: steps.cache-pnetcdf.outputs.cache-hit != 'true'
uses: ./.github/actions/buildpnetcdf
with:
pnetcdf_version: ${{ env.PNETCDF_VERSION }}
install_prefix: ${GITHUB_WORKSPACE}/pnetcdf
- name: cmake build
uses: ./.github/actions/parallelio_cmake
with:
parallelio_version: ${{ env.GITHUB_SHA }}
enable_fortran: True
netcdf_c_library: $GITHUB_WORKSPACE/netcdf-c/lib/libnetcdf.so
netcdf_c_include_dir: $GITHUB_WORKSPACE/netcdf-c/include
netcdf_fortran_library: $GITHUB_WORKSPACE/netcdf-f/lib/libnetcdff.so
netcdf_fortran_include_dir: $GITHUB_WORKSPACE/netcdf-f/include
pnetcdf_library: $GITHUB_WORKSPACE/pnetcdf/lib/libpnetcdf.a
pnetcdf_include_dir: $GITHUB_WORKSPACE/pnetcdf/include
install_prefix: $GITHUB_WORKSPACE/parallelio
- name: parallelio tests
run: |
pushd $GITHUB_WORKSPACE/build
make tests
ctest -VV -E test_async_
popd
# the following can be used by developers to login to the github server in case of errors
# see https://github.com/marketplace/actions/debugging-with-tmate for further details
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3