# Proper way to install Julia with \`OPENBLAS\_NUM\_THREADS=1\`

**URL:** https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855
**Category:** General Usage
**Tags:** installation, juliaup, openblas
**Created:** [October 11, 2023, 1:59pm UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855 "2023-10-11T13:59:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![pat-alt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pat-alt/32/34264_2.png) [@pat-alt](https://discourse.julialang.org/u/pat-alt)
#### Post date: [October 11, 2023, 1:59pm UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855/1 "2023-10-11T13:59:59Z")

</div>

_Related to: [Odd thread calling behavior on HPC](https://discourse.julialang.org/t/odd-thread-calling-behavior-on-hpc/104789/1)_

I’ve been experiencing some issues on our uni’s HPC due to OpenBLAS thread calling (see link to related discussion above). The issue can be resolved by just adding/modifying an environment variable (`export OPENBLAS_NUM_THREADS=1`). Ideally, I’d like to install Julia with that flag already activated.

Is there an easy way to do this using a) juliaup and b) using a [pre-built binary](https://julialang.org/downloads/platform/#linux_and_freebsd)?

Thanks!

---

<div class="post-metadata">

### Author: ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)
#### Post date: [October 11, 2023, 2:16pm UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855/2 "2023-10-11T14:16:29Z")

</div>

Surely it is easy to put this export statement in your .bashrc

---

<div class="post-metadata">

### Author: ![pat-alt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pat-alt/32/34264_2.png) [@pat-alt](https://discourse.julialang.org/u/pat-alt)
#### Post date: [October 11, 2023, 2:19pm UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855/3 "2023-10-11T14:19:12Z")

</div>

Yeh that’s fair, but I like to sync my dotfiles across platforms and I don’t necessarily want that flag everywhere. So if there’s a way to specify it during installation that’d be nicer.

---

<div class="post-metadata">

### Author: ![vchuravy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vchuravy/32/8_2.png) [@vchuravy](https://discourse.julialang.org/u/vchuravy)
#### Post date: [October 11, 2023, 2:42pm UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855/4 "2023-10-11T14:42:34Z")

</div>

I would just but it as an export statement in the slurm file.

---

<div class="post-metadata">

### Author: ![pat-alt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pat-alt/32/34264_2.png) [@pat-alt](https://discourse.julialang.org/u/pat-alt)
#### Post date: [October 11, 2023, 3:29pm UTC](https://discourse.julialang.org/t/proper-way-to-install-julia-with-openblas-num-threads-1/104855/5 "2023-10-11T15:29:36Z")

</div>

Alright, I’ll just stick with that for now, thanks!
