Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into size_ICM
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrlongne committed Nov 14, 2016
2 parents d2905d5 + 896ecd4 commit ee9772f
Show file tree
Hide file tree
Showing 9 changed files with 138 additions and 78 deletions.
89 changes: 62 additions & 27 deletions .travis-install-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# not provided by travis or by apt-get.

# preliminaries and environment

set -e
source regression/scripts/common.sh

topdir=`pwd` # /home/travis/build/losalamos/Draco
Expand All @@ -21,32 +21,67 @@ topdir=`pwd` # /home/travis/build/losalamos/Draco
RANDOM123_VER=1.09
CMAKE_VERSION=3.6.2-Linux-x86_64
NUMDIFF_VER=5.8.1
CLANG_FORMAT_VER=3.9
OPENMPI_VER=1.10.3

# printenv

if [[ ${STYLE} ]]; then

# clang-format and git-clang-format
echo " "
echo "Clang-format"
run "sudo add-apt-repository 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-${CLANG_FORMAT_VER} main'"
run "wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -"
run "sudo apt-get update -qq"
run "sudo apt-get install -qq -y clang-format-${CLANG_FORMAT_VER}"
run "cd ${VENDOR_DIR}/bin"
run "ln -s /usr/bin/clang-format-${CLANG_FORMAT_VER} clang-format"
run "ln -s /usr/bin/git-clang-format-${CLANG_FORMAT_VER} git-clang-format"
run "cd $topdir"

else

# Random123
echo " "
echo "Random123"
cd $HOME
run "wget https://www.deshawresearch.com/downloads/download_random123.cgi/Random123-${RANDOM123_VER}.tar.gz"
run "tar -xvf Random123-${RANDOM123_VER}.tar.gz"
echo "Please set RANDOM123_INC_DIR=$HOME/Random123-${RANDOM123_VER}/include"
run "ls $HOME/Random123-${RANDOM123_VER}/include"

# CMake
echo " "
echo "CMake"
run "cd $HOME"
run "wget --no-check-certificate http://www.cmake.org/files/v${CMAKE_VERSION:0:3}/cmake-${CMAKE_VERSION}.tar.gz"
run "tar -xzf cmake-${CMAKE_VERSION}.tar.gz"
run "cd $topdir"

# Numdiff
echo " "
echo "Numdiff"
run "wget http://mirror.lihnidos.org/GNU/savannah/numdiff/numdiff-${NUMDIFF_VER}.tar.gz"
run "tar -xvf numdiff-${NUMDIFF_VER}.tar.gz"
run "cd numdiff-${NUMDIFF_VER}"
run "./configure --prefix=/usr && make"
run "sudo make install"
run "cd $topdir"

# OpenMPI
echo " "
echo "OpenMPI"
run "wget --no-check-certificate https://www.open-mpi.org/software/ompi/v1.10/downloads/openmpi-${OPENMPI_VER}.tar.gz"
run "tar -zxf openmpi-${OPENMPI_VER}.tar.gz"
run "cd openmpi-${OPENMPI_VER}"
run "./configure --enable-mpi-thread-multiple --quiet > build-openmpi.log"
run "make >> build-openmpi.log"
run "sudo make install"
run "sudo sh -c 'echo \"/usr/local/lib\n/usr/local/lib/openmpi\" > /etc/ld.so.conf.d/openmpi.conf'"
run "sudo ldconfig"
run "cd $topdir"

# Random123
echo " "
echo "Random123"
cd $HOME
run "wget https://www.deshawresearch.com/downloads/download_random123.cgi/Random123-${RANDOM123_VER}.tar.gz"
run "tar -xvf Random123-${RANDOM123_VER}.tar.gz"
echo "Please set RANDOM123_INC_DIR=$HOME/Random123-${RANDOM123_VER}/include"
run "ls $HOME/Random123-${RANDOM123_VER}/include"

