anchor.diff:     character(len=*), intent(inout)         :: Msg
      ! local variables
      integer :: i
  -   call allocAry( Mat, nLines, nRows, 'p%Stff',  iStat, Msg); 
  +   call allocAry( Mat, nLines, nRows, VarName,  iStat, Msg); 
      if (iStat /= 0) return
      !Read Stiffness
      DO I =1,nLines
  
positive.code:     
      !> Checks that all inputs were correctly read
      subroutine CheckAllInputsRead()
          if (ErrStat2/=0) return
          if (p%nTot<0)                   then ; ErrStat2=ErrID_Fatal; ErrMsg2='ExtPtfm_MCKF, the total number of DOF was not set'; endif
          if (.not.allocated(p%PtfmAM))   then ; ErrStat2=ErrID_Fatal; ErrMsg2='ExtPtfm_MCKF, the mass matrix was not allocated.' ; endif
          if (.not.allocated(p%Stff))     then ; ErrStat2=ErrID_Fatal; ErrMsg2='ExtPtfm_MCKF, the stiffness matrix was not allocated.' ; endif
          if (.not.allocated(p%Damp))     then ; ErrStat2=ErrID_Fatal; ErrMsg2='ExtPtfm_MCKF, the damping matrix was not allocated.' ; endif
          if (.not.allocated(p%PtfmFt))   then ; ErrStat2=ErrID_Fatal; ErrMsg2='ExtPtfm_MCKF, the loads were not allocated.';endif
          if (.not.allocated(p%PtfmFt_t)) then ; ErrStat2=ErrID_Fatal; ErrMsg2='ExtPtfm_MCKF, the time vector was not allocated.'; endif
      end subroutine CheckAllInputsRead
  
     !> Reads a FLEX ASCII file for Guyan or CraigBampton reductions
     SUBROUTINE ReadFlexASCII()
         logical :: AllSet 
         REAL(ReKi) :: dt !< time step
         REAL(ReKi) :: T  !< total simulation time
  
         AllSet = .FALSE.
         T=-1
         dt=-1
         ! Get an available unit number for the file.
         CALL GetNewUnit( UnIn, ErrStat2, ErrMsg2 );               if ( ErrStat2 /= 0 ) return
         ! Open the Primary input file.
         CALL OpenFInpFile ( UnIn, InputFile, ErrStat2, ErrMsg2 ); if ( ErrStat2 /= 0 ) return
  
         ! --- Reading file line by line
         ErrStat2=0
         iLine=0
         do while (ErrStat2==0)
             iLine=iLine+1
             read(UnIn,'(A)', iostat=ErrStat2) Line
             if (ErrStat2/=0) then
                 if (ErrStat2 < 0) then
                     ErrStat2=0 ! End of file is fine
                 else
                     ErrMsg2='Error while reading file '//trim(InputFile)// ' line '//Num2LStr(iLine)
                 endif
                 exit
             endif
             ! Line content is analyzed as case incensitive 
             call Conv2UC(Line)
             if (index(Line,'!DIMENSION')==1) then
                 p%nTot = ReadIntFromStr(Line(12:), '`dimension`, line '//Num2LStr(iLine), ErrStat2, ErrMsg2); if (ErrStat2 /= 0) exit
                 p%nCB=p%nTot-6
  
             else if (index(Line,'!TIME INCREMENT IN SIMULATION:')==1) then
                 dt =  ReadFloatFromStr(Line(31:), '`time increment`, line '//Num2LStr(iLine), ErrStat2, ErrMsg2); if (ErrStat2 /= 0) exit
  
             else if (index(Line,'!TOTAL SIMULATION TIME IN FILE:')==1) then
                 T =  ReadFloatFromStr(Line(32:), '`total simulation time`, line '//Num2LStr(iLine), ErrStat2, ErrMsg2 ); if (ErrStat2 /= 0) exit
  
             else if (index(Line,'!MASS MATRIX')==1) then
                 iLine=iLine+1
                 CALL ReadCom( UnIn, InputFile, 'Comment - Line '//Num2LStr(iLine), ErrStat2, ErrMsg2); if (ErrStat2 /= 0) exit
                 if (p%nTot<0) exit
                 call ReadRealMatrix(UnIn, InputFile, p%PtfmAM, 'Mass Matrix', p%nTot, p%nTot, ErrStat2, ErrMsg2, iLine)
  
             else if (index(Line,'!STIFFNESS MATRIX')==1) then
                 iLine=iLine+1
                 CALL ReadCom( UnIn, InputFile, 'Comment - Line '//Num2LStr(iLine), ErrStat2, ErrMsg2);  if (ErrStat2 /= 0) exit
                 if (p%nTot<0) exit
                 call ReadRealMatrix(UnIn, InputFile, p%Stff, 'Stiffness Matrix', p%nTot, p%nTot, ErrStat2, ErrMsg2, iLine)
  
             else if (index(Line,'!DAMPING MATRIX')==1) then
                 iLine=iLine+1
                 CALL ReadCom( UnIn, InputFile, 'Comment - Line '//Num2LStr(iLine), ErrStat2, ErrMsg2); if (ErrStat2 /= 0) exit
                 if (p%nTot<0) exit
                 call ReadRealMatrix(UnIn, InputFile, p%Damp, 'Damping Matrix', p%nTot, p%nTot, ErrStat2, ErrMsg2, iLine)
  
             else if (index(Line,'!LOADING AND WAVE ELEVATION')==1) then
                 iLine=iLine+1
                 CALL ReadCom( UnIn, InputFile, 'Comment - Line '//Num2LStr(iLine), ErrStat2, ErrMsg2)
                 if (ErrStat2 /= 0) exit
                 p%nPtfmFt = nint(T/dt)+1
                 if (p%nTot<0) exit
                 call allocAry( p%PtfmFt,   max(1,p%nPtfmFt), p%nTot, 'p%PtfmFt',   ErrStat2, ErrMsg2); if (ErrStat2 /= 0) exit
                 call allocAry( p%PtfmFt_t, max(1,p%nPtfmFt),         'p%PtfmFt_t', ErrStat2, ErrMsg2); if (ErrStat2 /= 0) exit
                 if (p%nPtfmFt == 0) then
                    p%PtfmFt   = 0.0_ReKi
                    p%PtfmFt_t = 0.0_ReKi
  
negative.code:        p%nCB  = 0
         p%nTot = 6
         ! Get an available unit number for the file.
         CALL GetNewUnit( UnIn, ErrStat, ErrMsg );               if ( ErrStat /= 0 ) return
         ! Open the Primary input file.
         CALL OpenFInpFile ( UnIn, InputFile, ErrStat, ErrMsg ); if ( ErrStat /= 0 ) return
  
         !-------------------------- HEADER ---------------------------------------------
         CALL ReadStr( UnIn, InputFile, Line, 'Header line', 'File Header: External Platform MCKF Matrices (line 1)', ErrStat, ErrMsg)
         if ( ErrStat /= 0 ) return
         !---------------------- MASS MATRIX --------------------------------------
         CALL ReadCom( UnIn, InputFile, 'Section Header: Mass Matrix', ErrStat, ErrMsg)
         if ( ErrStat /= 0 ) return
         CALL ReadRealMatrix(UnIn, InputFile, p%PtfmAM, 'Mass Matrix', p%nTot, p%nTot, ErrStat, ErrMsg, iLine)
         if ( ErrStat /= 0 ) return
         !---------------------- DAMPING MATRIX --------------------------------------
         CALL ReadCom( UnIn, InputFile, 'Section Header: Damping Matrix', ErrStat, ErrMsg)
         if ( ErrStat /= 0 ) return
         CALL ReadRealMatrix(UnIn, InputFile, p%Damp, 'Damping Matrix', p%nTot, p%nTot, ErrStat, ErrMsg, iLine)
         if ( ErrStat /= 0 ) return
         !---------------------- STIFFNESS MATRIX --------------------------------------
         CALL ReadCom( UnIn, InputFile, 'Section Header: Stiffness Matrix', ErrStat, ErrMsg)
         if ( ErrStat /= 0 ) return
         CALL ReadRealMatrix(UnIn, InputFile, p%Stff, 'Stiffness Matrix', p%nTot, p%nTot, ErrStat, ErrMsg, iLine)
         if ( ErrStat /= 0 ) return
         !---------------------- LOAD time-history --------------------------------------
         p%nPtfmFt = 0
         CALL ReadCom( UnIn, InputFile, 'Section Header: Loads time-history', ErrStat, ErrMsg)
         CALL ReadCom( UnIn, InputFile, 'Loads time-history table channel names', ErrStat, ErrMsg)
         CALL ReadCom( UnIn, InputFile, 'Loads time-history table channel units', ErrStat, ErrMsg)
         allocate(TmpAry(1:p%nTot+1))
         if (ErrStat < AbortErrLev) then
            ! let's figure out how many rows of data are in the time-history table:
            read( UnIn, *, IOSTAT=ErrStat ) TmpAry
            do while (ErrStat==0)
               p%nPtfmFt = p%nPtfmFt + 1
               read( UnIn, *, IOSTAT=ErrStat ) TmpAry
            end do
         end if
         call allocAry( p%PtfmFt,   max(1,p%nPtfmFt), p%nTot, 'p%PtfmFt',   ErrStat, ErrMsg); if ( ErrStat /= 0 ) return
         call allocAry( p%PtfmFt_t, max(1,p%nPtfmFt),         'p%PtfmFt_t', ErrStat, ErrMsg); if ( ErrStat /= 0 ) return
         if (p%nPtfmFt == 0) then
            p%PtfmFt = 0.0_ReKi
            p%PtfmFt_t = 0.0_ReKi
  