parallel manner using PIO. After the prerequisite library functions are
used, a call to pio_writedarray is made, writing the passed
data to an on disk VDC2 collection.
PRE-REQUISITES:
VDF meta-file must be generated, using either rawtovdf or vdfcreate
if advanced features (wavelet type, compression ratios, or boundary type) are needed
VDF file requires VDC version to be 2, and requires the Waveletname,
WaveletBoundaryMode, CompressionRations, and NumTransforms to be set.
POST-EFFECTS:
After a successful write, VDC2 data will be in a directory located in
the same directory as the vdf file, using the vdf name, appended with _data
(ex. ghost.vdf generates VDC2 data in the dir ghost_data in the vdf dir)
If no compression is enabled, a single, uncompressed file will be
generated using PIO instead of a VDC
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=i4), | public | :: | vdc_dims(3) | ||||
| integer(kind=i4), | public | :: | vdc_bsize(3) | ||||
| integer(kind=i4), | public | :: | vdc_ts | ||||
| integer(kind=PIO_OFFSET), | public | :: | vdc_iostart(3) | ||||
| integer(kind=PIO_OFFSET), | public | :: | vdc_iocount(3) |
subroutine checks start/count for out of bounds, adjusts if the start/count is too high,
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in), | dimension(:) | :: | global_dims |
int(3) global grid dimensions |
|
| integer(kind=PIO_OFFSET), | intent(inout), | dimension(:) | :: | start |
int(3) current MPI task global start |
|
| integer(kind=PIO_OFFSET), | intent(inout), | dimension(:) | :: | count |
int(3) current MPI task global start int(3) current MPI task global count |
|
| integer(kind=i4), | intent(in) | :: | rank |
int rank of current MPI task |
subroutine that, given a global grid, VDC blocksize, and max # of nioprocs, will
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | rank |
int rank of the current MPI task |
||
| integer(kind=i4), | intent(inout) | :: | nioprocs |
int represents the max possible # of IO procs, |
||
| real(kind=r4), | intent(in), | dimension(:) | :: | block_dims | ||
| integer(kind=PIO_OFFSET), | intent(out) | :: | start(3) | |||
| integer(kind=PIO_OFFSET), | intent(out) | :: | count(3) | |||
| integer(kind=i4), | intent(in), | dimension(:) | :: | bsize |
int(3) VDC block size |
|
| integer(kind=i4), | intent(in), | dimension(:) | :: | data_dims |
subroutine that prepares the global grid to be split by the auto_start_count routine
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i4), | intent(in) | :: | rank |
int rank of the current |
||
| integer(kind=i4), | intent(in), | dimension(:) | :: | data_dims |
int(3) size of the global grid |
|
| integer(kind=i4), | intent(in), | dimension(:) | :: | vdc_bsize |
int(3) size of the global grid int(3) VDC block size |
|
| integer(kind=PIO_OFFSET), | intent(out) | :: | iostart(3) | |||
| integer(kind=PIO_OFFSET), | intent(out) | :: | iocount(3) | |||
| integer(kind=i4), | intent(inout) | :: | ioprocs |
int max # of IO procs, gets returned as the actual # used |