anchor.diff:        close(72)
         lstep=irstart ! in case restart files have no fields
   
  -c
         fname1='geombc.dat'
         fname1= trim(fname1)  // cname2(myrank+1)
  -c      fnamelr='restart.latest'
   
         itmp=1
         if (irstart .gt. 0) itmp = int(log10(float(irstart)))+1
         write (fmt1,"('(''restart.'',i',i1,',1x)')") itmp
         write (fnamer,fmt1) irstart
         fnamer = trim(fnamer) // cname2(myrank+1)
  -c      fnamelr = trim(fnamelr) // cname2(myrank+1)
  -
   c
   c.... open input files
  -c
  -
  -
  -c      call openfile(  fname1,  'read?', igeomBAK );
  -
  -
  -c
  -c.... try opening restart.latest.proc before trying restart.stepno.proc
  -c
  -c      call openfile(  fnamelr,  'read?', irstin );
  -c      if ( irstin .eq. 0 ) 
  -
  -!MR CHANGE
  -!       call openfile( fnamer, 'read?', irstin );
  -!MR CHANGE END
  -
  -! either one will work
  -c
   c.... input the geometry parameters
   c
  -
  -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
  -!MR CHANGE
  -
  -!      nfiles = 2
  -!      nfields = 31
  -!      numparts = 8
  -!      nppp = numparts/numpe
  -!      nppf = numparts/nfiles
  -
         nfiles = nsynciofiles
  -!      nfields = nsynciofieldsreadgeombc
         numparts = numpe !This is the common settings. Beware if you try to compute several parts per process
  -
  -!      nppp = numparts/numpe
  -!      nppf = numparts/nfiles
  -!MR CHANGE END
   
         itwo=2
         ione=1
  
positive.code:             warning='WARNING ndisp not equal nsd'
              write(*,*) warning , ndisp
           endif
  c
           if (nshg2 .ne. nshg) 
       &        call error ('restar  ', 'nshg   ', nshg)
  c
  c.... read the values of primitive variables into uold
  c
  
           allocate( uold(nshg,nsd) )
           allocate( uread(nshg,nsd) )
           
           iusiz=nshg*nsd
  
  !          call readdatablock(irstin,fname1,uread,iusiz,
  !      &        'double',iotype)
           call phio_readdatablock(fhandle,
       &    c_char_'displacement' // char(0),
       &    c_loc(uread), iusiz, dataDbl, iotype)
  
negative.code:          deallocate(BCinpread)
           BCinp=0
        endif
  c
  c.... read periodic boundary conditions
  c
        ione=1
        call phio_readheader(fhandle,
       & c_char_'periodic masters array' // char(0),
       & c_loc(nshg), ione, dataInt, iotype)
        allocate( point2iper(nshg) )
        allocate( iperread(nshg) )
        call phio_readdatablock(fhandle,
       & c_char_'periodic masters array' // char(0),
       & c_loc(iperread), nshg, dataInt, iotype)
        point2iper=iperread
  c
  c.... generate the boundary element blocks
  c
        call genbkb (ibksiz)
  c
  c  Read in the nsons and ifath arrays if needed
  c
  