-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #534 from UW-Hydro/develop
VIC 5.0.0-rc1
- Loading branch information
Showing
771 changed files
with
74,221 additions
and
178,439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "samples/data"] | ||
path = samples/data | ||
url = https://github.com/UW-Hydro/VIC_sample_data.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,90 @@ | ||
language: c | ||
compiler: gcc | ||
script: make -C src/ | ||
sudo: false # use container based build | ||
notifications: | ||
email: false | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
# Image Driver | ||
- compiler: gcc | ||
os: linux | ||
env: TESTID='image' | ||
addons: | ||
apt_packages: | ||
- libnetcdf-dev | ||
- gfortran | ||
- valgrind | ||
# open-mpi is built from source in image.travis | ||
# CESM Driver | ||
- compiler: gcc | ||
os: linux | ||
env: TESTID='cesm' | ||
addons: | ||
apt_packages: | ||
- libnetcdf-dev | ||
- gfortran | ||
# open-mpi is built from source in cesm.travis | ||
# Classic Driver | ||
- compiler: clang | ||
os: linux | ||
env: TESTID='classic' | ||
addons: | ||
apt_packages: | ||
- valgrind | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
- compiler: gcc | ||
os: linux | ||
env: TESTID='classic' | ||
addons: | ||
apt_packages: | ||
- valgrind | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
- compiler: gcc | ||
os: linux | ||
env: TESTID=classic USE_CC=gcc-5 | ||
addons: | ||
apt: | ||
packages: | ||
- gcc-5 | ||
- gcc-5-multilib | ||
- linux-libc-dev:i386 | ||
- valgrind | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
- compiler: clang | ||
os: linux | ||
env: TESTID=classic USE_CC=clang-3.6 | ||
addons: | ||
apt: | ||
packages: | ||
- clang-3.6 | ||
- valgrind | ||
sources: | ||
- llvm-toolchain-precise-3.6 | ||
- ubuntu-toolchain-r-test | ||
- compiler: gcc | ||
os: osx | ||
env: TESTID=classic BREW_INSTALLS=valgrind | ||
allow_failures: | ||
# OSX build moved to allowed failures because throughput was so slow on travis | ||
- compiler: gcc | ||
os: osx | ||
env: TESTID=classic BREW_INSTALLS=valgrind | ||
before_install: | ||
- source ci/vic_install_utils | ||
- source ci/${TESTID}.travis | ||
- install_miniconda | ||
- vic_before_install | ||
install: | ||
- vic_install | ||
before_script: | ||
- vic_before_script | ||
script: | ||
- vic_script | ||
after_success: | ||
- vic_after_success | ||
after_failure: | ||
- vic_after_failure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM ubuntu:trusty | ||
|
||
# Get the basic VIC dependencies | ||
RUN apt-get update -q && \ | ||
apt-get install -y -q --no-install-recommends \ | ||
ca-certificates \ | ||
build-essential \ | ||
ssh \ | ||
netcdf-bin \ | ||
libnetcdf-dev \ | ||
libopenmpi-dev \ | ||
openmpi-bin \ | ||
git \ | ||
make | ||
|
||
# Dedicated work directory for output | ||
ENV WORKDIR $HOME/workdir | ||
RUN mkdir -p $WORKDIR | ||
|
||
# Put the UW-Hydro version of VIC in the container | ||
RUN git clone https://github.com/UW-Hydro/VIC.git | ||
|
||
# Command to run when this image is "run", just build the classic and image drivers | ||
CMD git checkout develop && \ | ||
git pull origin develop && \ | ||
cd VIC/vic/drivers/classic && \ | ||
make && \ | ||
./vic_classic.exe -o && \ | ||
cd ../image && \ | ||
make && \ | ||
./vic_image.exe -o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DRIVER_PATH="./vic/drivers/cesm/" | ||
DRIVER_LIB="${DRIVER_PATH}lndlib.a" | ||
|
||
function vic_before_install { | ||
echo vic_before_install | ||
echo $PATH | ||
if [ ! -z "$USE_CC" ]; then | ||
echo "export CC=$USE_CC" | ||
export CC=$USE_CC; | ||
$CC --version | ||
fi | ||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then | ||
echo "Testing on osx" | ||
if [ ! -z "$BREW_TAPS" ]; then | ||
for tap in $BREW_TAPS | ||
do | ||
brew tap $tap | ||
done | ||
fi | ||
if [ ! -z "$BREW_INSTALLS" ]; then | ||
brew update | ||
for pkg in $BREW_INSTALLS | ||
do | ||
brew outdated $pkg || brew upgrade $pkg || brew install $pkg | ||
brew link $pkg | ||
done | ||
fi | ||
export TRAVIS_NETCDFPATH=/usr/local | ||
export TRAVIS_MPIPATH=/usr/local | ||
else | ||
export TRAVIS_NETCDFPATH=/usr | ||
export TRAVIS_MPIPATH="${HOME}/mpich" | ||
|
||
# Install MPICH | ||
if [ ! -d ${TRAVIS_MPIPATH} ]; then | ||
install_mpich | ||
else | ||
echo "MPICH installed..." | ||
fi | ||
find ${TRAVIS_MPIPATH} -name mpiexec | ||
find ${TRAVIS_MPIPATH} -name mpicc | ||
fi | ||
|
||
} | ||
|
||
function vic_install { | ||
echo vic_install | ||
cd ${TRAVIS_BUILD_DIR} | ||
echo $PWD | ||
make full -C $DRIVER_PATH | ||
} | ||
|
||
function vic_before_script { | ||
echo vic_before_script | ||
if [ ! -f $DRIVER_LIB ]; then | ||
echo "Library (${DRIVER_LIB}) not found!" | ||
exit 1 | ||
fi | ||
} | ||
|
||
function vic_script { | ||
echo vic_script | ||
nm ${DRIVER_LIB} | ||
|
||
# Run test package | ||
./tests/run_tests.py unit | ||
} | ||
|
||
function vic_after_success { | ||
echo vic_after_success | ||
echo "Success!" | ||
} | ||
|
||
function vic_after_failure { | ||
echo vic_after_failure | ||
echo "Test failed -- please review the log" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
DRIVER_PATH="${TRAVIS_BUILD_DIR}/vic/drivers/classic/" | ||
DRIVER_EXE="${DRIVER_PATH}vic_classic.exe" | ||
SAMPLES_PATH="${TRAVIS_BUILD_DIR}/samples/" | ||
|
||
function vic_before_install { | ||
echo vic_before_install | ||
echo $PATH | ||
if [ ! -z "$USE_CC" ]; then | ||
echo "export CC=$USE_CC" | ||
export CC=$USE_CC; | ||
$CC --version | ||
fi | ||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then | ||
echo "Testing on osx" | ||
if [ ! -z "$BREW_TAPS" ]; then | ||
for tap in $BREW_TAPS | ||
do | ||
brew tap $tap | ||
done | ||
fi | ||
if [ ! -z "$BREW_INSTALLS" ]; then | ||
brew update | ||
for pkg in $BREW_INSTALLS | ||
do | ||
brew outdated $pkg || brew upgrade $pkg || brew install $pkg | ||
brew link $pkg | ||
done | ||
fi | ||
fi | ||
} | ||
|
||
function vic_install { | ||
echo vic_install | ||
$CC --version | ||
which $CC | ||
type $CC | ||
make full -C $DRIVER_PATH | ||
} | ||
|
||
function vic_before_script { | ||
echo vic_before_script | ||
if [ ! -f $DRIVER_EXE ]; then | ||
echo "Executable (${DRIVER_EXE}) not found!" | ||
exit 1 | ||
fi | ||
|
||
echo "Getting sample data" | ||
bash ${SAMPLES_PATH}/get_sample_data.bash | ||
} | ||
|
||
function vic_script { | ||
echo vic_script | ||
$DRIVER_EXE -v | ||
$DRIVER_EXE -o | ||
|
||
# Run test package | ||
./tests/run_tests.py unit examples system \ | ||
--vic_exe=${DRIVER_EXE} \ | ||
--driver=${TESTID} \ | ||
--data_dir=${SAMPLES_PATH}/data | ||
|
||
} | ||
|
||
function vic_after_success { | ||
echo vic_after_success | ||
echo "Success!" | ||
} | ||
|
||
function vic_after_failure { | ||
echo vic_after_failure | ||
echo "Test failed -- please review the log" | ||
} |
Oops, something went wrong.