Hi PETSc devs, In an email I sent a few minutes ago, I claimed that the TS was writing files of size about 1MB per timestep. That is incorrect; it is actually writing files with a few kB (about 10 kB) per timestep. My questions in the previous email (why are these so big, and can I change that somehow?) still apply though, since this is still much larger than these files "should" be based on the size of the state (128 bits) and the time variable (64 bits). My apologies for the error, and thank you for any help you can provide. -Zane Jakobs
That does seem like a great deal of memory per timestep. We need a bit more information to help you. Which TSTrajectory are you using? Have you built PETSc with --download-revolve? Are you trying to save the entire trajectory for post-processing or just enough to run with TSAdjoint and do an optimization? The TSTRAJECTORYMEMORY (mis-named) can store some trajectory in memory (which is really what you want) and also some trajectory on disk if needed. Normally with TSAjoint and revolve you don't need to save a huge number of time-steps to files. It sounds like you might be saving all the steps to disk? Once we have this information, Hong Zhang who is the expert can provide you with advice on optimizing the use of TSTrajectory. Barry
On Apr 5, 2021, at 1:30 PM, Zane Charles Jakobs <[email protected]> wrote:
Hi PETSc devs,
In an email I sent a few minutes ago, I claimed that the TS was writing files of size about 1MB per timestep. That is incorrect; it is actually writing files with a few kB (about 10 kB) per timestep. My questions in the previous email (why are these so big, and can I change that somehow?) still apply though, since this is still much larger than these files "should" be based on the size of the state (128 bits) and the time variable (64 bits).
My apologies for the error, and thank you for any help you can provide.
-Zane Jakobs
I just tried to run ex20opt_ic.c (a two-variable ODE) which should be very similar to your problem. The file size is 64 bytes on my laptop. Can you prepare a minimal working example for us to reproduce the issue? Since the size of your ODE is so small, it would be much better to store the checkpoints in memory instead of to the disk. This can be done with -ts_trajectory_type memory. Thanks, Hong (Mr.)
On Apr 5, 2021, at 1:30 PM, Zane Charles Jakobs <[email protected]> wrote:
Hi PETSc devs,
In an email I sent a few minutes ago, I claimed that the TS was writing files of size about 1MB per timestep. That is incorrect; it is actually writing files with a few kB (about 10 kB) per timestep. My questions in the previous email (why are these so big, and can I change that somehow?) still apply though, since this is still much larger than these files "should" be based on the size of the state (128 bits) and the time variable (64 bits).
My apologies for the error, and thank you for any help you can provide.
-Zane Jakobs
The size you observed is the physical size of the file which is different from the logical size of the file. The difference is usually OS-dependent. In your case, the logical size of the file should be 64 bytes, but the physical size is 4KB on Mac and 12KB on linux. So these numbers make sense. I am not sure if there is anything we can do to make the physical size smaller. Thanks, Hong (Mr.)
On Apr 5, 2021, at 1:30 PM, Zane Charles Jakobs <[email protected]> wrote:
Hi PETSc devs,
In an email I sent a few minutes ago, I claimed that the TS was writing files of size about 1MB per timestep. That is incorrect; it is actually writing files with a few kB (about 10 kB) per timestep. My questions in the previous email (why are these so big, and can I change that somehow?) still apply though, since this is still much larger than these files "should" be based on the size of the state (128 bits) and the time variable (64 bits).
My apologies for the error, and thank you for any help you can provide.
-Zane Jakobs
participants (3)
-
Barry Smith -
Zane Charles Jakobs -
Zhang, Hong