# Hyperhreading Cores with Chapel

**URL:** https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198
**Category:** Users
**Created:** [December 15, 2022, 1:56am UTC](https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198 "2022-12-15T01:56:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [December 15, 2022, 1:56am UTC](https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198/1 "2022-12-15T01:56:09Z")

</div>

How does Chapel handle hyper-threaded cores, i.e. two threads fighting for access to a single FPU?

Our experience with floating point intensive applications is that two threads fighting for access to an FPU spend time fighting so we turn hyper-hreading to avoid that wasteful fighting so I advice against them.

I am curious at other's experience with hyper-threading just in case such avoid is rubbish. Thanks

---

<div class="post-metadata">

### Author: ![bradcray](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/bradcray/32/72_2.png) [@bradcray](https://chapel.discourse.group/u/bradcray)
#### Post date: [December 15, 2022, 2:11am UTC](https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198/2 "2022-12-15T02:11:20Z")

</div>

Hi Damian —

By default, Chapel doesn't use hyperthreading, which is to say, we create a number of threads equal to the number of physical cores rather than virtual ones. Users can override this choice by setting `CHPL_RT_NUM_THREADS_PER_LOCALE` to a numeric value to get a different number, or to `MAX_LOGICAL` as a mnemonic for "please create a task per hyperthreaded core". See [Chapel Tasks — Chapel Documentation 1.28](https://chapel-lang.org/docs/usingchapel/tasks.html#controlling-the-number-of-threads) for details.

-Brad

---

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [December 15, 2022, 11:17am UTC](https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198/3 "2022-12-15T11:17:27Z")

</div>

Thanks Brad. Answers my question.

---

<div class="post-metadata">

### Author: ![RedHatTurtle](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/redhatturtle/32/198_2.png) [@RedHatTurtle](https://chapel.discourse.group/u/RedHatTurtle)
#### Post date: [December 19, 2022, 6:34pm UTC](https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198/4 "2022-12-19T18:34:24Z")

</div>

In my personal experience there is no floating point performance to be gained from using SMT Cores, no mater if it's on Intel or AMD processors.

---

<div class="post-metadata">

### Author: ![damianmoz](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/damianmoz/32/319_2.png) [@damianmoz](https://chapel.discourse.group/u/damianmoz)
#### Post date: [December 19, 2022, 10:04pm UTC](https://chapel.discourse.group/t/hyperhreading-cores-with-chapel/18198/5 "2022-12-19T22:04:45Z")

</div>

I think that is everybody's experience. Just wanted to ensure that my beliefs matched others' reality,
