An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.


Home

OMP_SET_NUM_THREADS

Purpose:

Sets the number of threads that will be used in the next parallel region. Must be a postive integer.

Format:

Fortran

SUBROUTINE OMP_SET_NUM_THREADS(scalar_integer_expression)

C/C++

#include <omp.h>
void omp_set_num_threads(int num_threads)

Notes & Restrictions: