%3CLINGO-SUB%20id%3D%22lingo-sub-1335148%22%20slang%3D%22en-US%22%3ERunning%20long%20HPC%20jobs%20on%20Azure%20with%20checkpointing%20using%20LAMMPS%2C%20NAMD%20and%20Gromacs%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1335148%22%20slang%3D%22en-US%22%3E%3CP%3ESome%20HPC%20simulations%20take%20a%20long%20time%20to%20run%20(up%20to%20days%20and%20weeks)%20and%20run%20over%20multiple%20nodes.%20When%20running%20these%20long%20jobs%2C%20failure%20rate%20and%20availability%20of%20the%20underlying%20infrastructure%20may%20become%20an%20issue.%20One%20solution%20for%20recovering%20from%20these%20failures%20is%20using%20checkpointing%20during%20the%20simulation%20to%20provide%20a%20starting%20point%20in%20case%20the%20simulation%20is%20terminated%20for%20any%20reason.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20running%20compute%20jobs%20in%20Azure%2C%20most%20issues%20related%20to%20running%20on%20bare%20metal%20compute%20nodes%20still%20remain.%20Hardware%20can%20fail%2C%20memory%20can%20have%20issues%2C%20and%20the%20InfiniBand%20network%20may%20encounter%20problems.%20On%20top%20of%20that%2C%20due%20to%20security%20and%20functional%20updates%2C%20the%20(virtualization)%20software%20stack%20may%20not%20stay%20static%20throughout%20the%20duration%20of%20the%20job.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20way%20to%20prevent%20the%20impact%20of%20the%20potential%20failures%20is%20to%20save%20intermediate%20results%2C%20in%20such%20a%20way%20that%20a%20calculation%20can%20be%20restarted%20from%20that%20result%20point.%20The%20creation%20of%20this%20intermediate%20result%20is%20called%20creating%20a%20checkpoint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECheckpointing%20can%20be%20implemented%20at%20different%20levels%3A%20within%20the%20applications%20and%20at%20the%20OS%20level.%20If%20available%2C%20the%20checkpointing%20within%20applications%20are%20the%20most%20stable%2C%20and%20many%20applications%20do%20support%20checkpointing%20natively.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20significant%20downside%20of%20checkpointing%20is%20the%20amount%20of%20I%2FO%20that%20is%20added%20to%20the%20job%20during%20a%20checkpoint%2C%20and%20the%20incurred%20job%20delay%20during%20this%20writing.%20Therefore%2C%20there%20needs%20to%20be%20a%20good%20balance%20made%20for%20the%20time%20between%20checkpoints%20and%20the%20risk%20of%20job%20failure.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1356283722%22%20id%3D%22toc-hId--1356283721%22%3ESummary%3C%2FH2%3E%0A%3CP%3EThe%20actual%20amount%20of%20overhead%20of%20checkpointing%20depends%20on%20the%20size%20of%20the%20model%20in%20memory%20and%20the%20resulting%20file%20size%20that%20has%20to%20be%20written%20to%20disk.%20For%20smaller%20models%2C%20this%20file%20size%20can%20be%20in%20the%20range%20of%20hundreds%20of%20megabytes.%20Doing%20a%20single%20checkpoint%20per%20hour%20may%20not%20even%20be%20visible%20in%20the%20simulation%20speed.%20For%20larger%20models%2C%20this%20will%20be%20in%20the%20range%20of%20gigabytes%20(GBs)%20and%20here%2C%20a%20reasonably%20fast%20IO%20system%20will%20allow%20you%20to%20limit%20the%20overhead%20to%20stay%20in%20a%20range%20under%205%20percent.%20Depending%20on%20the%20total%20runtime%20of%20the%20simulation%2C%20it%20makes%20sense%20to%20implement%20checkpointing%20on%20an%20hourly%20up%20to%20daily%20interval.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1131229111%22%20id%3D%22toc-hId-1131229112%22%3ECluster%20setup%3C%2FH2%3E%0A%3CP%3EIn%20the%20examples%20below%2C%20an%20Azure%20CycleCloud-managed%20IBM%20LSF%20cluster%20is%20used.%20All%20the%20jobs%20are%20submitted%20from%20a%20regular%20user%20account%2C%20which%20has%20a%20shared%20homedir%2C%20hosted%20on%20Azure%20NetApp%20Files.%20The%20base%20configuration%20of%20this%20cluster%20is%20set%20up%20using%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAzure%2Fazurehpc%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20HPC%20resources%3C%2FA%3E%20on%20GitHub.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20setup%2C%20the%20homedir%20of%20the%20user%20is%20used%20for%20all%20job%20storage.%20This%20includes%20job%20files%2C%20input%20files%2C%20output%20files%20and%20checkpoint%20files.%20All%20applications%20are%20compiled%20and%20installed%20using%20%3CA%20href%3D%22http%3A%2F%2Feasybuilders.github.io%2Feasybuild%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%26nbsp%3BEasyBuild%26nbsp%3Bframework%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20post%20focuses%20on%20node%20failures%20and%20preventive%20measures%20at%20a%20job%20level.%20However%2C%20another%20potential%20failure%20point%20is%20the%20LSF%20master%20node%20of%20the%20cluster.%20Under%20normal%20circumstances%2C%20a%20failure%20on%20the%20master%20node%20does%20not%20influence%20the%20job%20run.%20That%20being%20said%2C%20one%20of%20the%20options%20is%20to%20have%20a%20high%20availability%20(HA)%20setup%20of%20a%20set%20of%20master%20nodes.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--676225352%22%20id%3D%22toc-hId--676225351%22%3ELAMMPS%3C%2FH2%3E%0A%3CP%3EThis%20Molecular%20Dynamics%20application%20is%20written%20at%20%3CA%20href%3D%22https%3A%2F%2Flammps.sandia.gov%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESandia%20labs%3C%2FA%3E%20and%20is%20open%20source.%20It%20supports%20MPI%20and%20can%20run%20large%20and%20long-lasting%20jobs.%20LAMMPS%20provides%20native%20support%20for%20checkpointing%2C%20which%20can%20be%20enabled%20by%20using%20the%20%3CSTRONG%3Erestart%3C%2FSTRONG%3E%26nbsp%3Bcommand%20in%20the%20input%20file.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20this%20example%2C%20a%20simple%20input%20file%20based%20on%20Lennard-Jones%20is%20used%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23%203d%20Lennard-Jones%20melt%3CBR%20%2F%3Evariable%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20x%20index%201%3CBR%20%2F%3Evariable%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20y%20index%201%3CBR%20%2F%3Evariable%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20z%20index%201%3CBR%20%2F%3Evariable%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20xx%20equal%20400*%24x%3CBR%20%2F%3Evariable%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20yy%20equal%20400*%24y%3CBR%20%2F%3Evariable%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20zz%20equal%20400*%24z%3CBR%20%2F%3Eunits%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lj%3CBR%20%2F%3Eatom_style%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20atomic%3CBR%20%2F%3Elattice%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20fcc%200.8442%3CBR%20%2F%3Eregion%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20box%20block%200%20%24%7Bxx%7D%200%20%24%7Byy%7D%200%20%24%7Bzz%7D%3CBR%20%2F%3Ecreate_box%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%20box%3CBR%20%2F%3Ecreate_atoms%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%20box%3CBR%20%2F%3Emass%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%201.0%3CBR%20%2F%3Evelocity%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20all%20create%201.44%2087287%20loop%20geom%3CBR%20%2F%3Epair_style%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lj%2Fcut%202.5%3CBR%20%2F%3Epair_coeff%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%201%201.0%201.0%202.5%3CBR%20%2F%3Eneighbor%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200.3%20bin%3CBR%20%2F%3Eneigh_modify%26nbsp%3B%26nbsp%3B%26nbsp%3B%20delay%200%20every%2020%20check%20no%3CBR%20%2F%3Efix%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%20all%20nve%3CBR%20%2F%3E%3CSTRONG%3Erestart%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201000%20lj.restart%3CBR%20%2F%3E%3C%2FSTRONG%3Erun%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20100000%20every%201000%20NULL%3C%2FPRE%3E%0A%3CP%3EThe%20job%20script%20creates%20a%20working%20directory%20based%20on%20the%20job-id%2C%20copies%20in%20the%20used%20executable%20and%20the%20input%20file%2C%20and%20starts%20a%20%3CSTRONG%3Empirun%3C%2FSTRONG%3E%20based%20on%20the%20amount%20of%20cores%20assigned%20to%20the%20job%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23!%2Fbin%2Fbash%3CBR%20%2F%3Emkdir%20%24LSB_JOBID%3CBR%20%2F%3Ecd%20%24LSB_JOBID%3CBR%20%2F%3Ecp%20~%2Fapps%2Flammps-7Aug19-mpi%2Fsrc%2Flmp_mpi%20.%3CBR%20%2F%3Ecp%20..%2Fin.lj%20.%3CBR%20%2F%3Emodule%20load%20foss%2F2018b%3CBR%20%2F%3Empirun%20-n%20%24LSB_DJOB_NUMPROC%20.%2Flmp_mpi%20-in%20in.lj%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20job%20is%20submitted%20using%20the%20LSF%20%3CSTRONG%3Ebsub%3C%2FSTRONG%3E%20command%2C%20and%20four%20HC%20nodes%20are%20requested%2C%20using%20a%20total%20of%20176%20cores%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CEM%3Ebsub%20-q%20hc-mpi%20-n%20176%20-R%20%22span%5Bptile%3D44%5D%22%20-o%20.%2F%25J.out%20.%2Flammpsjob.sh%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20the%20nodes%20are%20acquired%20and%20started%20up%2C%20the%20simulation%20kicks%20off.%20The%20job-id%20that%20is%20given%20is%2025%2C%20so%20we%20can%20now%20look%20at%20the%20job%20directory%20to%20follow%20the%20progress.%20Due%20to%20the%20%3CSTRONG%3Erestart%3C%2FSTRONG%3E%20option%20in%20the%20input%20file%2C%20a%20request%20is%20being%20made%20every%201%2C000%20simulation%20steps%20to%20create%20a%20file%20for%20all%20the%20256%20million%20atoms.%20In%20this%20case%2C%20a%2021-GB%20file%20is%20created%20roughly%20every%20half%20hour.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2012%3A20%20lj.restart.1000%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2012%3A51%20lj.restart.2000%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2013%3A22%20lj.restart.3000%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2013%3A53%20lj.restart.4000%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2014%3A24%20lj.restart.5000%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2014%3A56%20lj.restart.6000%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2021G%20Jan%26nbsp%3B%208%2015%3A26%20lj.restart.7000%3C%2FPRE%3E%0A%3CP%3ENow%20let%E2%80%99s%20assume%20that%20the%20job%20exited%20due%20to%20some%20failure.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20restart%20the%20simulation%2C%20a%20modified%20input%20file%20has%20to%20be%20made%E2%80%94mostly%20because%20the%20%3CSTRONG%3Eread_restart%3C%2FSTRONG%3E%20and%3C%2FP%3E%0A%3CP%3Ethe%20%3CSTRONG%3Ecreate_box%3C%2FSTRONG%3E%20commands%20conflict.%20They%20will%20both%20try%20to%20create%20the%20simulation%20space%20with%20the%20atoms.%20A%20working%20restart%20file%20is%20the%20following%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23%203d%20Lennard-Jones%20melt%3CBR%20%2F%3E%3CSTRONG%3Eread_restart%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lj.restart.*%3CBR%20%2F%3E%3C%2FSTRONG%3Evelocity%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20all%20create%201.44%2087287%20loop%20geom%3CBR%20%2F%3Epair_style%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20lj%2Fcut%202.5%3CBR%20%2F%3Epair_coeff%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%201%201.0%201.0%202.5%3CBR%20%2F%3Eneighbor%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200.3%20bin%3CBR%20%2F%3Eneigh_modify%26nbsp%3B%26nbsp%3B%26nbsp%3B%20delay%200%20every%2020%20check%20no%3CBR%20%2F%3Efix%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201%20all%20nve%3CBR%20%2F%3Erestart%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201000%20lj.restart%3CBR%20%2F%3E%3CSTRONG%3Erun%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20100000%20upto%20every%201000%20NULL%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3EFirst%2C%20%3CSTRONG%3Eread_restart%3C%2FSTRONG%3E%20is%20defined.%20It%20will%20look%20for%20the%20latest%20checkpoint%20file%20and%20use%20that%20to%20recreate%20the%20atoms.%20Next%2C%20the%20%3CSTRONG%3Erun%3C%2FSTRONG%3E%20command%20is%20modified%20to%20include%20%3CSTRONG%3Eupto%2C%3C%2FSTRONG%3E%26nbsp%3Bwhich%20tells%20the%20run%20to%20not%20restart%20the%20simulation%20and%20run%20100%2C000%20steps%20additional%20to%20the%20restart%20state%2C%20but%20to%20run%20only%20up%20to%20the%20initially%20defined%20endpoint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESince%20we%20are%20already%20in%20a%20working%20directory%20with%20all%20the%20required%20information%2C%20we%20also%20need%20to%20change%20the%20job%20submission%20script%20to%20look%20something%20like%20this%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23!%2Fbin%2Fbash%3CBR%20%2F%3Ecd%20~%2Fjobs%2F25%3CBR%20%2F%3Emodule%20load%20foss%2F2018b%3CBR%20%2F%3Empirun%20-n%20%24LSB_DJOB_NUMPROC%20.%2Flmp_mpi%20-in%20in.lj.restart%3C%2FPRE%3E%0A%3CP%3EAnd%20we%20can%20submit%20this%20again%20using%20the%20LSF%20%3CSTRONG%3Ebsub%3C%2FSTRONG%3E%20command%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CEM%3Ebsub%20-q%20hc-mpi%20-n%20176%20-R%20%22span%5Bptile%3D44%5D%22%20-o%20.%2F%25J.out%20.%2Frestart-lammpsjob.sh%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20starts%20a%20new%20job%20that%20takes%20the%20latest%20checkpoint%20file%20and%20continues%20the%20simulation%20from%20the%20defined%20checkpoint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnother%20way%20of%20implementing%20checkpointing%20that%20uses%20significantly%20less%20storage%20is%20restarting%20based%20on%20two%20restart%20files.%20In%20this%20version%20we%20write%20quite%20some%20data%20every%20half-hour%20to%20store%20the%20checkpoint%20files.%20This%20can%20be%20optimized%2C%20by%20using%20the%20following%20restart%20entries%20in%20the%20input%20file%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Erestart%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%201000%20lj.restart.1%20lj.restart.2%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20restarting%20from%20this%20state%2C%20check%20which%20file%20was%20written%20latest%20and%20use%20this%20specifically%20when%20adding%20the%20%3CSTRONG%3Eread_restart%3C%2FSTRONG%3E%20entry%20into%20the%20input%20file.%20Also%2C%20do%20not%20forget%20to%20add%20the%20%3CSTRONG%3Eupto%3C%2FSTRONG%3E%20entry.%20After%20resubmitting%20the%20simulation%2C%20it%20will%20continue%20from%20the%20last%20checkpoint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20quantify%20the%20checkpoint%20overhead%2C%20multiple%20jobs%20were%20submitted%2C%20and%20each%20is%20scheduled%20to%20simulate%20200%20steps%20and%20last%20approximately%201%20hour%20and%20use%20176%20cores.%20One%20of%20the%20jobs%20is%20doing%20a%20single%20checkpoint%20at%201%2C400%20steps%20minutes%2C%20one%20is%20doing%20two%20checkpoints%2C%20each%20at%20800%20steps%2C%20and%20one%20has%20no%20checkpointing%20enabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%201024px%3B%22%20width%3D%221024%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22116%22%3E%0A%3CP%3ECheckpoint%2Frun%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2282%22%3E%0A%3CP%3ERuntime%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2266%22%3E%0A%3CP%3ESteps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2295%22%3E%0A%3CP%3ELost%20time%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276%22%3E%0A%3CP%3EOverhead%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189%22%3E%0A%3CP%3EExtrapolated%20for%2024-hour%20job%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22116%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2282%22%3E%0A%3CP%3E3%2C469%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2266%22%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2295%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22116%22%3E%0A%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2282%22%3E%0A%3CP%3E3%2C630%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2266%22%3E%0A%3CP%3E2%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2295%22%3E%0A%3CP%3E161%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276%22%3E%0A%3CP%3E4.6%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189%22%3E%0A%3CP%3E0.18%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22116%22%3E%0A%3CP%3E2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2282%22%3E%0A%3CP%3E3%2C651%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2266%22%3E%0A%3CP%3E2%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2295%22%3E%0A%3CP%3E182%20sec%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2276%22%3E%0A%3CP%3E5.2%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22189%22%3E%0A%3CP%3E0.21%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20checkpoint%20overhead%20for%20this%20model%20is%20quite%20small%20with%20around%20a%205-percent%20impact%20for%20an%20hourly%20checkpoint.%20The%20combined%20checkpoint%20file%20size%20is%2021%20GB%2C%20which%20is%20being%20written%20during%20each%20checkpoint.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1811287481%22%20id%3D%22toc-hId-1811287482%22%3ENAMD%3C%2FH2%3E%0A%3CP%3EA%20second%20example%20of%20a%20molecular%20dynamic%20application%20is%20NAMD.%20This%20application%20is%20written%20and%20maintained%20by%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.ks.uiuc.edu%2FResearch%2Fnamd%2F%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EUniversity%20of%20Illinois%3C%2FA%3E.%20This%20application%20is%20open%20source%2C%20even%20though%20registration%20is%20required.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENAMD%20also%20supports%20checkpointing%20natively.%20This%20demonstration%20uses%20the%20STMV%20benchmark%2C%20which%20models%20about%201%2C000%2C000%20atoms.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20enable%20checkpointing%2C%20the%20following%20lines%20need%20to%20be%20added%20to%20the%20stmv.namd%20input%20file%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EoutputName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B.%2Foutput%3CBR%20%2F%3EoutputEnergies%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2020%3CBR%20%2F%3EoutputTiming%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2020%3CBR%20%2F%3Enumsteps%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2021600%3CBR%20%2F%3E%3CSTRONG%3ErestartName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%2Fcheckpoint%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3ErestartFreq%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20100%3CBR%20%2F%3E%3C%2FSTRONG%3E%3CSTRONG%3ErestartSave%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20yes%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3EAnd%20that%20input%20file%20can%20be%20used%20by%20the%20following%20job%20script%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%23!%2Fbin%2Fbash%3CBR%20%2F%3Emkdir%20%24LSB_JOBID%3CBR%20%2F%3Ecd%20%24LSB_JOBID%3CBR%20%2F%3Ecp%20..%2Fstmv%2F*%20.%3CBR%20%2F%3Emodule%20load%20NAMD%2F2.13-foss-2018b-mpi%3CBR%20%2F%3Empirun%20-n%20%24LSB_DJOB_NUMPROC%20namd2%20stmv.namd%3C%2FPRE%3E%0A%3CP%3EThe%20job%20is%20submitted%20with%20the%20following%20LSF%20submit%20script%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E%3CEM%3Ebsub%20-q%20hc-mpi%20-n%20176%20-R%20%22span%5Bptile%3D44%5D%22%20-o%20.%2F%25J.out%20.%2Fnamd-mpi-job%3C%2FEM%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20started%2C%20this%20job%20creates%20checkpoint%20files%20in%20the%20working%20directory%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A58%20checkpoint.9500.coor%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A58%20checkpoint.9500.vel%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%20261%20Jan%2015%2017%3A58%20checkpoint.9500.xsc%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A58%20checkpoint.9600.coor%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A58%20checkpoint.9600.vel%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%20261%20Jan%2015%2017%3A58%20checkpoint.9600.xsc%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A58%20checkpoint.9700.coor%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A58%20checkpoint.9700.vel%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%20261%20Jan%2015%2017%3A58%20checkpoint.9700.xsc%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A59%20checkpoint.9800.coor%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A59%20checkpoint.9800.vel%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%20261%20Jan%2015%2017%3A58%20checkpoint.9800.xsc%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A59%20checkpoint.9900.coor%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%2025M%20Jan%2015%2017%3A59%20checkpoint.9900.vel%3CBR%20%2F%3E-rw-r--r--.%26nbsp%3B%201%20ccadmin%20ccadmin%26nbsp%3B%20258%20Jan%2015%2017%3A59%20checkpoint.9900.xsc%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20the%20job%20fails%20at%20this%20point%2C%20the%20checkpoint%20files%20can%20be%20used%20to%20restart%20the%20job.%20To%20do%20this%2C%20the%20input%20file%20needs%20to%20be%20adjusted.%20Looking%20for%20the%20latest%20checkpoint%20file%20available%2C%20the%20timestep%20is%209%2C900.%20Now%2C%20in%20the%20input%20file%2C%20the%20following%20two%20changes%20are%20needed%E2%80%94first%2C%20tell%20the%20simulation%20to%20restart%20at%20time%209%2C900%2C%20and%20second%2C%20tell%20it%20to%20read%20and%20initialize%20the%20simulation%20from%20the%20checkpoint%20files%20of%20checkpoint.9900.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3EoutputName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%2Foutput%3CBR%20%2F%3EoutputEnergies%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2020%3CBR%20%2F%3EoutputTiming%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2020%3CBR%20%2F%3E%3CSTRONG%3Efirsttimestep%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%209900%3CBR%20%2F%3E%3C%2FSTRONG%3Enumsteps%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2021600%3CBR%20%2F%3ErestartName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%2Fcheckpoint%3CBR%20%2F%3ErestartFreq%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20100%3CBR%20%2F%3ErestartSave%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20yes%3CBR%20%2F%3E%3CSTRONG%3Ereinitatoms%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20.%2Fcheckpoint.9900%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3EAfter%20resubmitting%20the%20job%20with%20%3CSTRONG%3Ebsub%3C%2FSTRONG%3E%2C%20the%20simulation%20continues%20from%20the%20checkpoint%20and%20stops%20at%20the%20original%20intended%20step%2C%20as%20this%20example%20output%20shows%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3ETCL%3A%20Reinitializing%20atom%20data%20from%20files%20with%20basename%20.%2Fcheckpoint.9900%3CBR%20%2F%3EInfo%3A%20Reading%20from%20binary%20file%20.%2Fcheckpoint.9900.coor%3CBR%20%2F%3EInfo%3A%20Reading%20from%20binary%20file%20.%2Fcheckpoint.9900.vel%3CBR%20%2F%3E%5B%E2%80%A6%5D%3CBR%20%2F%3ETIMING%3A%2021600%26nbsp%3B%20CPU%3A%201882.08%2C%200.159911%2Fstep%26nbsp%3B%20Wall%3A%201882.08%2C%200.159911%2Fstep%2C%200%20hours%20remaining%2C%201192.902344%20MB%20of%20memory%20in%20use.%3CBR%20%2F%3EETITLE%3A%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20TS%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20BOND%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ANGLE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20DIHED%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMPRP%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20ELECT%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20VDW%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20BOUNDARY%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BMISC%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20KINETIC%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20TOTAL%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20TEMP%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20POTENTIAL%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20TOTAL3%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20TEMPAVG%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PRESSURE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20GPRESSURE%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20VOLUME%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20PRESSAVG%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20GPRESSAVG%3CBR%20%2F%3EENERGY%3A%26nbsp%3B%26nbsp%3B%2021600%26nbsp%3B%26nbsp%3B%26nbsp%3B%20366977.1834%26nbsp%3B%26nbsp%3B%26nbsp%3B%20278844.5518%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2081843.4582%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%205043.3226%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-4523413.8827%26nbsp%3B%26nbsp%3B%26nbsp%3B%20385319.1671%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200.0000%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200.0000%26nbsp%3B%26nbsp%3B%26nbsp%3B%20942875.0190%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-2462511.1806%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20296.5584%26nbsp%3B%20-3405386.1995%26nbsp%3B%20-2454036.3329%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20296.7428%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2015.0219%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%2019.7994%26nbsp%3B%2010190037.8159%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-1.4609%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-1.0415%3CBR%20%2F%3EWRITING%20EXTENDED%20SYSTEM%20TO%20RESTART%20FILE%20AT%20STEP%2021600%3CBR%20%2F%3EWRITING%20COORDINATES%20TO%20RESTART%20FILE%20AT%20STEP%2021600%3CBR%20%2F%3EFINISHED%20WRITING%20RESTART%20COORDINATES%3CBR%20%2F%3EWRITING%20VELOCITIES%20TO%20RESTART%20FILE%20AT%20STEP%2021600%3CBR%20%2F%3EFINISHED%20WRITING%20RESTART%20VELOCITIES%3CBR%20%2F%3EWRITING%20EXTENDED%20SYSTEM%20TO%20OUTPUT%20FILE%20AT%20STEP%2021600%3CBR%20%2F%3EWRITING%20COORDINATES%20TO%20OUTPUT%20FILE%20AT%20STEP%2021600%3CBR%20%2F%3EWRITING%20VELOCITIES%20TO%20OUTPUT%20FILE%20AT%20STEP%2021600%3CBR%20%2F%3E%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3CBR%20%2F%3EWallClock%3A%201894.207520%26nbsp%3B%20CPUTime%3A%201894.207520%26nbsp%3B%20Memory%3A%201192.902344%20MB%3CBR%20%2F%3E%5BPartition%200%5D%5BNode%200%5D%20End%20of%20program%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20quantify%20the%20checkpoint%20overhead%2C%20multiple%20jobs%20were%20submitted%2C%20each%20lasting%20approximately%20one%20hour%20and%20using%20176%20cores.%20One%20of%20the%20jobs%20is%20doing%20a%20single%20checkpoint%20at%2040%2C000%20steps%20minutes%2C%20one%20is%20doing%20two%20checkpoints%2C%20each%20at%2020%2C000%20steps%2C%20and%20one%20has%20no%20checkpointing%20enabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%201024px%3B%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22201px%22%20height%3D%2230px%22%3E%0A%3CP%3ECheckpoint%2Frun%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126px%22%20height%3D%2230px%22%3E%0A%3CP%3ERuntime%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22106px%22%20height%3D%2230px%22%3E%0A%3CP%3ESteps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133px%22%20height%3D%2230px%22%3E%0A%3CP%3ELost%20time%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22172px%22%20height%3D%2230px%22%3E%0A%3CP%3EOverhead%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22285px%22%20height%3D%2230px%22%3E%0A%3CP%3EExtrapolated%20for%2024-hour%20job%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22201px%22%20height%3D%2230px%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126px%22%20height%3D%2230px%22%3E%0A%3CP%3E3%2C300%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22106px%22%20height%3D%2230px%22%3E%0A%3CP%3E72%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133px%22%20height%3D%2230px%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22172px%22%20height%3D%2230px%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22285px%22%20height%3D%2230px%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22201px%22%20height%3D%2230px%22%3E%0A%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126px%22%20height%3D%2230px%22%3E%0A%3CP%3E3%2C395%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22106px%22%20height%3D%2230px%22%3E%0A%3CP%3E72%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133px%22%20height%3D%2230px%22%3E%0A%3CP%3E95%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22172px%22%20height%3D%2230px%22%3E%0A%3CP%3E2.8%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22285px%22%20height%3D%2230px%22%3E%0A%3CP%3E0.11%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22201px%22%20height%3D%2230px%22%3E%0A%3CP%3E2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22126px%22%20height%3D%2230px%22%3E%0A%3CP%3E3%2C417%20sec%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22106px%22%20height%3D%2230px%22%3E%0A%3CP%3E72%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22133px%22%20height%3D%2230px%22%3E%0A%3CP%3E117%20sec%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22172px%22%20height%3D%2230px%22%3E%0A%3CP%3E3.5%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22285px%22%20height%3D%2230px%22%3E%0A%3CP%3E0.13%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20checkpoint%20overhead%20in%20this%20model%20is%20around%203%20percent%20with%20a%20combined%20checkpoint%20file%20size%20of%2050%20MB.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-3833018%22%20id%3D%22toc-hId-3833019%22%3EGromacs%3C%2FH2%3E%0A%3CP%3EAnother%20Molecular%20Dynamics%20package%20is%20Gromacs%2C%20originally%20started%20at%20the%20University%20of%20Groningen%20in%20the%20Netherlands%20and%20now%20at%20Upsalla%20University%20in%20Sweden.%20This%20open%20source%20package%20is%20available%20at%20the%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.gromacs.org%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EGromacs%3C%2FA%3E%20website.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20data%20set%20used%20for%20this%20work%20is%20the%20open%20benchmark%20%3CA%20href%3D%22https%3A%2F%2Fwww.mpibpc.mpg.de%2Fgrubmueller%2Fbench%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EbenchPEP%3C%2FA%3E.%20This%20data%20set%20has%20around%2012%20million%20atoms%20and%20is%20roughly%20293%20MB%20in%20size.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EGromacs%20supports%20checkpointing%20natively.%20To%20enable%20it%2C%20use%20the%20following%20option%20on%20the%20%3CSTRONG%3Emdrun%3C%2FSTRONG%3E%20command%20line%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Empirun%20gmx_mpi%20mdrun%20-s%20benchPEP.tpr%20-nsteps%20-1%20-maxh%201.0%20%3CSTRONG%3E-cpt%2010%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20%3CSTRONG%3E%E2%80%93cpt%2010%3C%2FSTRONG%3E%20option%20initiates%20a%20checkpoint%20every%2010%20minutes.%20This%20is%20shown%20in%20the%20log%20files%20as%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Estep%26nbsp%3B%20320%3A%20timed%20with%20pme%20grid%20320%20320%20320%2C%20coulomb%20cutoff%201.200%3A%2032565.0%20M-cycles%3CBR%20%2F%3Estep%26nbsp%3B%20480%3A%20timed%20with%20pme%20grid%20288%20288%20288%2C%20coulomb%20cutoff%201.302%3A%2034005.8%20M-cycles%3CBR%20%2F%3Estep%26nbsp%3B%20640%3A%20timed%20with%20pme%20grid%20256%20256%20256%2C%20coulomb%20cutoff%201.465%3A%2043496.5%20M-cycles%3CBR%20%2F%3Estep%26nbsp%3B%20800%3A%20timed%20with%20pme%20grid%20280%20280%20280%2C%20coulomb%20cutoff%201.339%3A%2035397.0%20M-cycles%3CBR%20%2F%3Estep%26nbsp%3B%20960%3A%20timed%20with%20pme%20grid%20288%20288%20288%2C%20coulomb%20cutoff%201.302%3A%2033611.2%20M-cycles%3CBR%20%2F%3Estep%201120%3A%20timed%20with%20pme%20grid%20300%20300%20300%2C%20coulomb%20cutoff%201.250%3A%2032671.0%20M-cycles%3CBR%20%2F%3Estep%201280%3A%20timed%20with%20pme%20grid%20320%20320%20320%2C%20coulomb%20cutoff%201.200%3A%2031965.1%20M-cycles%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20optimal%20pme%20grid%20320%20320%20320%2C%20coulomb%20cutoff%201.200%3CBR%20%2F%3EWriting%20checkpoint%2C%20step%203200%20at%20Thu%20Mar%2019%2008%3A24%3A14%202020%3C%2FPRE%3E%0A%3CP%3EAfter%20killing%20a%20single%20thread%20on%20one%20of%20the%20machines%2C%20the%20job%20is%20stopped%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3E--------------------------------------------------------------------------%3CBR%20%2F%3Empirun%20noticed%20that%20process%20rank%2071%20with%20PID%2017851%20on%20node%20ip-0a000214%20exited%20on%20signal%209%20(Killed).%3CBR%20%2F%3E--------------------------------------------------------------------------%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20leaves%20us%20with%20a%20state.cpt%20file%20that%20was%20written%20during%20the%20last%20checkpoint.%20To%20restart%20from%20this%20state%20file%2C%20the%20following%20%3CSTRONG%3Emdrun%3C%2FSTRONG%3E%20command%20can%20be%20used%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Empirun%20gmx_mpi%20mdrun%20-s%20benchPEP.tpr%20%3CSTRONG%3E-cpi%20state.cpt%3C%2FSTRONG%3E%3C%2FPRE%3E%0A%3CP%3E%3CBR%20%2F%3EWhen%20starting%20this%20run%2C%20the%20computation%20continues%20from%20the%20checkpoint%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%3Estep%203520%3A%20timed%20with%20pme%20grid%20320%20320%20320%2C%20coulomb%20cutoff%201.200%3A%2031738.8%20M-cycles%3CBR%20%2F%3Estep%203680%3A%20timed%20with%20pme%20grid%20288%20288%20288%2C%20coulomb%20cutoff%201.310%3A%2033970.4%20M-cycles%3CBR%20%2F%3Estep%203840%3A%20timed%20with%20pme%20grid%20256%20256%20256%2C%20coulomb%20cutoff%201.474%3A%2044232.6%20M-cycles%3CBR%20%2F%3Estep%204000%3A%20timed%20with%20pme%20grid%20280%20280%20280%2C%20coulomb%20cutoff%201.348%3A%2036289.3%20M-cycles%3CBR%20%2F%3Estep%204160%3A%20timed%20with%20pme%20grid%20288%20288%20288%2C%20coulomb%20cutoff%201.310%3A%2034398.6%20M-cycles%3CBR%20%2F%3Estep%204320%3A%20timed%20with%20pme%20grid%20300%20300%20300%2C%20coulomb%20cutoff%201.258%3A%2032844.2%20M-cycles%3CBR%20%2F%3Estep%204480%3A%20timed%20with%20pme%20grid%20320%20320%20320%2C%20coulomb%20cutoff%201.200%3A%2032005.9%20M-cycles%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20optimal%20pme%20grid%20320%20320%20320%2C%20coulomb%20cutoff%201.200%3CBR%20%2F%3EWriting%20checkpoint%2C%20step%208080%20at%20Thu%20Mar%2019%2009%3A03%3A05%202020%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20the%20new%20checkpoint%20can%20be%20seen%3A%3C%2FP%3E%0A%3CPRE%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%20287M%20Mar%2019%2009%3A03%20state.cpt%3CBR%20%2F%3E-rw-rw-r--.%26nbsp%3B%201%20ccadmin%20ccadmin%20287M%20Mar%2019%2009%3A03%20state_prev.cpt%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20verify%20the%20checkpoint%20overhead%2C%20multiple%20jobs%20were%20submitted%2C%20each%20lasting%201%20hour%20(using%20%3CSTRONG%3E-maxh%201.0%3C%2FSTRONG%3E)%20and%20using%20176%20cores.%20One%20of%20the%20jobs%20performs%20a%20single%20checkpoint%20after%2045%20minutes%2C%20one%20does%20two%20checkpoints%2C%20each%20%26nbsp%3Bat%2020%20minutes%2C%20and%20one%20has%20no%20checkpointing%20enabled.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CTABLE%20style%3D%22width%3A%201024px%3B%22%20width%3D%221024%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22111%22%3E%0A%3CP%3ECheckpoint%2Frun%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2278%22%3E%0A%3CP%3ESteps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%0A%3CP%3ELost%20steps%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%0A%3CP%3EOverhead%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22198%22%3E%0A%3CP%3EExtrapolated%20for%2024-hour%20job%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22111%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2278%22%3E%0A%3CP%3E38%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22198%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22111%22%3E%0A%3CP%3E1%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2278%22%3E%0A%3CP%3E38%2C000%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%0A%3CP%3E0%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22198%22%3E%0A%3CP%3E0%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22111%22%3E%0A%3CP%3E2%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%2278%22%3E%0A%3CP%3E36%2C640%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22104%22%3E%0A%3CP%3E1%2C360%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22113%22%3E%0A%3CP%3E3.6%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22198%22%3E%0A%3CP%3E0.16%25%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20you%20can%20see%2C%20the%20overhead%20of%20doing%20a%20single%20checkpoint%20per%20hour%20is%20again%20very%20small%2C%20not%20even%20visible%20in%20the%20application%20run%20times.%20This%20is%20mainly%20because%20the%20model%20and%20checkpoint%20file%20size%20is%20287%20MB.%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1803621445%22%20id%3D%22toc-hId--1803621444%22%3ECheckpointing%20interval%3C%2FH2%3E%0A%3CP%3EAs%20these%20results%20show%2C%20checkpointing%20involves%20some%20overhead%2C%20and%20it%20varies%20by%20application%20and%20the%20size%20of%20the%20model%20that%20has%20to%20be%20written%20to%20disk.%20So%2C%20you%20need%20to%20weigh%20the%20tradeoffs%E2%80%94how%20often%20to%20checkpoint%20and%20what%20overhead%20is%20acceptable%20versus%20the%20risk%20of%20losing%20computation%20time%20due%20to%20a%20lost%20job.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20a%20general%20guideline%2C%20I%20advise%20the%20following%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EKeep%20checkpointing%20disabled%20for%20any%20jobs%20running%20for%20one%20hour%20or%20less.%3C%2FLI%3E%0A%3CLI%3EFor%20longer%20running%20jobs%2C%20start%20enabling%20checkpointing%20at%20an%20interval%20of%201%20to%2024%20hours%E2%80%94ideally%2C%20resulting%20in%20a%20checkpoint%20every%205%20to%2010%20percent%20of%20the%20jobs.%20For%20example%2C%20if%20a%20job%20is%20expected%20to%20run%20for%204%20days%20(96%20hours)%2C%20enable%20a%20checkpoint%20every%205%20to%2010%20hours.%20If%20a%20job%20is%20expected%20to%20run%20for%2010%20days%2C%20enable%20a%20checkpoint%20every%2012%20to%2024%20hours.%3C%2FLI%3E%0A%3CLI%3EFor%20longer%20running%20jobs%2C%20it's%20good%20to%20do%20more%20fine-grained%20checkpointing.%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20being%20said%2C%20with%20an%20overhead%20that's%20less%20than%205%20percent%20per%20hour%20of%20a%20job%2C%20it%20may%20be%20worth%20it%20to%20you%20to%20enable%20checkpointing.%20%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1335148%22%20slang%3D%22en-US%22%3E%3CP%3ESome%20HPC%20simulations%20take%20a%20long%20time%20to%20run%20(up%20to%20days%20and%20weeks)%20and%20run%20over%20multiple%20nodes.%20With%20long%20jobs%2C%20the%20failure%20rate%20and%20availability%20of%20the%20underlying%20infrastructure%20may%20become%20an%20issue.%20One%20solution%20for%20recovering%20from%20these%20failures%20is%20using%20checkpointing%20during%20the%20simulation%20to%20provide%20a%20starting%20point%20in%20case%20the%20simulation%20is%20terminated%20for%20any%20reason.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1335148%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3Echeckpointing%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHPC%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Some HPC simulations take a long time to run (up to days and weeks) and run over multiple nodes. When running these long jobs, failure rate and availability of the underlying infrastructure may become an issue. One solution for recovering from these failures is using checkpointing during the simulation to provide a starting point in case the simulation is terminated for any reason.

 

