| Both sides previous revision Previous revision Next revision | Previous revision |
| software:gromacs:caviness [2026-03-17 10:19] – [Restart / Append Issues on GROMACS v2023] thuachen | software:gromacs:caviness [2026-03-17 10:40] (current) – [Restart / Append Issues on GROMACS v2023.2] thuachen |
|---|
| |
| On Caviness, the template (''/opt/shared/templates/slurm/applications/gromacs.qs'') provides a number of options to provide the best performance, but you must read the comments and set the options accordingly for your job. By default the template uses double-precision (''md_rund''), however commenting out ''GROMACS_DOUBLE_PRECISION=YES'' will specify the single-precision version (''md_run'') instead. | On Caviness, the template (''/opt/shared/templates/slurm/applications/gromacs.qs'') provides a number of options to provide the best performance, but you must read the comments and set the options accordingly for your job. By default the template uses double-precision (''md_rund''), however commenting out ''GROMACS_DOUBLE_PRECISION=YES'' will specify the single-precision version (''md_run'') instead. |
| ======Restart / Append Issues on GROMACS v2023.2 ====== | ====Restart / Append Issues on GROMACS v2023.2 ==== |
| When running long GROMACS jobs on Caviness, users may need to restart simulations after jobs are preempted or reach the time limit. With GROMACS v2023.2, users may encounter the following error when attempting to append to a previous run: | When running long GROMACS jobs on Caviness, users may need to restart simulations after jobs are preempted or reach the time limit. With GROMACS v2023.2, users may encounter the following error when attempting to append to a previous run: |
| <code> | <code> |
| File locking is not supported on this system. | File locking is not supported on this system. |
| </code> | </code> |
| The cause of this issue is the file locking, which is not supported by the Lustre system on Caviness. This issue does not typically occur with older versions such as GROMACS v2018. In GROMACS v2018, when checkpoint files are read, the program attempts to establish a lock on the log file. If the lock fails, the program will continue executing if the ''-append'' flag was used. In GROMACS 2023, the log file code (and locking) was moved to a different source file and the option to ignore a failed lock was completely removed. This change persists in the most-recent source code on github (https://github.com/gromacs/gromacs/blob/main/src/gromacs/mdrunutility/handlerestart.cpp). Users can disable file locking by | |
| | This issue is related to file locking, which is not supported by the Lustre filesystem on Caviness. When GROMACS reads checkpoint files during a restart, it attempts to establish a lock on the log file. This behavior differs between versions: |
| | *GROMACS v2018: Attempts to lock the log file, but if locking fails, the program can still continue when using the ''-append'' option. |
| | *GROMACS v2023: The log file handling code was restructured, and the option to ignore a failed file lock was removed. As a result, the program exits with an error if file locking is not supported. |
| | |
| | This change is present in the [[https://github.com/gromacs/gromacs/blob/main/src/gromacs/mdrunutility/handlerestart.cpp|GROMACS source code on GitHub]]. |
| | ===Solution=== |
| | A Caviness-specific modification to GROMACS v2023 allows disabling file locking. Users can disable file locking by |
| <code> | <code> |
| export GMX_NO_FILE_LOCKING=1 | export GMX_NO_FILE_LOCKING=1 |
| </code> | </code> |
| then users can run command as usual, e.g.: | Then users can run commands, for example, |
| <code> | <code> |
| gmx mdrun -cpi npt_6 -deffnm npt_6 -append | gmx mdrun -cpi <checkpoint> -deffnm <filename> -append |
| </code> | </code> |