sync_geometry_host Subroutine

public subroutine sync_geometry_host()

Uses

  • proc~~sync_geometry_host~~UsesGraph proc~sync_geometry_host sync_geometry_host module~mod_global_parameters mod_global_parameters proc~sync_geometry_host->module~mod_global_parameters module~mod_basic_types mod_basic_types module~mod_global_parameters->module~mod_basic_types module~mod_connectivity mod_connectivity module~mod_global_parameters->module~mod_connectivity module~mod_constants mod_constants module~mod_global_parameters->module~mod_constants module~mod_physicaldata mod_physicaldata module~mod_global_parameters->module~mod_physicaldata module~mod_variables mod_variables module~mod_global_parameters->module~mod_variables mpi mpi module~mod_global_parameters->mpi module~mod_variables->module~mod_basic_types

Return a block's whole geometry - positions and metrics alike - from the device to the host, for every grid the host is about to read.

This is the output-time counterpart of sync_positions_host: saveamrfile calls it in the same place it pulls back bg%w, which covers the log, the snapshot, the slices, the collapsed views and autoconvert, and the standalone convert path does the same before generate_plotfile.

The fetch is unconditional and covers the whole grid in one pass, on purpose. Remembering "the host is already up to date" in a flag cannot be made honest, because the geometry is per block: any such flag would have to be cleared after refreshing whatever set of blocks happened to be listed at the time, and the next regrid or selectgrids can put a block that was not in that set straight back in front of host code. Doing every grid at once also keeps this to a few update directives per block rather than paying the per-call overhead once per reader.

Arguments

None

Called by

proc~~sync_geometry_host~~CalledByGraph proc~sync_geometry_host sync_geometry_host proc~main main proc~main->proc~sync_geometry_host proc~timeintegration timeintegration proc~main->proc~timeintegration proc~saveamrfile saveamrfile proc~saveamrfile->proc~sync_geometry_host proc~timeintegration->proc~saveamrfile program~agile agile program~agile->proc~main

Source Code

  subroutine sync_geometry_host()
    use mod_global_parameters

    integer :: iigrid

    ! Index igrids(iigrid) directly rather than through a local igrid: a
    ! variable whose only uses are inside GPU directives looks dead to the
    ! Fortran front end, the assignment to it is dropped, and the update then
    ! silently targets the wrong block.  sync_positions_host below is written
    ! the same way for the same reason.
    do iigrid = 1, igridstail
       
       
    end do

  end subroutine sync_geometry_host