Started out with the routine (edited to be simpler) as shown:

```
!DK STATIONARY_RECHECK
SUBROUTINE STATIONARY_RECHECK
IMPLICIT NONE
!
INCLUDE 'paramset.fi'
INCLUDE 'dziinfo.fi'
INCLUDE 'gopt.fi'
INCLUDE 'gtime.fi'
INCLUDE 'heating.fi'
INCLUDE 'sites.fi'
INCLUDE 'stationary.fi'
INCLUDE 'stem_status.fi'
INCLUDE 'vapor.fi'
INCLUDE 'write.fi'
!
! Local variables
!
INTEGER :: i, j, k, idiff, idiff_last
INTEGER :: min_num_occurances
INTEGER :: count_min_sites
INTEGER, DIMENSION(ndrymax) :: tau_counter
INTEGER, DIMENSION(ndrymax) :: mult_min_sites
INTEGER, DIMENSION(100,ndrymax) :: stems_each_multiple
!
!
! RECHECK HOVERING PERIODS BASED ON THE ONES THAT OCCUR INFREQUENTLY.
! LONG STATIONARY PERIODS NOT FOUND MIGHT BE BASED ON THESE.
!
min_num_occurances = COUNTCHANGINGSITES(1)
mult_min_sites(1) = CHANGINGSITES(1)
count_min_sites = 1
DO i=2,countchanging
IF ( COUNTCHANGINGSITES(i)<=min_num_occurances ) THEN
IF ( COUNTCHANGINGSITES(i)==min_num_occurances ) THEN
count_min_sites = count_min_sites + 1
mult_min_sites(count_min_sites) = CHANGINGSITES(i)
ELSE
min_num_occurances = COUNTCHANGINGSITES(i)
ENDIF
ENDIF
ENDDO
DO j=1,total_num_taus
tau_counter(j) = 0
ENDDO
WRITE (6,99030) count_min_sites
WRITE (6,99040) (mult_min_sites(i),i=1,count_min_sites)
.
.
.
.
.
.
RETURN
!
! FORMAT STATEMENTS
99030 FORMAT (//,i3,' multiple sites with least number of intermediate activations')
99040 FORMAT (' Sites are', 10i4)
!
END SUBROUTINE STATIONARY_RECHECK
```

The problem lies in this section of code

```
DO j=1,total_num_taus
tau_counter(j) = 0
ENDDO
```

It overwrites

mult_min_sites(i),i=1,count_min_sites

with zeros.

To show this, I put write statements around that section of the code, i.e.

```
WRITE (6,99040) (mult_min_sites(i),i=1,count_min_sites)
DO j=1,total_num_taus
tau_counter(j) = 0
ENDDO
WRITE (6,99040) (mult_min_sites(i),i=1,count_min_sites)
```

that produces the following two lines of printout

Sites are 15 143

Sites are 0 0

I can move the problem code to the first executable part of the routine so that

```
!DK STATIONARY_RECHECK
SUBROUTINE STATIONARY_RECHECK
IMPLICIT NONE
!
INCLUDE 'paramset.fi'
INCLUDE 'dziinfo.fi'
INCLUDE 'gopt.fi'
INCLUDE 'gtime.fi'
INCLUDE 'heating.fi'
INCLUDE 'sites.fi'
INCLUDE 'stationary.fi'
INCLUDE 'stem_status.fi'
INCLUDE 'vapor.fi'
INCLUDE 'write.fi'
!
! Local variables
!
INTEGER :: i, j, k, idiff, idiff_last
INTEGER :: min_num_occurances
INTEGER :: count_min_sites
INTEGER, DIMENSION(ndrymax) :: tau_counter
INTEGER, DIMENSION(ndrymax) :: mult_min_sites
INTEGER, DIMENSION(100,ndrymax) :: stems_each_multiple
!
!
! RECHECK HOVERING PERIODS BASED ON THE ONES THAT OCCUR INFREQUENTLY.
! LONG STATIONARY PERIODS NOT FOUND MIGHT BE BASED ON THESE.
!
DO j=1,total_num_taus
tau_counter(j) = 0
ENDDO
min_num_occurances = COUNTCHANGINGSITES(1)
mult_min_sites(1) = CHANGINGSITES(1)
count_min_sites = 1
DO i=2,countchanging
IF ( COUNTCHANGINGSITES(i)<=min_num_occurances ) THEN
IF ( COUNTCHANGINGSITES(i)==min_num_occurances ) THEN
count_min_sites = count_min_sites + 1
mult_min_sites(count_min_sites) = CHANGINGSITES(i)
ELSE
min_num_occurances = COUNTCHANGINGSITES(i)
ENDIF
ENDIF
ENDDO
WRITE (6,99030) count_min_sites
WRITE (6,99040) (mult_min_sites(i),i=1,count_min_sites)
.
.
.
.
.
```

and the correct output is yielded.

Using PVF 13.4, with the following compiler options:

-Bstatic -Mbackslash -I"F:\Macro3d\PGI\PGI_5-5-2013\Include Files" -I"d:\program files\pgi\win64\13.4\include" -I"D:\Program Files\PGI\Microsoft Open Tools 11\include" -I"D:\Program Files\PGI\Microsoft Open Tools 11\PlatformSDK\include" -fastsse -Mipa=fast,inline -O3 -Mvect=simd:256 -Minline -Munroll=n:4 -Mconcur -tp=sandybridge-64 -Minform=warn -Mkeepasm -Minfo=accel,ftn,inline,loop,opt,par,vect

Is there a problem or did I miss something?

Thanks for your assistance.