Fortran stubs added
This commit is contained in:
@@ -35,7 +35,7 @@ noinst_PROGRAMS += \
|
||||
read_setnparticlesf \
|
||||
read_setviewf \
|
||||
read_stridedf \
|
||||
write_core_vfd \
|
||||
write_core_vfdf \
|
||||
write_setnparticlesf \
|
||||
write_setviewf \
|
||||
write_stridedf
|
||||
@@ -43,6 +43,12 @@ endif
|
||||
|
||||
EXTRA_PROGRAMS =
|
||||
|
||||
read_canonicalviewf_SOURCES = read_canonicalviewf.f90
|
||||
read_setnparticlesf_SOURCES = read_setnparticlesf.f90
|
||||
read_setviewf_SOURCES = read_setviewf.f90
|
||||
read_stridedf_SOURCES = read_stridedf.f90
|
||||
write_core_vfdf_SOURCES = write_core_vfdf.f90
|
||||
write_setnparticles_SOURCES = write_setnparticles.f90
|
||||
write_setviewf_SOURCES = write_setviewf.f90
|
||||
write_stridedf_SOURCES = write_stridedf.f90
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
!
|
||||
! Copyright (c) 2006-2013, The Regents of the University of California,
|
||||
! through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||
! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
|
||||
! Institut (Switzerland). All rights reserved.!
|
||||
!
|
||||
! License: see file COPYING in top level of source distribution.
|
||||
!
|
||||
include 'H5hut.f90'
|
||||
|
||||
program read_canonicalview
|
||||
use H5hut
|
||||
implicit none
|
||||
include 'mpif.h'
|
||||
|
||||
! the file name we want to read
|
||||
character (len=*), parameter :: FNAME = "example_setnparticles.h5"
|
||||
integer*8, parameter :: NPOINTS = 99
|
||||
|
||||
integer :: comm, rank, ierr
|
||||
integer*8 :: file, i, status
|
||||
integer*4, allocatable :: data(:)
|
||||
|
||||
! init MPI & H5hut
|
||||
comm = MPI_COMM_WORLD
|
||||
call mpi_init(ierr)
|
||||
call mpi_comm_rank(comm, rank, ierr)
|
||||
call h5_abort_on_error ()
|
||||
|
||||
! create fake data
|
||||
allocate (data (NPOINTS))
|
||||
do i = 1, NPOINTS
|
||||
data (i) = i + NPOINTS*rank
|
||||
enddo
|
||||
|
||||
! open the a file for parallel writing and ceate step #0
|
||||
file = h5_openfile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT)
|
||||
status = h5_setstep(file, 0_8)
|
||||
|
||||
! set the size of the 1D array
|
||||
status = h5pt_setnpoints (file, npoints)
|
||||
|
||||
! write the particles
|
||||
status = h5pt_writedata_i4 (file, "data", data)
|
||||
|
||||
! cleanup
|
||||
status = h5_closefile (file)
|
||||
deallocate (data)
|
||||
call mpi_finalize (ierr)
|
||||
|
||||
end program write_setnparticles
|
||||
@@ -0,0 +1,51 @@
|
||||
!
|
||||
! Copyright (c) 2006-2013, The Regents of the University of California,
|
||||
! through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||
! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
|
||||
! Institut (Switzerland). All rights reserved.!
|
||||
!
|
||||
! License: see file COPYING in top level of source distribution.
|
||||
!
|
||||
include 'H5hut.f90'
|
||||
|
||||
program write_setnparticles
|
||||
use H5hut
|
||||
implicit none
|
||||
include 'mpif.h'
|
||||
|
||||
! the file name we want to read
|
||||
character (len=*), parameter :: FNAME = "example_setnparticles.h5"
|
||||
integer*8, parameter :: NPOINTS = 99
|
||||
|
||||
integer :: comm, rank, ierr
|
||||
integer*8 :: file, i, status
|
||||
integer*4, allocatable :: data(:)
|
||||
|
||||
! init MPI & H5hut
|
||||
comm = MPI_COMM_WORLD
|
||||
call mpi_init(ierr)
|
||||
call mpi_comm_rank(comm, rank, ierr)
|
||||
call h5_abort_on_error ()
|
||||
|
||||
! create fake data
|
||||
allocate (data (NPOINTS))
|
||||
do i = 1, NPOINTS
|
||||
data (i) = i + NPOINTS*rank
|
||||
enddo
|
||||
|
||||
! open the a file for parallel writing and ceate step #0
|
||||
file = h5_openfile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT)
|
||||
status = h5_setstep(file, 0_8)
|
||||
|
||||
! set the size of the 1D array
|
||||
status = h5pt_setnpoints (file, npoints)
|
||||
|
||||
! write the particles
|
||||
status = h5pt_writedata_i4 (file, "data", data)
|
||||
|
||||
! cleanup
|
||||
status = h5_closefile (file)
|
||||
deallocate (data)
|
||||
call mpi_finalize (ierr)
|
||||
|
||||
end program write_setnparticles
|
||||
@@ -0,0 +1,51 @@
|
||||
!
|
||||
! Copyright (c) 2006-2013, The Regents of the University of California,
|
||||
! through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||
! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
|
||||
! Institut (Switzerland). All rights reserved.!
|
||||
!
|
||||
! License: see file COPYING in top level of source distribution.
|
||||
!
|
||||
include 'H5hut.f90'
|
||||
|
||||
program write_setnparticles
|
||||
use H5hut
|
||||
implicit none
|
||||
include 'mpif.h'
|
||||
|
||||
! the file name we want to read
|
||||
character (len=*), parameter :: FNAME = "example_setnparticles.h5"
|
||||
integer*8, parameter :: NPOINTS = 99
|
||||
|
||||
integer :: comm, rank, ierr
|
||||
integer*8 :: file, i, status
|
||||
integer*4, allocatable :: data(:)
|
||||
|
||||
! init MPI & H5hut
|
||||
comm = MPI_COMM_WORLD
|
||||
call mpi_init(ierr)
|
||||
call mpi_comm_rank(comm, rank, ierr)
|
||||
call h5_abort_on_error ()
|
||||
|
||||
! create fake data
|
||||
allocate (data (NPOINTS))
|
||||
do i = 1, NPOINTS
|
||||
data (i) = i + NPOINTS*rank
|
||||
enddo
|
||||
|
||||
! open the a file for parallel writing and ceate step #0
|
||||
file = h5_openfile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT)
|
||||
status = h5_setstep(file, 0_8)
|
||||
|
||||
! set the size of the 1D array
|
||||
status = h5pt_setnpoints (file, npoints)
|
||||
|
||||
! write the particles
|
||||
status = h5pt_writedata_i4 (file, "data", data)
|
||||
|
||||
! cleanup
|
||||
status = h5_closefile (file)
|
||||
deallocate (data)
|
||||
call mpi_finalize (ierr)
|
||||
|
||||
end program write_setnparticles
|
||||
@@ -0,0 +1,51 @@
|
||||
!
|
||||
! Copyright (c) 2006-2013, The Regents of the University of California,
|
||||
! through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||
! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
|
||||
! Institut (Switzerland). All rights reserved.!
|
||||
!
|
||||
! License: see file COPYING in top level of source distribution.
|
||||
!
|
||||
include 'H5hut.f90'
|
||||
|
||||
program write_setnparticles
|
||||
use H5hut
|
||||
implicit none
|
||||
include 'mpif.h'
|
||||
|
||||
! the file name we want to read
|
||||
character (len=*), parameter :: FNAME = "example_setnparticles.h5"
|
||||
integer*8, parameter :: NPOINTS = 99
|
||||
|
||||
integer :: comm, rank, ierr
|
||||
integer*8 :: file, i, status
|
||||
integer*4, allocatable :: data(:)
|
||||
|
||||
! init MPI & H5hut
|
||||
comm = MPI_COMM_WORLD
|
||||
call mpi_init(ierr)
|
||||
call mpi_comm_rank(comm, rank, ierr)
|
||||
call h5_abort_on_error ()
|
||||
|
||||
! create fake data
|
||||
allocate (data (NPOINTS))
|
||||
do i = 1, NPOINTS
|
||||
data (i) = i + NPOINTS*rank
|
||||
enddo
|
||||
|
||||
! open the a file for parallel writing and ceate step #0
|
||||
file = h5_openfile (FNAME, H5_O_WRONLY, H5_PROP_DEFAULT)
|
||||
status = h5_setstep(file, 0_8)
|
||||
|
||||
! set the size of the 1D array
|
||||
status = h5pt_setnpoints (file, npoints)
|
||||
|
||||
! write the particles
|
||||
status = h5pt_writedata_i4 (file, "data", data)
|
||||
|
||||
! cleanup
|
||||
status = h5_closefile (file)
|
||||
deallocate (data)
|
||||
call mpi_finalize (ierr)
|
||||
|
||||
end program write_setnparticles
|
||||
@@ -0,0 +1,36 @@
|
||||
!
|
||||
! Copyright (c) 2006-2013, The Regents of the University of California,
|
||||
! through Lawrence Berkeley National Laboratory (subject to receipt of any
|
||||
! required approvals from the U.S. Dept. of Energy) and the Paul Scherrer
|
||||
! Institut (Switzerland). All rights reserved.!
|
||||
!
|
||||
! License: see file COPYING in top level of source distribution.
|
||||
!
|
||||
include 'H5hut.f90'
|
||||
|
||||
program write_core_vfd
|
||||
use H5hut
|
||||
implicit none
|
||||
include 'mpif.h'
|
||||
|
||||
! the file name we want to read
|
||||
character (len=*), parameter :: FNAME = "example_core_vfd"
|
||||
integer*8, parameter :: DIM = 99
|
||||
|
||||
integer :: comm, rank, ierr
|
||||
integer*8 :: file, i, status
|
||||
integer*4, allocatable :: data(:)
|
||||
|
||||
! init MPI & H5hut
|
||||
comm = MPI_COMM_WORLD
|
||||
call mpi_init(ierr)
|
||||
call mpi_comm_rank(comm, rank, ierr)
|
||||
call h5_abort_on_error ()
|
||||
|
||||
|
||||
! cleanup
|
||||
status = h5_closefile (file)
|
||||
deallocate (data)
|
||||
call mpi_finalize (ierr)
|
||||
|
||||
end program write_core_vfd
|
||||
Reference in New Issue
Block a user