Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Threads #9

Open
PallHaraldsson opened this issue May 3, 2022 · 1 comment
Open

Implement Threads #9

PallHaraldsson opened this issue May 3, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@PallHaraldsson
Copy link
Contributor

PallHaraldsson commented May 3, 2022

I suppose threads aren't yet implemented. I suppose it's hard so feel free to skip. Or at least comment on how difficult.

Since you already did mandelbrot I thought it might be low-hanging fruit as for another Julia program at Debian Benchmark Game, but the one there is already threaded so I may give up on that one.

Taking out write I got allocations (assuming because of the threading):

julia> @time mandelbrot(stdout, 8)
  0.000394 seconds (55 allocations: 4.703 KiB)

Since it's a constant known amount of threads and thus allocations, then maybe this actually would just work? Allocations only a problem if they actually trigger GC, and I could rely on not happening for such a small amount of?

@brenhinkeller
Copy link
Owner

Ah yeah, so as I understand it, enabling multithreading in StaticCompiler currently would be rather hard. On the StaticTools side, some of the Libc functions that StaticTools calls may not be thread-safe unless your Libc is thread-safe, but that's not likely what's causing any errors you'd get. Someday I'd like to be able to use MPI in StaticCompiler'd programs, but that's unlikely to work out of the box

@brenhinkeller brenhinkeller added the enhancement New feature or request label Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants