diff --git a/docs/source/usersguide/install.rst b/docs/source/usersguide/install.rst index 8d98a5c729..7d3cda1733 100644 --- a/docs/source/usersguide/install.rst +++ b/docs/source/usersguide/install.rst @@ -162,7 +162,7 @@ openmp coverage Compile and link code instrumented for coverage analysis. This is typically - used in conjunction with gcov. + used in conjunction with gcov_. maxcoord Maximum number of nested coordinate levels in geometry. Defaults to 10. @@ -174,6 +174,8 @@ should be used: cmake -Ddebug=on /path/to/openmc +.. _gcov: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html + Compiling with MPI ++++++++++++++++++ diff --git a/src/geometry.F90 b/src/geometry.F90 index 79f1dd3ee4..39d95817ba 100644 --- a/src/geometry.F90 +++ b/src/geometry.F90 @@ -76,8 +76,8 @@ contains type(Particle), intent(inout) :: p integer :: i ! cell loop index on a level - integer :: j - integer :: n_coord + integer :: j ! coordinate level index + integer :: n_coord ! saved number of coordinate levels integer :: n ! number of cells to search on a level integer :: index_cell ! index in cells array type(Cell), pointer :: c ! pointer to cell @@ -125,7 +125,7 @@ contains logical, intent(inout) :: found integer, optional :: search_cells(:) integer :: i ! index over cells - integer :: j + integer :: j ! coordinate level index integer :: i_xyz(3) ! indices in lattice integer :: n ! number of cells to search integer :: index_cell ! index in cells array @@ -186,7 +186,7 @@ contains ! ====================================================================== ! CELL CONTAINS LOWER UNIVERSE, RECURSIVELY FIND CELL - ! Create new level of coordinates + ! Store lower level coordinates p % coord(j + 1) % xyz = p % coord(j) % xyz p % coord(j + 1) % uvw = p % coord(j) % uvw @@ -221,7 +221,7 @@ contains ! Determine lattice indices i_xyz = lat % get_indices(p % coord(j) % xyz + TINY_BIT * p % coord(j) % uvw) - ! Create new level of coordinates + ! Store lower level coordinates p % coord(j + 1) % xyz = lat % get_local_xyz(p % coord(j) % xyz, i_xyz) p % coord(j + 1) % uvw = p % coord(j) % uvw @@ -1911,7 +1911,7 @@ contains if (c % type == CELL_FILL) then next_univ => universes(c % fill) - levels_below = maximum_levels(next_univ) + levels_below = max(levels_below, maximum_levels(next_univ)) ! ==================================================================== ! CELL CONTAINS LATTICE, RECURSIVELY FIND CELL diff --git a/src/initialize.F90 b/src/initialize.F90 index 518a285a43..599923713b 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -104,6 +104,7 @@ contains ! Check to make sure there are not too many nested coordinate levels in the ! geometry since the coordinate list is statically allocated for performance ! reasons + print *, 'Max levels = ', maximum_levels(universes(BASE_UNIVERSE)) if (maximum_levels(universes(BASE_UNIVERSE)) > MAX_COORD) then call fatal_error("Too many nested coordinate levels in the geometry. & &Try increasing the maximum number of coordinate levels by & diff --git a/src/particle_header.F90 b/src/particle_header.F90 index e78a895139..7c2586c3e2 100644 --- a/src/particle_header.F90 +++ b/src/particle_header.F90 @@ -41,7 +41,7 @@ module particle_header integer :: type ! Particle type (n, p, e, etc) ! Particle coordinates - integer :: n_coord ! number of current coordinates + integer :: n_coord ! number of current coordinates type(LocalCoord) :: coord(MAX_COORD) ! coordinates for all levels ! Other physical data