From f1b4e0ae7f2a806a4381dde286f44bd1765208a8 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Mon, 14 Sep 2015 16:47:00 +0700 Subject: [PATCH] Avoid bug with PGI Fortran compiler. Apparently the PGI Fortran compiler (15.7) doesn't like variable names that are the same as module names. --- src/initialize.F90 | 36 ++++++++++++++++++------------------ src/state_point.F90 | 38 +++++++++++++++++++------------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/initialize.F90 b/src/initialize.F90 index bd479032f..48985a718 100644 --- a/src/initialize.F90 +++ b/src/initialize.F90 @@ -930,7 +930,7 @@ contains integer :: i, j ! Tally, filter loop counters integer :: n_filt ! Number of filters originally in tally logical :: count_all ! Count all cells - type(TallyObject), pointer :: tally ! Current tally + type(TallyObject), pointer :: t ! Current tally type(Universe), pointer :: univ ! Pointer to universe type(Cell), pointer :: c ! Pointer to cell integer, allocatable :: univ_list(:) ! Target offsets @@ -943,18 +943,18 @@ contains do i = 1, n_tallies ! Get pointer to tally - tally => tallies(i) + t => tallies(i) - n_filt = tally%n_filters + n_filt = t%n_filters ! Loop over the filters to determine how many additional filters ! need to be added to this tally - do j = 1, tally%n_filters + do j = 1, t%n_filters ! Determine type of filter - if (tally%filters(j)%type == FILTER_DISTRIBCELL) then + if (t%filters(j)%type == FILTER_DISTRIBCELL) then count_all = .true. - if (size(tally%filters(j)%int_bins) > 1) then + if (size(t%filters(j)%int_bins) > 1) then call fatal_error("A distribcell filter was specified with & &multiple bins. This feature is not supported.") end if @@ -975,15 +975,15 @@ contains do i = 1, n_tallies ! Get pointer to tally - tally => tallies(i) + t => tallies(i) ! Initialize the filters - do j = 1, tally%n_filters + do j = 1, t%n_filters ! Set the number of bins to the number of instances of the cell - if (tally%filters(j)%type == FILTER_DISTRIBCELL) then - c => cells(tally%filters(j)%int_bins(1)) - tally%filters(j)%n_bins = c%instances + if (t%filters(j)%type == FILTER_DISTRIBCELL) then + c => cells(t%filters(j)%int_bins(1)) + t%filters(j)%n_bins = c%instances end if end do @@ -1024,7 +1024,7 @@ contains type(SetInt) :: cell_list ! distribells to track type(Universe), pointer :: univ ! pointer to universe class(Lattice), pointer :: lat ! pointer to lattice - type(TallyObject), pointer :: tally ! pointer to tally + type(TallyObject), pointer :: t ! pointer to tally type(TallyFilter), pointer :: filter ! pointer to filter ! Begin gathering list of cells in distribcell tallies @@ -1032,10 +1032,10 @@ contains ! Populate list of distribcells to track do i = 1, n_tallies - tally => tallies(i) + t => tallies(i) - do j = 1, tally%n_filters - filter => tally%filters(j) + do j = 1, t%n_filters + filter => t%filters(j) if (filter%type == FILTER_DISTRIBCELL) then if (.not. cell_list%contains(filter%int_bins(1))) then @@ -1079,10 +1079,10 @@ contains ! Loop over all tallies do l = 1, n_tallies - tally => tallies(l) + t => tallies(l) - do m = 1, tally%n_filters - filter => tally%filters(m) + do m = 1, t%n_filters + filter => t%filters(m) ! Loop over only distribcell filters ! If filter points to cell we just found, set offset index diff --git a/src/state_point.F90 b/src/state_point.F90 index 7688d5d33..691d0567e 100644 --- a/src/state_point.F90 +++ b/src/state_point.F90 @@ -52,7 +52,7 @@ contains integer(HID_T) :: filter_group, moments_group character(8) :: moment_name ! name of moment (e.g, P3) character(MAX_FILE_LEN) :: filename - type(StructuredMesh), pointer :: mesh + type(StructuredMesh), pointer :: meshp type(TallyObject), pointer :: tally type(ElemKeyValueII), pointer :: current type(ElemKeyValueII), pointer :: next @@ -166,16 +166,16 @@ contains ! Write information for meshes MESH_LOOP: do i = 1, n_meshes - mesh => meshes(id_array(i)) - mesh_group = create_group(meshes_group, "mesh " // trim(to_str(mesh%id))) + meshp => meshes(id_array(i)) + mesh_group = create_group(meshes_group, "mesh " // trim(to_str(meshp%id))) - call write_dataset(mesh_group, "id", mesh%id) - call write_dataset(mesh_group, "type", mesh%type) - call write_dataset(mesh_group, "n_dimension", mesh%n_dimension) - call write_dataset(mesh_group, "dimension", mesh%dimension) - call write_dataset(mesh_group, "lower_left", mesh%lower_left) - call write_dataset(mesh_group, "upper_right", mesh%upper_right) - call write_dataset(mesh_group, "width", mesh%width) + call write_dataset(mesh_group, "id", meshp%id) + call write_dataset(mesh_group, "type", meshp%type) + call write_dataset(mesh_group, "n_dimension", meshp%n_dimension) + call write_dataset(mesh_group, "dimension", meshp%dimension) + call write_dataset(mesh_group, "lower_left", meshp%lower_left) + call write_dataset(mesh_group, "upper_right", meshp%upper_right) + call write_dataset(mesh_group, "width", meshp%width) call close_group(mesh_group) end do MESH_LOOP @@ -600,7 +600,7 @@ contains character(MAX_FILE_LEN) :: path_temp character(19) :: current_time character(8) :: moment_name ! name of moment (e.g, P3, Y-1,1) - type(StructuredMesh), pointer :: mesh + type(StructuredMesh), pointer :: meshp type(TallyObject), pointer :: tally ! Write message @@ -718,18 +718,18 @@ contains ! Read and overwrite mesh information MESH_LOOP: do i = 1, n_meshes - mesh => meshes(id_array(i)) + meshp => meshes(id_array(i)) curr_key = key_array(id_array(i)) mesh_group = open_group(meshes_group, "mesh " // & trim(to_str(curr_key))) - call read_dataset(mesh_group, "id", mesh%id) - call read_dataset(mesh_group, "type", mesh%type) - call read_dataset(mesh_group, "n_dimension", mesh%n_dimension) - call read_dataset(mesh_group, "dimension", mesh%dimension) - call read_dataset(mesh_group, "lower_left", mesh%lower_left) - call read_dataset(mesh_group, "upper_right", mesh%upper_right) - call read_dataset(mesh_group, "width", mesh%width) + call read_dataset(mesh_group, "id", meshp%id) + call read_dataset(mesh_group, "type", meshp%type) + call read_dataset(mesh_group, "n_dimension", meshp%n_dimension) + call read_dataset(mesh_group, "dimension", meshp%dimension) + call read_dataset(mesh_group, "lower_left", meshp%lower_left) + call read_dataset(mesh_group, "upper_right", meshp%upper_right) + call read_dataset(mesh_group, "width", meshp%width) call close_group(mesh_group) end do MESH_LOOP