# CMake
echo " "
echo "CMake"
run "cd $HOME"
run "wget --no-check-certificate http://www.cmake.org/files/v${CMAKE_VERSION:0:3}/cmake-${CMAKE_VERSION}.tar.gz"
run "tar -xzf cmake-${CMAKE_VERSION}.tar.gz"
run "cd $topdir"

# Numdiff
echo " "
echo "Numdiff"
run "wget http://mirror.lihnidos.org/GNU/savannah/numdiff/numdiff-${NUMDIFF_VER}.tar.gz"
run "tar -xvf numdiff-${NUMDIFF_VER}.tar.gz"
run "cd numdiff-${NUMDIFF_VER}"
run "./configure --prefix=/usr && make"
run "sudo make install"
run "cd $topdir"
fi

# Finish up and report
64 changes: 27 additions & 37 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,63 @@
language: cpp
sudo: required
dist: trusty

# Notes:
# $HOME -> /home/travis
# code checked out to (this is $PWD for the script) -> /home/travis/build/losalamos/Draco
# travis will not install numdiff -> use ./.travis-install-dependencies.sh.

env:
global:
- BLAS_blas_LIBRARY=/usr/lib/libblas.a
- CC=gcc-5
- CCACHE_CPP2=yes
- CMAKE=$HOME/cmake-3.6.2-Linux-x86_64/bin/cmake
- CTEST=$HOME/cmake-3.6.2-Linux-x86_64/bin/ctest
- CXX=g++-5
- FC=gfortran-5
- LAPACK_LIB_DIR=/usr/lib
- OMP_NUM_THREADS=4
- RANDOM123_INC_DIR=$HOME/Random123-1.09/include
- VENDOR_DIR=${HOME}
- topdir=/home/travis/build/losalamos/Draco
- COVERAGE=ON
matrix:
- STYLE=ON
- WERROR=ON

addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- ccache
- libgsl0-dev
- libopenmpi-dev
- openmpi-bin
- gcc-5
- g++-5
- gfortran-5
- liblapack-dev
- clang-format-3.8

env:
global:
- topdir=/home/travis/build/losalamos/Draco
- CCACHE_CPP2=yes
- GVER=5
- CMAKE_VERSION=3.6.2-Linux-x86_64
- CMAKE=$HOME/cmake-${CMAKE_VERSION}/bin/cmake
- CTEST=$HOME/cmake-${CMAKE_VERSION}/bin/ctest
- RANDOM123_VER=1.09
- RANDOM123_INC_DIR=$HOME/Random123-${RANDOM123_VER}/include
- LAPACK_LIB_DIR=/usr/lib
- BLAS_blas_LIBRARY=/usr/lib/libblas.a
- J=2
- OMP_NUM_THREADS=4
- CLANG_FORMAT_VER=3.8
- VENDOR_DIR=${HOME}
matrix:
- STYLE=ON
- WERROR=ON
- COVERAGE=ON

before_install:
- if [[ ${GVER} ]]; then export CC=gcc-${GVER}; export CXX=g++-${GVER}; export FC=gfortran-${GVER}; fi
- if [[ ${COVERAGE} ]]; then pip install --user codecov; fi
- mkdir -p ${VENDOR_DIR}/bin & export PATH=${VENDOR_DIR}/bin:$PATH
- if [[ ${COVERAGE} ]]; then pip install --user codecov; fi

install: ./.travis-install-dependencies.sh

before_script:
- if [[ ${WERROR} ]]; then for i in CC CXX FC; do eval export ${i}=\"${!i} -Werror\"; done; fi
- if [[ ${COVERAGE} ]]; then for i in CC CXX FC; do eval export ${i}=\"${!i} --coverage\"; done; fi
# - cd $topdir && echo $CMAKE && $CMAKE --version && which numdiff && printenv
- if [[ ${WERROR} ]]; then for i in CC CXX FC; do eval export ${i}=\"${!i} -Werror\"; done; fi
- if [[ ${COVERAGE} ]]; then for i in CC CXX FC; do eval export ${i}=\"${!i} --coverage\"; done; fi

