+-------------------------------IBM Extension--------------------------------+

NUM_PARTHDS()

Purpose

Returns the number of parallel Fortran threads the run time should create during execution of a program. This value is set by using the PARTHDS run-time option. If the user does not set the PARTHDS run-time option, the run time will set a default value for PARTHDS. In doing so, the run time may consider the following when setting the option:

Class

Inquiry function

Result Value

Default scalar integer

If the compiler option -qsmp has not been specified, then NUM_PARTHDS will always return a value of 1.

Examples

I = NUM_PARTHDS()
IF (I == 1) THEN
   CALL SINGLE_THREAD_ROUTINE()
ELSE
   CALL MULTI_THREAD_ROUTINE() 


Specific Name Argument Type Result Type Pass As Arg?
NUM_PARTHDS default scalar integer default scalar integer no

Related Information

See the parthds run-time option and the XLSMPOPTS run-time option in the XL Fortran User's Guide.

+----------------------------End of IBM Extension----------------------------+

IBM Copyright 2003