Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

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

Document Table of Contents

blacs_get

Gets values that BLACS use for internal defaults.

Syntax

call blacs_get( icontxt, what, val )

Input Parameters

icontxt

INTEGER. On values of what that are tied to a particular context, this parameter is the integer handle indicating the context. Otherwise, ignored.

what

INTEGER. Indicates what BLACS internal(s) should be returned in val. Present options are:

  • what = 0 : Handle indicating default system context.
  • what = 1 : The BLACS message ID range.
  • what = 2 : The BLACS debug level the library was compiled with.
  • what = 10 : Handle indicating the system context used to define the BLACS context whose handle is icontxt.
  • what = 11 : Number of rings multiring broadcast topology is presently using.
  • what = 12 : Number of branches general tree broadcast topology is presently using.
  • what = 13 : Number of rings multiring combine topology is presently using.
  • what = 14 : Number of branches general tree combine topology is presently using.
  • what = 15 : Whether topologies are forced to be repeatable or not. A non-zero return value indicates that topologies are being forced to be repeatable. See Repeatability and Coherence for more information about repeatability.
  • what = 16 : Whether topologies are forced to be heterogenous coherent or not. A non-zero return value indicates that topologies are being forced to be heterogenous coherent. See Repeatability and Coherence for more information about coherence.

Output Parameters

val

INTEGER. The value of the BLACS internal.

Description

This routine gets the values that the BLACS are using for internal defaults. Some values are tied to a BLACS context, and some are more general. The most common use is in retrieving a default system context for input into blacs_gridinit or blacs_gridmap.

Some systems, such as MPI*, supply their own version of context. For those users who mix system code with BLACS code, a BLACS context should be formed in reference to a system context. Thus, the grid creation routines take a system context as input. If you wish to have strictly portable code, you may use blacs_get to retrieve a default system context that will include all available processes. This value is not tied to a BLACS context, so the parameter icontxt is unused.

blacs_get returns information on three quantities that are tied to an individual BLACS context, which is passed in as icontxt. The information that may be retrieved is:

  • The handle of the system context upon which this BLACS context was defined

  • The number of rings for TOP = 'M' (multiring broadcast/combine)

  • The number of branches for TOP = 'T' (general tree broadcast/general tree gather).

  • Whether topologies are being forced to be repeatable or heterogenous coherent.