script:
# -Wl,--no-as-needed is a workaround for bugs.debian.org/457284 .
- if [[ ${STYLE} ]]; then regression/check_style.sh -t; else mkdir -p build && cd build &&
${CMAKE} -DCMAKE_EXE_LINKER_FLAGS="-Wl,--no-as-needed" .. &&
make -j${J} VERBOSE=1 &&
${CTEST} -j ${J} -E \(c4_tstOMP_2\) &&
make -j 2 VERBOSE=1 &&
${CTEST} -j 2 -E \(c4_tstOMP_2\) &&
make install DESTDIR="${HOME}" && cd - ; fi

after_success:
- if [[ ${COVERAGE} ]]; then codecov --gcov-exec gcov-${GVER}; fi
- if [[ ${COVERAGE} ]]; then codecov --gcov-exec gcov-5; fi

cache:
- ccache
Expand All @@ -81,7 +75,6 @@ git:
# CC=gcc-5
# CCACHE_CPP2=yes
# CI=true
# CLANG_FORMAT_VER=3.8
# CMAKE=/home/travis/cmake-3.5.2-Linux-x86_64/bin/cmake
# CMAKE_VERSION=3.5.2-Linux-x86_64
# COMPOSER_NO_INTERACTION=1
Expand All @@ -94,12 +87,10 @@ git:
# GEM_PATH=/home/travis/.rvm/gems/ruby-2.2.5:/home/travis/.rvm/gems/ruby-2.2.5@global
# GIT_ASKPASS=echo
# GOROOT=/home/travis/.gimme/versions/go1.4.2.linux.amd64
# GVER=5
# HAS_ANTARES_THREE_LITTLE_FRONZIES_BADGE=true
# HAS_JOSH_K_SEAL_OF_APPROVAL=true
# HOME=/home/travis
# IRBRC=/home/travis/.rvm/rubies/ruby-2.2.5/.irbrc
# J=2
# JAVA_HOME=/usr/lib/jvm/java-7-oracle
# JRUBY_OPTS=--client -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -Xcext.enabled=false -J-Xss2m -Xcompile.invokedynamic=false
# LANG=en_US.UTF-8
Expand Down Expand Up @@ -127,7 +118,6 @@ git:
# RACK_ENV=test
# RAILS_ENV=test
# RANDOM123_INC_DIR=/home/travis/Random123-1.09/include
# RANDOM123_VER=1.09
# RUBY_VERSION=ruby-2.2.5
# SHELL=/bin/bash
# SHLVL=2
Expand Down
2 changes: 1 addition & 1 deletion environment/bashrc/.bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ if test ${DRACO_BASHRC_DONE:-no} = no && test ${INTERACTIVE} = true; then
;;

# Snow | Fire | Ice
sn* )
sn* | fi* | ic* )
source ${DRACO_ENV_DIR}/bashrc/.bashrc_toss3
;;

Expand Down
2 changes: 1 addition & 1 deletion environment/bashrc/.bashrc_toss3
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ else
module load friendly-testing

export dracomodules="intel/16.0.3 openmpi/1.10.3 mkl \
subversion cmake numdiff git totalview hsi trilinos/12.8.1 \
subversion cmake numdiff git totalview trilinos/12.8.1 \
superlu-dist/4.3 metis/5.1.0 parmetis/4.0.3 ndi random123 eospac/6.2.4"

fi
Expand Down
12 changes: 11 additions & 1 deletion environment/git/install-hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Install git pre-commit hooks. The root directory of the target local git
# repository is expected as a parameter.

# Example:
# .../draco/environment/git $HOME/ccs-codes/jayenne

# This file is part of a set of unofficial pre-commit hooks available
# at github.
# Link: https://github.com/githubbrowser/Pre-commit-hooks
Expand All @@ -17,7 +20,14 @@ HOOKS="pre-commit pre-commit-clang-format"
# There should be no need to change anything below this line.

export rscriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export dotgitdir="$( cd "$rscriptdir/../../.git" && pwd )"

