forked from earth-system-radiation/rte-rrtmgp
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
139 lines (135 loc) · 3.48 KB
/
.travis.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
sudo: required
dist: xenial
language: cpp
# Could run both sets of kernels in parallel but setup is the majority of the time
#env:
# - RTE_KERNELS=""
# - RTE_KERNELS="openacc"
matrix:
include:
- compiler: gcc # Using
env:
- FC=pgfortran
- FCFLAGS="-Mallocatable=03 -Mstandard -Mbounds -Mchkptr -Kieee -Mchkstk"
- TEST_PGI=yes
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- gfortran-8
- libnetcdf-dev
- compiler: gcc
env:
- FC=gfortran-9
- FCFLAGS="-ffree-line-length-none -m64 -std=f2003 -march=native -fbounds-check -finit-real=nan -DUSE_CBOOL"
- TEST_PGI=no
- NCHOME=/usr/
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-9
- gfortran-9
- libnetcdf-dev
- compiler: gcc
env:
- FC=gfortran-8
- FCFLAGS="-ffree-line-length-none -m64 -std=f2003 -march=native -fbounds-check -finit-real=nan -DUSE_CBOOL"
- TEST_PGI=no
- NCHOME=/usr/
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-8
- gfortran-8
- libnetcdf-dev
# cache:
# timeout: 1000
# directories:
# - "$HOME/pgi/"
before_install:
# Install PGI Community edition if not present in cache
- if [[ "${TEST_PGI}" == "yes" ]]; then
wget -q 'https://raw.githubusercontent.com/nemequ/pgi-travis/master/install-pgi.sh';
chmod +x install-pgi.sh;
./install-pgi.sh --nvidia;
pgfortran --version;
echo "switch -pthread is" > .userrc;
echo "append(LDLIB1=-lpthread);" >> .userrc;
fi
# Install netcdf-fortran for PGI
- git clone https://github.com/Unidata/netcdf-fortran.git --branch v4.4.4
- cd netcdf-fortran
- FC=$FC ./configure --prefix=${HOME}/netcdff
- make
- make install
- cd .. || exit 1
# Install CONDA
- wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda3/bin:$PATH
- conda update --yes conda
install:
# conda create --yes -n test python=$TRAVIS_PYTHON_VERSION
- conda create --yes -n test python=3.7
- source activate test
- conda install --yes urllib3 netcdf4 xarray dask
before_script:
- export RRTMGP_ROOT=$PWD
- export RRTMGP_DIR=$PWD/build
- export NFHOME=${HOME}/netcdff
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$NFHOME/lib
- cd examples/rfmip-clear-sky
- python3 ./stage_files.py
- cd ../..
script:
# Build library - default kernels
- cd build || exit 1
- make || exit 1
- cd .. || exit 1
# Build and run RFMIP examples
- cd examples/rfmip-clear-sky || exit 1
- make clean
- make || exit 1
- python3 ./run-rfmip-examples.py
- python3 ./compare-to-reference.py --fail=1.e-4
- cd ../..
# Build and run all-sky example
- cd examples/all-sky || exit 1
- make clean
- make || exit 1
- python3 ./run-allsky-example.py
- python3 ./compare-to-reference.py
- cd ../..
#
# Build library - Open-acc kernels
#
- export RTE_KERNELS="openacc"
- cd build || exit 1
- make clean
- make || exit 1
- cd .. || exit 1
# Build and run RFMIP examples
- cd examples/rfmip-clear-sky || exit 1
- make clean
- make || exit 1
- python3 ./run-rfmip-examples.py
- python3 ./compare-to-reference.py --fail=1.e-4
- cd ../..
# Build and run all-sky example
- cd examples/all-sky || exit 1
- make clean
- make || exit 1
- python3 ./run-allsky-example.py
- python3 ./compare-to-reference.py
- cd ../..
notifications:
email:
on_success: never
on_failure: never