-
Notifications
You must be signed in to change notification settings - Fork 23
173 lines (169 loc) · 6.61 KB
/
mac_openmpi.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Mac OSX with OpenMPI
on:
push:
branches: [ master, test_github_actions ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.1'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'test/test_installed/*'
pull_request:
branches: [ master, test_github_actions ]
paths-ignore:
- '**/*.md'
- '**/*.txt'
- '**/*.1'
- '**/*.jpg'
- '**/*.png'
- 'docs/*'
- 'test/test_installed/*'
env:
OPENMPI_VERSION: 5.0.2
AUTOCONF_VERSION: 2.71
AUTOMAKE_VERSION: 1.17
LIBTOOL_VERSION: 2.5.4
M4_VERSION: 1.4.19
jobs:
build:
runs-on: macos-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v4
- name: Set up dependencies
run: |
# brew install gcc
# which gcc
# gcc --version
# which gfortran
- name: Clean up git untracked files
run: |
git clean -fx
- name: Build GNU autotools
run: |
export PATH="${GITHUB_WORKSPACE}/AUTOTOOLS/bin:${PATH}"
export LD_LIBRARY_PATH="${GITHUB_WORKSPACE}/AUTOTOOLS/lib:${LD_LIBRARY_PATH}"
cd ${GITHUB_WORKSPACE}
wget -q https://ftp.gnu.org/gnu/m4/m4-${M4_VERSION}.tar.gz
gzip -dc m4-${M4_VERSION}.tar.gz | tar -xf -
cd m4-${M4_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/AUTOTOOLS \
--silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
cd ${GITHUB_WORKSPACE}
wget -q https://ftp.gnu.org/gnu/autoconf/autoconf-${AUTOCONF_VERSION}.tar.gz
gzip -dc autoconf-${AUTOCONF_VERSION}.tar.gz | tar -xf -
cd autoconf-${AUTOCONF_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/AUTOTOOLS \
--silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
cd ${GITHUB_WORKSPACE}
wget -q https://ftp.gnu.org/gnu/automake/automake-${AUTOMAKE_VERSION}.tar.gz
gzip -dc automake-${AUTOMAKE_VERSION}.tar.gz | tar -xf -
cd automake-${AUTOMAKE_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/AUTOTOOLS \
--silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
cd ${GITHUB_WORKSPACE}
wget -q https://ftp.gnu.org/gnu/libtool/libtool-${LIBTOOL_VERSION}.tar.gz
gzip -dc libtool-${LIBTOOL_VERSION}.tar.gz | tar -xf -
cd libtool-${LIBTOOL_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/AUTOTOOLS \
--silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
- name: Build OPENMPI
run: |
cd ${GITHUB_WORKSPACE}
rm -rf OPENMPI ; mkdir OPENMPI ; cd OPENMPI
VER_MAJOR=${OPENMPI_VERSION%.*}
wget -q https://download.open-mpi.org/release/open-mpi/v${VER_MAJOR}/openmpi-${OPENMPI_VERSION}.tar.gz
gzip -dc openmpi-${OPENMPI_VERSION}.tar.gz | tar -xf -
cd openmpi-${OPENMPI_VERSION}
./configure --prefix=${GITHUB_WORKSPACE}/OPENMPI \
--silent \
--with-io-romio-flags="--with-file-system=ufs" \
--with-hwloc=internal \
--with-pmix=internal \
--with-libevent=internal \
--disable-mpi-fortran \
CC=gcc
make -s LIBTOOLFLAGS=--silent V=1 -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
- name: Build PnetCDF
run: |
cd ${GITHUB_WORKSPACE}
export PATH="${GITHUB_WORKSPACE}/AUTOTOOLS/bin:${PATH}"
export LD_LIBRARY_PATH="${GITHUB_WORKSPACE}/AUTOTOOLS/lib:${LD_LIBRARY_PATH}"
m4 --version
autoconf --version
automake --version
libtool --version
autoreconf -i
mkdir -p pnetcdf_output
./configure --enable-option-checking=fatal \
--enable-profiling \
pnc_ac_debug=yes \
--enable-burst_buffering \
--enable-subfiling \
--enable-thread-safe \
--with-pthread \
--disable-fortran \
--with-mpi=${GITHUB_WORKSPACE}/OPENMPI \
TESTMPIRUN="${GITHUB_WORKSPACE}/OPENMPI/bin/mpiexec --oversubscribe -n NP" \
TESTOUTDIR=${GITHUB_WORKSPACE}/pnetcdf_output
make -j 8 tests
- name: Print config.log
if: ${{ always() }}
run: |
cat ${GITHUB_WORKSPACE}/config.log
- name: make check
run: |
cd ${GITHUB_WORKSPACE}
make check
- name: Print test log files
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
fname=`find src test examples benchmarks -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: make ptests
run: |
cd ${GITHUB_WORKSPACE}
make ptests
- name: make distcheck
run: |
cd ${GITHUB_WORKSPACE}
make -j 8 distcheck DISTCHECK_CONFIGURE_FLAGS="--silent --with-mpi=${GITHUB_WORKSPACE}/OPENMPI"
- name: make install
run: |
cd ${GITHUB_WORKSPACE}
prefix_path=${GITHUB_WORKSPACE}/pnetcdf_install
echo "---- test make install prefix=${prefix_path}"
make install prefix=${prefix_path}
test/tst_install.sh ${prefix_path}
prefix_path=pnetcdf_install
destdir_path=${GITHUB_WORKSPACE}/inst/
echo "---- test make install prefix=${prefix_path} DESTDIR=${destdir_path}"
make install prefix=${prefix_path} DESTDIR=${destdir_path}
test/tst_install.sh ${destdir_path}${prefix_path}
- name: Cleanup
if: ${{ always() }}
run: |
cd ${GITHUB_WORKSPACE}
make -s distclean
rm -rf ${GITHUB_WORKSPACE}/pnetcdf_output
rm -rf ${GITHUB_WORKSPACE}/OPENMPI
rm -rf ${GITHUB_WORKSPACE}/pnetcdf_install
rm -rf ${GITHUB_WORKSPACE}/inst