~ubuntu-branches/ubuntu/utopic/adios/utopic

« back to all changes in this revision

Viewing changes to tests/genarray/copyarray2D.F90

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2013-12-09 15:21:31 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20131209152131-jtd4fpmdv3xnunnm
Tags: 1.5.0-1
* New upstream.
* Standards-Version: 3.9.5
* Include latest config.{sub,guess} 
* New watch file.
* Create libadios-bin for binaries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
program genarray
66
66
    use genarray2D_comm
 
67
    use adios_write_mod
67
68
    implicit none
68
69
    include 'mpif.h'
69
70
 
72
73
    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
73
74
    call MPI_Comm_size (group_comm, nproc , ierr)
74
75
 
75
 
    call adios_init ("genarray.xml", ierr)
 
76
    call adios_init ("genarray.xml", group_comm, ierr)
76
77
    !call MPI_Barrier (group_comm, ierr)
77
78
 
78
79
    call processArgs()
196
197
!!***************************
197
198
subroutine readArray()
198
199
    use genarray2D_comm
 
200
    use adios_write_mod
 
201
    use adios_read_mod
199
202
    implicit none
200
203
    integer :: tstep
201
204
    character(2) :: mode = "r"
202
 
    integer*8 adios_err
203
205
    include 'mpif.h'
204
206
 
205
207
    ! Write out data using ADIOS
211
213
 
212
214
    adios_totalsize = group_size
213
215
 
214
 
    call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
 
216
    call MPI_BARRIER(MPI_COMM_WORLD,ierr)
215
217
    cache_start_time = MPI_WTIME()
216
218
 
217
219
    call adios_open (handle, group, inputfile, mode, group_comm, err)
244
246
    adios_buf_size = 4 * ndx * ndy
245
247
    call adios_read (handle, "int_xyt", int_xy, adios_buf_size, err)
246
248
 
247
 
    call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
 
249
    call MPI_BARRIER(MPI_COMM_WORLD,ierr)
248
250
    cache_end_time = MPI_WTIME()
249
251
    cache_total_time = cache_end_time - cache_start_time
250
252
 
262
264
!!***************************
263
265
subroutine writeArray()
264
266
    use genarray2D_comm
 
267
    use adios_write_mod
265
268
    implicit none
266
269
    integer :: tstep
267
270
    character(2) :: mode = "w"
268
 
    integer*8 adios_err
269
271
    include 'mpif.h'
270
272
 
271
273
    ! Write out data using ADIOS
282
284
        !print '("rank=",i0," group=",A," file=",A," group_size=",i0)', rank, trim(group), &
283
285
        !    trim(outputfile), group_size
284
286
 
285
 
        call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
 
287
        call MPI_BARRIER(MPI_COMM_WORLD,ierr)
286
288
        cache_start_time = MPI_WTIME()
287
289
 
288
290
        call adios_open (handle, group, outputfile, mode, group_comm, err)
306
308
        endif
307
309
        call adios_write (handle, "int_xyt", int_xy, err)
308
310
 
309
 
        call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
 
311
        call MPI_BARRIER(MPI_COMM_WORLD,ierr)
310
312
        cache_end_time = MPI_WTIME()
311
313
        cache_total_time = cache_end_time - cache_start_time
312
314