write_xml_volatile Function

public function write_xml_volatile(xml_volatile, filename) result(error)

Arguments

TypeIntentOptionalAttributesName
character, intent(in) :: xml_volatile
character, intent(in) :: filename

Return Value integer(kind=I4P)


Called by

proc~~write_xml_volatile~~CalledByGraph proc~write_xml_volatile write_xml_volatile program~vtk_fortran_write_volatile vtk_fortran_write_volatile program~vtk_fortran_write_volatile->proc~write_xml_volatile

Contents

Source Code


Source Code

   function write_xml_volatile(xml_volatile, filename) result(error)
   !< Write the volatile file into a real file.
   !< This is what a master process should do into a parallel scenario where it being the only process allowed to access to
   !< filesystem: slave processes create XML volatile file econded into a characters string and master process collects and writes
   !< them by means of `write_xml_volatile`.
   character(*), intent(in) :: xml_volatile !< XML volatile file.
   character(*), intent(in) :: filename     !< XML file name.
   integer(I4P)             :: error        !< Status error.
   integer(I4P)             :: xml_unit     !< XML file unit.

   open(newunit=xml_unit,             &
        file=trim(adjustl(filename)), &
        form='UNFORMATTED',           &
        access='STREAM',              &
        action='WRITE',               &
        status='REPLACE',             &
        iostat=error)
   write(unit=xml_unit, iostat=error) xml_volatile
   endfunction write_xml_volatile