From c9d2d6899af1b35d81e25f8f505f8d09df2b8b50 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 1 Jul 2016 09:22:49 +0700 Subject: [PATCH 1/7] Incremented version number and added release notes --- docs/source/conf.py | 4 +- docs/source/methods/geometry.rst | 2 +- docs/source/releasenotes.rst | 113 ++++++++++++++++--------------- man/man1/openmc.1 | 2 +- setup.py | 2 +- src/constants.F90 | 4 +- 6 files changed, 66 insertions(+), 61 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 38661cdb3..cb43079e3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -69,9 +69,9 @@ copyright = u'2011-2016, Massachusetts Institute of Technology' # built documents. # # The short X.Y version. -version = "0.7" +version = "0.8" # The full version, including alpha/beta/rc tags. -release = "0.7.1" +release = "0.8.0" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/methods/geometry.rst b/docs/source/methods/geometry.rst index bcd568ca3..c689883d0 100644 --- a/docs/source/methods/geometry.rst +++ b/docs/source/methods/geometry.rst @@ -205,7 +205,7 @@ traveling in its current direction, it will not hit the surface. The complete derivation for different types of surfaces used in OpenMC will be presented in the following sections. -Since :math:f(x,y,z)` in general is quadratic in :math:`x`, :math:`y`, and +Since :math:`f(x,y,z)` in general is quadratic in :math:`x`, :math:`y`, and :math:`z`, this implies that :math:`f(x_0 + du_0, y + dv_0, z + dw_0)` is quadratic in :math:`d`. Thus we expect at most two real solutions to :eq:`dist-to-boundary-1`. If no solutions to :eq:`dist-to-boundary-1` exist or diff --git a/docs/source/releasenotes.rst b/docs/source/releasenotes.rst index 65309fd70..3b96be7f8 100644 --- a/docs/source/releasenotes.rst +++ b/docs/source/releasenotes.rst @@ -1,78 +1,83 @@ .. _releasenotes: ============================== -Release Notes for OpenMC 0.7.1 +Release Notes for OpenMC 0.8.0 ============================== -This release of OpenMC provides some substantial improvements over version -0.7.0. Non-simple cell regions can now be defined through the ``|`` (union) and -``~`` (complement) operators. Similar changes in the Python API also allow -complex cell regions to be defined. A true secondary particle bank now exists; -this is crucial for photon transport (to be added in the next minor release). A -rich API for multi-group cross section generation has been added via the -``openmc.mgxs`` Python module. +This release of OpenMC includes a few new major features including the +capability to perform neutron transport with multi-group cross section data as +well as experimental support for the windowed multipole method being developed +at MIT. Source sampling options have also been expanded significantly, with the +option to supply arbitrary tabular and discrete distributions for energy, angle, +and spatial coordinates. -Various improvements to tallies have also been made. It is now possible to -explicitly specify that a collision estimator be used in a tally. A new -``delayedgroup`` filter and ``delayed-nu-fission`` score allow a user to obtain -delayed fission neutron production rates filtered by delayed group. Finally, the -new ``inverse-velocity`` score may be useful for calculating kinetics -parameters. +The Python API has been significantly restructured in this release compared to +version 0.7.1. Any scripts written based on the version 0.7.1 API will likely +need to be rewritten. Some of the most visible changes include the following: -.. caution:: In previous versions, depending on how OpenMC was compiled binary - output was either given in HDF5 or a flat binary format. With this - version, all binary output is now HDF5 which means you **must** - have HDF5 in order to install OpenMC. Please consult the user's - guide for instructions on how to compile with HDF5. +- ``SettingsFile`` is now ``Settings``, ``MaterialsFile`` is now ``Materials``, + and ``TalliesFile`` is now ``Tallies``. +- The ``GeometryFile`` class no longer exists and is replaced by the + ``Geometry`` class which now has an ``export_to_xml()`` method. +- Source distributions are defined using the ``Source`` class and assigned to + the ``Settings.source`` property. +- The ``Executor`` class no longer exists and is replaced by ``openmc.run()`` + and ``openmc.plot_geometry()`` functions. + +The Python API documentation has also been significantly expanded. ------------------- System Requirements ------------------- There are no special requirements for running the OpenMC code. As of this -release, OpenMC has been tested on a variety of Linux distributions, Mac OS X, -and Microsoft Windows 7. Memory requirements will vary depending on the size of -the problem at hand (mostly on the number of nuclides in the problem). +release, OpenMC has been tested on a variety of Linux distributions and Mac +OS X. Numerous users have reported working builds on Microsoft Windows, but your +mileage may vary. Memory requirements will vary depending on the size of the +problem at hand (mostly on the number of nuclides and tallies in the problem). ------------ New Features ------------ -- Support for complex cell regions (union and complement operators) -- Generic quadric surface type -- Improved handling of secondary particles -- Binary output is now solely HDF5 -- ``openmc.mgxs`` Python module enabling multi-group cross section generation -- Collision estimator for tallies -- Delayed fission neutron production tallies with ability to filter by delayed - group -- Inverse velocity tally score -- Performance improvements for binary search -- Performance improvements for reaction rate tallies +- Multi-group mode +- Vast improvements to the Python API +- Experimental windowed multipole capability +- Periodic boundary conditions +- Expanded source sampling options +- Distributed materials +- Subcritical multiplication support +- Improved method for reproducible URR table sampling +- Refactor of continuous-energy reaction data +- Improved documentation and new Jupyter notebooks --------- Bug Fixes --------- -- 299322_: Bug with material filter when void material present -- d74840_: Fix triggers on tallies with multiple filters -- c29a81_: Correctly handle maximum transport energy -- 3edc23_: Fixes in the nu-scatter score -- 629e3b_: Assume unspecified surface coefficients are zero in Python API -- 5dbe8b_: Fix energy filters for openmc-plot-mesh-tally -- ff66f4_: Fixes in the openmc-plot-mesh-tally script -- 441fd4_: Fix bug in kappa-fission score -- 7e5974_: Allow fixed source simulations from Python API +- 70daa7_: Make sure MT=3 cross section is not used +- 40b05f_: Ensure source bank is resampled for fixed source runs +- 9586ed_: Fix two hexagonal lattice bugs +- a855e8_: Make sure graphite models don't error out on max events +- 7294a1_: Fix incorrect check on cmfd.xml +- 12f246_: Ensure number of realizations is written to statepoint +- 0227f4_: Fix bug when sampling multiple energy distributions +- 51deaa_: Prevent segfault when user specifies '18' on tally scores +- fed74b_: Prevent duplicate tally scores +- 8467ae_: Better threshold for allowable lost particles +- 493c6f_: Fix type of return argument for h5pget_driver_f -.. _299322: https://github.com/mit-crpg/openmc/commit/299322 -.. _d74840: https://github.com/mit-crpg/openmc/commit/d74840 -.. _c29a81: https://github.com/mit-crpg/openmc/commit/c29a81 -.. _3edc23: https://github.com/mit-crpg/openmc/commit/3edc23 -.. _629e3b: https://github.com/mit-crpg/openmc/commit/629e3b -.. _5dbe8b: https://github.com/mit-crpg/openmc/commit/5dbe8b -.. _ff66f4: https://github.com/mit-crpg/openmc/commit/ff66f4 -.. _441fd4: https://github.com/mit-crpg/openmc/commit/441fd4 -.. _7e5974: https://github.com/mit-crpg/openmc/commit/7e5974 +.. _70daa7: https://github.com/mit-crpg/openmc/commit/70daa7 +.. _40b05f: https://github.com/mit-crpg/openmc/commit/40b05f +.. _9586ed: https://github.com/mit-crpg/openmc/commit/9586ed +.. _a855e8: https://github.com/mit-crpg/openmc/commit/a855e8 +.. _7294a1: https://github.com/mit-crpg/openmc/commit/7294a1 +.. _12f246: https://github.com/mit-crpg/openmc/commit/12f246 +.. _0227f4: https://github.com/mit-crpg/openmc/commit/0227f4 +.. _51deaa: https://github.com/mit-crpg/openmc/commit/51deaa +.. _fed74b: https://github.com/mit-crpg/openmc/commit/fed74b +.. _8467ae: https://github.com/mit-crpg/openmc/commit/8467ae +.. _493c6f: https://github.com/mit-crpg/openmc/commit/493c6f ------------ Contributors @@ -81,11 +86,11 @@ Contributors This release contains new contributions from the following people: - `Will Boyd `_ -- `Sterling Harper `_ -- `Bryan Herman `_ +- `Derek Gaston `_ +- `Sterling Harper `_ - `Colin Josey `_ +- `Jingang Liang `_ - `Adam Nelson `_ - `Paul Romano `_ - `Kelly Rowland `_ - `Sam Shaner `_ -- `Jon Walsh `_ diff --git a/man/man1/openmc.1 b/man/man1/openmc.1 index 102adfbdc..e69360a7c 100644 --- a/man/man1/openmc.1 +++ b/man/man1/openmc.1 @@ -46,7 +46,7 @@ to locate ACE format cross section libraries if the user has not specified the tag in .I settings.xml\fP. .SH LICENSE -Copyright \(co 2011-2015 Massachusetts Institute of Technology. +Copyright \(co 2011-2016 Massachusetts Institute of Technology. .PP Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/setup.py b/setup.py index a842a1c3a..393f40bd3 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ except ImportError: have_setuptools = False kwargs = {'name': 'openmc', - 'version': '0.7.1', + 'version': '0.8.0', 'packages': ['openmc', 'openmc.data', 'openmc.mgxs', 'openmc.model', 'openmc.stats'], 'scripts': glob.glob('scripts/openmc-*'), diff --git a/src/constants.F90 b/src/constants.F90 index b3e5ed89b..127b4507f 100644 --- a/src/constants.F90 +++ b/src/constants.F90 @@ -7,8 +7,8 @@ module constants ! OpenMC major, minor, and release numbers integer, parameter :: VERSION_MAJOR = 0 - integer, parameter :: VERSION_MINOR = 7 - integer, parameter :: VERSION_RELEASE = 1 + integer, parameter :: VERSION_MINOR = 8 + integer, parameter :: VERSION_RELEASE = 0 ! Revision numbers for binary files integer, parameter :: REVISION_STATEPOINT = 15 From ede81f95e989bcd4f1842e663e7f6526e190e83c Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 1 Jul 2016 13:19:39 +0700 Subject: [PATCH 2/7] Ensure line-length is within 160 characters per F2008 standard --- src/multipole_header.F90 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/multipole_header.F90 b/src/multipole_header.F90 index a21677a95..143047b0b 100644 --- a/src/multipole_header.F90 +++ b/src/multipole_header.F90 @@ -45,7 +45,8 @@ module multipole_header logical :: fissionable = .false. ! Is this isotope fissionable? integer :: length ! Number of poles integer, allocatable :: l_value(:) ! The l index of the pole - real(8), allocatable :: pseudo_k0RS(:) ! The value (sqrt(2*mass neutron)/reduced planck constant) * AWR/(AWR + 1) * scattering radius for each l + real(8), allocatable :: pseudo_k0RS(:) ! The value (sqrt(2*mass neutron)/reduced planck constant) + ! * AWR/(AWR + 1) * scattering radius for each l complex(8), allocatable :: data(:,:) ! Contains all of the pole-residue data real(8) :: sqrtAWR ! Square root of the atomic weight ratio From 195f81cacbf5c9bb8ca7b48ffb641d3c4f384180 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Fri, 1 Jul 2016 13:20:47 +0700 Subject: [PATCH 3/7] Update Intel compiler flags. Allow CC to be set in run_tests.py --- CMakeLists.txt | 9 ++++----- tests/run_tests.py | 7 +++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16cf914e5..73f0afccc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,8 +147,7 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) if(debug) list(APPEND f90flags -g -warn -ftrapuv -fp-stack-check "-check all" -fpe0) - list(APPEND cflags -g -warn -ftrapuv -fp-stack-check - "-check all" -fpe0) + list(APPEND cflags -g -w3 -ftrapuv -fp-stack-check) list(APPEND ldflags -g) endif() if(profile) @@ -161,9 +160,9 @@ elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) list(APPEND cflags -O3) endif() if(openmp) - list(APPEND f90flags -openmp) - list(APPEND cflags -openmp) - list(APPEND ldflags -openmp) + list(APPEND f90flags -qopenmp) + list(APPEND cflags -qopenmp) + list(APPEND ldflags -qopenmp) endif() elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI) diff --git a/tests/run_tests.py b/tests/run_tests.py index 5a04f340a..87282055c 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -42,6 +42,7 @@ parser.add_option("-s", "--script", action="store_true", dest="script", # Default compiler paths FC='gfortran' +CC='gcc' MPI_DIR='/opt/mpich/3.2-gnu' HDF5_DIR='/opt/hdf5/1.8.16-gnu' PHDF5_DIR='/opt/phdf5/1.8.16-gnu' @@ -52,6 +53,8 @@ script_mode = False # Override default compiler paths if environmental vars are found if 'FC' in os.environ: FC = os.environ['FC'] +if 'CC' in os.environ: + CC = os.environ['CC'] if 'MPI_DIR' in os.environ: MPI_DIR = os.environ['MPI_DIR'] if 'HDF5_DIR' in os.environ: @@ -158,8 +161,10 @@ class Test(object): self.fc = os.path.join(MPI_DIR, 'bin', 'mpifort') else: self.fc = os.path.join(MPI_DIR, 'bin', 'mpif90') + self.cc = os.path.join(MPI_DIR, 'bin', 'mpicc') else: self.fc = FC + self.cc = CC # Sets the build name that will show up on the CDash def get_build_name(self): @@ -189,6 +194,7 @@ class Test(object): # Runs the ctest script which performs all the cmake/ctest/cdash def run_ctest_script(self): os.environ['FC'] = self.fc + os.environ['CC'] = self.cc if self.mpi: os.environ['MPI_DIR'] = MPI_DIR if self.phdf5: @@ -203,6 +209,7 @@ class Test(object): # Runs cmake when in non-script mode def run_cmake(self): os.environ['FC'] = self.fc + os.environ['CC'] = self.cc if self.mpi: os.environ['MPI_DIR'] = MPI_DIR if self.phdf5: From 65f1c4baaf62971a56d64d4ccf8d145a8819f98b Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Tue, 19 Jul 2016 08:45:28 -0500 Subject: [PATCH 4/7] When installing OpenMC locally, set PYTHONPATH to avoid error --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73f0afccc..dcaf30a1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,6 +317,7 @@ if(PYTHONINTERP_FOUND) --root=debian/openmc --install-layout=deb WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})") else() + install(CODE "set(ENV{PYTHONPATH} \"${CMAKE_INSTALL_PREFIX}/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages\")") install(CODE "execute_process( COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${CMAKE_INSTALL_PREFIX} From 5d4bd3079cb6fc6e68599775ff5f39adcb517e06 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 20 Jul 2016 22:20:41 -0500 Subject: [PATCH 5/7] Ensure offset argument in h5tinsert_f is integer(SIZE_T) --- src/hdf5_interface.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hdf5_interface.F90 b/src/hdf5_interface.F90 index 0bfe04051..44541a50e 100644 --- a/src/hdf5_interface.F90 +++ b/src/hdf5_interface.F90 @@ -2383,8 +2383,8 @@ contains ! Insert the 'r' and 'i' identifiers call h5tcreate_f(H5T_COMPOUND_F, size_double, dtype_real, hdf5_err) call h5tcreate_f(H5T_COMPOUND_F, size_double, dtype_imag, hdf5_err) - call h5tinsert_f(dtype_real, "r", 0_8, H5T_NATIVE_DOUBLE, hdf5_err) - call h5tinsert_f(dtype_imag, "i", 0_8, H5T_NATIVE_DOUBLE, hdf5_err) + call h5tinsert_f(dtype_real, "r", 0_SIZE_T, H5T_NATIVE_DOUBLE, hdf5_err) + call h5tinsert_f(dtype_imag, "i", 0_SIZE_T, H5T_NATIVE_DOUBLE, hdf5_err) ! Set up collective vs. independent I/O data_xfer_mode = H5FD_MPIO_COLLECTIVE_F From 9b1292fc1523fdc45b075a16c9f9b2d8b453157a Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 21 Jul 2016 09:52:47 -0500 Subject: [PATCH 6/7] Remove -flto flag for GCC optimize=on. Apparently causes trouble with gcc 5.4 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dcaf30a1d..64eee2e9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -126,7 +126,7 @@ if(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) list(APPEND ldflags -pg) endif() if(optimize) - list(APPEND f90flags -O3 -flto -fuse-linker-plugin) + list(APPEND f90flags -O3) list(APPEND cflags -O3) endif() if(openmp) From b1fa2c176f98df9b4909496efeab59817a663642 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 25 Jul 2016 09:10:14 -0500 Subject: [PATCH 7/7] Fix bug in OpenCG compatibility module --- LICENSE | 2 +- openmc/opencg_compatible.py | 2 +- readme.rst | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index f00937632..fe18b53f9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2011-2015 Massachusetts Institute of Technology +Copyright (c) 2011-2016 Massachusetts Institute of Technology Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/openmc/opencg_compatible.py b/openmc/opencg_compatible.py index 967e11f48..93a257f46 100644 --- a/openmc/opencg_compatible.py +++ b/openmc/opencg_compatible.py @@ -820,7 +820,7 @@ def get_opencg_lattice(openmc_lattice): # Create an OpenCG Lattice to represent this OpenMC Lattice name = openmc_lattice.name - dimension = openmc_lattice.dimension + dimension = openmc_lattice.shape pitch = openmc_lattice.pitch lower_left = openmc_lattice.lower_left universes = openmc_lattice.universes diff --git a/readme.rst b/readme.rst index ab13e36f5..03964d943 100644 --- a/readme.rst +++ b/readme.rst @@ -10,9 +10,9 @@ transport code based on modern methods. It is a constructive solid geometry, continuous-energy transport code that uses ACE format cross sections. The project started under the Computational Reactor Physics Group at MIT. -Complete documentation on the usage of OpenMC is hosted on GitHub at -http://mit-crpg.github.io/openmc/. If you are interested in the project or would -like to help and contribute, please send a message to the OpenMC User's Group +Complete documentation on the usage of OpenMC is hosted on Read the Docs at +http://openmc.readthedocs.io. If you are interested in the project or would like +to help and contribute, please send a message to the OpenMC User's Group `mailing list`_. ------------ @@ -49,7 +49,7 @@ License OpenMC is distributed under the MIT/X license_. .. _mailing list: https://groups.google.com/forum/?fromgroups=#!forum/openmc-users -.. _installation instructions: http://mit-crpg.github.io/openmc/usersguide/install.html -.. _Troubleshooting section: http://mit-crpg.github.io/openmc/usersguide/troubleshoot.html +.. _installation instructions: http://openmc.readthedocs.io/en/latest/usersguide/install.html +.. _Troubleshooting section: http://openmc.readthedocs.io/en/latest/usersguide/troubleshoot.html .. _Issues: https://github.com/mit-crpg/openmc/issues -.. _license: http://mit-crpg.github.io/openmc/license.html +.. _license: http://openmc.readthedocs.io/en/latest/license.html