---
name: "rploadgo"
section: "2"
platform: "linux"
package: "lam2-dev"
version: "6.3.2-3"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/rploadgo"
---

# rploadgo(2)

Load and execute a LAM program on a remote node.

## NAME

rploadgo - Load and execute a LAM program on a remote node.

## C SYNOPSIS

\#include \<kio.h\>

int rploadgo (int srcnode, int destnode, char \*filename, int flags, char \*\*argv, int \*pid, int \*idx);

## FORTRAN SYNOPSIS

subroutine RPLDGO (srcnode, destnode, filename, flags, pid, idx, ierr)

integer srcnode, destnode, flags, pid, idx, ierr\
 character filename\*(\*)

## ARGUMENTS

- srcnode

  where program is stored

- destnode

  where new process will be created

- filename

  program file

- flags

  runtime flags passed to new process

- argv

  null-terminated array of strings to be passed as command-line arguments to the new process

- pid

  new process identifier (output)

- idx

  new process index (output)

## DESCRIPTION

If the source and destination nodes are identical, the program is not transferred and the process is created with [rpcreate(2)](/rpcreate/2.md). Otherwise the program is transferred with [rload(2)](/rload/2.md), stored in /tmp on the destination node, and created with [rpgo(2)](/rpgo/2.md).

If the source node is the local node, the program is located by searching the directories defined in the PATH environment variable of the caller. Otherwise, the PATH variable of the remote LAM daemon is used. Usually, the only difference is in how the "." directory is resolved. On the local node it is the current working directory of the calling process. On a remote node it is the user's home directory.

### Current Working Directory

By default, *rploadgo()* will propagate the caller's current working directory to the created process if target node is the local node. This is accomplished by passing the RTF\_CWD runtime flag to [rpgo(2)](/rpgo/2.md) or [rpcreate(2)](/rpcreate/2.md). A remote process will assume the remote home directory as its current working directory. This behaviour can be changed by the RTF\_APPWD runtime flag.

### Runtime Flags

Runtimes flags are defined in \<kio.h\> (\<NET.h\> for Fortran) and can be added together in any combination.

- RTF\_WAIT

  The new process will send a message to the calling process, received by [rpwait(2)](/rpwait/2.md), when it exits. This flag is used if the parent is interested in the exit code of the child process. Failure to call [rpwait(2)](/rpwait/2.md) at some point after using this flag will leave stray messages with weird events in buffers on the caller's node.

- RTF\_TRACE

  Enable tracing for the new process.

- RTF\_APPWD

  The current working directory will be the location of the executable program.

## ERRORS

- ENOPDESCRIPTORS

  The remote process descriptor table is full.

- ENOFLDESCRIPTORS

  The table of strorage blocks (kept by the flat daemon) is full.

## SEE ALSO

[rpcreate(2)](/rpcreate/2.md), [rpgo(2)](/rpgo/2.md), [rpwait(2)](/rpwait/2.md)
