Skip to content

Conversation

thomashampson
Copy link
Contributor

@thomashampson thomashampson commented Jun 13, 2025

Description of work

Add a check for a new UNIT_TEST_THREADS environment variable that can be set in the Jenkins configuration for each node that can be used to limit the number of unit tests to be run in parallel. This has been done so that we can limit the number of unit tests processes on out macOS builders, some of which have limited RAM (compared to the core count).

Further detail of work

I have set UNIT_TEST_THREADS=6 on the following nodes, which have been observed to timeout on tests:

  • isis-ndw2564
  • isis-ndw2995
  • isis-ndw2996

This value is two below the number of cores, so will hopefully give the machines more resources to run the tests in parallel successfully. We can tweak the number inside the Jenkins configuration if required.

Purpose of work

Often the nightly will fail because unit tests have timed out on macOS.

Fixes #39434 (hopefully!)

To test:

Search the osx build log for this PR for ctest -j. If it is one of the machines listed above, it should have a 6 as the next character.

This does not require release notes because it is a build configuration change.


Reviewer

Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.

Code Review

  • Is the code of an acceptable quality?
  • Does the code conform to the coding standards?
  • Are the unit tests small and test the class in isolation?
  • If there is GUI work does it follow the GUI standards?
  • If there are changes in the release notes then do they describe the changes appropriately?
  • Do the release notes conform to the release notes guide?

Functional Tests

  • Do changes function as described? Add comments below that describe the tests performed?
  • Do the changes handle unexpected situations, e.g. bad input?
  • Has the relevant (user and developer) documentation been added/updated?

Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.

Gatekeeper

If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.

Adding this to the run-tests script will allow a
per-node configuration of the maximum number of
units tests to run in parallel.
@thomashampson thomashampson added this to the Release 6.13 milestone Jun 13, 2025
@thomashampson thomashampson added High Priority An issue or pull request that if not addressed is severe enough to postponse a release. macOS Only The issues related to macOS only. Currently could be x64 or ARM. ISIS: Core Issue and pull requests at ISIS that relate to Core features and functions DevOps Issues and pull requests related to DevOps labels Jun 13, 2025
@thomashampson thomashampson marked this pull request as ready for review June 13, 2025 14:21
@peterfpeterson peterfpeterson merged commit c40c079 into release-next Jun 13, 2025
10 checks passed
@peterfpeterson peterfpeterson deleted the unit_test_threads branch June 13, 2025 15:36
@sf1919 sf1919 moved this to Done in v6.13 Release Jun 16, 2025
peterfpeterson pushed a commit to peterfpeterson/mantid that referenced this pull request Jun 20, 2025
Add a check for a new `UNIT_TEST_THREADS` environment variable that can
be set in the Jenkins configuration for each node that can be used to
limit the number of unit tests to be run in parallel. This has been done
so that we can limit the number of unit tests processes on out macOS
builders, some of which have limited RAM (compared to the core count).

### Further detail of work
I have set `UNIT_TEST_THREADS=6` on the following nodes, which have been
observed to timeout on tests:
- isis-ndw2564
- isis-ndw2995
- isis-ndw2996

This value is two below the number of cores, so will hopefully give the
machines more resources to run the tests in parallel successfully. We
can tweak the number inside the Jenkins configuration if required.
peterfpeterson pushed a commit to peterfpeterson/mantid that referenced this pull request Jun 20, 2025
Add a check for a new `UNIT_TEST_THREADS` environment variable that can
be set in the Jenkins configuration for each node that can be used to
limit the number of unit tests to be run in parallel. This has been done
so that we can limit the number of unit tests processes on out macOS
builders, some of which have limited RAM (compared to the core count).

### Further detail of work
I have set `UNIT_TEST_THREADS=6` on the following nodes, which have been
observed to timeout on tests:
- isis-ndw2564
- isis-ndw2995
- isis-ndw2996

This value is two below the number of cores, so will hopefully give the
machines more resources to run the tests in parallel successfully. We
can tweak the number inside the Jenkins configuration if required.
peterfpeterson added a commit that referenced this pull request Jun 20, 2025
This pulls a variety of changes to buildscripts, dependencies, and
assundries upstream of those changes.
* #39108
* #39440
* #38976
* #39240
* #39522
* #39337
* #39481
* #39295
* #39360
* #39355
* #39170
* #39343
* #37350

---------

Co-authored-by: Darsh Dinger <106342815+darshdinger@users.noreply.github.com>
Co-authored-by: Jack <jack.allen@stfc.ac.uk>
Co-authored-by: thomashampson <thomas.hampson@stfc.ac.uk>
Co-authored-by: James Clarke <139879523+jclarkeSTFC@users.noreply.github.com>
Co-authored-by: Sarah Foxley <55837273+sf1919@users.noreply.github.com>
Co-authored-by: Adam J. Jackson <a.j.jackson@physics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Issues and pull requests related to DevOps High Priority An issue or pull request that if not addressed is severe enough to postponse a release. ISIS: Core Issue and pull requests at ISIS that relate to Core features and functions macOS Only The issues related to macOS only. Currently could be x64 or ARM.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants