subroutine procstat()
  character(len=128) :: key, mot1, mot2
  integer :: ios, iter, My_unit
  ! Ouverture du fichier
  OPEN ( NEWUNIT = My_unit ,    FILE     = '/proc/self/status', &
         FORM   = 'formatted' , ACCESS   = 'sequential',        &
         ACTION = 'read' ,      POSITION = 'rewind' ,&          
         IOSTAT = ios )                                    
  IF ( ios /= 0 ) stop " Probleme a l'ouverture "

  ! Lecture du nom de l'executable (pour verification)
  READ (UNIT =My_unit , FMT=*, IOSTAT = ios ) key, mot1
  DO WHILE (trim(key) /= "VmPeak:")
    READ (UNIT =My_unit , FMT=*, IOSTAT = ios ) key, mot1,mot2
  END DO
  print *, "procstat : VMSizeMax = ", trim(mot1), trim(mot2)
  DO WHILE (trim(key) /= "VmHWM:")
    READ (UNIT =My_unit , FMT=*, IOSTAT = ios ) key, mot1, mot2
  END DO
  print *, "procstat : RSSMax = ", trim(mot1), trim(mot2)
  DO WHILE (trim(key) /= "VmStk:")
    READ (UNIT =My_unit , FMT=*, IOSTAT = ios ) key, mot1, mot2
  END DO
  print *, "procstat : StackMax = ", trim(mot1), trim(mot2)
  CLOSE ( UNIT =My_unit )
end subroutine procstat