Commit bba4e16b authored by Valentin Reis's avatar Valentin Reis
Browse files

[fix] Manifest format fix for non-mpi libnrm instrumentation.

Removes the need for libnrm "instrumentation" attribute in manifest when
downstream manual progress report is used.
parent 8144a3fa
Pipeline #12312 passed with stages
in 8 minutes and 31 seconds
......@@ -18,7 +18,7 @@ let Perfwrapper =
{ perfFreq : types.Frequency, perfLimit : Integer }
let Instrumentation =
-- Libnrm instrumentation. The only attribute that configures this feature
-- Activate LD_PRELOAD based `libnrm` instrumentation. The only attribute that configures this feature
-- is a message rate limitation.
{ ratelimit : types.Frequency }
......
......@@ -429,7 +429,7 @@ nrmDownstreamEvent callTime clientid = \case
DownstreamThreadID ->
RWST Cfg [Behavior] (Maybe Cmd) IO (CommonOutcome a)
registerDTT c dtid = do
put $ addDownstreamThreadClient c dtid
put . Just $ addDownstreamThreadClient c dtid
log "downstream thread registered."
return OAdjustment
......
......@@ -122,15 +122,17 @@ addDownstreamCmdClient c downstreamCmdClientID =
addDownstreamThreadClient ::
Cmd ->
DownstreamThreadID ->
Maybe Cmd
Cmd
addDownstreamThreadClient c downstreamThreadClientID =
c ^. #cmdCore . #manifest . #app . #instrumentation <&> \(Manifest.Instrumentation ratelimit) ->
c & #downstreamThreads . at downstreamThreadClientID ?~ DownstreamThread
{ maxValue = 1 & progress,
ratelimit = toFrequency ratelimit,
dtLastReferenceMeasurements = MemBuffer.empty,
lastRead = Nothing
}
c & #downstreamThreads . at downstreamThreadClientID ?~ DownstreamThread
{ maxValue = 1 & progress,
ratelimit = c ^. #cmdCore . #manifest . #app . #instrumentation
& \case
Just (Manifest.Instrumentation ratelimit) -> toFrequency ratelimit
Nothing -> 1 & hz,
dtLastReferenceMeasurements = MemBuffer.empty,
lastRead = Nothing
}
-- | newtype wrapper for an argument.
newtype Arg = Arg Text
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment