Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

optimize FILE-IO #37

Open
nathanfranklin opened this issue Mar 12, 2015 · 2 comments
Open

optimize FILE-IO #37

nathanfranklin opened this issue Mar 12, 2015 · 2 comments

Comments

@nathanfranklin
Copy link
Member

An earlier approach and goal of LAMMPS-MD FILE-IO was to avoid reading from file unless required.

We were originally writing to particle data (ABCParticle related information) to just one file. The idea was that we would write to the file, lammps would run and read this file..and write new results in the same file. If no data related changes occurs (i.e. wrapper.SP[TIME_STEP]=.2 can occur but particles.update_particle does not), there we can avoid reading the data file unless someone queries or changes the data (particles.update_particleor particles.update_particle ).

The idea was to avoid unneeded file reading:

part = md.get_part("foo")
md.run()
md.run()
p = part.get_particle(123)  # reading of file by SimPhoNy first occurs
p = part.get_particle(234)   
md.run() 
wrapper.SP[TIME_STEP]=.1
md.run()
md.run()
p = part.get_particle(123)  # reading of file by SimPhoNy occurs for the second time

However, along the way or even from the beginning this wasnt implemented correctly or tested so this was removed in 423d912

@itziakos
Copy link
Member

Welcome to cache invalidation hell 😄

@nathanfranklin
Copy link
Member Author

ha! definitely.

I realized today that it wouldn't work since I moved to two files.. then I looked more closely and realized that all my logic didn't make sense.

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

No branches or pull requests

2 participants