34 Commits

Author SHA1 Message Date
d41ec74665 IO: Use generic xxh64() to calculate all hashes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 17:31:59 -03:00
97e572ec94 IO: Make sure bounds have the same domensions while stored and read.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 06:49:53 -03:00
ca3580e2ec IO: Fix wrong warning while reading from an XML+binary restart snapshot.
If the forcing is off, the number of forcing modes is zero, but it is
not the same as a wrong number of forcing modes stored in the restart
file.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-13 06:47:38 -03:00
7c1d028805 IO: Store hashes in write_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:42:05 -03:00
c2294cbe5e IO: Store hashes with leading zeros in write_restart_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:29:18 -03:00
5a9ea1dc92 IO: Verify hashes while reading XML+binary restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 18:19:33 -03:00
52d899aa72 IO: Store hashes of binary files in XML+binary restar snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-11 15:19:25 -03:00
5c554a2b2d IO: Do not store driving coefficients if nmodes == 0.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 21:06:34 -03:00
add0759308 IO: Handle properly seeds and driving coeffs in HDF5 restart files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 20:58:27 -03:00
13858e6456 IO: Implement XML+binary format of the regular snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-05-01 11:40:37 -03:00
4550af59d4 IO: Fix mismatch in the XML restart snapshot.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-04-30 14:31:01 -03:00
59bc5482ea IO: Fix calling read_snapshot_parameter_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-04-30 07:57:34 -03:00
07e74abfa9 IO: Implement XML+binary format of the restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-04-29 17:38:41 -03:00
408f42151d IO, DRIVER: Store x/y/zblocks separately.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-04-28 14:40:04 -03:00
24d33316ae RANDOM: Change Marsaglia's xorshift to Vigna's xoshiro256+ generator.
Completely rewrite the random generator module. The new method is
true 64-bit floating point generator in contrast to 32-bit Marsaglia's
methods. Add recommended seeds' initialization and jump for parallel
computations. Make function names more meaningful and add new functions
in IO module to store the seeds properly.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-04-25 18:37:58 -03:00
ad0303d3ba Update copyright.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-03-02 13:18:53 -03:00
76d7cf8826 IO, DRIVER, PYTHON: Fix domain block dimensions with job restart.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-21 15:58:38 -03:00
d205696410 BLOCKS: Add status argument to append/remove_datablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 12:42:25 -02:00
9e9c903cc1 BLOCKS: Add status argument to append/remove_metablock().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 12:34:20 -02:00
601adc8037 IO, DRIVER: Allow for restart with different number of ghost zones.
Now we can restart from restart snapshots with different number of ghost
zones. Also, remove the old restart snapshot format support from
read_datablocks_h5().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 11:02:36 -02:00
6d421e6efb IO: Update the initialization/finalization status flag.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-11 10:01:35 -02:00
ec9a5ee2bd IO: Use nb, ne instead of ib, ie, jb, je, kb, ke.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-05 13:02:27 -02:00
af62878ba9 IO: Use bcells instead of im, jm, km.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-05 11:02:35 -02:00
af2c7213f3 COORDINATES: Use ncells instead of in, jn, and kn.
Also rename ng to nghosts.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-04 14:43:10 -02:00
43b3581a9e COORDINATES: Replace ir, jr, kr with domain_base_dims(:).
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-02-03 22:31:05 -02:00
67a842f24c IO: Use helper subroutines in print_io().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-30 22:48:30 -02:00
e7d5d00da8 DRIVER, IO: Move precise_snapshot variable to IO module.
Also improve a bit print_io().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-30 12:06:26 -02:00
7a2d694629 DRIVER, IO: Initialize I/O after reading parameters.
Use it to handle parameters from restart snapshots. Also separate
printing I/O parameters from I/O module initialization.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-29 15:07:50 -02:00
2a6062cbd5 DRIVER, COORDINATES, IO: Pass more fixed parameters to initialize_coordinates().
Parameters such block dimensions, the base level dimensions, or the
domain extrema cannot be modified when the job is restarted, so read
them from the restart snapshots.

Also add new subroutine to IO read integer vector attribute from the
HDF5 snapshots.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-29 10:38:16 -02:00
4aa92643ab DRIVER, PROBLEMS, IO: Initiate problems earlier.
Also store the problem name in the restart snapshot.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-29 09:59:09 -02:00
305ed8ed13 IO: Replace explicit calls to get_parameter_*() with unified one.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-28 21:17:10 -02:00
fc5db6dd29 DRIVER, IO, COORDINATES: Reset toplev for restarted jobs.
If the job was restart with different maxlev, then
initialize_coordinates() has to know about it, so it generate
appropriate coordinates.

Read maxlev from the restart snapshot, if the job was restarted, and set
toplev as the maximum value between the previous and current maxlev.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-28 18:56:39 -02:00
6fbd567130 IO: Implement subroutine to read parameters from the restart snapshots.
If we run a job from a restart snapshot and modify some of the
parameters in the parameter file, this could lead to problems. Some
parameters, like the set of equations, equation of state, or block
dimensions, simply cannot be modified. Therefore, any such parameter,
modifies in the parameter file, should be overwritten with the value
from the restart snapshot. The purpose of these subroutines is to read
these parameters from restart snapshots.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-28 18:19:31 -02:00
f8b65842af Move source files from src/ to sources/.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2019-01-28 09:14:20 -02:00