anchor.diff:                 point2ifath(i)=i
               enddo
               nsonmax=1
  -c
            endif
         else
            allocate (point2nsons(1))
  
positive.code:          deallocate( iBCtmpread)
           iBCtmp=0
        endif
  !MR CHANGE END
  
  c
  c.... read boundary condition data
  c
  
        ione=1
  
  c      ione=1
  c      fname1='boundary condition array?'
  c      call readheader(igeomBAK,fname1,intfromfile,
  c     &     ione, 'double', iotype)
        call phio_readheader(fhandle,
       & c_char_'boundary condition array' // char(0),
       & c_loc(intfromfile),ione, dataDbl, iotype)
  c here intfromfile(1) contains (ndof+7)*numpbc
  !MR CHANGE
  !       if ( numpbc > 0 ) then
  !          if(intfromfile(1).ne.(ndof+7)*numpbc) then
  !            warning='WARNING more data in BCinp than needed: keeping 1st'
  !            write(*,*) warning, ndof+7
  !          endif
  !          allocate( BCinp(numpbc,ndof+7) )
  !          nsecondrank=intfromfile(1)/numpbc
  !          allocate( BCinpread(numpbc,nsecondrank) )
  !          iBCinpsiz=intfromfile(1)
  ! c         call readdatablock(igeomBAK,fname1,BCinpread,iBCinpsiz,
  ! c     &                      'double',iotype)
  !          call readdatablock(igeom,fname2,BCinpread,iBCinpsiz,
  !      &                      'double',iotype)
  !          BCinp(:,1:(ndof+7))=BCinpread(:,1:(ndof+7))
  !       else  ! sometimes a partition has no BC's
  !          allocate( BCinp(1,ndof+7) )
  !          BCinp=0
  !       endif
  
        if ( numpbc > 0 ) then
  !         if(intfromfile(1).ne.(ndof+7)*numpbc) then
  !           warning='WARNING more data in BCinp than needed: keeping 1st'
  !           write(*,*) warning, ndof+7
  !         endif
           allocate( BCinp(numpbc,ndof+7) )
           nsecondrank=intfromfile(1)/numpbc
           allocate( BCinpread(numpbc,nsecondrank) )
  
negative.code:          call phio_readdatablock(fhandle, c_char_'ilwork' // char(0),
       &      c_loc(ilworkread), nlwork, dataInt , iotype)
  
           point2ilwork = ilworkread
           call ctypes (point2ilwork)
        else
  