#!/usr/local/bin/perl - w

# check  output file to see whether they contain "Cloudy ends:"
# string and write corresponding line into checksum file.
# if size of file $p_dir/checksum is zero, then program crashed.  

  while(defined($output= glob("*.out")) ){ 
     system "grep 'Cloudy ends'  $output >checksum";
     if(-z "checksum"){
       print STDERR " Cloudy  has crashed in $output !!!\n";      
     }
   }
   
