forked from parflow/parflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
182 lines (163 loc) · 6.36 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
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
173
174
175
176
177
178
179
180
181
182
jobs:
include:
- os: linux
dist: trusty
name: 'Ubuntu 14.04LTS'
env:
- PF_ACC_BACKEND=none
- PF_TEST_VER=ubuntu1404
- PF_PYTHON=false
addons:
apt:
packages:
- gfortran
- libhdf5-openmpi-dev
- libhdf5-openmpi-7
- hdf5-helpers
- tcl-dev
- tk-dev
- os: linux
dist: trusty
name: 'Ubuntu 14.04LTS with OMP'
env:
- PF_ACC_BACKEND=omp
- PF_TEST_VER=ubuntu1404
- PF_PYTHON=false
addons:
apt:
packages:
- gfortran
- libhdf5-openmpi-dev
- libhdf5-openmpi-7
- hdf5-helpers
- tcl-dev
- tk-dev
- os: linux
dist: bionic
name: 'Ubuntu 18.04LTS'
env:
- PF_ACC_BACKEND=none
- PF_TEST_VER=ubuntu1804
- PF_PYTHON=true
addons:
apt:
packages:
- gfortran
- libhdf5-openmpi-dev
- libhdf5-openmpi-100
- hdf5-helpers
- tcl-dev
- tk-dev
- python3
- python3-venv
- os: linux
dist: bionic
name: 'Ubuntu 18.04LTS with OMP'
env:
- PF_ACC_BACKEND=omp
- PF_TEST_VER=ubuntu1804
- PF_PYTHON=false
addons:
apt:
packages:
- gfortran
- libhdf5-openmpi-dev
- libhdf5-openmpi-100
- hdf5-helpers
- tcl-dev
- tk-dev
- os: linux
dist: bionic
name: 'Ubuntu 18.04LTS with CUDA'
env:
- PF_ACC_BACKEND=cuda
- PF_TEST_VER=ubuntu1804
- PF_PYTHON=false
addons:
apt:
packages:
- gfortran
- libhdf5-openmpi-dev
- libhdf5-openmpi-100
- hdf5-helpers
- tcl-dev
- tk-dev
language: cpp
compiler:
- gcc
before_install:
# Set up dependencies
- echo $LANG
- echo $LC_ALL
- test -n $CC && unset CC
- test -n $CXX && unset CXX
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 78BD65473CB3BD13;
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6B05F25D762E3157;
- sudo apt-get -qq update
# Set up CMake
- if [[ ! -f cmake-3.14.0-Linux-x86_64/bin/cmake ]]; then
wget --no-check-certificate http://cmake.org/files/v3.14/cmake-3.14.0-Linux-x86_64.tar.gz && tar -xf cmake-3.14.0-Linux-x86_64.tar.gz;
fi
- export PATH=$TRAVIS_BUILD_DIR/cmake-3.14.0-Linux-x86_64/bin/:$PATH;
# Set up Hypre; testing against version used in XSDK 0.5
- wget https://github.com/hypre-space/hypre/archive/v2.18.2.tar.gz && tar -xf v2.18.2.tar.gz
- cd hypre-2.18.2/src
- ./configure && make install
- export HYPRE_ROOT=`pwd`/hypre && cd ../..
# Set up Silo
- wget https://wci.llnl.gov/content/assets/docs/simulation/computer-codes/silo/silo-4.10.2/silo-4.10.2.tar.gz && tar -xf silo-4.10.2.tar.gz
- cd silo-4.10.2
- ./configure --disable-silex --disable-hzip --disable-fpzip && make install
- export SILO_ROOT=`pwd` && cd ..
# Set up CUDA
- CUDA_SHORT=10.1;
- CUDA_VER=10.1.105-1;
- wget http://developer.download.nvidia.com/compute/cuda/repos/${PF_TEST_VER}/x86_64/cuda-repo-${PF_TEST_VER}_${CUDA_VER}_amd64.deb;
- sudo dpkg -i cuda-repo-${PF_TEST_VER}_${CUDA_VER}_amd64.deb;
- sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/${PF_TEST_VER}/x86_64/7fa2af80.pub;
- sudo apt update -qq;
- sudo apt install -y cuda-core-${CUDA_SHORT/./-} cuda-cudart-dev-${CUDA_SHORT/./-} cuda-nvtx-${CUDA_SHORT/./-};
- export CUDA_HOME=/usr/local/cuda-${CUDA_SHORT};
- export LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH};
- export LIBRARY_PATH=${CUDA_HOME}/lib64/stubs;
- export PATH=${CUDA_HOME}/bin:${PATH};
# Set up UCX for OpenMPI
- sudo apt install -y autoconf;
- sudo apt install -y automake;
- sudo apt install -y libtool;
- wget https://github.com/openucx/ucx/releases/download/v1.8.0-rc1/ucx-1.8.0.tar.gz && tar -xf ucx-1.8.0.tar.gz;
- cd ucx-1.8.0;
- ./contrib/configure-release --prefix=$TRAVIS_BUILD_DIR/ucx-cuda --with-cuda=$CUDA_HOME --with-java=no --disable-numa && sudo make -j8 install;
- cd ..;
# Set up OpenMPI
- wget https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.3.tar.gz && tar -xf openmpi-4.0.3.tar.gz;
- cd openmpi-4.0.3;
- ./configure --with-cuda=$CUDA_HOME --with-ucx=$TRAVIS_BUILD_DIR/ucx-cuda && sudo make -j8 install;
- cd ..;
- sudo ldconfig;
# Set up RMM
- if [[ $PF_ACC_BACKEND == 'cuda' ]]; then
git clone -b branch-0.10 --single-branch --recurse-submodules https://github.com/rapidsai/rmm.git;
cd rmm && export RMM_ROOT=`pwd` && cmake . -DCMAKE_INSTALL_PREFIX=$RMM_ROOT && make -j && make install && cd ..;
fi
before_script:
# Set up Parflow
- cd $TRAVIS_BUILD_DIR
- export CC=mpicc && export CXX=mpicxx && export F77=mpif77 && export FC=mpif90
- export OMPI_MCA_rmaps_base_oversubscribe=1
- export OMP_NUM_THREADS=1
# Build with PARFLOW_ACCELERATOR_BACKEND=$PF_ACC_BACKEND
- export PARFLOW_DIR=$TRAVIS_BUILD_DIR/install && mkdir -p $PARFLOW_DIR;
- if [[ $PF_ACC_BACKEND == 'cuda' ]]; then
mkdir -p $TRAVIS_BUILD_DIR/build && cd $TRAVIS_BUILD_DIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-lcuda -Wall -Werror -Wno-unused-result -Wno-unused-function' -DPARFLOW_AMPS_LAYER=mpi1 -DPARFLOW_AMPS_SEQUENTIAL_IO=true -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DHYPRE_ROOT=$HYPRE_ROOT -DPARFLOW_ENABLE_HDF5=true -DSILO_ROOT=$SILO_ROOT -DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR -DPARFLOW_ACCELERATOR_BACKEND=cuda -DRMM_ROOT=$RMM_ROOT;
else
mkdir -p $TRAVIS_BUILD_DIR/build && cd $TRAVIS_BUILD_DIR/build && cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS='-Wall -Werror -Wno-unused-result -Wno-unused-function' -DPARFLOW_AMPS_LAYER=mpi1 -DPARFLOW_AMPS_SEQUENTIAL_IO=true -DPARFLOW_ENABLE_TIMING=TRUE -DPARFLOW_HAVE_CLM=ON -DHYPRE_ROOT=$HYPRE_ROOT -DPARFLOW_ENABLE_HDF5=true -DSILO_ROOT=$SILO_ROOT -DCMAKE_INSTALL_PREFIX=$PARFLOW_DIR -DPARFLOW_ACCELERATOR_BACKEND=$PF_ACC_BACKEND -DPARFLOW_ENABLE_PYTHON=$PF_PYTHON -DPARFLOW_PYTHON_VIRTUAL_ENV=$PF_PYTHON;
fi
- cd $TRAVIS_BUILD_DIR/build && make && make install;
script:
# Run tests with PARFLOW_ACCELERATOR_BACKEND=$PF_ACC_BACKEND (Travis does not support running with CUDA)
- if [[ $PF_ACC_BACKEND != 'cuda' ]]; then
cd $TRAVIS_BUILD_DIR/build && make test;
fi
after_failure:
- cat $TRAVIS_BUILD_DIR/build/Testing/Temporary/LastTest.log