Skip to content
Snippets Groups Projects
Commit 39f3d214 authored by Jacob Kegerreis's avatar Jacob Kegerreis
Browse files

Add label_delta to parallel IO too

parent ce6c4924
No related branches found
No related tags found
1 merge request!544Add optional parameter label_delta to set the increment between snapshot output labels
......@@ -850,8 +850,12 @@ void prepare_file(struct engine* e, const char* baseName, long long N_total[6],
/* HDF5 File name */
char fileName[FILENAME_BUFFER_SIZE];
snprintf(fileName, FILENAME_BUFFER_SIZE, "%s_%04i.hdf5", baseName,
e->snapshot_output_count);
if (e->snapshot_label_delta == 1)
snprintf(fileName, FILENAME_BUFFER_SIZE, "%s_%04i.hdf5", baseName,
e->snapshot_output_count);
else
snprintf(fileName, FILENAME_BUFFER_SIZE, "%s_%06i.hdf5", baseName,
e->snapshot_output_count * e->snapshot_label_delta);
/* Open HDF5 file with the chosen parameters */
hid_t h_file = H5Fcreate(fileName, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment