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

Reset cell and particle counter on load and skip cpu and level loops while loading if not required #83

Merged
merged 4 commits into from
Feb 18, 2022

Conversation

nvaytet
Copy link
Collaborator

@nvaytet nvaytet commented Feb 18, 2022

With these changes:

osyris.Dataset(8, scale="au", path=path).load('sink') yields

Loaded: 0 cells, 0 particles.
Dataset: osyrisdata/starformation/output_00008: 128.00 B
Datagroup: sink 128.00 B
'id' Min: 1.0 Max: 2.0 [] (2,)
'msink' Min: 3.482e+32 Max: 3.485e+32 [g] (2,)
'position' Min: 3.383e+03 Max: 3.471e+03 [au] (2, 3)
'v' Min: 7.464e+04 Max: 7.577e+04 [cm / s] (2, 3)

(we skip both loops over CPUs and amr levels)

osyris.Dataset(8, scale="au", path=path).load('hydro') yields

Processing 12 files in osyrisdata/starformation/output_00008
 16% : read      65623 cells,          0 particles
 25% : read      90140 cells,          0 particles
 33% : read     118232 cells,          0 particles
 41% : read     147100 cells,          0 particles
 50% : read     170244 cells,          0 particles
 66% : read     235859 cells,          0 particles
 75% : read     260384 cells,          0 particles
 83% : read     288476 cells,          0 particles
 91% : read     312840 cells,          0 particles
Loaded: 340488 cells, 0 particles.
Dataset: osyrisdata/starformation/output_00008: 43.58 MB
Datagroup: hydro 43.58 MB
'density' Min: 2.376e-19 Max: 8.047e-12 [g / cm ** 3] (340488,)
'thermal_pressure' Min: 8.555e-11 Max: 0.057 [erg / cm ** 3] (340488,)
'internal_energy' Min: 1.379e+07 Max: 9.174e+15 [] (340488,)
'temperature' Min: 10.002 Max: 196.393 [K] (340488,)
'velocity' Min: 742.189 Max: 4.216e+05 [cm / s] (340488, 3)
'B_left' Min: 2.097e-05 Max: 0.164 [G] (340488, 3)
'B_right' Min: 2.097e-05 Max: 0.162 [G] (340488, 3)
'B_field' Min: 2.119e-05 Max: 0.157 [G] (340488, 3)

(we loop over CPUs and amr levels, but only have hydro variables in the output)

osyris.Dataset(8, scale="au", path=path).load('part') yields

Processing 12 files in osyrisdata/starformation/output_00008
 16% : read          0 cells,          0 particles
 25% : read          0 cells,        956 particles
 33% : read          0 cells,        956 particles
 41% : read          0 cells,        956 particles
 50% : read          0 cells,       2109 particles
 66% : read          0 cells,       2109 particles
 75% : read          0 cells,       3065 particles
 83% : read          0 cells,       3065 particles
 91% : read          0 cells,       4217 particles
Loaded: 0 cells, 4218 particles.
Dataset: osyrisdata/starformation/output_00008: 337.44 KB
Datagroup: part 337.44 KB
'mass' Min: 1.651e+29 Max: 1.652e+29 [g] (4218,)
'identity' Min: -2.0 Max: -1.0 [] (4218,)
'levelp' Min: 5.0 Max: 5.0 [] (4218,)
'birth_time' Min: 8.888e-05 Max: 8.892e-05 [] (4218,)
'position' Min: 3.354e+03 Max: 3.500e+03 [au] (4218, 3)
'velocity' Min: 7.464e+04 Max: 7.577e+04 [cm / s] (4218, 3)

(we skip the loop over amr levels and only load particles)

@nvaytet nvaytet merged commit 5b60ab5 into main Feb 18, 2022
@nvaytet nvaytet deleted the skip_cpu_and_level_loops branch February 18, 2022 20:49
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

Successfully merging this pull request may close these issues.

None yet

1 participant