Skip to content

Commit 1189fa2

Browse files
sbryngelsonclaude
andcommitted
Remove dead MOK assignments in Lustre sequential read path
The file_per_process path uses MPI_FILE_READ (sequential), not MPI_FILE_SET_VIEW, so m_MOK/n_MOK/p_MOK/WP_MOK/var_MOK were computed but never read. Two of these (n_MOK, p_MOK) also had a copy-paste bug using m_glb_read instead of n/p_glb_read. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6a3aa5d commit 1189fa2

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

src/simulation/m_start_up.fpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -571,44 +571,27 @@ contains
571571
p_glb_read = p_glb + 1
572572
end if
573573

574-
! Resize some integers so MPI can read even the biggest file
575-
m_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
576-
n_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
577-
p_MOK = int(m_glb_read + 1, MPI_OFFSET_KIND)
578-
WP_MOK = int(storage_size(0._wp)/8, MPI_OFFSET_KIND)
579-
MOK = int(1._wp, MPI_OFFSET_KIND)
580-
str_MOK = int(name_len, MPI_OFFSET_KIND)
581-
NVARS_MOK = int(sys_size, MPI_OFFSET_KIND)
582-
583574
! Read the data for each variable
584575
if (bubbles_euler .or. elasticity) then
585576
do i = 1, sys_size!adv_idx%end
586-
var_MOK = int(i, MPI_OFFSET_KIND)
587-
588577
call MPI_FILE_READ(ifile, MPI_IO_DATA%var(i)%sf, data_size*mpi_io_type, &
589578
mpi_io_p, status, ierr)
590579
end do
591580
!Read pb and mv for non-polytropic qbmm
592581
if (qbmm .and. .not. polytropic) then
593582
do i = sys_size + 1, sys_size + 2*nb*nnode
594-
var_MOK = int(i, MPI_OFFSET_KIND)
595-
596583
call MPI_FILE_READ(ifile, MPI_IO_DATA%var(i)%sf, data_size*mpi_io_type, &
597584
mpi_io_p, status, ierr)
598585
end do
599586
end if
600587
else
601588
if (down_sample) then
602589
do i = 1, sys_size
603-
var_MOK = int(i, MPI_OFFSET_KIND)
604-
605590
call MPI_FILE_READ(ifile, q_cons_temp(i)%sf, data_size*mpi_io_type, &
606591
mpi_io_p, status, ierr)
607592
end do
608593
else
609594
do i = 1, sys_size
610-
var_MOK = int(i, MPI_OFFSET_KIND)
611-
612595
call MPI_FILE_READ(ifile, MPI_IO_DATA%var(i)%sf, data_size*mpi_io_type, &
613596
mpi_io_p, status, ierr)
614597
end do

0 commit comments

Comments
 (0)