forked from ufs-community/MPAS-Model
-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (127 loc) · 4.87 KB
/
Copy pathbuild_mpas_intel.yml
File metadata and controls
147 lines (127 loc) · 4.87 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
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
name: Build (Intel) MPAS Standalone
on: [pull_request,workflow_dispatch]
jobs:
build_mpas_intel:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false # Disable fail-fast
matrix:
fortran-compiler: [intel]
build-system: [make, cmake]
# Environmental variables
env:
driver_ROOT: /home/runner/work
AUTOCONF_VERSION: 2.71
AUTOMAKE_VERSION: 1.17
M4_VERSION: 1.4.19
LIBTOOL_VERSION: 2.5.4
PNETCDF: /home/runner/PnetCDF
AUTOTOOLS: /home/runner/AUTOTOOLS
OMPI: /opt/intel/oneapi/mpi/2021.10.0
# Workflow steps
steps:
- name: Checkout code (into ${driver_ROOT})
uses: actions/checkout@v3
- name: Initialize submodules
run: |
git submodule update --init --recursive
echo "ls -l src/core_atmosphere/physics/physics_mmm"
- name: "Install Intel compilers & MPI"
uses: NOAA-EMC/ci-install-intel-toolkit@ufs-community-mpas-ci-v2.0
with:
install-mpi: true
install-oneapi: false
mpi-wrapper-setup: classic
- name: Cache Intel
id: cache-INTEL
uses: actions/cache@v4
with:
path: /opt/intel/oneapi/mpi/2021.10.0
key: cache-AUTOTOOLS-${{matrix.fortran-compiler}}-key
- name: Install NetCDF library
run: |
sudo apt-get update
sudo apt-get install libnetcdff-dev
- name: Cache GNU autotools
id: cache-AUTOTOOLS
uses: actions/cache@v4
with:
path: /home/runner/AUTOTOOLS
key: cache-AUTOTOOLS-${{matrix.fortran-compiler}}-key
- name: Build GNU autotools
if: steps.cache-AUTOTOOLS.outputs.cache-hit != 'true'
run: |
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=${AUTOTOOLS} --silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
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=${AUTOTOOLS} --silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
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=${AUTOTOOLS} --silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
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=${AUTOTOOLS} --silent
make -s -j 8 install > qout 2>&1
make -s -j 8 distclean >> qout 2>&1
echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=${AUTOTOOLS}/bin:$PATH" >> $GITHUB_ENV
- name: Cache PnetCDF
id: cache-pnetcdf
uses: actions/cache@v4
with:
path: /home/runner/PnetCDF
key: cache-PnetCDF-${{matrix.fortran-compiler}}-key
- name: Install PnetCDF
if: steps.cache-PnetCDF.outputs.cache-hit != 'true'
run: |
set -x
echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=${AUTOTOOLS}/bin:$PATH" >> $GITHUB_ENV
m4 --version
autoconf --version
automake --version
libtool --version
echo "Install PnetCDF on ${PNETCDF}"
rm -rf PnetCDF ; mkdir PnetCDF ; cd PnetCDF
git clone -q https://github.com/Parallel-NetCDF/PnetCDF.git
cd PnetCDF
autoreconf -i
./configure --prefix=${PNETCDF} --with-mpi=${OMPI}
make -j 8 install
echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV
- name: Setup environment
run: |
echo "FC=mpiifort" >> $GITHUB_ENV
echo "CC=mpiicc" >> $GITHUB_ENV
echo "PNETCDF=${PNETCDF}" >> $GITHUB_ENV
echo "PATH=${AUTOTOOLS}/bin:$PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${AUTOTOOLS}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
echo "PATH=${PNETCDF}/bin:$PATH" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${PNETCDF}/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Build MPAS Standalone (make)
if: matrix.build-system == 'make'
run: |
cd ${driver_ROOT}/MPAS-Model/MPAS-Model
make intel-mpi CORE=init_atmosphere
make intel-mpi CORE=atmosphere
- name: Build MPAS Standalone (cmake)
if: matrix.build-system == 'cmake'
run: |
cd ${driver_ROOT}/MPAS-Model/MPAS-Model
mkdir build
cd build
cmake -DMPAS_DOUBLE_PRECISION=OFF -DMPAS_CORES="init_atmosphere;atmosphere" ..
make -j8