---
name: "drmaa_version"
section: "3"
platform: "linux"
package: "gridengine-drmaa-dev"
version: "6.2u5-7.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/drmaa_misc"
---

# drmaa\_version(3)

Miscellaneous DRMAA functions.

Part of [drmaa\_misc(3)](/drmaa_misc/3.md).

## NAME

drmaa\_strerror, drmaa\_get\_contact, drmaa\_version, drmaa\_get\_DRM\_system - Miscellaneous DRMAA functions.

## SYNOPSIS

**#include "drmaa.h"**

```
const char *drmaa_strerror(
int drmaa_errno
```

**);**

```
int drmaa_get_contact(
char *contact,
size_t contact_len,
char *error_diagnosis,
size_t error_diag_len
```

**);**

```
int drmaa_version(
unsigned int *major,
unsigned int *minor,
char *error_diagnosis,
size_t error_diag_len
```

**);**

```
int drmaa_get_DRM_system(
char *drm_system,
size_t drm_system_len,
char *error_diagnosis,
size_t error_diag_len
```

**);**

```
int drmaa_get_DRMAA_implementation(
char *drm_impl,
size_t drm_impl_len,
char *error_diagnosis,
size_t error_diag_len
```

**);**

```

```

## DESCRIPTION

**The drmaa\_strerror() function returns a message text associated with the DRMAA error number,** *drmaa\_errno***. For invalid DRMAA error codes \`NULL' is returned.**

### drmaa\_get\_contact()

**The drmaa\_get\_contact() returns an opaque string containing contact**  **information related to the current DRMAA session to be used with the** [*drmaa\_init*(3)](/drmaa_init/3.md) function. The opaque string contains the information required by drmaa\_init() to reconnect to the current session instead of creating a new session. [*drmaa\_init*(3)](/drmaa_init/3.md) function.

The drmaa\_get\_contact() function returns the same value before and after [*drmaa\_init*(3)](/drmaa_init/3.md) is called.

### drmaa\_version()

The drmaa\_version() function returns into the integers pointed to by *major*  and *minor*, the major and minor version numbers of the DRMAA library. For a DRMAA 1.0 compliant  implementation \`1' and \`0' will be returned in *major* and *minor*, respectively.

### drmaa\_get\_DRM\_system()

The drmaa\_get\_DRM\_system() function returns into *drm\_system* up to  *drm\_system\_len* characters of a string containing Sun Grid Engine product and  version information.

The drmaa\_get\_DRM\_system() function returns the same value before and after [*drmaa\_init*(3)](/drmaa_init/3.md) is called.

### drmaa\_get\_DRMAA\_implementation()

The drmaa\_get\_DRMAA\_implementation() function returns into *drm\_system* up to  *drm\_system\_len* characters of a string containing the Sun Grid Engine DRMAA implementation version information.  In the current implementation, the drmaa\_get\_DRMAA\_implementation() function returns the same result as the drmaa\_get\_DRM\_system() function.

The drmaa\_get\_DRMAA\_implementation() function returns the same value before and after [*drmaa\_init*(3)](/drmaa_init/3.md) is called.

## ENVIRONMENTAL VARIABLES

- **SGE\_ROOT**

  Specifies the location of the Sun Grid Engine standard configuration files.

- **SGE\_CELL**

  If set, specifies the default Sun Grid Engine cell to be used. To address a Sun Grid Engine cell Sun Grid Engine uses (in the order of precedence):

  The name of the cell specified in the environment variable SGE\_CELL, if it is set.

  The name of the default cell, i.e. **default**.

- **SGE\_DEBUG\_LEVEL**

  If set, specifies that debug information should be written to stderr. In addition the level of detail in which debug information is generated is defined.

- **SGE\_QMASTER\_PORT**

  If set, specifies the tcp port on which [*sge\_qmaster*(8)](/sge_qmaster/8.md) is expected to listen for communication requests. Most installations will use a services map entry instead to define that port.

## RETURN VALUES

Upon successful completion, drmaa\_get\_contact(), drmaa\_version(), and drmaa\_get\_DRM\_system() return DRMAA\_ERRNO\_SUCCESS. Other values indicate an error. Up to *error\_diag\_len* characters of error related diagnosis  information is then provided in the buffer *error\_diagnosis*.

## ERRORS

The drmaa\_get\_contact(), drmaa\_version(), drmaa\_get\_DRM\_system(), and drmaa\_get\_DRMAA\_implementation() will fail if:

### DRMAA\_ERRNO\_INTERNAL\_ERROR

Unexpected or internal DRMAA error, like system call failure, etc.

### DRMAA\_ERRNO\_DRM\_COMMUNICATION\_FAILURE

Could not contact DRM system for this request.

### DRMAA\_ERRNO\_AUTH\_FAILURE

The specified request is not processed successfully due to authorization failure.

### DRMAA\_ERRNO\_INVALID\_ARGUMENT

The input value for an argument is invalid.

### DRMAA\_ERRNO\_NO\_MEMORY

Failed allocating memory.

The drmaa\_get\_contact() and drmaa\_get\_DRM\_system() will fail if:

### DRMAA\_ERRNO\_NO\_ACTIVE\_SESSION

Failed because there is no active session.

## SEE ALSO

[*drmaa\_session*(3)](/drmaa_session/3.md).
