NAG C Library Function Document

nag_licence_query (a00acc)

1
Purpose

nag_licence_query (a00acc) provides a convenient means of checking the availability of a valid licence key on licence-managed implementations before starting computations that will use NAG C Library functions. In particular, the use of this function is highly recommended in programs that call NAG C Library functions within multithreaded sections (e.g., OpenMP parallel regions). The function need only be called once, before the start of the first multithreaded section.

2
Specification

#include <nag.h>
#include <naga00.h>
Nag_Boolean  nag_licence_query ()

3
Description

nag_licence_query (a00acc) returns the logical value Nag_TRUE if a valid licence is found, otherwise Nag_FALSE is returned.
On non licence-managed implementations, Nag_TRUE is always returned.

4
References

None.

5
Arguments

None.

6
Error Indicators and Warnings

None.

7
Accuracy

Not applicable.

8
Parallelism and Performance

Not applicable.

9
Further Comments

None.

10
Example

This example prints an appropriate message depending upon the value returned by nag_licence_query (a00acc).

10.1
Program Text

Program Text (a00acce.c)

10.2
Program Data

None.

10.3
Program Results

Program Results (a00acce.r)