checkpoint Subroutine

public subroutine checkpoint(files, qp, nodes, control, scheme, dims)

Create a checkpoint dump file if the time has come

Arguments

Type IntentOptional AttributesName
type(filetype), intent(inout) :: files
real(kind=wp), intent(in), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2, 1:dims%n_var):: qp
type(nodetype), intent(in), dimension(-2:dims%imx+3,-2:dims%jmx+3,-2:dims%kmx+3):: nodes
type(controltype), intent(inout) :: control
type(schemetype), intent(in) :: scheme
type(extent), intent(in) :: dims

Calls

proc~~checkpoint~~CallsGraph proc~checkpoint checkpoint proc~dump_data dump_data proc~checkpoint->proc~dump_data proc~purge_dump_dir purge_dump_dir proc~checkpoint->proc~purge_dump_dir debugcall debugcall proc~checkpoint->debugcall proc~make_dump_dir make_dump_dir proc~checkpoint->proc~make_dump_dir proc~dump_data->debugcall proc~write_restart_log write_restart_log proc~dump_data->proc~write_restart_log proc~write_file~4 write_file proc~dump_data->proc~write_file~4 proc~remove_directory remove_directory proc~purge_dump_dir->proc~remove_directory proc~create_directory create_directory proc~make_dump_dir->proc~create_directory proc~write_initial_resnorm write_initial_resnorm proc~write_restart_log->proc~write_initial_resnorm proc~close_file close_file proc~write_file~4->proc~close_file write_file_tec_nodal write_file_tec_nodal proc~write_file~4->write_file_tec_nodal proc~open_file open_file proc~write_file~4->proc~open_file proc~setup_file~2 setup_file proc~write_file~4->proc~setup_file~2 write_file_vtk write_file_vtk proc~write_file~4->write_file_vtk write_file_tec write_file_tec proc~write_file~4->write_file_tec proc~close_file->debugcall proc~open_file->debugcall proc~setup_file~2->debugcall

Called by

proc~~checkpoint~~CalledByGraph proc~checkpoint checkpoint proc~setup_solver setup_solver proc~setup_solver->proc~checkpoint proc~iterate_one_more_time_step iterate_one_more_time_step proc~iterate_one_more_time_step->proc~checkpoint program~main main program~main->proc~iterate_one_more_time_step proc~start_run start_run program~main->proc~start_run proc~start_run->proc~setup_solver

Contents

Source Code


Source Code

    subroutine checkpoint(files, qp, nodes, control, scheme, dims)
      !< Create a checkpoint dump file if the time has come
      !-----------------------------------------------------------

      implicit none
      type(filetype), intent(inout) :: files
      type(extent), intent(in) :: dims
      type(controltype), intent(inout) :: control
      type(schemetype), intent(in) :: scheme
      type(nodetype), dimension(-2:dims%imx+3,-2:dims%jmx+3,-2:dims%kmx+3), intent(in) :: nodes
      real(wp), dimension(-2:dims%imx+2,-2:dims%jmx+2,-2:dims%kmx+2, 1:dims%n_var), intent(in) :: qp


      DebugCall('checkpoint')

      if (control%checkpoint_iter .ne. 0) then
          if (mod(control%current_iter, control%checkpoint_iter) == 0 &
             .or. control%current_iter == control%max_iters) then
              call make_dump_dir(control)
              call dump_data(files, qp, nodes, control, scheme, dims)
              print*, "writing data at: ", control%current_iter, control%checkpoint_iter_count
              call purge_dump_dir(control)
              control%checkpoint_iter_count = control%checkpoint_iter_count + 1
          end if
      end if

    end subroutine checkpoint