MFC
Exascale flow solver
Loading...
Searching...
No Matches
m_delay_file_access.f90
Go to the documentation of this file.
1!>
2!! @file
3!! @brief Contains module m_delay_file_access
4
5!> @brief Rank-staggered file access delays to prevent I/O contention on parallel file systems
7
9
10 implicit none
11
12 private
13
14 public :: delayfileaccess
15
16 integer, private, parameter :: n_processes_file_access = 128, file_access_delay_unit = 10000
17
18contains
19
20 !> Introduce a rank-dependent busy-wait delay to stagger parallel file access and reduce I/O contention.
21 impure subroutine delayfileaccess(ProcessRank)
22
23 integer, intent(in) :: processrank
24 integer :: idelay, nfileaccessdelayiterations
25 real(wp) :: number, dummy
26
27 nfileaccessdelayiterations = (processrank/n_processes_file_access)*file_access_delay_unit
28
29 do idelay = 1, nfileaccessdelayiterations
30 call random_number(number)
31 dummy = number*number
32 end do
33
34 end subroutine delayfileaccess
35
36end module m_delay_file_access
Rank-staggered file access delays to prevent I/O contention on parallel file systems.
impure subroutine, public delayfileaccess(processrank)
Introduce a rank-dependent busy-wait delay to stagger parallel file access and reduce I/O contention.
integer, parameter, private n_processes_file_access
integer, parameter, private file_access_delay_unit
Working-precision kind selection (half/single/double) and corresponding MPI datatype parameters.
integer, parameter wp
Change to single_precision if needed.