exaloop / codon

A high-performance, zero-overhead, extensible Python compiler using LLVM
https://docs.exaloop.io/codon
Other
14.32k stars 502 forks source link

Multiple unwanted Threads #584

Open sinainnet opened 2 weeks ago

sinainnet commented 2 weeks ago

Hi, I have created the following program:

while True: 
      continue 

I have compiled it with the following command:

codon build --release -o test test.codon

But, when I am running it, it creates a lot of unwanted threads!

image

I do not want those threads! What should I do?

arshajii commented 2 weeks ago

Can you try setting the environment variable OMP_NUM_THREADS to 1 (i.e. export OMP_NUM_THREADS=1)?

sinainnet commented 2 weeks ago

It is the same!

sinainnet commented 2 weeks ago

I have installed the codon by this:

codon build --release -o test test.codon
arshajii commented 2 weeks ago

These could also be GC market threads -- can you please try export GC_MARKERS=1 as well?

sinainnet commented 2 weeks ago

Yes, that is working. Perfect. So, my question is what would be the performance impact if I set the number of GC threads to 1?