Skip to content

No flush after event number output #150

Closed

Description

@AdrianMeyerAhrens

Hi Oleksii,

I am not sure if this is a real issue and if there are some reasons for why it is implemented this way, but let me explain first:
I am using the feature of the TaskManager to output the current event number at a fixed frequency (https://github.com/HeavyIonAnalysis/AnalysisTree/blob/master/infra/TaskManager.cpp#L118 ). When running locally in a terminal this works fine, however, when trying to write this into a log file when running on virgo the buffering makes it a bit useless. Since there is no "flush" or "std::endl" at the end of std::cout << "Event no " << iEvent << "\n"; the output is not directly written into the log file but buffered until the buffer is full or something else triggers a flush and then its written all at once.
In my case for example when I run over 20k events with a verbosity period of 500, I cannot check how far the job has progressed because there is not enough std output to fill the buffer during the run, so all the "event no XXXXX" are written into the log at once when the program has finished.
I know that we want to minimize the number of write operations on the cluster, but it also does not really make sense to buffer the output which is supposed to track the current progress, right?

Thanks in advance
Adrian

Activity

  1. lubynets commented on Aug 28, 2026

    @lubynets
    Contributor

    Hi @AdrianMeyerAhrens, thanks for pointing to the problem! It was fixed in the PR #151

  2. AdrianMeyerAhrens commented on Aug 31, 2026

    @AdrianMeyerAhrens
    Author

    Hi @lubynets
    thanks for the quick fix, works fine now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions