-
Notifications
You must be signed in to change notification settings - Fork 18
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 #50 from NCAR/develop
Update master for 0.4 tag
- Loading branch information
Showing
38 changed files
with
2,800 additions
and
1,272 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,5 @@ test_regression | |
test_calendar | ||
test_qm | ||
test_config | ||
downscale | ||
test_random | ||
gard |
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,19 +1,27 @@ | ||
sudo: false | ||
sudo: false # use container-based build | ||
language: fortran | ||
compiler: | ||
- gfortran | ||
os: | ||
- linux | ||
notifications: | ||
email: false | ||
|
||
compiler: gfortran-6 | ||
os: linux | ||
env: TESTID='gard_linux' | ||
addons: | ||
apt: | ||
source: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
packages: | ||
- gfortran | ||
- libnetcdf-dev | ||
- liblapack-dev | ||
- libnetcdf-dev | ||
- gfortran-6 | ||
before_install: | ||
- source ci/gard_install_utils | ||
- gard_before_install | ||
install: | ||
- gard_install | ||
script: | ||
- sed -i "s|NCDF_PATH = /usr/local|NCDF_PATH = /usr|" src/makefile | ||
- sed -i "s|LAPACK_PATH = /usr/local|LAPACK_PATH = /usr|" src/makefile | ||
- make -C src -j4 test | ||
- make -C src -j4 | ||
- gard_script | ||
after_success: | ||
- gard_after_success | ||
after_failure: | ||
- gard_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
set -x | ||
|
||
export CC=/usr/bin/gcc-6 | ||
export FC=/usr/bin/gfortran-6 | ||
|
||
if [ -z "$WORKDIR" ]; then | ||
export WORKDIR=$HOME/workdir | ||
mkdir -p $WORKDIR | ||
fi | ||
|
||
if [ -z "$INSTALLDIR" ]; then | ||
export INSTALLDIR=$HOME/installdir | ||
mkdir -p $INSTALLDIR | ||
fi | ||
|
||
function install_szip { | ||
echo install_szip | ||
cd $WORKDIR | ||
wget --no-check-certificate -q http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz | ||
tar -xzf szip-2.1.tar.gz | ||
cd szip-2.1 | ||
./configure --prefix=$INSTALLDIR &> config.log | ||
make &> make.log | ||
make install | ||
export CPPFLAGS="$CPPFLAGS -I${INSTALLDIR}/include" | ||
export LDFLAGS="$LDFLAGS -L${INSTALLDIR}/lib" | ||
} | ||
|
||
function install_hdf5 { | ||
echo install_hdf5 | ||
cd $WORKDIR | ||
wget --no-check-certificate -q http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.10.0-patch1.tar.gz | ||
tar -xzf hdf5-1.10.0-patch1.tar.gz | ||
cd hdf5-1.10.0-patch1 | ||
./configure --prefix=$INSTALLDIR &> config.log | ||
make &> make.log | ||
make install | ||
export LIBDIR=${INSTALLDIR}/lib | ||
} | ||
|
||
function install_netcdf_c { | ||
echo install_netcdf_c | ||
cd $WORKDIR | ||
wget --no-check-certificate -q ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4.4.1.tar.gz | ||
tar -xzf netcdf-4.4.1.tar.gz | ||
cd netcdf-4.4.1 | ||
./configure --prefix=$INSTALLDIR &> config.log | ||
make &> make.log | ||
make install | ||
export LD_LIBRARY_PATH=${INSTALLDIR}/lib | ||
} | ||
|
||
function install_netcdf_fortran { | ||
echo install_netcdf_fortran | ||
cd $WORKDIR | ||
wget --no-check-certificate -q ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-fortran-4.4.4.tar.gz | ||
tar -xzf netcdf-fortran-4.4.4.tar.gz | ||
cd netcdf-fortran-4.4.4 | ||
./configure --prefix=$INSTALLDIR &> config.log | ||
make &> make.log | ||
make install | ||
} | ||
|
||
function gard_before_install { | ||
echo gard_before_install | ||
# Install szip (used by hdf5) | ||
install_szip | ||
# Install HDF5 | ||
install_hdf5 | ||
# Install NetCDF-C | ||
install_netcdf_c | ||
# Install NetCDF fortran | ||
install_netcdf_fortran | ||
} | ||
|
||
function gard_install { | ||
echo gard_install | ||
cd ${TRAVIS_BUILD_DIR} | ||
sed -i "s|NCDF_PATH = /usr/local|NCDF_PATH = ${INSTALLDIR}|" src/makefile | ||
sed -i "s|LAPACK_PATH = /usr/local|LAPACK_PATH = /usr|" src/makefile | ||
make -C src clean; make -C src -j4 test | ||
make -C src clean; make -C src -j4 MODE=debugslow | ||
make -C src clean; make -C src -j4 MODE=debug | ||
make -C src clean; make -C src -j4 MODE=debugompslow | ||
make -C src clean; make -C src -j4 MODE=debugomp | ||
make -C src clean; make -C src -j4 MODE=profile | ||
make -C src clean; make -C src -j4 MODE=fast | ||
make -C src clean; make -C src -j4 | ||
echo "GARD install succeeded" | ||
} | ||
|
||
function gard_script { | ||
cd ./src | ||
./gard --version | ||
./gard -h | ||
./test_calendar | ||
# ./test_random | ||
./test_regression | ||
# ./test_config ../run/downscale_options.txt | ||
cd ../ | ||
echo "GARD script succeeded" | ||
} | ||
|
||
function gard_after_success { | ||
echo gard_after_success | ||
echo "GARD build succeeded" | ||
} | ||
|
||
function gard_after_failure { | ||
echo gard_after_failure | ||
echo "GARD build failed" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.