-
Notifications
You must be signed in to change notification settings - Fork 7
155 lines (151 loc) · 5.77 KB
/
ubuntu_mpich.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Ubuntu with MPICH
on:
push:
branches: [ master, dev ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'case_studies/*'
pull_request:
branches: [ master, dev ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'case_studies/*'
env:
MPICH_VERSION: 4.1.2
HDF5_VERSION: 1.14.2
NETCDF_VERSION: 4.9.2
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install automake autoconf libtool libtool-bin m4
# The MPICH installed on github actions is too slow
# sudo apt-get install mpich
# mpicc -v
# zlib
sudo apt-get install zlib1g-dev
- name: Build MPICH
run: |
cd ${GITHUB_WORKSPACE}
rm -rf MPICH ; mkdir MPICH ; cd MPICH
wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz
gzip -dc mpich-${MPICH_VERSION}.tar.gz | tar -xf -
cd mpich-${MPICH_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/MPICH \
--silent \
--enable-romio \
--with-file-system=ufs \
--with-device=ch3:sock \
--disable-fortran \
CC=gcc
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1
- name: Install HDF5
run: |
cd ${GITHUB_WORKSPACE}
rm -rf HDF5 ; mkdir HDF5 ; cd HDF5
VER_MAJOR=${HDF5_VERSION%.*}
wget -cq https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${VER_MAJOR}/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz
tar -zxf hdf5-${HDF5_VERSION}.tar.gz
cd hdf5-${HDF5_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/HDF5 \
--silent \
--enable-parallel \
--enable-build-mode=production \
--enable-unsupported \
--enable-threadsafe \
--disable-doxygen-doc \
--disable-doxygen-man \
--disable-doxygen-html \
--disable-tests \
--disable-fortran \
--disable-cxx \
CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1
- name: Install NetCDF
run: |
cd ${GITHUB_WORKSPACE}
rm -rf /NetCDF ; mkdir NetCDF ; cd NetCDF
wget -qc https://github.com/Unidata/netcdf-c/archive/refs/tags/v${NETCDF_VERSION}.tar.gz
tar -zxf v${NETCDF_VERSION}.tar.gz
cd netcdf-c-${NETCDF_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/NetCDF \
--silent \
--disable-dap \
--disable-nczarr \
--disable-nczarr-filters \
--disable-filter-testing \
--disable-byterange \
CC=${GITHUB_WORKSPACE}/MPICH/bin/mpicc \
CPPFLAGS="-I${GITHUB_WORKSPACE}/HDF5/include" \
LDFLAGS="-L${GITHUB_WORKSPACE}//HDF5/lib" \
LIBS="-lhdf5"
make -s LIBTOOLFLAGS=--silent V=1 -j 4 install > qout 2>&1
make -s -j 4 distclean >> qout 2>&1
- name: Configure Log VOL connector
run: |
cd ${GITHUB_WORKSPACE}
autoreconf -i
./configure --with-hdf5=${GITHUB_WORKSPACE}/HDF5 \
--enable-test-netcdf4=${GITHUB_WORKSPACE}/NetCDF \
--enable-test-hdf5-iotest \
--with-mpi=${GITHUB_WORKSPACE}/MPICH
# Do NOT test QMCPACK, as it requires FFTW which fails to build
- name: Print config.log if error
if: ${{ failure() }}
run: |
cd ${GITHUB_WORKSPACE}
cat config.log
- name: Build Log VOL connector
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make -j 4
# Do NOT parallel build, cmake for external tests can fail
make tests
- name: Serial-run test - make check
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make check
- name: Print test log files
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
fname=`find tests utils examples -type f -name "*.log"`
for f in $fname ; do \
bname=`basename $f` ; \
if test "x$bname" != xconfig.log ; then \
echo "-------- dump $f ----------------------------" ; \
cat $f ; \
fi ; \
done
- name: Parallel-run test - make ptest
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make ptest
- name: Test distribution - make distcheck
if: ${{ success() }}
run: |
cd ${GITHUB_WORKSPACE}
make -j4 -s V=1 LIBTOOLFLAGS=--silent distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-hdf5=${GITHUB_WORKSPACE}/HDF5 --with-mpi=${GITHUB_WORKSPACE}/MPICH"
- name: make distclean
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
make -s distclean