When running compute jobs in Azure, most issues related to running on bare metal compute nodes still remain. Hardware can fail, memory can have issues, and the InfiniBand network may encounter problems. On top of that, due to security and functional updates, the (virtualization) software stack may not stay static throughout the duration of the job.

 

A way to prevent the impact of the potential failures is to save intermediate results, in such a way that a calculation can be restarted from that result point. The creation of this intermediate result is called creating a checkpoint.

 

Checkpointing can be implemented at different levels: within the applications and at the OS level. If available, the checkpointing within applications are the most stable, and many applications do support checkpointing natively. 

 

One significant downside of checkpointing is the amount of I/O that is added to the job during a checkpoint, and the incurred job delay during this writing. Therefore, there needs to be a good balance made for the time between checkpoints and the risk of job failure.

 

Summary

The actual amount of overhead of checkpointing depends on the size of the model in memory and the resulting file size that has to be written to disk. For smaller models, this file size can be in the range of hundreds of megabytes. Doing a single checkpoint per hour may not even be visible in the simulation speed. For larger models, this will be in the range of gigabytes (GBs) and here, a reasonably fast IO system will allow you to limit the overhead to stay in a range under 5 percent. Depending on the total runtime of the simulation, it makes sense to implement checkpointing on an hourly up to daily interval.

 

