FLASH4.5 API

Generated from /asc/asci2/site/flashcode/secure/release_4p5/source/monitors/Logfile/Logfile_open.F90 with ROBODoc v4.99.8 on Tue Mar 05 16:16:16 2019

TABLE OF CONTENTS


[Functions] source/monitors/Logfile/Logfile_open

[top][index]

NAME

 Logfile_open

SYNOPSIS

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

DESCRIPTION

   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.

ARGUMENTS

  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.

EXAMPLE

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

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