FLASH3.3 Release API

ROBODoc 4.99 manual

Generated from /asc/home/flashdocs/FLASH3_33/source/monitors/Logfile/Logfile_open.F90 with ROBODoc v4.99.8 on Wed Oct 20 17:16:47 2010


[Functions] source/monitors/Logfile/Logfile_open





  Logfile_open(integer(out) :: logUnit,
               logical(IN)  :: logUnitLocal)


   FLASH supports two types of logfiles. One that keeps track of the
   global state of the simulation, and another type that logs local
   information from each processor separately. A simulation generates at most
   one global logfile, whereas the number of 
   local logfiles generated by the simulation can be anywhere from 0 to 
   the number of processors in the simulation. 
   This function opens the global log file, either in append mode 
   if it already exists or as a new file. 

   The local logfiles are expected to be used mostly for diagnostic
   purposes. The local logfiles
   are always opened in the append mode, and the handle is returned to 
   the calling routine. It is the responsibility of the calling routine
   to call Logfile_close after it has finished writing to the logfile.


  logUnit - the handle for the file opened by the function, returns a 
              0 if no file has been opened
  logUnitLocal - if true, indicates that the local logfile should be 
                 opened. By default the global logfile is opened.


  Any code unit can include the following statements to log
  local processor related information in the local logfile

  call Logfile_open(logUnit,logUnitLocal)
  if(logUnit/=0) then
     write(logUnit,*)'I am logging some information'
     call Logfile_close(myPE,logUnitLocal)
  end if