bproc_nodenumber -- Get the node number based on the given IP address.
#include <sys/bproc.h> int bproc_nodenumber (struct sockaddr * addr, int size);
- pointer to a
struct sockaddr, that has the IP filled in
- The size of
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
Returns the node number associated with the IP address.
BPROC_NODE_NONE if no valid node was found.
addrpoints to memory that is not accessible by the program.
- There was an I/O error.
- Out of memory error.