204 Commits

Author SHA1 Message Date
de424f2d5d IO: Rewrite write_coordinates_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-20 00:47:09 -03:00
c727702e79 IO: Polish a bit write_variables_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-20 00:14:15 -03:00
cc6cca3cef IO: Remove option to store with or without ghost zones.
Snapshots are always stored with the ghost zones.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-20 00:12:10 -03:00
69d5ac374b IO: Rewrite write_variables_h5().
Store whole blocks with ghost zones.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-20 00:10:19 -03:00
0cde0a8d0d IO: Remove selection of the HDF5 snapshot type.
Only snapshots storing primitive variables are supported.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 23:49:12 -03:00
ff74b6828a IO: Remove write_conservative_variables_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 23:46:03 -03:00
3987c45cfe IO: Rewrite write_snapshot_h5().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 23:44:04 -03:00
ff4f600922 IO: Slightly rewrite the public subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 21:26:56 -03:00
3962bb2550 IO: Use print_message() in Amun-XML subroutines.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 20:07:28 -03:00
bd5fde97f6 HASH, IO: Properly handle the digest type.
Allow to select the digest type by the user. For the restart files we
always use the XXH64 hash.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-19 10:07:46 -03:00
8eca13d556 IO: Do not set hash type if libxxhash is not used.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-18 23:20:50 -03:00
a10d7d5499 CMAKE, HASH, IO: Detect and use the system libxxhash.
If it is available, allow to choose between XXH64 (default) and XXH3
hash algorithms provided by the library XXHASH.

If it is not available, the internal slower implementation is used.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-18 23:15:51 -03:00
f659000e8c PROFILE: Remove all custom profiling.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 15:22:15 -03:00
ea010e0ff3 IO: Pass the problem's name as argument to snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-11-16 12:31:10 -03:00
8297482639 IO: Store 'cmax' so we can properly resume jobs.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-23 11:23:58 -03:00
27041d0feb DRIVER, EVOLUTION, IO: Rewrite handling precise snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-19 14:03:57 -03:00
55b0d24b77 EVOLUTION: Rework slightly the way new time step is calculated.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-10-19 13:28:25 -03:00
6dbda8bf14 IO: Use the same array to store each variable in write_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-20 17:56:51 -03:00
6532c998fb IO: Implement restoring from version 2.0 of AmunXML restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 12:57:34 -03:00
3b44444211 IO: Implement storing the version 2.0 of AmunXML restart snapshots.
This version avoids allocation of big arrays to store the array fields
of data blocks. Fields with primitive and conservative variables are
stores separately for each block.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-15 12:06:48 -03:00
9b5e809ca9 IO: Make sure only available block's %uu fields are re/stored.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 14:31:15 -03:00
3d45fcca34 BLOCKS: Use %uu instead of %u0, %u1, and %u2.
Block field %uu addopts its size according to the used integration
methods. Use it for all operation insteado of fields %u0, %u1, and %u2.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-07-10 14:05:00 -03:00
ec16bdff05 IO: Fix restart from XML format when nghosts becomes smaller.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-18 17:26:52 -03:00
e51da1c696 IO: Restart correctly from XML format for different nghosts.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-03-18 16:59:57 -03:00
5728c1cab5 IO: Use stream access to store/read binary files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-02-04 22:26:15 -03:00
3d16d5c13d Update copyrights.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2021-02-04 17:35:04 -03:00
2450ec2a34 IO: Store dte in the restart snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-09-15 20:06:49 -03:00
af5673108e IO: Search for the last restart snapshot only if nrest = 0.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-09-11 19:09:58 -03:00
f199e231e6 EVOLUTION, IO: Add tolerances, interations and rejections counters.
Store these variables in restart snapshots.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-09-01 16:38:11 -03:00
1cac584c46 IO: Use newunit instead of unit in read_restart_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-24 22:06:42 -03:00
38fb24f9d6 IO: Always write all three dimensions of bounds(:,:,:).
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-24 20:43:23 -03:00
30c012d01a IO: Add more Intel dependent inquire statements.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-24 19:29:21 -03:00
f0a7edb6ea IO: Detect record length in write_binary_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-23 19:44:49 -03:00
945e627199 COMPRESSION, IO: Replace sizeof() with size() and transfer().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-22 20:29:43 -03:00
fe9c223489 IO: Fix a warning in the case of no forcing modes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-19 22:49:46 -03:00
3115ecdabb IO: Restart job from the last available restart snapshot.
If parameter 'restart_number' was not set or is negative, it is
determined from the last available restart snapshot. The restart
snapshots should be all in the same restart path in the complete
sequence, i.e., from first one to the last one.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-19 22:38:51 -03:00
0a5a502079 IO: Store parameters 'cfl' and 'glm_alpha' in snapshots.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-19 18:45:23 -03:00
fec8708ac9 IO: Update header for XML files to be compatible with Python.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-18 12:20:52 -03:00
e509ea4e9a IO: Change order of attributes in write_attribute_xml_file().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-18 11:58:53 -03:00
88f3c44b52 IO: Rename compression level for HDF5.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-17 18:35:12 -03:00
6bf3afcf0b EQUATIONS: Rename parameter 'csnd' to 'sound_speed'.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-16 16:46:27 -03:00
fda340b21b EQUATIONS: Rename gamma to adiabatic_index.
Keyword 'gamma' is reserved in Fortran for calculating Gamma function.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-16 16:41:28 -03:00
eb7c8dbd76 COMPRESSION, PYTHON: Add support for LZ4 compression.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-11 15:28:20 -03:00
2012a5eb92 IO: Remove compression suffix if the file is not compressed.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-11 15:01:26 -03:00
af4da9444a IO: Store compression format in binary file attributes.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-11 12:00:42 -03:00
0006459521 IO: Remove debug info.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-11 09:32:51 -03:00
352f7a7c1b IO: Fix file name in write_binary_xml(), when compression is inefficient.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-10 20:46:20 -03:00
c209000fb2 IO: Fix binary restart snapshot storing when the compression is on.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-10 20:29:25 -03:00
e0a4f2a4a5 IO: Print compression format and level of XML+binary files.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-10 16:52:16 -03:00
8b475b880b IO: Add storing compressed fields in write_snapshot_xml().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
2020-08-10 16:32:42 -03:00