Requires: Base Development System
Right-click a For Loop and select Configure Iteration Parallelism from the shortcut menu to display this dialog box.
After you review performance considerations for parallel For Loop iterations and determine whether a For Loop is parallelizable, use this dialog box to enable parallel loop iterations.
This dialog box includes the following components:
- Enable loop iteration parallelism—Enables For Loop iteration parallelism. When you place a checkmark in this checkbox, the parallel instances (P) terminal appears below the count (N) terminal on the For Loop. Use the parallel instances terminal to specify the number of generated parallel loop instances you want LabVIEW to use. If you wire -1 to the parallel instances terminal, LabVIEW uses all the loop instances you specify in Number of generated parallel loop instances. If you wire 0 to the parallel instances terminal or leave the terminal unwired, LabVIEW determines the number of available logical processors at run time and uses that number of loop instances.
- Number of generated parallel loop instances—Specifies the number of For Loop instances you want LabVIEW to generate at compile time. If you plan to distribute the VI to multiple computers, set Number of generated parallel loop instances equal to the maximum number of logical processors you expect any of those computers to ever contain. Use the parallel instances terminal on the For Loop to specify how many of the generated instances to use at run time. If you wire a number to the parallel instances terminal that is larger than the number of generated parallel loop instances you specify in this dialog box, LabVIEW uses only the number of generated parallel loop instances that you specify here because that is the number of instances generated.
- Iteration partitioning schedule—Specifies how LabVIEW assigns loop iterations to each loop instance.
- Automatically partition iterations—Divides loop iterations into chunks of loop iterations automatically.
- Specify partitioning with chunk size (C) terminal—Divides loop iterations into constant-sized chunks. The value you wire to the chunk size (C) terminal specifies the chunk size. You also can wire an array to the chunk size terminal to specify a size for each chunk of iterations. If you wire too many chunk sizes, LabVIEW ignores the extra values. If you wire too few chunk sizes, LabVIEW uses the last element in the array to determine the size of the remaining chunks of iterations.
- Allow debugging—Allows debugging inside the For Loop by setting the loop iterations to run sequentially. By default, you cannot debug parallel loop iterations.