handle_copy_solution Subroutine

private subroutine handle_copy_solution(session, id, op, header, reply_header, reply_payload, status, message)

Service a COPY_SOLUTION request.

Decode the requested primitive list, copy current solution from the session into per-primitive buffers, pack them as a binary payload (little-endian real64, primitives concatenated in the decoded order), and emit the reply header that names the field offsets. Only rank 0 owns the socket and emits the reply.

Arguments

Type IntentOptional Attributes Name
type(solver_session_t), intent(inout) :: session
character(len=*), intent(in) :: id
character(len=*), intent(in) :: op
integer(kind=int8), intent(in) :: header(:)
integer(kind=int8), intent(out), allocatable :: reply_header(:)
integer(kind=int8), intent(out), allocatable :: reply_payload(:)
integer, intent(out) :: status
character(len=*), intent(out) :: message