---
name: "gfarm_initialize"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.7.20+dfsg-1.2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gfarm_initialize"
---

# gfarm\_initialize(3)

initialize the Gfarm execution environment for client

## NAME

gfarm\_initialize - initialize the Gfarm execution environment for client

## SYNOPSIS

```
#include <gfarm/gfarm.h>
```

**gfarm\_error\_t gfarm\_initialize(int \****argcp***, char \*\*\*** *argvp***);**

## DESCRIPTION

**gfarm\_initialize()** initializes the Gfarm execution environment for client application. This function should be called before any Gfarm library API. *argcp* is a pointer to the number of arguments and *argvp* is a pointer to the argument vector.

## RETURN VALUES

**GFARM\_ERR\_NO\_ERROR**

The function terminated successfully.

**GFARM\_ERR\_NO\_MEMORY**

Insufficient memory was available.

**GFARM\_ERR\_UNKNOWN\_HOST**

The metadata server cannot be resolved.

**GFARM\_ERR\_NETWORK\_IS\_UNREACHABLE**

Network is unrechable.

**GFARM\_ERR\_OPERATION\_TIMED\_OUT**

Connetion timeout occurs.

**GFARM\_ERR\_PROTOCOL**

Protocol error occurs.

**GFARM\_ERR\_BROKEN\_PIPE**

Connection to the metadata server is broken.

**GFARM\_ERR\_PERMISSION\_DENIED**

The requested access to the file is not allowed, or one of the directories in *gfarm\_url* did not allow search (execute) permission. Or, the authentication to the metadata server fails.

**GFARM\_ERR\_PROTOCOL\_NOT\_SUPPORTED**

Specified authentication protocol is not supported.

**GFARM\_ERR\_AUTHENTICATION**

User authentication failed when connecting to the metadata server.

Others

An error except the above occurred. The reason is shown by its **gfarm\_error\_string**(3).

## SEE ALSO

[**gfarm\_terminate**(3)](/gfarm_terminate/3.md)
