Skip to content

Commit

Permalink
Merge branch 'master' into sts
Browse files Browse the repository at this point in the history
  • Loading branch information
felker authored Oct 31, 2018
2 parents 24f66e3 + 1fe841a commit 6633136
Show file tree
Hide file tree
Showing 22 changed files with 294 additions and 70 deletions.
46 changes: 34 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,62 @@
# .travis.yml
# Defines build matrix and regression tests for Travis CI.com
# Defines build matrix and regression tests for Travis CI
language: cpp
branches:
only:
- master
- dust
- mhd4_3D
# Default build matrix is 4x Ubuntu builds:
# Default build matrix is 4x Ubuntu builds (inherit the default stage name "test"):
os:
- linux
dist: trusty
sudo: false # use faster container-based build
addons:
apt:
sources:
- llvm-toolchain-trusty-5.0
packages:
- "python3"
- "python3-pip"
- "clang-5.0" # Ubuntu 14.04 ships wit Clang 3.5.0 as of 2018-10-29
# OpenMPI and MPICH implementations:
env:
matrix:
- MPI_CHOICE=mpich
- MPI_CHOICE=openmpi
- MPI_CHOICE=mpich
- MPI_CHOICE=openmpi
compiler:
- g++
- clang++
# Define Ubuntu build caches (cache ignored inside "include:" matrix)
cache:
pip: true # Caching NumPy for regression test script
directories:
directories: # TODO(felker): sync "version_str=" lines in install scripts with cache dir names
# For caching Linux source directories:
- openmpi-3.0.2 # released 6/1/18
- mpich-3.2.1 # stable maintenance release from 11/10/17
- openmpi-3.0.2
- mpich-3.2.1
# Caching Linux install directories:
- openmpi
- mpich
- fftw
- fftw-3.3.7 # stable release as of 11/8/17
- fftw-3.3.8
- hdf5
- hdf5-1.10.1 # released on 2017-04-27
- hdf5-1.10.4

# Explicitly includilng the 2x macOS jobs in build matrix
# Explicitly includilng the 2x macOS jobs in build matrix (inherit the default stage name "test")
# Must specify complete build details, or the jobs will inherit
# the first value in the above arrays. Could encapsulate in script
# --------------
# History of Travis CI default osx_image (date = when used in this file)
# (2018-10-30) xcode9.4 on macOS 10.13 High Sierra
# (2018-04-11) xcode8.3 on macOS 10.12 Sierra
# TODO(felker): improve syncing of osx "softwareupdate" cmd xcode version argument in
# tst/ci/travis/ install_mpich.sh, install_openmpi.sh (workaround for Homebrew GCC)
matrix:
include:
- os: osx
osx_image: xcode9.3 # macOS 10.13 High Sierra
osx_image: xcode9.4
compiler: clang++
addons:
env:
- MPI_CHOICE=mpich
# Override Linux cache mapping
Expand All @@ -67,8 +77,9 @@ matrix:
- hdf5
- "/usr/local/Cellar/hdf5/"
- os: osx
osx_image: xcode8.3 # macOS 10.12 Sierra. Default as of 4/11/18
osx_image: xcode9.4
compiler: clang++
addons:
env:
- MPI_CHOICE=openmpi
- TMPDIR=/tmp
Expand All @@ -93,12 +104,23 @@ matrix:
- stage: python linter
before_install: skip
install: skip
addons:
apt:
packages:
- "python3"
- "python3-pip"
env:
compiler:
script: python3 -m flake8 --exclude=cpplint.py,openmpi-* && echo "Finished linting Python files with flake8"
# Test Google C++ Style Guide adherence for .cpp, .hpp files:
- stage: c++ linter
before_install: skip
install: skip
before_script: skip
addons:
env:
compiler:
# "python" must point to Py2 distro, otherwise cpplint.py will silently quit while checking 1st file
script: cd tst/style/ && ./cpplint_athena.sh

# Recommended by Travis CI documentation to unset these for MPI builds to prevent conflicts
Expand Down
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Feature branches to merge to `master`:
- Improved readability of `TimeIntegratorTaskList`
- Fixed spherical coordinates terms for non-ideal MHD
- Fixed reflective symmetry preservation for hydrodynamic viscosity calculations
- Eliminated small floating point errors when analyzing uniform grid results using included Python HDF5 reader
- Eliminated small floating-point errors when analyzing uniform grid results using included Python HDF5 reader
- Changed turbulence driving switches to avoid possible bug during initial cycle
- Plugged MPI resource leaks in Multigrid