Cluster setup

In the examples below, an Azure CycleCloud-managed IBM LSF cluster is used. All the jobs are submitted from a regular user account, which has a shared homedir, hosted on Azure NetApp Files. The base configuration of this cluster is set up using Azure HPC resources on GitHub.

 

In this setup, the homedir of the user is used for all job storage. This includes job files, input files, output files and checkpoint files. All applications are compiled and installed using  EasyBuild framework.

 

This post focuses on node failures and preventive measures at a job level. However, another potential failure point is the LSF master node of the cluster. Under normal circumstances, a failure on the master node does not influence the job run. That being said, one of the options is to have a high availability (HA) setup of a set of master nodes.

 

LAMMPS

This Molecular Dynamics application is written at Sandia labs and is open source. It supports MPI and can run large and long-lasting jobs. LAMMPS provides native support for checkpointing, which can be enabled by using the restart command in the input file.

 

For this example, a simple input file based on Lennard-Jones is used:

 

# 3d Lennard-Jones melt
variable        x index 1
variable        y index 1
variable        z index 1
variable        xx equal 400*$x
variable        yy equal 400*$y
variable        zz equal 400*$z
units           lj
atom_style      atomic
lattice         fcc 0.8442
region          box block 0 ${xx} 0 ${yy} 0 ${zz}
create_box      1 box
create_atoms    1 box
mass            1 1.0
velocity        all create 1.44 87287 loop geom
pair_style      lj/cut 2.5
pair_coeff      1 1 1.0 1.0 2.5
neighbor        0.3 bin
neigh_modify    delay 0 every 20 check no
fix             1 all nve
restart         1000 lj.restart
run             100000 every 1000 NULL

