---
name: "pvm_advise"
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_advise"
---

# pvm\_advise(3)

Controls use of direct task-to-task routing. \[In Version 3.2: Replaced by pvm\_setopt\]

## NAME

pvm\_advise() - Controls use of direct task-to-task routing.\
 \[In Version 3.2: Replaced by pvm\_setopt\]

## SYNOPSIS

```
C	int info = pvm_advise( int route )
Fortran	call pvmfadvise( route, info )
```

## PARAMETERS

- route

  **Integer advising PVM to set up direct task-to-task links.**\
  \
   *route options*

  ```
  PvmDontRoute	1	Don't allow direct links to this task
  PvmAllowDirect	2	Allow but don't request direct links
  PvmRouteDirect	3	Request direct links
  ```

- info

  **Integer returning error status.**

## DESCRIPTION

**The routine** *pvm\_advise* **advises PVM on whether or not** **to set up direct task-to-task links (using TCP) for** **all subsequent communication. Once a link is established it** **remains until the application finishes.** **If a direct link can not be established because one of the two tasks** **has requested** *PvmDontRoute* **or because no resources are available,** **then the default route through the PVM daemons is used.** **pvm\_advise can be called multiple times to selectively establish** **direct links,** **but is typically set only once near the beginning of each task.** *PvmAllowDirect* **is the default advise setting.** **This setting on task A allows other tasks to set up direct links to A.** **Once a direct link is established between tasks** **both tasks will use it for sending messages.** **pvm\_advise returns the error status in** *info.* **The performance of direct task-to-task links can be up to a factor** **of two better than the default route. The draw back is a lack of** **scalability of the direct links.** **Some versions of UNIX limit the number of links to no more than 30.**

## EXAMPLES

```
C:
	info = pvm_advise( PvmRouteDirect );

Fortran:
	CALL PVMFADVISE( PVMROUTEDIRECT, INFO )
```

## ERRORS

**This error condition can be returned by** *pvm\_advise*

- PvmBadParam

  **giving an invalid route value.**

## SEE ALSO

**pvm\_setopt(3PVM)**
