Skip to content

Commit 8567b2d

Browse files
authored
Merge pull request #1305 from boutproject/v4.2-rc
Version 4.2.0
2 parents 8389878 + 91096a3 commit 8567b2d

757 files changed

Lines changed: 64823 additions & 37558 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codacy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
languages:
3+
cpp:
4+
extensions:
5+
- '*.hxx'
6+
- '*.cxx'
7+
engines:
8+
coverage:
9+
enabled: true
10+
exclude_paths:
11+
- tests/**
12+
- examples/**
13+
bandit:
14+
enabled: true
15+
include_paths:
16+
- tools/pylib/**
17+
cppcheck:
18+
enabled: true
19+
exclude_paths:
20+
- externalpackages/**
21+
- tools/**
22+
pylint:
23+
enable: true
24+
include_paths:
25+
- tools/pylib/**
26+
prospector:
27+
enable: true
28+
include_paths:
29+
- tools/pylib/**
30+
shellcheck:
31+
enable: true
32+
exclude_paths:
33+
- build-aux/**

.codacy_coverage.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#First install the reporter tool
2+
wget -q -O ~/codacy-coverage-reporter-assembly-latest.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/4.0.1/codacy-coverage-reporter-4.0.1-assembly.jar > /dev/null
3+
4+
#Analyse the existing gcov files and output in compatible xml format
5+
#The -g option says to use the existing gcov files, the -k options says to not delete the gcov files
6+
#The -j option is like make's -j
7+
#See https://gcovr.com/guide.html for more details
8+
gcovr --root . -k -j 2 --xml -o gcovr_report.xml --exclude-directories "tests/.*"
9+
10+
#Do the upload
11+
java -jar ~/codacy-coverage-reporter-assembly-latest.jar report -f --language CPP -r gcovr_report.xml --partial

.codecov.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
comment: false
2+
3+
ignore:
4+
- "tests"
5+
6+
codecov:
7+
branch: next

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@
2424
.tmtags
2525
autom4te.cache/
2626
aclocal.m4
27-
data_*
28-
test*.py
2927
/bin/bout-config
3028
/externalpackages/
3129
/include/pvode
3230
/lib/
3331
/manual/*.pdf
3432
/tools/vagrant/.vagrant
33+
\#*#
34+
.#*
35+
*.132t.vect
3536
*.gcda
3637
*.gcno
3738
bout-coverage/
39+
src/.libfast
40+
.*.mk

.install_miniconda_for_travis.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

.pip_install_for_travis.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
export PATH=${HOME}/.local/bin:${PATH}
3+
pip3 install --user --upgrade pip setuptools
4+
5+
for package in $@
6+
do
7+
if test $package == "cython"
8+
then
9+
# fast install Cython
10+
pip3 install --user Cython --install-option="--no-cython-compile"
11+
elif test $package == "something_else"
12+
then
13+
pip3 install what_we_need
14+
else
15+
pip3 install --user $package
16+
fi
17+
done

.travis.yml

Lines changed: 94 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -3,57 +3,112 @@ dist: trusty
33
language: cpp
44
compiler: gcc
55

6+
git:
7+
depth: 3
8+
69
addons:
710
apt:
8-
packages:
9-
- openmpi-bin
10-
- libopenmpi-dev
11+
# Note &<name> creates a reference that we can refer to later using
12+
# *<name>, see https://en.wikipedia.org/wiki/YAML#Syntax
13+
packages: &standard_packages
1114
- libfftw3-dev
1215
- libnetcdf-dev
13-
- libhdf5-serial-dev
1416
- netcdf-bin
1517
- hdf5-tools
18+
- python3
19+
- python3-pip
20+
- python3-numpy
21+
- python3-scipy
22+
- lcov
23+
- libhdf5-mpi-dev
24+
- openmpi-bin
25+
- libopenmpi-dev
1626

1727
matrix:
28+
fast_finish: true
1829
include:
19-
- env: CONFIGURE_OPTIONS=''
20-
- env: CONFIGURE_OPTIONS='--enable-openmp' OMP_NUM_THREADS=2
21-
- env: CONFIGURE_OPTIONS='--enable-debug'
22-
- env: CONFIGURE_OPTIONS='--enable-checks=no --enable-optimize=3 --disable-signal --disable-track --disable-backtrace'
23-
- env: CONFIGURE_OPTIONS='' MPICH_CC=clang MPICH_CXX=clang++ OMPI_CC=clang OMPI_CXX=clang++
24-
compiler: clang
25-
- env: CONFIGURE_OPTIONS='--enable-debug' MPICH_CC=clang MPICH_CXX=clang++ OMPI_CC=clang OMPI_CXX=clang++
26-
compiler: clang
30+
- env: &default_env
31+
- CONFIGURE_OPTIONS='--enable-checks=no --enable-optimize=3 --disable-signal --disable-track --disable-backtrace'
32+
- SCRIPT_FLAGS='-uim'
33+
- PIP_PACKAGES='netcdf4'
2734
- addons:
2835
apt:
36+
sources:
37+
- ubuntu-toolchain-r-test
2938
packages:
30-
- openmpi-bin
31-
- libopenmpi-dev
32-
- libfftw3-dev
33-
- libnetcdf-dev
34-
- libhdf5-serial-dev
35-
- netcdf-bin
36-
- hdf5-tools
39+
- g++-7
40+
- *standard_packages
41+
env:
42+
- *default_env
43+
- CONFIGURE_OPTIONS='--enable-debug'
44+
- CC=gcc-7 CXX=g++-7
45+
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
46+
#The -Wno-literal-suffix flag in CXXFLAGS above is a temporary workaround to
47+
#disable a noisy message arising from the relatively old version of openmpi
48+
#in use in combination with the relatively new version of gcc. We should be able
49+
#to remove this if a newer openmpi version is introduced.
50+
- CXXFLAGS="-Wno-literal-suffix -Wall -Wextra"
51+
- env:
52+
- *default_env
53+
- CONFIGURE_OPTIONS='--enable-shared'
54+
- SCRIPT_FLAGS="-uim -t python -t shared"
55+
- PIP_PACKAGES='netcdf4 cython'
56+
- env:
57+
- *default_env
58+
- CONFIGURE_OPTIONS='--enable-openmp'
59+
- OMP_NUM_THREADS=2
60+
#CLANG
61+
- env:
62+
- *default_env
63+
- CONFIGURE_OPTIONS='--enable-debug'
64+
- MPICH_CC=clang MPICH_CXX=clang++
65+
- OMPI_CC=clang OMPI_CXX=clang++
66+
compiler: clang
67+
#COVERAGE
68+
- if: branch IN (master, next) OR commit_message =~ /build coverage/
69+
addons:
70+
apt:
71+
packages:
72+
- *standard_packages
3773
- libpetsc3.4.2-dev
38-
env: CONFIGURE_OPTIONS='--with-petsc' PETSC_DIR=/usr/lib/petscdir/3.4.2 PETSC_ARCH=linux-gnu-c-opt
39-
- addons:
74+
- libslepc3.4.2-dev
75+
- liblapack-dev
76+
- libparpack2-dev
77+
- jq
78+
env:
79+
- CONFIGURE_OPTIONS='--enable-code-coverage --enable-debug --enable-track --enable-checks=3 --with-petsc --with-lapack --with-slepc --enable-openmp'
80+
- OMP_NUM_THREADS=2
81+
- PETSC_DIR=/usr/lib/petscdir/3.4.2
82+
- PETSC_ARCH=linux-gnu-c-opt
83+
- SLEPC_DIR=/usr/lib/slepcdir/3.4.2
84+
- SLEPC_ARCH=linux-gnu-c-opt
85+
- SCRIPT_FLAGS='-cu'
86+
- PIP_PACKAGES='gcovr'
87+
- secure: "M5U3I81hzK41Kw7KB+DpEMxP/sgkWkFI4uiRZQDMDFRlhcitsJQQ/YGeBt3a0vo153m2P2PmmeKUl/lTo5WS5SfAVFI8BkcyBjpxZQXV3OD8ru7JsMgVc5pGwl2dvR8Qz02gUIbrIpAlf3YDnNVb6F1C9ofDaCnZU3GUTLH5Fy5z5Z8OpuTaLmTVMMnT2ZEcRawHbmlVhIB/9PUQUa+fM7iC+dtszFxZ2ma5LOHxPS2sGpRCKE5Sae1/xAFWjo4oO0ZqYu5JFvKdb+/2yWKTg/1aTyxCdqAzLg4ldzDlX759zXgtWn+k3TLiVyQ+gsvF8QZkh4BKvl/w2KZ20vRP3blzmxvdsSH+ZP92MZIIK9EkNPGd+UJJd5Hu+zwecEFyfO8bXB9l00kzUsVx+lo7VHbANuNO3b5a6FRiihTCgk+dfOxxrow/fci+lQ9BkmJg0680SIj2e6UM/P9lFgfQLH3IoacN1PtkyqnpJqdHUdbWmpqMtmitmQhXHjnJ+wDb5+i9b1fy5yEsB64rjgF9PBr1/Nos1XD4oGWAknXmQTgWhNyy6f+e0wBNcSUd5nrReLTOAscyXYpcTqONp1W999JSFQEH+YTwBfXytdkWaAGAFEhaaAXQ2jCwHO7jl/TODPfSeZgXkQiT5jgg63i5tlPB4Xn0MTSCX74bYIi16Tk="
88+
- if: branch IN (master, next) OR commit_message =~ /build coverage/
89+
addons:
90+
apt:
91+
packages:
92+
- *standard_packages
93+
- jq
94+
env:
95+
- CONFIGURE_OPTIONS='--enable-code-coverage --disable-debug --disable-checks'
96+
- SCRIPT_FLAGS='-cu'
97+
- PIP_PACKAGES='gcovr'
98+
- secure: "M5U3I81hzK41Kw7KB+DpEMxP/sgkWkFI4uiRZQDMDFRlhcitsJQQ/YGeBt3a0vo153m2P2PmmeKUl/lTo5WS5SfAVFI8BkcyBjpxZQXV3OD8ru7JsMgVc5pGwl2dvR8Qz02gUIbrIpAlf3YDnNVb6F1C9ofDaCnZU3GUTLH5Fy5z5Z8OpuTaLmTVMMnT2ZEcRawHbmlVhIB/9PUQUa+fM7iC+dtszFxZ2ma5LOHxPS2sGpRCKE5Sae1/xAFWjo4oO0ZqYu5JFvKdb+/2yWKTg/1aTyxCdqAzLg4ldzDlX759zXgtWn+k3TLiVyQ+gsvF8QZkh4BKvl/w2KZ20vRP3blzmxvdsSH+ZP92MZIIK9EkNPGd+UJJd5Hu+zwecEFyfO8bXB9l00kzUsVx+lo7VHbANuNO3b5a6FRiihTCgk+dfOxxrow/fci+lQ9BkmJg0680SIj2e6UM/P9lFgfQLH3IoacN1PtkyqnpJqdHUdbWmpqMtmitmQhXHjnJ+wDb5+i9b1fy5yEsB64rjgF9PBr1/Nos1XD4oGWAknXmQTgWhNyy6f+e0wBNcSUd5nrReLTOAscyXYpcTqONp1W999JSFQEH+YTwBfXytdkWaAGAFEhaaAXQ2jCwHO7jl/TODPfSeZgXkQiT5jgg63i5tlPB4Xn0MTSCX74bYIi16Tk="
99+
100+
- stage: Finalise Coverage
101+
if: branch IN (master, next) OR commit_message =~ /build coverage/
102+
addons:
40103
apt:
41-
sources:
42-
- ubuntu-toolchain-r-test
43104
packages:
44-
- g++-6
45-
- openmpi-bin
46-
- libopenmpi-dev
47-
- libfftw3-dev
48-
- libnetcdf-dev
49-
- libhdf5-serial-dev
50-
- netcdf-bin
51-
- hdf5-tools
52-
env: CONFIGURE_OPTIONS='' CC=gcc-6 CXX=g++-6 MPICH_CC=gcc-6 MPICH_CXX=g++-6 OMPI_CC=gcc-6 OMPI_CXX=g++-6 MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" CXXFLAGS=-Wno-literal-suffix
53-
#The -Wno-literal-suffix flag in CXXFLAGS above is a temporary workaround to
54-
#disable a noisy message arising from the relatively old version of openmpi
55-
#in use in combination with the relatively new version of gcc. We should be able
56-
#to remove this if a newer openmpi version is introduced.
105+
- *standard_packages
106+
- jq
107+
env:
108+
- SCRIPT_FLAGS='-cu'
109+
- PIP_PACKAGES='gcovr'
110+
- secure: "M5U3I81hzK41Kw7KB+DpEMxP/sgkWkFI4uiRZQDMDFRlhcitsJQQ/YGeBt3a0vo153m2P2PmmeKUl/lTo5WS5SfAVFI8BkcyBjpxZQXV3OD8ru7JsMgVc5pGwl2dvR8Qz02gUIbrIpAlf3YDnNVb6F1C9ofDaCnZU3GUTLH5Fy5z5Z8OpuTaLmTVMMnT2ZEcRawHbmlVhIB/9PUQUa+fM7iC+dtszFxZ2ma5LOHxPS2sGpRCKE5Sae1/xAFWjo4oO0ZqYu5JFvKdb+/2yWKTg/1aTyxCdqAzLg4ldzDlX759zXgtWn+k3TLiVyQ+gsvF8QZkh4BKvl/w2KZ20vRP3blzmxvdsSH+ZP92MZIIK9EkNPGd+UJJd5Hu+zwecEFyfO8bXB9l00kzUsVx+lo7VHbANuNO3b5a6FRiihTCgk+dfOxxrow/fci+lQ9BkmJg0680SIj2e6UM/P9lFgfQLH3IoacN1PtkyqnpJqdHUdbWmpqMtmitmQhXHjnJ+wDb5+i9b1fy5yEsB64rjgF9PBr1/Nos1XD4oGWAknXmQTgWhNyy6f+e0wBNcSUd5nrReLTOAscyXYpcTqONp1W999JSFQEH+YTwBfXytdkWaAGAFEhaaAXQ2jCwHO7jl/TODPfSeZgXkQiT5jgg63i5tlPB4Xn0MTSCX74bYIi16Tk="
111+
script: wget -q -O ~/codacy-coverage-reporter-assembly-latest.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/4.0.1/codacy-coverage-reporter-4.0.1-assembly.jar ; java -jar ~/codacy-coverage-reporter-assembly-latest.jar final
57112

58113
before_install:
59114
##################################################
@@ -64,19 +119,13 @@ before_install:
64119
- eval "${MATRIX_EVAL}"
65120
- echo "${CC} $(${CC} --version)"
66121
##################################################
67-
# Install Conda for python 3
122+
# Install remaining python3 packages using pip
68123
##################################################
69-
- source .install_miniconda_for_travis.sh
70-
71-
##################################################
72-
73-
# Make sure to use the system NetCDF/HDF5 libraries, or we end up
74-
# using the Conda libraries, which causes no end of headaches
75-
- export CONFIGURE_OPTIONS="--with-netcdf=/usr/bin/nc-config --with-hdf5=/usr/bin/h5cc $CONFIGURE_OPTIONS"
124+
- source .pip_install_for_travis.sh ${PIP_PACKAGES}
76125

77126
script:
78127
# Configure, compile and run test_suite
79-
- "./.travis_script.sh"
128+
- "./.travis_script.sh ${SCRIPT_FLAGS}"
80129

81130
notifications:
82131
# Send a notification to the BOUT++ Slack team

0 commit comments

Comments
 (0)