Returns the file corresponding to restart file in current setup
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(in) | :: | is_one_file_per_processor | |||
character(len=*), | intent(in), | optional | :: | fileopt |
function get_file_proc(is_one_file_per_processor, fileopt) result(file_proc)
use mp, only: iproc
implicit none
logical, intent(in) :: is_one_file_per_processor
character(len=*), intent(in), optional :: fileopt
character(run_name_size) :: file_proc
file_proc = trim(restart_file)
if (present(fileopt)) file_proc = trim(file_proc) // trim(adjustl(fileopt))
if (is_one_file_per_processor) write(file_proc, '(A,".",I0)') trim(file_proc), iproc
end function get_file_proc