# problem in multithreading

**URL:** <https://castor-project.discourse.group/t/problem-in-multithreading/154>\
**Category:** General Discussions\
**Created:** [June 2, 2020, 8:24am UTC](https://castor-project.discourse.group/t/problem-in-multithreading/154 "2020-06-02T08:24:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hadi\_Rezaei](https://avatars.discourse-cdn.com/v4/letter/h/ebca7d/32.png) [@Hadi\_Rezaei](https://castor-project.discourse.group/u/Hadi_Rezaei)\
**Post date:** [June 2, 2020, 8:24am UTC](https://castor-project.discourse.group/t/problem-in-multithreading/154/1 "2020-06-02T08:24:19Z")

</div>

Dear CASToR users  
I used castor\_v2.1 and I exported CASTOR\_OMP=1 and CASTOR\_MPI for installation but when I run a program only one thread is used. I attached a picture that indicates it. How can I use multithreading for reconstruction? I used a big scanner and I need to faster reconstruction!!

Any answer will be highly appreciated!

Best regards

 ![castor.png](https://global.discourse-cdn.com/free1/uploads/castor_project/original/1X/3f892399857207f9991a97a12860520761ef9ac7.png)

---

<div class="post-metadata">

**Author:** ![sstute](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sstute](https://castor-project.discourse.group/u/sstute)\
**Post date:** [June 2, 2020, 8:39am UTC](https://castor-project.discourse.group/t/problem-in-multithreading/154/2 "2020-06-02T08:39:39Z")

</div>

Dear Hadi,

The option “-th 0” will automatically fix a number of threads corresponding to the number of cores in your system.

We built CASToR so that it does not do anything by default unless the use asks for it.

Best

Simon

---

<div class="post-metadata">

**Author:** ![sstute](https://avatars.discourse-cdn.com/v4/letter/s/8c91f0/32.png) [@sstute](https://castor-project.discourse.group/u/sstute)\
**Post date:** [June 2, 2020, 9:04am UTC](https://castor-project.discourse.group/t/problem-in-multithreading/154/3 "2020-06-02T09:04:00Z")

</div>

Please always answer to the list as it may be of interest for other users.

This warning message cannot be more clear: the code was not compiled with the CASTOR\_OMP option. You should redo the compilation following the users guide.

Simon
