Skip to content

Fix code review issues: missing imports, duplicate lock, and MPI file I/O#600

Merged
johanneshofmann87 merged 2 commits into316-implement-hamiltonian-variables-checkfrom
copilot/sub-pr-566
Feb 15, 2026
Merged

Fix code review issues: missing imports, duplicate lock, and MPI file I/O#600
johanneshofmann87 merged 2 commits into316-implement-hamiltonian-variables-checkfrom
copilot/sub-pr-566

Conversation

Copy link

Copilot AI commented Feb 15, 2026

Addresses code review feedback on PR #566 (QMC runtime variables implementation).

Changes

  • Added module-level imports: output_unit and error_unit from iso_fortran_env in QMC_runtime_var_mod.F90 to fix compilation errors where symbols were used without import

  • Removed duplicate lock: Eliminated redundant lock_QMC_runtime_settings() call in main.F90:485 since it's already called inside check_update_schemes_compatibility():234

  • Fixed MPI file I/O: Wrapped file operations in read_and_broadcast_TEMPERING_var() with rank 0 check to prevent multiple processes from reading the same file

CALL MPI_COMM_RANK(MPI_COMM_WORLD, irank, ierr)
IF (irank == 0) THEN
  OPEN(UNIT=5,FILE='parameters',STATUS='old',ACTION='read',IOSTAT=ierr)
  ! ... read and close ...
END IF
CALL MPI_BCAST(...)  ! Broadcast to all ranks
  • Minor fixes: Corrected spelling ("Bradcast" → "Broadcast") and indentation in error handling

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

… spelling and indentation

Co-authored-by: johanneshofmann87 <129625831+johanneshofmann87@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement Hamiltonian variables check Fix code review issues: missing imports, duplicate lock, and MPI file I/O Feb 15, 2026
@johanneshofmann87 johanneshofmann87 marked this pull request as ready for review February 15, 2026 19:35
@johanneshofmann87 johanneshofmann87 merged commit 55a323b into 316-implement-hamiltonian-variables-check Feb 15, 2026
165 checks passed
@johanneshofmann87 johanneshofmann87 deleted the copilot/sub-pr-566 branch February 15, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants