FUTHARK-MULTICORE(1)

πŸ“¦
version 0.25.32 Β· 5 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so like, this is futhark-multicore β€” it's the Futhark manual page (yes bestie, section 1 of the Futhark manual) and it compiles Futhark to multithreaded C πŸ’–


🌸 SYNOPSIS 🌸

futhark multicore [options...] <program.fut>

πŸ¦‹ DESCRIPTION πŸ¦‹

so futhark multicore takes a Futhark program and translates it into multithreaded C code. and then? two roads, bestie πŸ’… it either compiles that C code with a C compiler into an executable binary program, OR it produces a .h file and a .c file that you can link with other code. your choice, main character energy either way.

and ngl the standard Futhark optimisation pipeline is used. no shortcuts, we're doing the full glow-up 🌈

the resulting program will read the arguments to the entry point (main by default) from standard input and print its return value on standard output. and the arguments are read and printed in Futhark syntax. that's the vibe check, that's the whole groove πŸŽ€


πŸ’… OPTIONS πŸ’…

it accepts the same options as futhark-c. literally the exact same ones, no cap. go look at futhark-c <#futhark-c-1> for the full tea 🫢


🧚 ENVIRONMENT VARIABLES 🧚

  • CC β€” the C compiler used to compile the program. defaults to cc if unset. she's the one holding the compiler, periodt ✨
  • CFLAGS β€” a space-separated list of options passed to the C compiler. defaults to -O3 -std=c99 -pthread if unset. iconic defaults tbh πŸ”₯

πŸ‘‘ EXECUTABLE OPTIONS πŸ‘‘

the generated executables accept the same options as those generated by futhark-c <#futhark-c-1>. yep, all of them. but wait β€” there's more πŸ‘€ the following additional options are also accepted:

  • --num-threads=INT β€” use this many physical threads. that's it. that's the setting. she's simple, she's powerful πŸ’œ

😭 BUGS 😭

okay so here's the thing. it currently works only on Unix-like systems because of a dependency on pthreads. yeah. that's the limitation, fr fr.

but the manpage says adding support for Windows would likely not be difficult 🫢 so like… someone go do it? not me tho πŸ™ˆ


πŸ”₯ SEE ALSO πŸ”₯

  • futhark-c <#futhark-c-1>
  • futhark-test <#futhark-test-1>

2013-2020, DIKU, University of Copenhagen


and that's the whole page bestie!! this was Futhark manual version 0.25.32, dated Mar 11, 2026 β€” go compile something multithreaded and slay πŸ’–βœ¨πŸŒΈπŸ¦‹πŸ’…πŸ‘‘

πŸ“¦ where this page comes from