6.6. Restart Mechanism¶
This section describes the restart mechanism in \({\mathcal H}\Phi\).
6.6.1. Overview¶
\({\mathcal H}\Phi\) supports checkpoint/restart functionality, allowing:
Resumption of interrupted calculations
Breaking large calculations into smaller jobs
Iterative refinement of eigenvectors
6.6.2. Restart Files¶
The following files are used for restart:
- Eigenvector files
zvo_eigenvec_{rank}_set{set}.datStores the eigenvector for each MPI rank.
- Restart vector files
restart_{rank}.datContains the Lanczos vectors needed to resume iteration.
- Tri-diagonal matrix
zvo_Lanczos_Step.datStores the Lanczos coefficients.
6.6.3. Input/Output Settings¶
In the CalcMod input file:
iInputEigenVec0: Start from random or specified initial vector (default)1: Read eigenvector from file and recalculate2: Read eigenvector from file
iOutputEigenVec0: Do not output eigenvector (default)1: Output eigenvector to file
6.6.4. Usage Examples¶
Initial calculation with eigenvector output
Set iOutputEigenVec = 1 in the CalcMod file.
After the calculation completes, eigenvector files will be written.
Restart from eigenvector
Set iInputEigenVec = 1 and iOutputEigenVec = 1.
The calculation will read the eigenvector from the previous run
and refine it.
Calculate expectation values only
Set iInputEigenVec = 2.
The eigenvector will be read and used to compute observables
without further diagonalization.
6.6.5. File Format¶
Eigenvector files are stored in binary format for efficiency. Each file contains:
Header information (system size, etc.)
Complex double array of eigenvector components
The files are platform-dependent due to binary format. Ensure restart files are used on the same architecture.
6.6.6. MPI Considerations¶
When using MPI, each process writes and reads its own restart files. The number of MPI processes must match between the original and restart runs.
If you need to change the process count, you must:
Gather all eigenvector files
Redistribute the data
Split into new per-process files
6.6.7. Common Issues¶
- File not found
Ensure restart files are in the working directory with correct names.
- Process count mismatch
The number of MPI processes must match the original calculation.
- File corruption
If calculations produce unexpected results after restart, the restart files may be corrupted. Delete them and start fresh.
6.6.8. Best Practices¶
Regularly save eigenvector files during long calculations
Keep backup copies of restart files
Verify results after restart by checking conserved quantities
Document the calculation parameters used with each restart file