anchor.diff:  ! SHARED variables are shared across threads
   ! PRIVATE variables are uninitialized and isolated to each thread
   ! FIRSTPRIVATE variables are initialized with their existing value and isolated to each thread
  -!$OMP PARALLEL SHARED(nstations,nfaults,ntensile,faults,tensile,stations,lame,shearmod), &
  -!$OMP          SHARED(fault_type,coord_type,iWantDisp,iWantStrain,coordTypeWarning,debug_mode), &
  -!$OMP          SHARED(displacement_file,strain_file,stress_file,estress_file,normal_file,shear_file,coulomb_file), &
  -!$OMP          SHARED(disp_output_mode,iWantStress,iWantTraction,iWantProg), &
  +!$OMP PARALLEL SHARED(nstations,stations,coord_type), &
  +!$OMP          SHARED(nfaults,faults,ntensile,tensile,fault_type), &
  +!$OMP          SHARED(targets), &
  +!$OMP          SHARED(lame,shearmod), &
  +!$OMP          SHARED(iWantDisp,iWantStrain,iWantStress,iWantTraction), &
  +!$OMP          SHARED(debug_mode,iWantProg,depthWarning,coordTypeWarning), &
  +!$OMP          SHARED(displacement_file,strain_file,stress_file,estress_file), &
  +!$OMP          SHARED(normal_file,shear_file,coulomb_file), &
  +!$OMP          SHARED(disp_output_mode), &
   !$OMP&         FIRSTPRIVATE(warn_dist), &
  -!$OMP&         PRIVATE(iSta,disp,stn,sta_coord), &
  -!$OMP&         PRIVATE(iFlt,ierr), &
  -!$OMP&         PRIVATE(evlo,evla,evdp,str,dip,rak,slip_mag,wid,len,dist,az,test_dist), &
  -!$OMP&         PRIVATE(slip,mom,disptmp,stntmp), &
  -!$OMP&         PRIVATE(sts,ests,tshr,tshrmx,coul,svec,nvec,trac,tupd,tstr,tnor,targets), &
  -!$OMP&         DEFAULT(NONE)
  +!$OMP&         PRIVATE(iSta,sta_coord), &
  +!$OMP&         PRIVATE(iFlt,evlo,evla,evdp,str,dip,rak,slip_mag,wid,len,slip,mom), &
  +!$OMP&         PRIVATE(dist,az,test_dist), &
  +!$OMP&         PRIVATE(disptmp,stntmp), &
  +!$OMP&         PRIVATE(svec,nvec,trac,tupd,tstr,tnor), &
  +!$OMP&         PRIVATE(disp,stn,sts,ests,tshr,tshrmx,coul), &
  +!$OMP&         PRIVATE(ierr), &
  +!$OMP&         DEFAULT(NONE), &
  +!$OMP&         NUM_THREADS(nthreads)
   
   ! if (OMP_GET_THREAD_NUM().eq.0) then
  -!     write(0,*) 'OMP_NUM_THREADS=',OMP_GET_NUM_THREADS()
  +!     write(stdout,*) 'OMP_NUM_THREADS=',OMP_GET_NUM_THREADS()
   ! endif
   
   ! The following loop is executed in parallel, with chunks of size 1, and ordering the output
  
positive.code:                     tshrmx, tnor, coul
  double precision :: nvec(3), svec(3), tstr, tupd
  
  ! integer :: OMP_GET_NUM_THREADS, OMP_GET_THREAD_NUM
  
  
  if (verbosity.ge.1) then
  
negative.code: 
  
      ! Miscellaneous options
      elseif (trim(tag).eq.'-parallel') then
          isParallel = .true.
          ! Check for optional argument specifying number of threads
          i = i + 1
          if (i.gt.narg) then                       ! "-parallel" was the last command line argument
              cycle
          endif
          call get_command_argument(i,arg)
          if (isNumeric(arg)) then                  ! the argument is numeric, read nthreads
              read(arg,*,iostat=ios) nthreads
              if (ios.ne.0) then                    ! trouble reading numeric argument, not an integer?
                  write(stderr,*) 'o92util: could not read ',trim(arg),' as an integer NTHREADS'
                  call usage('(usage:misc)')
              endif
          else                                      ! the argument is not numeric, reset i
              i = i - 1
          endif
  
      elseif (trim(tag).eq.'-parallel-check') then  ! Check whether compiled with OpenMP
  #ifdef USE_OPENMP
          write(*,*) 'o92util: compiled with OpenMP'
  #else
          write(*,*) 'o92util: compiled without OpenMP'
  #endif
          stop
  
  
      elseif (trim(tag).eq.'-cartesian'.or.trim(tag).eq.'-xy') then
          coord_type = 'cartesian'
      elseif (trim(tag).eq.'-geographic'.or.trim(tag).eq.'-geo') then
  