Skip to content

Commit

Permalink
Merge pull request #534 from UW-Hydro/develop
Browse files Browse the repository at this point in the history
VIC 5.0.0-rc1
  • Loading branch information
bartnijssen authored Jun 29, 2016
2 parents 7c3556b + dc56d48 commit aa0f335
Show file tree
Hide file tree
Showing 771 changed files with 74,221 additions and 178,439 deletions.
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,32 @@
*.lib
*.a

# Build process
.depend
.cache
build/
dist/
vic_headers.py

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
*.dSYM
*.mod

vicNl
vic_classic
vic_image
liblnd.a
_vic.py

.DS_Store
site/
TAGS

*egg-info*

# Python stuff
.ipynb_checkpoints
.eggs
3 changes: 3 additions & 0 deletions .gitmodules
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
91 changes: 89 additions & 2 deletions .travis.yml
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
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you think you have found a bug in VIC, please file an issue on Github [here](

If you can provide more information that is great. If you know how to run the model in a debugger, you may be able to pinpoint where the problem occurs.

#### Requesting New features
#### Proposing New Features

The VIC model is under active development. If you would like to propose a new feature, driver, or extension to the VIC model, please raise a Github issue [here](https://github.com/UW-Hydro/VIC/issues). Also, because VIC is an open source model with no official support for development, be prepared to contribute to the implementation of your feature request. Also note that features that are only of interest to you are unlikely to be implemented in the main source code repo (although you are of course free to modify the code in any way you see fit).

Expand Down
31 changes: 31 additions & 0 deletions ci/Dockerfile
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
81 changes: 81 additions & 0 deletions ci/cesm.travis
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"
}
76 changes: 76 additions & 0 deletions ci/classic.travis
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"
}
Loading

0 comments on commit aa0f335

Please sign in to comment.