Time step formatting is failing in writer plugin

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

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

But the writer plugin is producing:

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?

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.

1 Like

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.

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.

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

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

[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.

You may also find the following useful:

Regards, Freddie.

1 Like