Commit 79ee3890 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

silence allocation warnings

parent a0b3755b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -179,6 +179,12 @@ program drspine
  if (istat/=DATA_MANAGER_OK) &
    call msg_fatal('drspine', msg_fmt('("init: data manager allocating ",i0," slots failed")', data_allocation))

  ! FIXME: find a better way to do that (paz)
  allocate(runno_point_stat(3,MAX_TOTAL_POINTS))
  allocate(dj_phaseoffsets(MAX_TOTAL_POINTS))
  runno_point_stat = 0
  dj_phaseoffsets  = 0

  !allocate(scan_group(0:data_size))
  !call init_data_group(scan_group)
  !call init_data_group(scan_group(0), GROUP_DEFAULT, 'default')
+5 −5
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@ module fit_data
  integer, parameter  :: MAX_TOTAL_POINTS = 10000
  real(kind=DBL)      :: DJOFFSET_LIMIT   = 0.2d-6
  integer             :: count_dj_offset                      = 0
  integer            :: runno_point_stat(3,MAX_TOTAL_POINTS) = 0
  real(kind=DBL)     :: dj_phaseoffsets(MAX_TOTAL_POINTS)    = 0
  integer,allocatable,dimension(:,:)        :: runno_point_stat
  real(kind=DBL), dimension(:), allocatable :: dj_phaseoffsets
!!mm<<


+1 −1
Original line number Diff line number Diff line
@@ -411,7 +411,7 @@ contains
    ! Read detector section
    ! =======================================================================
    subroutine read_detector_section(iretval, detector)
      integer, intent(out) :: iretval
      integer, intent(inout) :: iretval
      type(detector_struct), intent(inout) :: detector
      !
      real(kind=DBL) :: center_x=16.0, center_y=16.0     ! FIXME: hard coded defaults
+17 −8
Original line number Diff line number Diff line
@@ -13,11 +13,15 @@ module write_utils
  integer, parameter :: MAX_DEFF_QVAL   = 100
  integer, parameter :: MAX_DEFF_SERIES = 100

  real(kind=DBL)     :: deff_series_q   (MAX_DEFF_QVAL,0: MAX_DEFF_SERIES) ! q-values
  real(kind=DBL)     :: deff_series_d   (MAX_DEFF_QVAL,0: MAX_DEFF_SERIES) ! deff values
  real(kind=DBL)     :: deff_series_derr(MAX_DEFF_QVAL,0: MAX_DEFF_SERIES) ! deff errors
  integer            :: n_deff_series                                      ! loaded series
  integer            :: n_deff          (0:MAX_DEFF_SERIES)                ! no q-values of a series
  integer                          :: n_deff_series   = -1                  ! loaded series
  integer, allocatable,dimension(:) :: n_deff                    ! no q-values of a series
  real(kind=DBL),allocatable, dimension(:,:) :: deff_series_q    ! q-values
  real(kind=DBL),allocatable, dimension(:,:) :: deff_series_d    ! deff values
  real(kind=DBL),allocatable, dimension(:,:) :: deff_series_derr ! deff errors
  !integer            :: n_deff          (0:MAX_DEFF_SERIES)                ! no q-values of a series
  !real(kind=DBL)     :: deff_series_q   (MAX_DEFF_QVAL,0: MAX_DEFF_SERIES) ! q-values
  !real(kind=DBL)     :: deff_series_d   (MAX_DEFF_QVAL,0: MAX_DEFF_SERIES) ! deff values
  !real(kind=DBL)     :: deff_series_derr(MAX_DEFF_QVAL,0: MAX_DEFF_SERIES) ! deff errors



@@ -213,12 +217,17 @@ dq: do j=1, nq
   subroutine deff_series_init()
     implicit none

      if (n_deff_series<0) then !allocate arrays on the first call
        allocate(n_deff(0:MAX_DEFF_SERIES))
        allocate(deff_series_q(MAX_DEFF_QVAL,0: MAX_DEFF_SERIES))
        allocate(deff_series_d(MAX_DEFF_QVAL,0: MAX_DEFF_SERIES))
        allocate(deff_series_derr(MAX_DEFF_QVAL,0: MAX_DEFF_SERIES))
      end if
      n_deff             = 0
      n_deff_series      = 0
      deff_series_q      = 0
      deff_series_d      = 0
      deff_series_derr   = 0
      n_deff_series      = 0
      n_deff             = 0
     
   end subroutine deff_series_init


+7 −3
Original line number Diff line number Diff line
@@ -14,9 +14,9 @@ program testhisto
  !
  character(len=1024)       :: filename = repeat(' ', 1024)
  !
  real(kind=DBL), dimension(1:MAX_ENTRIES)  :: taus
  real(kind=DBL), dimension(1:MAX_ENTRIES)  :: qabs
  real(kind=DBL), dimension(1:MAX_ENTRIES)  :: weights
  real(kind=DBL), allocatable, dimension(:)  :: taus
  real(kind=DBL), allocatable, dimension(:)  :: qabs
  real(kind=DBL), allocatable, dimension(:)  :: weights
  integer                                   :: nentries
  !
  type(double_bin_struct) :: tau_bins
@@ -61,6 +61,10 @@ program testhisto
     end select
  end do
  !
  allocate(taus(MAX_ENTRIES))
  allocate(qabs(MAX_ENTRIES))
  allocate(weights(MAX_ENTRIES))
  !
  print *, trim(filename)
  if (len_trim(filename)<1) then
    print *, 'need a filename to process'