The job script creates a working directory based on the job-id, copies in the used executable and the input file, and starts a mpirun based on the amount of cores assigned to the job:

 

#!/bin/bash
mkdir $LSB_JOBID
cd $LSB_JOBID
cp ~/apps/lammps-7Aug19-mpi/src/lmp_mpi .
cp ../in.lj .
module load foss/2018b
mpirun -n $LSB_DJOB_NUMPROC ./lmp_mpi -in in.lj

 

The job is submitted using the LSF bsub command, and four HC nodes are requested, using a total of 176 cores:

 

bsub -q hc-mpi -n 176 -R "span[ptile=44]" -o ./%J.out ./lammpsjob.sh

 

Once the nodes are acquired and started up, the simulation kicks off. The job-id that is given is 25, so we can now look at the job directory to follow the progress. Due to the restart option in the input file, a request is being made every 1,000 simulation steps to create a file for all the 256 million atoms. In this case, a 21-GB file is created roughly every half hour.

 

-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 12:20 lj.restart.1000
-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 12:51 lj.restart.2000
-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 13:22 lj.restart.3000
-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 13:53 lj.restart.4000
-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 14:24 lj.restart.5000
-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 14:56 lj.restart.6000
-rw-rw-r--.  1 ccadmin ccadmin  21G Jan  8 15:26 lj.restart.7000

