---
name: "pvm_joingroup"
section: "3"
platform: "linux"
package: "pvm-dev"
version: "3.4.2-8"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/pvm_joingroup"
---

# pvm\_joingroup(3)

Enrolls the calling process in a named group.

## NAME

pvm\_joingroup - Enrolls the calling process in a named group.

## SYNOPSIS

```
C	int inum = pvm_joingroup( char *group )
Fortran	call pvmfjoingroup( group, inum )
```

## PARAMETERS

- group

  **Character string group name of an existing group.**\

- inum

  **Integer instance number returned by the routine.** **Instance numbers start at 0 and count up.** **Values less than zero indicate an error.**

## DESCRIPTION

**The routine** *pvm\_joingroup* **enrolls the calling task in** **the group named** *group* **and returns the instance number** *inum* **of this task in this group.** **If there is an error** *inum* **will be negative.**

**Instance numbers start at 0 and count up.** **When using groups a (group, inum) pair uniquely identifies a** **PVM process.** **This is consistent with the PVM 2.4 naming schemes.** **If a task leaves a group by calling pvm\_lvgroup** **and later rejoins the same group,** **the task is not guaranteed to get the same instance number.** **PVM attempts to reuse old instance numbers, so when a task** **joins a group it will get the lowest available instance number.** **A task can be a member of multiple groups simultaneously.**

## EXAMPLES

```
C:
	inum = pvm_joingroup( "worker" );

Fortran:
	CALL PVMFJOINGROUP( 'group2', INUM )
```

## ERRORS

**These error conditions can be returned by** *pvm\_joingroup*

- PvmSysErr

  **pvmd was not started or has crashed.**

- PvmBadParam

  **giving a NULL group name.**

- PvmDupGroup

  **trying to join a group you are already in.**

## SEE ALSO

**pvm\_lvgroup(3PVM)**
