Difference between revisions of "FAQ"

From ZeptoOS
Jump to navigationJump to search
Line 6: Line 6:
 
This depends on what number one is interested in.
 
This depends on what number one is interested in.
  
A '''pset rank''' is a number identifying a compute node within each ''pset'' (an I/O node and the compute nodes that communicate with it).  Pset rank is used as the last octet in the IP address on the tree network connecting the compute nodes and the I/O nodes (''x'' in <tt>192.168.1.</tt>''x'').
+
===Pset rank===
 +
 
 +
A pset rank is a number identifying a compute node within each ''pset'' (an I/O node and the compute nodes that communicate with it).  Pset rank is used as the last octet in the IP address on the tree network connecting the compute nodes and the I/O nodes (''x'' in <tt>192.168.1.</tt>''x'').
  
 
The pset rank is available on the compute nodes from <tt>/proc/personality.sh</tt>, in the <tt>BG_RANK_IN_PSET</tt> variable:
 
The pset rank is available on the compute nodes from <tt>/proc/personality.sh</tt>, in the <tt>BG_RANK_IN_PSET</tt> variable:

Revision as of 16:13, 28 April 2009

KTAU | Top


How to obtain a CN node number

This depends on what number one is interested in.

Pset rank

A pset rank is a number identifying a compute node within each pset (an I/O node and the compute nodes that communicate with it). Pset rank is used as the last octet in the IP address on the tree network connecting the compute nodes and the I/O nodes (x in 192.168.1.x).

The pset rank is available on the compute nodes from /proc/personality.sh, in the BG_RANK_IN_PSET variable:

#!/bin/sh

. /proc/personality.sh

echo "My pset rank is $BG_RANK_IN_PSET"

From a C program it will be easier to use the binary personality available from /proc/personality. The definition of the structure can be found in /bgsys/drivers/ppcfloor/arch/include/common/bgp_personality.h. The pset rank is in Network_Config.RankInPSet:

#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <common/bgp_personality.h>

int main(void)
{
    _BGP_Personality_t personality;
    int fd;

    if ((fd = open("/proc/personality", O_RDONLY)) == -1)
    {
        perror("open");
        return 1;
    }
    if (read(fd, &personality, sizeof(personality)) != sizeof(personality))
    {
        perror("read");
        close(fd);
        return 1;
    }
    close(fd);

    printf("My pset rank is %d\n", personality.Network_Config.RankInPSet);

    return 0;
}

(compile the above with -I/bgsys/drivers/ppcfloor/arch/include)

How to find the MPI rank from a shell script

How to open a socket from a CN to the outside world

ZOID provides IP packet forwarding between the compute nodes and the I/O nodes. However, because the compute nodes use non-routable IP addresses (192.168.1.x), they cannot communicate directly with the outside world.

The most transparent solution to this problem is to perform network address translation (NAT) on the I/O nodes using the Linux kernel netfilter infrastructure. We used to enable this by default, but experiments have shown it to have a detrimental effect on the overall performance of the TCP/IP stack on the I/O nodes, slowing down access to the network filesystems.

To enable the translation, pass ZOID_NAT_ENABLE environment variable when submitting a job. An administrator can also enable this option permanently in the config file.

How to obtain a Cobalt job ID

Cobalt passes the job id to the application processes launched on the compute nodes using the COBALT_JOBID environment variable.

This variable is also accessible from the user script running on the I/O nodes, using the ZOID_JOB_ENV variable:

COBALT_JOBID=`echo $ZOID_JOB_ENV | sed 's/^.*COBALT_JOBID=\([^:]*\)/\1/'`

KTAU | Top