lucasmyers97 / maier-saupe-lc-hydrodynamics

Work at University of Minnesota using finite element methods to simulate hydrodynamics of liquid crystals with a Maier-Saupe field theory free energy
4 stars 0 forks source link

Figure out automatic git commit hash update #41

Open lucasmyers97 opened 2 years ago

lucasmyers97 commented 2 years ago

I'd like to be able to automatically update some repository with the current git commit hash so that I can write it to files so that I know exactly what simulation was run, and so that (in principle) I can just checkout that head and re-compile and re-run with the same parameters to get the same thing back. The method here had me recompiling (or at least relinking) everything each time I run cmake, which is not ideal. Might just be easier to have cmake write to a file every time I run cmake, and then I can just have the code read the hash from that file.

lucasmyers97 commented 1 year ago

Linking is actually not so much of a problem since we started using mold linker, so maybe this is a viable solution.

The other thing we could do is just print the date and time to the config file and make sure that the git commits are in sync.