Developer Reference for Intel® oneAPI Math Kernel Library for Fortran

ID 766686
Date 3/31/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

mkl_get_max_threads

Gets the number of OpenMP* threads targeted for parallelism.

Syntax

nt = mkl_get_max_threads()

Fortran Include Files/Modules
  • Include file: mkl.fi
  • Module (compiled): mkl_service.mod
  • Module (source): mkl_service.f90
Description

This function returns the number of OpenMP threads available for Intel® oneAPI Math Kernel Library to use in internal parallel regions.

Return Values

Name

Type

Description

nt

INTEGER*4

The maximum number of threads for Intel® oneAPI Math Kernel Library functions to use in internal parallel regions.

Example
use mkl_service
…
if (1 == mkl_get_max_threads()) print *, "Intel MKL does not employ threading"