prepare_output Subroutine

public subroutine prepare_output(params, flow)

Creates the output directory specified in the case parameters.

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
type(flow_mpi_t), intent(in) :: flow

Calls

proc~~prepare_output~~CallsGraph proc~prepare_output mod_output::prepare_output proc~fatal_error mod_kinds::fatal_error proc~prepare_output->proc~fatal_error

Called by

proc~~prepare_output~~CalledByGraph proc~prepare_output mod_output::prepare_output program~lowmach_react_hex lowmach_react_hex program~lowmach_react_hex->proc~prepare_output

Source Code

   subroutine prepare_output(params, flow)
      type(case_params_t), intent(in) :: params
      type(flow_mpi_t), intent(in) :: flow

      integer :: exitstat
      character(len=path_len + 16) :: command

      if (flow%rank /= 0) return

      command = 'mkdir -p '//trim(params%output_dir)
      call execute_command_line(trim(command), exitstat=exitstat)

      if (exitstat /= 0) then
         call fatal_error('output', 'failed to create output directory')
      end if
   end subroutine prepare_output