Skip to content

Commit 6633136

Browse files
authored
Merge branch 'master' into sts
2 parents 24f66e3 + 1fe841a commit 6633136

22 files changed

+294
-70
lines changed

.travis.yml

+34-12
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,62 @@
11
# .travis.yml
2-
# Defines build matrix and regression tests for Travis CI.com
2+
# Defines build matrix and regression tests for Travis CI
33
language: cpp
44
branches:
55
only:
66
- master
77
- dust
88
- mhd4_3D
9-
# Default build matrix is 4x Ubuntu builds:
9+
# Default build matrix is 4x Ubuntu builds (inherit the default stage name "test"):
1010
os:
1111
- linux
1212
dist: trusty
1313
sudo: false # use faster container-based build
1414
addons:
1515
apt:
16+
sources:
17+
- llvm-toolchain-trusty-5.0
1618
packages:
1719
- "python3"
1820
- "python3-pip"
21+
- "clang-5.0" # Ubuntu 14.04 ships wit Clang 3.5.0 as of 2018-10-29
1922
# OpenMPI and MPICH implementations:
2023
env:
2124
matrix:
22-
- MPI_CHOICE=mpich
23-
- MPI_CHOICE=openmpi
25+
- MPI_CHOICE=mpich
26+
- MPI_CHOICE=openmpi
2427
compiler:
2528
- g++
2629
- clang++
2730
# Define Ubuntu build caches (cache ignored inside "include:" matrix)
2831
cache:
2932
pip: true # Caching NumPy for regression test script
30-
directories:
33+
directories: # TODO(felker): sync "version_str=" lines in install scripts with cache dir names
3134
# For caching Linux source directories:
32-
- openmpi-3.0.2 # released 6/1/18
33-
- mpich-3.2.1 # stable maintenance release from 11/10/17
35+
- openmpi-3.0.2
36+
- mpich-3.2.1
3437
# Caching Linux install directories:
3538
- openmpi
3639
- mpich
3740
- fftw
38-
- fftw-3.3.7 # stable release as of 11/8/17
41+
- fftw-3.3.8
3942
- hdf5
40-
- hdf5-1.10.1 # released on 2017-04-27
43+
- hdf5-1.10.4
4144

42-
# Explicitly includilng the 2x macOS jobs in build matrix
45+
# Explicitly includilng the 2x macOS jobs in build matrix (inherit the default stage name "test")
4346
# Must specify complete build details, or the jobs will inherit
4447
# the first value in the above arrays. Could encapsulate in script
48+
# --------------
49+
# History of Travis CI default osx_image (date = when used in this file)
50+
# (2018-10-30) xcode9.4 on macOS 10.13 High Sierra
51+
# (2018-04-11) xcode8.3 on macOS 10.12 Sierra
52+
# TODO(felker): improve syncing of osx "softwareupdate" cmd xcode version argument in
53+
# tst/ci/travis/ install_mpich.sh, install_openmpi.sh (workaround for Homebrew GCC)
4554
matrix:
4655
include:
4756
- os: osx
48-
osx_image: xcode9.3 # macOS 10.13 High Sierra
57+
osx_image: xcode9.4
4958
compiler: clang++
59+
addons:
5060
env:
5161
- MPI_CHOICE=mpich
5262
# Override Linux cache mapping
@@ -67,8 +77,9 @@ matrix:
6777
- hdf5
6878
- "/usr/local/Cellar/hdf5/"
6979
- os: osx
70-
osx_image: xcode8.3 # macOS 10.12 Sierra. Default as of 4/11/18
80+
osx_image: xcode9.4
7181
compiler: clang++
82+
addons:
7283
env:
7384
- MPI_CHOICE=openmpi
7485
- TMPDIR=/tmp
@@ -93,12 +104,23 @@ matrix:
93104
- stage: python linter
94105
before_install: skip
95106
install: skip
107+
addons:
108+
apt:
109+
packages:
110+
- "python3"
111+
- "python3-pip"
112+
env:
113+
compiler:
96114
script: python3 -m flake8 --exclude=cpplint.py,openmpi-* && echo "Finished linting Python files with flake8"
97115
# Test Google C++ Style Guide adherence for .cpp, .hpp files:
98116
- stage: c++ linter
99117
before_install: skip
100118
install: skip
101119
before_script: skip
120+
addons:
121+
env:
122+
compiler:
123+
# "python" must point to Py2 distro, otherwise cpplint.py will silently quit while checking 1st file
102124
script: cd tst/style/ && ./cpplint_athena.sh
103125

