.. role:: ref(emphasis) .. _futhark-multicore(1): ================= futhark-multicore ================= SYNOPSIS ======== futhark multicore [options...] DESCRIPTION =========== ``futhark multicore`` translates a Futhark program to multithreaded C code, and either compiles that C code with a C compiler to an executable binary program, or produces a ``.h`` and ``.c`` file that can be linked with other code. The standard Futhark optimisation pipeline is used. 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. The arguments are read and printed in Futhark syntax. OPTIONS ======= -h Print help text to standard output and exit. --entry-point NAME Treat this top-level function as an entry point. --library Generate a library instead of an executable. Appends ``.c``/``.h`` to the name indicated by the ``-o`` option to determine output file names. -o outfile Where to write the result. If the source program is named ``foo.fut``, this defaults to ``foo``. --safe Ignore ``unsafe`` in program and perform safety checks unconditionally. --server Generate a server-mode executable that reads commands from stdin. -v verbose Enable debugging output. If compilation fails due to a compiler error, the result of the last successful compiler step will be printed to standard error. -V Print version information on standard output and exit. -W Do not print any warnings. --Werror Treat warnings as errors. ENVIRONMENT VARIABLES ===================== ``CC`` The C compiler used to compile the program. Defaults to ``cc`` if unset. ``CFLAGS`` Space-separated list of options passed to the C compiler. Defaults to ``-O3 -std=c99 -pthread`` if unset. EXECUTABLE OPTIONS ================== Generated executables accept the same options as those generated by :ref:`futhark-c(1)`. The following additional options are accepted. -P, --profile Collect and report various bits of profiling information. --num-threads=INT Use this many physical threads. BUGS ==== Currently works only on Unix-like systems because of a dependency on pthreads. Adding support for Windows would likely not be difficult. SEE ALSO ======== :ref:`futhark-c(1)`, :ref:`futhark-test(1)`