Expand All @@ -67,10 +67,10 @@ Feature branches to merge to `master`:
- Viscosity terms break Rayleigh-Taylor symmetry [\#144](https://github.com/PrincetonUniversity/athena/issues/144)
- SIMD vectorization disabled for Roe-type Riemann solvers [\#126](https://github.com/PrincetonUniversity/athena/issues/126)
- Memory leak in jeans\_3d.py test MPI run [\#115](https://github.com/PrincetonUniversity/athena/issues/115)
- athena\_read.py athdf\(\) results in small floating point errors [\#111](https://github.com/PrincetonUniversity/athena/issues/111)
- athena\_read.py athdf\(\) results in small floating-point errors [\#111](https://github.com/PrincetonUniversity/athena/issues/111)
- Remove unused GravityBoundaryFunction\_\[\] array from Mesh class [\#149](https://github.com/PrincetonUniversity/athena/pull/149) ([felker](https://github.com/felker))
- Cleanup minor issues before v1.1.1 release; fix viscosity asymmetry [\#147](https://github.com/PrincetonUniversity/athena/pull/147) ([felker](https://github.com/felker))
- Return exact floating point values when reading HDF5 coordinates [\#145](https://github.com/PrincetonUniversity/athena/pull/145) ([c-white](https://github.com/c-white))
- Return exact floating-point values when reading HDF5 coordinates [\#145](https://github.com/PrincetonUniversity/athena/pull/145) ([c-white](https://github.com/c-white))
- Fixed spherical coordinates for non-ideal MHD [\#142](https://github.com/PrincetonUniversity/athena/pull/142) ([tomidakn](https://github.com/tomidakn))
- Added interactive spherical plotting: [\#139](https://github.com/PrincetonUniversity/athena/pull/139) ([c-white](https://github.com/c-white))
- Use \#pragma omp declare simd for functions called in SIMD loops [\#138](https://github.com/PrincetonUniversity/athena/pull/138) ([felker](https://github.com/felker))
Expand Down Expand Up @@ -117,7 +117,7 @@ Feature branches to merge to `master`:
- Characteristic variable reconstruction (PLM and PPM) with `time/xorder=2c` or `3c` runtime option
- Redesign of time-integrator to support high-order schemes
- Turbulence driving
- Double precision floating point HDF5 output
- Double precision floating-point HDF5 output
- Software development tools (mostly) exclusive to private repository:
- Continuous integration (Jenkins and Travis CI)
- C++ style checker
Expand All @@ -142,9 +142,9 @@ Feature branches to merge to `master`:
- Conflicting restart and input parameters for writing output [\#62](https://github.com/PrincetonUniversity/athena/issues/62)
- Add double precision option for HDF5 output [\#28](https://github.com/PrincetonUniversity/athena/issues/28)
- Improve vectorization for loops in PPM [\#121](https://github.com/PrincetonUniversity/athena/pull/121) ([beiwang2003](https://github.com/beiwang2003))
- Improve symmetry-preservation of HLLD floating point operations [\#120](https://github.com/PrincetonUniversity/athena/pull/120) ([felker](https://github.com/felker))
- Improve symmetry-preservation of HLLD floating-point operations [\#120](https://github.com/PrincetonUniversity/athena/pull/120) ([felker](https://github.com/felker))
- Fix restarted simulation calculation of next\_time for writing outputs [\#116](https://github.com/PrincetonUniversity/athena/pull/116) ([felker](https://github.com/felker))
- Support double precision floating point HDF5 output [\#108](https://github.com/PrincetonUniversity/athena/pull/108) ([felker](https://github.com/felker))
- Support double precision floating-point HDF5 output [\#108](https://github.com/PrincetonUniversity/athena/pull/108) ([felker](https://github.com/felker))
- Add templates for Issue and PR; creating draft of CONTRIBUTING.md [\#93](https://github.com/PrincetonUniversity/athena/pull/93) ([felker](https://github.com/felker))
- 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))
- Improve TimeIntegratorTaskList performance [\#80](https://github.com/PrincetonUniversity/athena/pull/80) ([felker](https://github.com/felker))
Expand Down Expand Up @@ -210,7 +210,7 @@ Feature branches to merge to `master`:
- Add Bash wrapper to join\_vtk++ for many MeshBlocks, output steps [\#91](https://github.com/PrincetonUniversity/athena/pull/91) ([felker](https://github.com/felker))
- Add CODEOWNERS file to new .github/ root dir [\#90](https://github.com/PrincetonUniversity/athena/pull/90) ([felker](https://github.com/felker))
- Add ShearingBox component [\#89](https://github.com/PrincetonUniversity/athena/pull/89) ([jmshi](https://github.com/jmshi))
- Improve floating point precision consistency throughout code [\#82](https://github.com/PrincetonUniversity/athena/pull/82) ([felker](https://github.com/felker))
- Improve floating-point precision consistency throughout code [\#82](https://github.com/PrincetonUniversity/athena/pull/82) ([felker](https://github.com/felker))
- Add primitive variable flooring functions to the EquationOfState class [\#81](https://github.com/PrincetonUniversity/athena/pull/81) ([felker](https://github.com/felker))
- 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))
- Add cylindrical and spherical polar coordinates limiter terms to PPM [\#69](https://github.com/PrincetonUniversity/athena/pull/69) ([felker](https://github.com/felker))
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ SRC_FILES := $(wildcard src/*.cpp) \
$(wildcard src/bvals/*.cpp) \
$(wildcard src/coordinates/*.cpp) \
src/eos/$(EOS_FILE) \
$(wildcard src/fft/*.cpp) \
src/eos/eos_high_order.cpp \
$(wildcard src/fft/*.cpp) \
$(wildcard src/field/*.cpp) \
$(wildcard src/field/field_diffusion/*.cpp) \
$(wildcard src/gravity/*.cpp) \
Expand Down
22 changes: 15 additions & 7 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
# --fftw_path=path path to FFTW libraries (requires the FFTW library)
# --grav=xxx use xxx as the self-gravity solver
# --cxx=xxx use xxx as the C++ compiler
# --ccmd=name use name as the command to call the C++ compiler
# --ccmd=name use name as the command to call the (non-MPI) C++ compiler
# --mpiccmd=name use name as the command to call the MPI C++ compiler
# --cflag=string append string whenever invoking compiler/linker
# --include=path use -Ipath when compiling
# --lib=path use -Lpath when linking
Expand Down Expand Up @@ -207,7 +208,12 @@
# --ccmd=[name] argument
parser.add_argument('--ccmd',
default=None,
help='override for command to use to call C++ compiler')
help='override for command to use to call (non-MPI) C++ compiler')

# --mpiccmd=[name] argument
parser.add_argument('--mpiccmd',
default=None,
help='override for command to use to call MPI C++ compiler')

# --cflag=[string] argument
parser.add_argument('--cflag',
Expand Down Expand Up @@ -461,7 +467,6 @@
else:
definitions['SINGLE_PRECISION_ENABLED'] = '0'


# -debug argument
if args['debug']:
definitions['DEBUG'] = 'DEBUG'
Expand All @@ -478,6 +483,10 @@
else:
definitions['DEBUG'] = 'NOT_DEBUG'

# --ccmd=[name] argument
if args['ccmd'] is not None:
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = args['ccmd']

# -mpi argument
if args['mpi']:
definitions['MPI_OPTION'] = 'MPI_PARALLEL'
Expand All @@ -489,6 +498,9 @@
makefile_options['COMPILER_FLAGS'] += ' -h mpi1'
if args['cxx'] == 'bgxl':
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = 'mpixlcxx' # noqa
# --mpiccmd=[name] argument
if args['mpiccmd'] is not None:
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = args['mpiccmd'] # noqa
else:
definitions['MPI_OPTION'] = 'NOT_MPI_PARALLEL'

Expand Down Expand Up @@ -577,10 +589,6 @@
else:
definitions['H5_DOUBLE_PRECISION_ENABLED'] = '0'

# --ccmd=[name] argument
if args['ccmd'] is not None:
definitions['COMPILER_COMMAND'] = makefile_options['COMPILER_COMMAND'] = args['ccmd']

# --cflag=[string] argument
if args['cflag'] is not None:
makefile_options['COMPILER_FLAGS'] += ' '+args['cflag']
Expand Down
4 changes: 2 additions & 2 deletions src/defs.hpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
// enable GR frame transformations? default=0 (false)
#define FRAME_TRANSFORMATIONS @FRAME_TRANSFORMATIONS@

// floating point single precision option
// floating-point single precision option
#define SINGLE_PRECISION_ENABLED @SINGLE_PRECISION_ENABLED@

// MPI parallelization (MPI_PARALLEL or NOT_MPI_PARALLEL)
Expand All @@ -66,7 +66,7 @@
// HDF5 output (HDF5OUTPUT or NO_HDF5OUTPUT)
#define @HDF5_OPTION@

// HDF5 floating point ouptut precision option
// HDF5 floating-point ouptut precision option
#define H5_DOUBLE_PRECISION_ENABLED @H5_DOUBLE_PRECISION_ENABLED@

// compiler options
Expand Down
12 changes: 6 additions & 6 deletions src/hydro/rsolvers/mhd/hlld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ void Hydro::RiemannSolver(const int kl, const int ku, const int jl, const int ju

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

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

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

Expand All @@ -218,10 +218,10 @@ void Hydro::RiemannSolver(const int kl, const int ku, const int jl, const int ju
urst.bz = ur.bz * tmp;
}
// v_i* dot B_i*
// (KGF): group transverse momenta terms for floating point associativity symmetry
// (KGF): group transverse momenta terms for floating-point associativity symmetry
Real vbstr = (urst.mx*bxi+(urst.my*urst.by+urst.mz*urst.bz))*urst_d_inv;
// eqn (48) of M&K
// (KGF): group transverse by, bz terms for floating point associativity symmetry
// (KGF): group transverse by, bz terms for floating-point associativity symmetry
urst.e = (sdr*ur.e - ptr*wri[IVX] + ptst*spd[2] +
bxi*(wri[IVX]*bxi + (wri[IVY]*ur.by + wri[IVZ]*ur.bz) - vbstr))*sdmr_inv;
// ul** and ur** - if Bx is near zero, same as *-states
Expand Down
2 changes: 1 addition & 1 deletion src/inputs/hdf5_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <mpi.h> // MPI_COMM_WORLD, MPI_INFO_NULL
#endif

// Determine floating point precision (in memory, not file)
// Determine floating-point precision (in memory, not file)
#if SINGLE_PRECISION_ENABLED
#define H5T_REAL H5T_NATIVE_FLOAT
#else
Expand Down
4 changes: 3 additions & 1 deletion src/mesh/mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,9 @@ void Mesh::Initialize(int res_flag, ParameterInput *pin) {

// begin fourth-order correction of midpoint initial condition:
// --------------------------
bool correct_ic = pmb->precon->correct_ic;

// correct IC on all MeshBlocks or none; switch cannot be toggled independently
bool correct_ic = pmb_array[0]->precon->correct_ic;
if (correct_ic == true) {
#pragma omp for private(pmb, phydro, pfield, pbval)
for (int i=0; i<nmb; ++i) {
Expand Down
10 changes: 10 additions & 0 deletions src/reconstruct/reconstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ Reconstruction::Reconstruction(MeshBlock *pmb, ParameterInput *pin) {
<< "Reconfigure with Cartesian coordinates " << std::endl;
throw std::runtime_error(msg.str().c_str());
}

if (SHEARING_BOX) {
std::stringstream msg;
msg << "### FATAL ERROR in Reconstruction constructor" << std::endl
<< "Selected time/xorder=" << input_recon << " flux calculations"
<< "currently does not support shearing box boundary conditions " << std::endl;
throw std::runtime_error(msg.str().c_str());
return;
}

// check for necessary number of ghost zones for PPM w/ fourth-order flux corrections
int req_nghost = 4;
// until new algorithm for face-averaged Field->bf to cell-averaged Hydro->bcc
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ran2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// shuffle and added safeguards. Returns a uniform random deviate between 0.0 and 1.0
// (exclusive of the endpoint values). Call with idum = a negative integer to
// initialize; thereafter, do not alter idum between successive deviates in a sequence.
// RNMX should appriximate the largest floating point value that is less than 1.
// RNMX should appriximate the largest floating-point value that is less than 1.

#define IMR1 2147483563
#define IMR2 2147483399
Expand Down
4 changes: 2 additions & 2 deletions src/utils/show_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ void ShowConfig(void) {
std::cout<<" General Relativity: OFF " << std::endl;
}
if (SINGLE_PRECISION_ENABLED) {
std::cout<<" Floating point precision: single" << std::endl;
std::cout<<" Floating-point precision: single" << std::endl;
} else {
std::cout<<" Floating point precision: double" << std::endl;
std::cout<<" Floating-point precision: double" << std::endl;
}
std::cout<<" Number of ghost cells: " << NGHOST << std::endl;
#ifdef MPI_PARALLEL
Expand Down
Loading

0 comments on commit 6633136

Please sign in to comment.