Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter configuration to execute thread pinning when desired #20

Merged
merged 1 commit into from Feb 21, 2024

Conversation

plasorak
Copy link
Contributor

There can now be more than on thread pinning file, and use need to specify after which is an FSM transition after which the run control will automatically execute the thread pinning.

@plasorak
Copy link
Contributor Author

To use this one must use DUNE-DAQ/nanorc#243

@bieryAtFnal bieryAtFnal added the miscellaneous deliverable A change that is/will be part of a release but is not substantial enough to be a daq-deliverable label Feb 14, 2024
@plasorak
Copy link
Contributor Author

To use this, the configuration for the readout should be:

"readout": {
  "...",
  "thread_pinning_files": [
   {
      "file": "path/to/file.json",
      "after": "conf"
    },
    {
      "file": "path/to/another/file.json",
      "after": "boot"
    },
  ],
  "..."
}

Where "after" is an FSM transition in the run control.

This generates a boot.json with:

{
  "...",
  "scripts": {
    "thread_pinning_0": {
      "after": "conf",
      "cmd": [
        "readout-affinity.py --pinfile ${DUNEDAQ_THREAD_PIN_FILE}"
      ],
      "env": {
        "DUNEDAQ_THREAD_PIN_FILE": "path/to/file.json",
        "LD_LIBRARY_PATH": "getenv",
        "PATH": "getenv"
      }
    },
    "thread_pinning_1": {
      "after": "boot",
      "cmd": [
        "readout-affinity.py --pinfile ${DUNEDAQ_THREAD_PIN_FILE}"
      ],
      "env": {
        "DUNEDAQ_THREAD_PIN_FILE": "path/to/another/file.json",
        "LD_LIBRARY_PATH": "getenv",
        "PATH": "getenv"
      }
    }
  },
  "..."
}

That is then executed parsed and executed by nanorc.

@plasorak
Copy link
Contributor Author

Not going in for v4.3.0. Changed the base branch to v4.4.0.

@plasorak plasorak changed the base branch from prep-release/fddaq-v4.3.0 to production/v4 February 16, 2024 16:01
@plasorak plasorak changed the base branch from production/v4 to prep-release/fddaq-v4.3.0 February 19, 2024 17:42
@wesketchum
Copy link
Contributor

Just tested at EHN1 and it appears to work. Thanks @plasorak

@plasorak plasorak merged commit 8d14945 into prep-release/fddaq-v4.3.0 Feb 21, 2024
1 check passed
@plasorak plasorak deleted the plasorak/pin-thread-sequence branch February 21, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
miscellaneous deliverable A change that is/will be part of a release but is not substantial enough to be a daq-deliverable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants