Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluidity attempts to write particle subgroups after deleting detectors #371

Open
adigitoleo opened this issue Jan 9, 2023 · 0 comments
Open
Assignees

Comments

@adigitoleo
Copy link

When the option delete_outside_domain is enabled, Fluidity attempts to write particles after deleting their detectors, leading to write errors. In the (contrived) case of a particle subgroup with zero remaining particles after deletion, this can also crash the simulation, causing runaway memory usage. The relevant sections of the code are:

It seems like there are two parts to a potential solution: flag when detectors have been deleted and propagate this information to particles to stop the output, and add a final write before deleting the detectors. Alternatively, a simpler way would be to add a catch to prevent writing anything in the zero particles case, I'm not quite sure if that would be enough.

Hopefully the following options tree and mesh will reproduce the issue:
zero_particles.tar.gz

The example options tree contains two particle subgroups, one with initialise_during_simulation set, which acts as a workaround for the issue. I get a fluidity.err-0 that contains:

[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#49/x' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#49/y' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#49/z' failed.
[proc 0] E: h5pt_writedata_i4_: Write to dataset '/Step#49/id' failed.
[proc 0] E: h5pt_writedata_i4_: Write to dataset '/Step#49/proc_id' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#49/test1' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#50/x' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#50/y' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#50/z' failed.
[proc 0] E: h5pt_writedata_i4_: Write to dataset '/Step#50/id' failed.
[proc 0] E: h5pt_writedata_i4_: Write to dataset '/Step#50/proc_id' failed.
[proc 0] E: h5pt_writedata_r8_: Write to dataset '/Step#50/test1' failed.

The log shows that for the last two timesteps, the first subgroup has 0 local and 0 global detectors after moving.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants