# Get \`ERROR: julia: -t,--threads=\<n\>\[,auto|\<m\>\]; n must be an integer \>= 1\` when running test

**URL:** <https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131>\
**Category:** General Usage\
**Created:** [April 16, 2025, 4:58pm UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131 "2025-04-16T16:58:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [April 16, 2025, 4:58pm UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131/1 "2025-04-16T16:58:02Z")

</div>

Not sure what to do here. I have a laptop I haven’t really worked much on for like 6 months. Running Julia on it has been fine. However, now I tried to run the tests of a package that I develop. I activate the environment and do

```julia
] test

```

And I get this

```julia
ERROR: julia: -t,--threads=<n>[,auto|<m>]; n must be an integer >= 1

```

as output.

Just running Julia as normal does not yield any problem. This happens when I run on master (so nothing I have added to the package, this just to work on my desktop). I have tried restarting the computer and it was fine.

This is on Julai 1.11.5 and Ubuntu 22.04

---

<div class="post-metadata">

**Author:** ![eldee](https://avatars.discourse-cdn.com/v4/letter/e/b5a626/32.png) [@eldee](https://discourse.julialang.org/u/eldee)\
**Post date:** [April 17, 2025, 7:56am UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131/2 "2025-04-17T07:56:18Z")

</div>

> [@Torkel](#):
>
> I have tried restarting the computer and it was fine.

Does that mean your issue goes away after rebooting?

* * *

In any case, this sounds to me like you have (the package has) a settings/preferences file/variable somewhere setting the number of threads incorrectly. Perhaps in an older version of Julia you could use `-t 0` for what’s now `-t auto`?

---

<div class="post-metadata">

**Author:** ![TimG](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TimG](https://discourse.julialang.org/u/TimG)\
**Post date:** [April 17, 2025, 8:05am UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131/3 "2025-04-17T08:05:10Z")

</div>

I had this error, too, after upgrading to v1.11.5 using juliaup. I use vs code on windows. Number of threads was reported as (blank). To fix, I had to manually set the number of threads myself. Then it went back to normal. .

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [April 17, 2025, 8:13am UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131/4 "2025-04-17T08:13:16Z")

</div>

> <https://github.com/julia-vscode/julia-vscode/issues/3798>
>
> I am unable to run tests from the VS Code Julia REPL after updating Julia from 1….11.4 to 1.11.5 - testing fails with:
> \`\`\`
> ERROR: julia: -t,--threads=\<n\>\[,auto|\<m\>\]; n must be an integer \>= 1
> \`\`\`
> 
> Testing from a separate Julia REPL works just fine.
> 
> This is \<strike\>likely\</strike\> due to a combination of not setting \`julia.NumThreads\` and https://github.com/JuliaLang/Pkg.jl/pull/4141
> 
> Likely solution is to not set \`JULIA\_NUM\_THREADS\` if \`julia.NumThreads\` is undefined.
> 
> Testing from the VS Code Julia REPL:
> \`\`\`
> julia\> versioninfo()
> Julia Version 1.11.5
> Commit 760b2e5b739 (2025-04-14 06:53 UTC)
> Build Info:
> Official https://julialang.org/ release
> Platform Info:
> OS: macOS (x86\_64-apple-darwin24.0.0)
> CPU: 16 × Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
> WORD\_SIZE: 64
> LLVM: libLLVM-16.0.6 (ORCJIT, skylake)
> Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
> Environment:
> JULIA\_EDITOR = code
> JULIA\_NUM\_THREADS = 
> JULIA\_PKG\_USE\_CLI\_GIT = true
> 
> (Example) pkg\> test
> No Changes to \`~/dev/julia/Example.jl/Project.toml\`
> No Changes to \`~/dev/julia/Example.jl/Manifest.toml\`
> Testing Example
> Status \`/private/var/folders/s1/xwq\_jtwc8xld63006s6ny0n80000gn/T/jl\_ggVXG0/Project.toml\`
> \[7876af07\] Example v0.5.5 \`~/dev/julia/Example.jl\`
> \[8dfed614\] Test v1.11.0
> Status \`/private/var/folders/s1/xwq\_jtwc8xld63006s6ny0n80000gn/T/jl\_ggVXG0/Manifest.toml\`
> \[7876af07\] Example v0.5.5 \`~/dev/julia/Example.jl\`
> \[2a0f44e3\] Base64 v1.11.0
> \[b77e0a4c\] InteractiveUtils v1.11.0
> \[56ddb016\] Logging v1.11.0
> \[d6f4376e\] Markdown v1.11.0
> \[9a3f8284\] Random v1.11.0
> \[ea8e919c\] SHA v0.7.0
> \[9e88b42a\] Serialization v1.11.0
> \[8dfed614\] Test v1.11.0
> Testing Running tests...
> ERROR: julia: -t,--threads=\<n\>\[,auto|\<m\>\]; n must be an integer \>= 1
> ERROR: Package Example errored during testing
> \`\`\`

---

<div class="post-metadata">

**Author:** ![stemann](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stemann/32/4030_2.png) [@stemann](https://discourse.julialang.org/u/stemann)\
**Post date:** [April 17, 2025, 8:37am UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131/5 "2025-04-17T08:37:15Z")

</div>

@Torkel Are you also using VS Code?

---

<div class="post-metadata">

**Author:** ![Torkel](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/torkel/32/5030_2.png) [@Torkel](https://discourse.julialang.org/u/Torkel)\
**Post date:** [April 17, 2025, 8:52am UTC](https://discourse.julialang.org/t/get-error-julia-t-threads-n-auto-m-n-must-be-an-integer-1-when-running-test/128131/6 "2025-04-17T08:52:23Z")

</div>

Yes, I was in VSCode. Thanks for the help, I changed to

```julia
    "julia.NumThreads": 2

```

(no idea what is best really)  
and the tests can run now