if [[ $1 ]]; then
if [[ -d $1/.git ]]; then
export dotgitdir="$( cd "$1/.git" && pwd )"
else
export dotgitdir="$( cd "$rscriptdir/../../.git" && pwd )"
fi
fi

. "$(dirname -- "$0")/canonicalize_filename.sh"

Expand Down
3 changes: 3 additions & 0 deletions regression/ccscs-regress.msub
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ if [[ "${regress_mode}" = "off" ]]; then
export AUTODOCDIR=$work_dir/autodoc
else
export work_dir=${base_dir}/${subproj}/${dashboard_type}_${comp}/${build_type}
if test -d /ccs/codes/radtran/autodoc; then
export AUTODOCDIR=/ccs/codes/radtran/autodoc
fi
fi

echo "ccscs-regress.msub: work_dir = ${work_dir}"
Expand Down
6 changes: 4 additions & 2 deletions regression/draco_regression_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,10 @@ win32$ set work_dir=c:/full/path/to/work_dir
/usr/projects/draco/vendors
c:/vendors
)
set( AUTODOCDIR "${VENDOR_DIR}/../autodoc" )
get_filename_component( AUTODOCDIR "${AUTODOCDIR}" ABSOLUTE )
if( NOT "$ENV{AUTODOCDIR}x" STREQUAL "x" )
set( AUTODOCDIR "$ENV{AUTODOCDIR}" )
get_filename_component( AUTODOCDIR "${AUTODOCDIR}" ABSOLUTE )
endif()

set( VERBOSE ON )
set( CTEST_OUTPUT_ON_FAILURE ON )
Expand Down
30 changes: 25 additions & 5 deletions regression/fetch_co.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,30 @@ fi
thisbranch=`git rev-parse --abbrev-ref HEAD`
log "thisbranch = $thisbranch"

# If the branch already exists in the regression source directory, remove it and
# fetch it again.
if test "$thisbranch" = "pr${featurebranch}"; then
run "${GIT} reset --hard origin/develop"
run "${GIT} pull origin $prdir/${featurebranch}/head"
else
run "${GIT} fetch origin ${prdir}/${featurebranch}/head:pr${featurebranch}"
run "${GIT} checkout pr${featurebranch}"
# run "${GIT} reset --hard origin/develop"
run "${GIT} checkout develop"
run "${GIT} branch -D pr${featurebranch}"
# run "${GIT} pull origin $prdir/${featurebranch}/head"
fi
run "${GIT} fetch origin ${prdir}/${featurebranch}/head:pr${featurebranch}"
run "${GIT} checkout pr${featurebranch}"

# Another option is to edit .git/config:
# [core]
# repositoryformatversion = 0
# filemode = true
# bare = false
# logallrefupdates = true
# [remote "origin"]
# url = [email protected]:losalamos/Draco.git
# fetch = +refs/heads/*:refs/remotes/origin/*
# fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
# [branch "develop"]
# remote = origin
# merge = refs/heads/develop
# so that 'git fetch origin' fetches all PRs and 'git checkout pr/999' will be a
# tracking branch. The problem with this approach is that all PRs are downloaded
# and this can take time.
8 changes: 4 additions & 4 deletions src/c4/Invert_Comm_Map.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ namespace rtt_c4 {
typedef std::map<int, size_t> Invert_Comm_Map_t;

//---------------------------------------------------------------------------//
/*
* \brief Inverts a communication map.
/**
* \brief Invert the contents of a one-to-many mapping between nodes.
*
* \param to_map On input, a map from processor number to the size of
* \param[in] to_map On input, a map from processor number to the size of
* information to be sent to (or received from) that processor
* by the current processor.
* \param from_map On output, a map from processor number to the size of
* \param[out] from_map On output, a map from processor number to the size of
* information to be received from (or sent to) that processor by
* the current processor. On input, ignored and deleted.
*
Expand Down

0 comments on commit ee9772f

Please sign in to comment.