104126
# Recommended by Travis CI documentation to unset these for MPI builds to prevent conflicts

CHANGELOG.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Feature branches to merge to `master`:
5555
- Improved readability of `TimeIntegratorTaskList`
5656
- Fixed spherical coordinates terms for non-ideal MHD
5757
- Fixed reflective symmetry preservation for hydrodynamic viscosity calculations
58-
- Eliminated small floating point errors when analyzing uniform grid results using included Python HDF5 reader
58+
- Eliminated small floating-point errors when analyzing uniform grid results using included Python HDF5 reader
5959
- Changed turbulence driving switches to avoid possible bug during initial cycle
6060
- Plugged MPI resource leaks in Multigrid
6161

@@ -67,10 +67,10 @@ Feature branches to merge to `master`:
6767
- Viscosity terms break Rayleigh-Taylor symmetry [\#144](https://github.com/PrincetonUniversity/athena/issues/144)
6868
- SIMD vectorization disabled for Roe-type Riemann solvers [\#126](https://github.com/PrincetonUniversity/athena/issues/126)
6969
- Memory leak in jeans\_3d.py test MPI run [\#115](https://github.com/PrincetonUniversity/athena/issues/115)
70-
- athena\_read.py athdf\(\) results in small floating point errors [\#111](https://github.com/PrincetonUniversity/athena/issues/111)
70+
- athena\_read.py athdf\(\) results in small floating-point errors [\#111](https://github.com/PrincetonUniversity/athena/issues/111)
7171
- Remove unused GravityBoundaryFunction\_\[\] array from Mesh class [\#149](https://github.com/PrincetonUniversity/athena/pull/149) ([felker](https://github.com/felker))
7272
- Cleanup minor issues before v1.1.1 release; fix viscosity asymmetry [\#147](https://github.com/PrincetonUniversity/athena/pull/147) ([felker](https://github.com/felker))
73-
- Return exact floating point values when reading HDF5 coordinates [\#145](https://github.com/PrincetonUniversity/athena/pull/145) ([c-white](https://github.com/c-white))
73+
- Return exact floating-point values when reading HDF5 coordinates [\#145](https://github.com/PrincetonUniversity/athena/pull/145) ([c-white](https://github.com/c-white))
7474
- Fixed spherical coordinates for non-ideal MHD [\#142](https://github.com/PrincetonUniversity/athena/pull/142) ([tomidakn](https://github.com/tomidakn))
7575
- Added interactive spherical plotting: [\#139](https://github.com/PrincetonUniversity/athena/pull/139) ([c-white](https://github.com/c-white))
7676
- Use \#pragma omp declare simd for functions called in SIMD loops [\#138](https://github.com/PrincetonUniversity/athena/pull/138) ([felker](https://github.com/felker))
@@ -117,7 +117,7 @@ Feature branches to merge to `master`:
117117
- Characteristic variable reconstruction (PLM and PPM) with `time/xorder=2c` or `3c` runtime option
118118
- Redesign of time-integrator to support high-order schemes
119119
- Turbulence driving
120-
- Double precision floating point HDF5 output
120+
- Double precision floating-point HDF5 output
121121
- Software development tools (mostly) exclusive to private repository:
122122
- Continuous integration (Jenkins and Travis CI)
123123
- C++ style checker
@@ -142,9 +142,9 @@ Feature branches to merge to `master`:
142142
- Conflicting restart and input parameters for writing output [\#62](https://github.com/PrincetonUniversity/athena/issues/62)
143143
- Add double precision option for HDF5 output [\#28](https://github.com/PrincetonUniversity/athena/issues/28)
144144
- Improve vectorization for loops in PPM [\#121](https://github.com/PrincetonUniversity/athena/pull/121) ([beiwang2003](https://github.com/beiwang2003))
145-
- Improve symmetry-preservation of HLLD floating point operations [\#120](https://github.com/PrincetonUniversity/athena/pull/120) ([felker](https://github.com/felker))
145+
- Improve symmetry-preservation of HLLD floating-point operations [\#120](https://github.com/PrincetonUniversity/athena/pull/120) ([felker](https://github.com/felker))
146146
- Fix restarted simulation calculation of next\_time for writing outputs [\#116](https://github.com/PrincetonUniversity/athena/pull/116) ([felker](https://github.com/felker))
147-
- Support double precision floating point HDF5 output [\#108](https://github.com/PrincetonUniversity/athena/pull/108) ([felker](https://github.com/felker))
147+
- Support double precision floating-point HDF5 output [\#108](https://github.com/PrincetonUniversity/athena/pull/108) ([felker](https://github.com/felker))
148148
- Add templates for Issue and PR; creating draft of CONTRIBUTING.md [\#93](https://github.com/PrincetonUniversity/athena/pull/93) ([felker](https://github.com/felker))
149149
- Make athdf a class which will delay reading until data is requested [\#84](https://github.com/PrincetonUniversity/athena/pull/84) ([msbc](https://github.com/msbc))
150150
- Improve TimeIntegratorTaskList performance [\#80](https://github.com/PrincetonUniversity/athena/pull/80) ([felker](https://github.com/felker))
@@ -210,7 +210,7 @@ Feature branches to merge to `master`:
210210
- Add Bash wrapper to join\_vtk++ for many MeshBlocks, output steps [\#91](https://github.com/PrincetonUniversity/athena/pull/91) ([felker](https://github.com/felker))
211211
- Add CODEOWNERS file to new .github/ root dir [\#90](https://github.com/PrincetonUniversity/athena/pull/90) ([felker](https://github.com/felker))
212212
- Add ShearingBox component [\#89](https://github.com/PrincetonUniversity/athena/pull/89) ([jmshi](https://github.com/jmshi))
213-
- Improve floating point precision consistency throughout code [\#82](https://github.com/PrincetonUniversity/athena/pull/82) ([felker](https://github.com/felker))
213+
- Improve floating-point precision consistency throughout code [\#82](https://github.com/PrincetonUniversity/athena/pull/82) ([felker](https://github.com/felker))
214214
- Add primitive variable flooring functions to the EquationOfState class [\#81](https://github.com/PrincetonUniversity/athena/pull/81) ([felker](https://github.com/felker))
215215
- Add MG and FFT convergence regression tests based on 3D linear Jeans instability [\#75](https://github.com/PrincetonUniversity/athena/pull/75) ([alwinm](https://github.com/alwinm))
216216
- Add cylindrical and spherical polar coordinates limiter terms to PPM [\#69](https://github.com/PrincetonUniversity/athena/pull/69) ([felker](https://github.com/felker))

Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ SRC_FILES := $(wildcard src/*.cpp) \
2626
$(wildcard src/bvals/*.cpp) \
2727
$(wildcard src/coordinates/*.cpp) \
2828
src/eos/$(EOS_FILE) \
29-
$(wildcard src/fft/*.cpp) \
3029
src/eos/eos_high_order.cpp \
30+
$(wildcard src/fft/*.cpp) \
3131
$(wildcard src/field/*.cpp) \
3232
$(wildcard src/field/field_diffusion/*.cpp) \
3333
$(wildcard src/gravity/*.cpp) \

configure.py

+15-7
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
# --fftw_path=path path to FFTW libraries (requires the FFTW library)
2929
# --grav=xxx use xxx as the self-gravity solver
3030
# --cxx=xxx use xxx as the C++ compiler
31-
# --ccmd=name use name as the command to call the C++ compiler
31+
# --ccmd=name use name as the command to call the (non-MPI) C++ compiler
32+
# --mpiccmd=name use name as the command to call the MPI C++ compiler
3233
# --cflag=string append string whenever invoking compiler/linker
3334
# --include=path use -Ipath when compiling
3435
# --lib=path use -Lpath when linking
@@ -207,7 +208,12 @@
207208
# --ccmd=[name] argument
208209
parser.add_argument('--ccmd',
209210
default=None,
210-
help='override for command to use to call C++ compiler')
211+
help='override for command to use to call (non-MPI) C++ compiler')
212+
213+
# --mpiccmd=[name] argument
214+
parser.add_argument('--mpiccmd',
215+
default=None,
216+
help='override for command to use to call MPI C++ compiler')
211217

212218
# --cflag=[string] argument
213219
parser.add_argument('--cflag',
@@ -461,7 +467,6 @@
461467
else:
462468
definitions['SINGLE_PRECISION_ENABLED'] = '0'
463469

464-
465470
# -debug argument
466471
if args['debug']:
467472
definitions['DEBUG'] = 'DEBUG'
@@ -478,6 +483,10 @@
478483
else:
479484
definitions['DEBUG'] = 'NOT_DEBUG'
480485

486+
# --ccmd=[name] argument
487+
if args['ccmd'] is not None:
488+
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = args['ccmd']
489+
481490
# -mpi argument
482491
if args['mpi']:
483492
definitions['MPI_OPTION'] = 'MPI_PARALLEL'
@@ -489,6 +498,9 @@
489498
makefile_options['COMPILER_FLAGS'] += ' -h mpi1'
490499
if args['cxx'] == 'bgxl':
491500
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = 'mpixlcxx' # noqa
501+
# --mpiccmd=[name] argument
502+
if args['mpiccmd'] is not None:
503+
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = args['mpiccmd'] # noqa
492504
else:
493505
definitions['MPI_OPTION'] = 'NOT_MPI_PARALLEL'
494506

@@ -577,10 +589,6 @@
577589
else:
578590
definitions['H5_DOUBLE_PRECISION_ENABLED'] = '0'
579591

580-
# --ccmd=[name] argument
581-
if args['ccmd'] is not None:
582-
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = args['ccmd']
583-
584592
# --cflag=[string] argument
585593
if args['cflag'] is not None:
586594
makefile_options['COMPILER_FLAGS'] += ' '+args['cflag']

src/defs.hpp.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
// enable GR frame transformations? default=0 (false)
5555
#define FRAME_TRANSFORMATIONS @FRAME_TRANSFORMATIONS@
5656

57-
// floating point single precision option
57+
// floating-point single precision option
5858
#define SINGLE_PRECISION_ENABLED @SINGLE_PRECISION_ENABLED@
5959

6060
// MPI parallelization (MPI_PARALLEL or NOT_MPI_PARALLEL)
@@ -66,7 +66,7 @@
6666
// HDF5 output (HDF5OUTPUT or NO_HDF5OUTPUT)
6767
#define @HDF5_OPTION@
6868

69-
// HDF5 floating point ouptut precision option
69+
// HDF5 floating-point ouptut precision option
7070
#define H5_DOUBLE_PRECISION_ENABLED @H5_DOUBLE_PRECISION_ENABLED@
7171

7272
// compiler options

src/hydro/rsolvers/mhd/hlld.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ void Hydro::RiemannSolver(const int kl, const int ku, const int jl, const int ju
7474

7575
// Compute L/R states for selected conserved variables
7676
Real bxsq = bxi*bxi;
77-
// (KGF): group transverse vector components for floating point associativity symmetry
77+
// (KGF): group transverse vector components for floating-point associativity symmetry
7878
Real pbl = 0.5*(bxsq + (SQR(wli[IBY]) + SQR(wli[IBZ]))); // magnetic pressure (l/r)
7979
Real pbr = 0.5*(bxsq + (SQR(wri[IBY]) + SQR(wri[IBZ])));
8080
Real kel = 0.5*wli[IDN]*(SQR(wli[IVX]) + (SQR(wli[IVY]) + SQR(wli[IVZ])));
@@ -141,7 +141,7 @@ void Hydro::RiemannSolver(const int kl, const int ku, const int jl, const int ju
141141
Real sdr = spd[4] - wri[IVX];
142142

143143
// S_M: eqn (38) of Miyoshi & Kusano
144-
// (KGF): group ptl, ptr terms for floating point associativity symmetry
144+
// (KGF): group ptl, ptr terms for floating-point associativity symmetry
145145
spd[2] = (sdr*ur.mx - sdl*ul.mx + (ptl - ptr))/(sdr*ur.d - sdl*ul.d);
146146

147147
Real sdml = spd[0] - spd[2]; // S_i-S_M (i=L or R)
@@ -190,10 +190,10 @@ void Hydro::RiemannSolver(const int kl, const int ku, const int jl, const int ju
190190
ulst.bz = ul.bz * tmp;
191191
}
192192
// v_i* dot B_i*
193-
// (KGF): group transverse momenta terms for floating point associativity symmetry
193+
// (KGF): group transverse momenta terms for floating-point associativity symmetry
194194
Real vbstl = (ulst.mx*bxi+(ulst.my*ulst.by+ulst.mz*ulst.bz))*ulst_d_inv;
195195
// eqn (48) of M&K
196-
// (KGF): group transverse by, bz terms for floating point associativity symmetry
196+
// (KGF): group transverse by, bz terms for floating-point associativity symmetry
197197
ulst.e = (sdl*ul.e - ptl*wli[IVX] + ptst*spd[2] +
198198
bxi*(wli[IVX]*bxi + (wli[IVY]*ul.by + wli[IVZ]*ul.bz) - vbstl))*sdml_inv;
199199

@@ -218,10 +218,10 @@ void Hydro::RiemannSolver(const int kl, const int ku, const int jl, const int ju
218218
urst.bz = ur.bz * tmp;
219219
}
220220
// v_i* dot B_i*
221-
// (KGF): group transverse momenta terms for floating point associativity symmetry
221+
// (KGF): group transverse momenta terms for floating-point associativity symmetry
222222
Real vbstr = (urst.mx*bxi+(urst.my*urst.by+urst.mz*urst.bz))*urst_d_inv;
223223
// eqn (48) of M&K
224-
// (KGF): group transverse by, bz terms for floating point associativity symmetry
224+
// (KGF): group transverse by, bz terms for floating-point associativity symmetry
225225
urst.e = (sdr*ur.e - ptr*wri[IVX] + ptst*spd[2] +
226226
bxi*(wri[IVX]*bxi + (wri[IVY]*ur.by + wri[IVZ]*ur.bz) - vbstr))*sdmr_inv;
227227
// ul** and ur** - if Bx is near zero, same as *-states

src/inputs/hdf5_reader.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <mpi.h> // MPI_COMM_WORLD, MPI_INFO_NULL
2727
#endif
2828

29-
// Determine floating point precision (in memory, not file)
29+
// Determine floating-point precision (in memory, not file)
3030
#if SINGLE_PRECISION_ENABLED
3131
#define H5T_REAL H5T_NATIVE_FLOAT
3232
#else

src/mesh/mesh.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,9 @@ void Mesh::Initialize(int res_flag, ParameterInput *pin) {
13501350

13511351
// begin fourth-order correction of midpoint initial condition:
13521352
// --------------------------
1353-
bool correct_ic = pmb->precon->correct_ic;
1353+
1354+
// correct IC on all MeshBlocks or none; switch cannot be toggled independently
1355+
bool correct_ic = pmb_array[0]->precon->correct_ic;
13541356
if (correct_ic == true) {
13551357
#pragma omp for private(pmb, phydro, pfield, pbval)
13561358
for (int i=0; i<nmb; ++i) {

src/reconstruct/reconstruction.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,16 @@ Reconstruction::Reconstruction(MeshBlock *pmb, ParameterInput *pin) {
143143
<< "Reconfigure with Cartesian coordinates " << std::endl;
144144
throw std::runtime_error(msg.str().c_str());
145145
}
146+
147+
if (SHEARING_BOX) {
148+
std::stringstream msg;
149+
msg << "### FATAL ERROR in Reconstruction constructor" << std::endl
150+
<< "Selected time/xorder=" << input_recon << " flux calculations"
151+
<< "currently does not support shearing box boundary conditions " << std::endl;
152+
throw std::runtime_error(msg.str().c_str());
153+
return;
154+
}
155+
146156
// check for necessary number of ghost zones for PPM w/ fourth-order flux corrections
147157
int req_nghost = 4;
148158
// until new algorithm for face-averaged Field->bf to cell-averaged Hydro->bcc

src/utils/ran2.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// shuffle and added safeguards. Returns a uniform random deviate between 0.0 and 1.0
2222
// (exclusive of the endpoint values). Call with idum = a negative integer to
2323
// initialize; thereafter, do not alter idum between successive deviates in a sequence.
24-
// RNMX should appriximate the largest floating point value that is less than 1.
24+
// RNMX should appriximate the largest floating-point value that is less than 1.
2525

2626
#define IMR1 2147483563
2727
#define IMR2 2147483399

src/utils/show_config.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ void ShowConfig(void) {
5757
std::cout<<" General Relativity: OFF " << std::endl;
5858
}
5959
if (SINGLE_PRECISION_ENABLED) {
60-
std::cout<<" Floating point precision: single" << std::endl;
60+
std::cout<<" Floating-point precision: single" << std::endl;
6161
} else {
62-
std::cout<<" Floating point precision: double" << std::endl;
62+
std::cout<<" Floating-point precision: double" << std::endl;
6363
}
6464
std::cout<<" Number of ghost cells: " << NGHOST << std::endl;
6565
#ifdef MPI_PARALLEL

0 commit comments

Comments
 (0)