Stream: helpdesk (published)

Topic: ✔ set Julia threads on CI


view this post on Zulip Leandro Martínez (Dec 13 2024 at 15:02):

When I set, on a CI workflow:

env:
  JULIA_NUM_THREADS: 2

Am I really requiring a machine where 2 threads are actually available? If I use JULIA_NUM_THREADS: 10 will this bring any issue or computing demand for running the tests? I would like to use a large number of threads for some tests, but I do not need actual processors to be available.

view this post on Zulip Mosè Giordano (Dec 13 2024 at 16:39):

Leandro Martínez said:

When I set, on a CI workflow:

env:
  JULIA_NUM_THREADS: 2

Am I really requiring a machine where 2 threads are actually available?

No. Setting an environment variable has no effect whatsoever on getting a specific machine. Also, if you're only using Github-hosted runners you don't have any choice, you get what they give you.

Leandro Martínez said:

If I use JULIA_NUM_THREADS: 10 will this bring any issue or computing demand for running the tests?

Worst that can happen is that the job will be slow because the machine will be oversubscribed. If that's a problem it's up to you.

view this post on Zulip Leandro Martínez (Dec 13 2024 at 17:02):

Great, thanks!

view this post on Zulip Notification Bot (Dec 13 2024 at 17:02):

Leandro Martínez has marked this topic as resolved.


Last updated: Dec 28 2024 at 04:38 UTC