Now let’s assume that the job exited due to some failure.

 

To restart the simulation, a modified input file has to be made—mostly because the read_restart and

the create_box commands conflict. They will both try to create the simulation space with the atoms. A working restart file is the following:

 

# 3d Lennard-Jones melt
read_restart    lj.restart.*
velocity        all create 1.44 87287 loop geom
pair_style      lj/cut 2.5
pair_coeff      1 1 1.0 1.0 2.5
neighbor        0.3 bin
neigh_modify    delay 0 every 20 check no
fix             1 all nve
restart         1000 lj.restart
run             100000 upto every 1000 NULL

First, read_restart is defined. It will look for the latest checkpoint file and use that to recreate the atoms. Next, the run command is modified to include upto, which tells the run to not restart the simulation and run 100,000 steps additional to the restart state, but to run only up to the initially defined endpoint.

 

Since we are already in a working directory with all the required information, we also need to change the job submission script to look something like this:

 

#!/bin/bash
cd ~/jobs/25
module load foss/2018b
mpirun -n $LSB_DJOB_NUMPROC ./lmp_mpi -in in.lj.restart

And we can submit this again using the LSF bsub command:

 

bsub -q hc-mpi -n 176 -R "span[ptile=44]" -o ./%J.out ./restart-lammpsjob.sh

 

This starts a new job that takes the latest checkpoint file and continues the simulation from the defined checkpoint.

 

Another way of implementing checkpointing that uses significantly less storage is restarting based on two restart files. In this version we write quite some data every half-hour to store the checkpoint files. This can be optimized, by using the following restart entries in the input file:

 

restart         1000 lj.restart.1 lj.restart.2

 

When restarting from this state, check which file was written latest and use this specifically when adding the read_restart entry into the input file. Also, do not forget to add the upto entry. After resubmitting the simulation, it will continue from the last checkpoint.

 

To quantify the checkpoint overhead, multiple jobs were submitted, and each is scheduled to simulate 200 steps and last approximately 1 hour and use 176 cores. One of the jobs is doing a single checkpoint at 1,400 steps minutes, one is doing two checkpoints, each at 800 steps, and one has no checkpointing enabled.

 

Checkpoint/run

Runtime

Steps

Lost time

Overhead

Extrapolated for 24-hour job

0

3,469 sec

 

0

0%

0%

1

3,630 sec

2,000

161 sec

4.6%

0.18%

2

3,651

2,000

182 sec 

5.2%

0.21%

 

The checkpoint overhead for this model is quite small with around a 5-percent impact for an hourly checkpoint. The combined checkpoint file size is 21 GB, which is being written during each checkpoint.

 

