S-Lang PVM Module Reference: Using the PVM Module

Next Previous Contents

## 2. Using the PVM Module

To use the `PVM` module in a S-lang script, it is first necessary to make the functions in the package known to the interpreter via

> `

>         () = evalfile ("pvm");

> `

or, if the application embedding the interpreter supports the `require` function,

> `

>         require ("pvm");

> `

may be used. If there is a namespace conflict between symbols in the script and those defined in the module, it may be necessary to load the PVM package into a namespace, e.g.,

> `

>        () = evalfile ("pvm", "p");

> `

will place the PVM symbols into a namespace called `p`.

Once the PVM module has been loaded, the functions it defines may be used in the usual way, e.g.,

> `

>         require ("pvm");
>             .
>             .
>         variable master_tid = pvm_mytid ();

> `

where `pvm_mytid` is the PVM function which returns the task identifier of the calling process.

Next Previous Contents