bproc_nodenumber

Name

bproc_nodenumber – Get the node number based on the given IP address.

Synopsis

#include <sys/bproc.h>
int bproc_nodenumber (struct sockaddr * addr, int size);

Arguments

addr

pointer to a struct sockaddr, that has the IP filled in

size

The size of addr

Description

Retrieves the IP address from the sockaddr structure and provides the number of the node with that address. There is a direct one-to-one mapping of node number to IP address as given in the /etc/beowulf/config file. Node numbering starts at 0 with the first IP address in the range and increments by 1 up to the last IP address in the range.

Return Value

Returns the node number associated with the IP address.

Returns BPROC_NODE_NONE if no valid node was found.

Errors

EFAULT

addr points to memory that is not accessible by the program.

EIO

There was an I/O error.

ENOMEM

Out of memory error.