forked from CODARcode/Example-Heat_Transfer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
io_adios_gpp.F90
54 lines (41 loc) · 1.25 KB
/
io_adios_gpp.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
! ADIOS is freely available under the terms of the BSD license described
! in the COPYING file in the top level directory of this source distribution.
!
! Copyright (c) 2008 - 2009. UT-BATTELLE, LLC. All rights reserved.
!
!
! Simplest ADIOS/XML based I/O for the heat_transfer example
!
! (c) Oak Ridge National Laboratory, 2014
! Author: Norbert Podhorszki
!
module heat_io
contains
subroutine io_init()
use heat_vars
use adios_write_mod
call adios_init ("heat_transfer.xml", app_comm, ierr)
end subroutine io_init
subroutine io_finalize()
use heat_vars
use adios_write_mod
call adios_finalize (rank, ierr)
end subroutine io_finalize
subroutine io_write(tstep,curr)
use heat_vars
use adios_write_mod
implicit none
include 'mpif.h'
integer, intent(in) :: tstep
integer, intent(in) :: curr
integer*8 adios_handle, adios_groupsize, adios_totalsize
integer adios_err
character (len=200) :: filename
character(2) :: mode = "w"
write(filename,'(a,".bp")') trim(outputfile)
if (tstep > 1) mode = "a"
call adios_open (adios_handle, "heat", filename, mode, app_comm, adios_err)
#include "gwrite_heat.fh"
call adios_close (adios_handle, adios_err)
end subroutine io_write
end module heat_io