NAMD

A second example of a molecular dynamic application is NAMD. This application is written and maintained by the University of Illinois. This application is open source, even though registration is required.

 

NAMD also supports checkpointing natively. This demonstration uses the STMV benchmark, which models about 1,000,000 atoms.

 

To enable checkpointing, the following lines need to be added to the stmv.namd input file:

 

outputName          ./output
outputEnergies      20
outputTiming        20
numsteps            21600
restartName         ./checkpoint
restartFreq         100
restartSave         yes

And that input file can be used by the following job script:

 

#!/bin/bash
mkdir $LSB_JOBID
cd $LSB_JOBID
cp ../stmv/* .
module load NAMD/2.13-foss-2018b-mpi
mpirun -n $LSB_DJOB_NUMPROC namd2 stmv.namd

The job is submitted with the following LSF submit script:

 

bsub -q hc-mpi -n 176 -R "span[ptile=44]" -o ./%J.out ./namd-mpi-job

 

Once started, this job creates checkpoint files in the working directory:

 

-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:58 checkpoint.9500.coor
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:58 checkpoint.9500.vel
-rw-r--r--.  1 ccadmin ccadmin  261 Jan 15 17:58 checkpoint.9500.xsc
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:58 checkpoint.9600.coor
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:58 checkpoint.9600.vel
-rw-r--r--.  1 ccadmin ccadmin  261 Jan 15 17:58 checkpoint.9600.xsc
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:58 checkpoint.9700.coor
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:58 checkpoint.9700.vel
-rw-r--r--.  1 ccadmin ccadmin  261 Jan 15 17:58 checkpoint.9700.xsc
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:59 checkpoint.9800.coor
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:59 checkpoint.9800.vel
-rw-r--r--.  1 ccadmin ccadmin  261 Jan 15 17:58 checkpoint.9800.xsc
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:59 checkpoint.9900.coor
-rw-r--r--.  1 ccadmin ccadmin  25M Jan 15 17:59 checkpoint.9900.vel
-rw-r--r--.  1 ccadmin ccadmin  258 Jan 15 17:59 checkpoint.9900.xsc

 

If the job fails at this point, the checkpoint files can be used to restart the job. To do this, the input file needs to be adjusted. Looking for the latest checkpoint file available, the timestep is 9,900. Now, in the input file, the following two changes are needed—first, tell the simulation to restart at time 9,900, and second, tell it to read and initialize the simulation from the checkpoint files of checkpoint.9900.

 

outputName          ./output
outputEnergies      20
outputTiming        20
firsttimestep       9900
numsteps            21600
restartName         ./checkpoint
restartFreq         100
restartSave         yes
reinitatoms        ./checkpoint.9900

After resubmitting the job with bsub, the simulation continues from the checkpoint and stops at the original intended step, as this example output shows:

 

TCL: Reinitializing atom data from files with basename ./checkpoint.9900
Info: Reading from binary file ./checkpoint.9900.coor
Info: Reading from binary file ./checkpoint.9900.vel
[…]
TIMING: 21600  CPU: 1882.08, 0.159911/step  Wall: 1882.08, 0.159911/step, 0 hours remaining, 1192.902344 MB of memory in use.
ETITLE:      TS           BOND          ANGLE          DIHED          IMPRP               ELECT            VDW       BOUNDARY           MISC        KINETIC               TOTAL           TEMP      POTENTIAL         TOTAL3        TEMPAVG            PRESSURE      GPRESSURE         VOLUME       PRESSAVG      GPRESSAVG
ENERGY:   21600    366977.1834    278844.5518     81843.4582      5043.3226       -4523413.8827    385319.1671         0.0000         0.0000    942875.0190       -2462511.1806       296.5584  -3405386.1995  -2454036.3329       296.7428             15.0219        19.7994  10190037.8159        -1.4609        -1.0415
WRITING EXTENDED SYSTEM TO RESTART FILE AT STEP 21600
WRITING COORDINATES TO RESTART FILE AT STEP 21600
FINISHED WRITING RESTART COORDINATES
WRITING VELOCITIES TO RESTART FILE AT STEP 21600
FINISHED WRITING RESTART VELOCITIES
WRITING EXTENDED SYSTEM TO OUTPUT FILE AT STEP 21600
WRITING COORDINATES TO OUTPUT FILE AT STEP 21600
WRITING VELOCITIES TO OUTPUT FILE AT STEP 21600
====================================================
WallClock: 1894.207520  CPUTime: 1894.207520  Memory: 1192.902344 MB
[Partition 0][Node 0] End of program

 

To quantify the checkpoint overhead, multiple jobs were submitted, each lasting approximately one hour and using 176 cores. One of the jobs is doing a single checkpoint at 40,000 steps minutes, one is doing two checkpoints, each at 20,000 steps, and one has no checkpointing enabled.

 

Checkpoint/run

Runtime

Steps

Lost time

Overhead

Extrapolated for 24-hour job

0

3,300 sec

72,000

0

0%

0%

1

3,395 sec

72,000

95 sec

2.8%

0.11%

2

3,417 sec

72,000

117 sec 

3.5%

0.13%

 

The checkpoint overhead in this model is around 3 percent with a combined checkpoint file size of 50 MB.

Gromacs

Another Molecular Dynamics package is Gromacs, originally started at the University of Groningen in the Netherlands and now at Upsalla University in Sweden. This open source package is available at the Gromacs website.

 

The data set used for this work is the open benchmark benchPEP. This data set has around 12 million atoms and is roughly 293 MB in size.

 

Gromacs supports checkpointing natively. To enable it, use the following option on the mdrun command line:

 

mpirun gmx_mpi mdrun -s benchPEP.tpr -nsteps -1 -maxh 1.0 -cpt 10

 

The –cpt 10 option initiates a checkpoint every 10 minutes. This is shown in the log files as:

 

step  320: timed with pme grid 320 320 320, coulomb cutoff 1.200: 32565.0 M-cycles
step  480: timed with pme grid 288 288 288, coulomb cutoff 1.302: 34005.8 M-cycles
step  640: timed with pme grid 256 256 256, coulomb cutoff 1.465: 43496.5 M-cycles
step  800: timed with pme grid 280 280 280, coulomb cutoff 1.339: 35397.0 M-cycles
step  960: timed with pme grid 288 288 288, coulomb cutoff 1.302: 33611.2 M-cycles
step 1120: timed with pme grid 300 300 300, coulomb cutoff 1.250: 32671.0 M-cycles
step 1280: timed with pme grid 320 320 320, coulomb cutoff 1.200: 31965.1 M-cycles
              optimal pme grid 320 320 320, coulomb cutoff 1.200
Writing checkpoint, step 3200 at Thu Mar 19 08:24:14 2020

After killing a single thread on one of the machines, the job is stopped:

 

--------------------------------------------------------------------------
mpirun noticed that process rank 71 with PID 17851 on node ip-0a000214 exited on signal 9 (Killed).
--------------------------------------------------------------------------

 

This leaves us with a state.cpt file that was written during the last checkpoint. To restart from this state file, the following mdrun command can be used:

 

mpirun gmx_mpi mdrun -s benchPEP.tpr -cpi state.cpt


When starting this run, the computation continues from the checkpoint:

 

step 3520: timed with pme grid 320 320 320, coulomb cutoff 1.200: 31738.8 M-cycles
step 3680: timed with pme grid 288 288 288, coulomb cutoff 1.310: 33970.4 M-cycles
step 3840: timed with pme grid 256 256 256, coulomb cutoff 1.474: 44232.6 M-cycles
step 4000: timed with pme grid 280 280 280, coulomb cutoff 1.348: 36289.3 M-cycles
step 4160: timed with pme grid 288 288 288, coulomb cutoff 1.310: 34398.6 M-cycles
step 4320: timed with pme grid 300 300 300, coulomb cutoff 1.258: 32844.2 M-cycles
step 4480: timed with pme grid 320 320 320, coulomb cutoff 1.200: 32005.9 M-cycles
              optimal pme grid 320 320 320, coulomb cutoff 1.200
Writing checkpoint, step 8080 at Thu Mar 19 09:03:05 2020

 

And the new checkpoint can be seen:

-rw-rw-r--.  1 ccadmin ccadmin 287M Mar 19 09:03 state.cpt
-rw-rw-r--.  1 ccadmin ccadmin 287M Mar 19 09:03 state_prev.cpt

 

To verify the checkpoint overhead, multiple jobs were submitted, each lasting 1 hour (using -maxh 1.0) and using 176 cores. One of the jobs performs a single checkpoint after 45 minutes, one does two checkpoints, each  at 20 minutes, and one has no checkpointing enabled.

 

Checkpoint/run

Steps

Lost steps

Overhead

Extrapolated for 24-hour job

0

38,000

0

0%

0%

1

38,000

0

0%

0%

2

36,640

1,360      

3.6%

0.16%

 

As you can see, the overhead of doing a single checkpoint per hour is again very small, not even visible in the application run times. This is mainly because the model and checkpoint file size is 287 MB.

Checkpointing interval

As these results show, checkpointing involves some overhead, and it varies by application and the size of the model that has to be written to disk. So, you need to weigh the tradeoffs—how often to checkpoint and what overhead is acceptable versus the risk of losing computation time due to a lost job.

 

As a general guideline, I advise the following:

  • Keep checkpointing disabled for any jobs running for one hour or less.
  • For longer running jobs, start enabling checkpointing at an interval of 1 to 24 hours—ideally, resulting in a checkpoint every 5 to 10 percent of the jobs. For example, if a job is expected to run for 4 days (96 hours), enable a checkpoint every 5 to 10 hours. If a job is expected to run for 10 days, enable a checkpoint every 12 to 24 hours.
  • For longer running jobs, it's good to do more fine-grained checkpointing.

 

That being said, with an overhead that's less than 5 percent per hour of a job, it may be worth it to you to enable checkpointing.