Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

This feature is not supported on the Wolfram Cloud.

is an option for Compile that specifies whether it should create a compiled function that could run in parallel.


  • Parallelization applies to the execution of the compiled function.
  • Compiled functions only run in parallel if Listable is one of the RuntimeAttributes and the function threads over list arguments.
  • Compiled functions run in parallel using multiple threads of execution.
  • Typically, $ProcessorCount is used to determine how many threads are used.
  • If a compiled function running in parallel has several threads trying to call ordinary Wolfram Language code, only one thread can do this at any time.
  • The following settings can be used:
  • Truecreate parallel code
    Falsecreate single-thread code
    Automaticuse parallelization for optimal arguments

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Listable compiled functions can execute in parallel:

Click for copyable input

This shows the operation running sequentially:

Click for copyable input

Typically, $ProcessorCount is used to determine how many threads can be used:

Click for copyable input
Introduced in 2010