# Time step formatting is failing in writer plugin

**URL:** <https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317>\
**Category:** Errors\
**Tags:** config, plugins, hpc\
**Created:** [10 November 2025 22:23 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317 "2025-11-10T22:23:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlmostSurelyRob](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/almostsurelyrob/32/446_2.png) [@AlmostSurelyRob](https://pyfr.discourse.group/u/AlmostSurelyRob)\
**Post date:** [10 November 2025 22:23 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/1 "2025-11-10T22:23:00Z")

</div>

I am on develop branch of PyFR running a case with the following setting

```ini
[soln-plugin-writer]
dt-out = 10
basedir = .
basename = k0-{t:06.1f}

```

But the writer plugin is producing:

```shell
ls -lt *.pyfrs
Nov 10 22:09 k0-0000.0.pyfrs
Nov 10 22:08 pyfr-40781105-3712-4684-a8ef-8a47c1102e19.pyfrs
Nov 10 22:05 pyfr-1e77effb-8f27-4db9-bf13-bf34c1c2b2e2.pyfrs

```

When I run Taylor-Green test case serially, I get the correct behaviour with time steps labels. Is there something I am missing?

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [10 November 2025 22:36 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/2 "2025-11-10T22:36:11Z")

</div>

The file writer is now asynchronous with file writing proceeding in the background while the simulation progresses. The oddly named files are the temporary names used during writing with a rename being performed at the end.

Is the simulation progressing? The code should not let more than one file write be underway at any one time and so it is unexpected that there are multiple temporary files present.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![AlmostSurelyRob](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/almostsurelyrob/32/446_2.png) [@AlmostSurelyRob](https://pyfr.discourse.group/u/AlmostSurelyRob)\
**Post date:** [11 November 2025 10:37 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/3 "2025-11-11T10:37:31Z")

</div>

Yes, the simulation was progressing and I was browsing the file live. I am going to restart this and let you know again if I see more than 1 temporary files. I definitely saw two though.

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [11 November 2025 11:43 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/4 "2025-11-11T11:43:47Z")

</div>

If you kill PyFR (or it crashes) while a write is occurring you will see these files. There is a timeout in the writer which by default is 60 seconds or so. This ensures that writes can not continue on in the background indefinitely.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![AlmostSurelyRob](https://yyz2.discourse-cdn.com/free1/user_avatar/pyfr.discourse.group/almostsurelyrob/32/446_2.png) [@AlmostSurelyRob](https://pyfr.discourse.group/u/AlmostSurelyRob)\
**Post date:** [11 November 2025 16:51 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/5 "2025-11-11T16:51:35Z")

</div>

Not an issue. As per your note above the files get renamed into the pattern specified in the INI.

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [11 November 2025 17:06 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/6 "2025-11-11T17:06:43Z")

</div>

In case you were wondering the reason we do this is because a valid configuration for the time averaging plugin is:

```auto
[soln-plugin-tavg]
mode = continuous
basedir = .
basename = tavg.pyfrs

```

so that you only accumulate a single averaging file. If we didn’t take care to write out temporary files should your simulation terminate while a new file is being written out you’d lose the current file.

Regards, Freddie.

---

<div class="post-metadata">

**Author:** ![fdw](https://avatars.discourse-cdn.com/v4/letter/f/a587f6/32.png) [@fdw](https://pyfr.discourse.group/u/fdw)\
**Post date:** [11 November 2025 17:15 UTC](https://pyfr.discourse.group/t/time-step-formatting-is-failing-in-writer-plugin/1317/7 "2025-11-11T17:15:09Z")

</div>

You may also find the following useful:

> <https://github.com/PyFR/PyFR/blob/b59a100e7cb21a88ffccc099bff8fe8e30b4b972/doc/src/io.rst>

Regards, Freddie.
