Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

atollrun.h File Reference

Header file for the PALMS Atollrun Environment. More...

#include "atoll.h"
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <exception>

Include dependency graph for atollrun.h:

Include dependency graph

Go to the source code of this file.

Data Structures

class  Atollrun
class  AtollrunException

Defines

#define ATOLLRUN_INIT_SUCCESS   0
#define ATOLLRUN_INIT_ERROR   -1
#define ATOLLPORT(rank)   Atollrun_getPort(rank)
#define ATOLLHANDLE(rank)   Atollrun_getHandle(rank)

Functions

int Atollrun_Init (int *pArgc, char **pArgv[])
void Atollrun_setEstablishConnectionsOnInit (int pAutoSetup)
void Atollrun_setPerformConnectionTestOnInit (int pSelfTest)
void Atollrun_setAcquirePortOnSingle (int pAcquireOnSingle)
int Atollrun_getCommRank ()
int Atollrun_getCommSize ()
port_id Atollrun_getPort (int pRank)
atoll_handle Atollrun_getHandle (int pRank)


Detailed Description

Header file for the PALMS Atollrun Environment.

See also main

Author:
Holger Sattel
Date:
2004-02-16

Definition in file atollrun.h.


Define Documentation

#define ATOLLHANDLE rank   )     Atollrun_getHandle(rank)
 

shortcut macro for function Atollrun_getHandle()

Definition at line 212 of file atollrun.h.

#define ATOLLPORT rank   )     Atollrun_getPort(rank)
 

shortcut macro for function Atollrun_getPort()

Definition at line 209 of file atollrun.h.

#define ATOLLRUN_INIT_ERROR   -1
 

symbolic constant indicating the failure of the init function

Definition at line 206 of file atollrun.h.

#define ATOLLRUN_INIT_SUCCESS   0
 

symbolic constant indicating the success of the init function

Definition at line 203 of file atollrun.h.


Function Documentation

int Atollrun_getCommRank  ) 
 

Return my rank. It's similar to MPI_Comm_Rank() of MPI. Note: If calling this function before Atollrun_Init() or after a failed Atollrun_Init(), it prints a message to stderr and exits the program !!!

Returns:
my rank in the current process group

int Atollrun_getCommSize  ) 
 

Return the size of the current process group. It's similar to MPI_Comm_Size() of MPI. Note: If calling this function before Atollrun_Init() or after a failed Atollrun_Init(), it prints a message to stderr and exits the program !!!

Returns:
the size of the current process group

atoll_handle Atollrun_getHandle int  pRank  ) 
 

Return the ATOLL handle for communicating to a certain Rank ID Note: If calling this function before Atollrun_Init() or after a failed Atollrun_Init() or with an illegal rank as argument, it prints a message to stderr and exits the program !!!

Parameters:
pRank the rank to resolve the ATOLL handle for
Returns:
the ATOLL handle of the Rank ID pRank

port_id Atollrun_getPort int  pRank  ) 
 

Return the ATOLL port of a certain Rank ID Note: If calling this function before Atollrun_Init() or after a failed Atollrun_Init() or with an illegal rank as argument, it prints a message to stderr and exits the program !!!

Parameters:
pRank the rank to resolve the ATOLL port for
Returns:
the ATOLL port of the Rank ID pRank

int Atollrun_Init int *  pArgc,
char **  pArgv[]
 

Initializes the network by communicating with 'atollrun.py'. It's similar to MPI_Init() of MPI. NOTE: It's essential that the user program did not write anything to the console before this function !!!

Parameters:
pArgc pointer to the argument counter
pArgv pointer to the argument vector
Returns:
the result of the initialization routine
Return values:
ATOLLRUN_INIT_SUCCESS success
ATOLLRUN_INIT_ERROR failure

void Atollrun_setAcquirePortOnSingle int  pAcquireOnSingle  ) 
 

This function sets a flag for the Atollrun_Init() method. When set to true, on initialization the method opens a ATOLL port even when the current process is the only one and having nobody to communicate to. This flag only makes sense when setting it before calling Atollrun_Init()

Parameters:
pAcquireOnSingle flag indicating if the Atollrun_Init() method will open an ATOLL port when the process is alone (0 = false, else true)

void Atollrun_setEstablishConnectionsOnInit int  pAutoSetup  ) 
 

This function sets a flag for the Atollrun_Init() method. When set to true, on initialization Atollrun_Init() establishes connections to all peers and performs a little communication test. If set to false, on initialization Atollrun_Init() will only open an ATOLL port, but nothing more. Settings this flag to false implies Atollrun_setPerformConnectionTestOnInit(false). This flag only makes sense when setting it before calling Atollrun_Init()

Parameters:
pAutoSetup flag indicating if the Atollrun_Init() method will establish connections and perform a test (0 = false, else true)

void Atollrun_setPerformConnectionTestOnInit int  pSelfTest  ) 
 

This functions sets a flag for the Atollrun_Init() method. When set to true, on initialization Atollrun_Init() performs a little connections test after establishing the connections. If set to false, on initialization Atollrun_Init() will not test the communication between the ports. Setting this flag to true implies Atollrun_setEstablishConnectionsOnInit(true). This flag only makes sense when setting it before calling Atollrun_Init()

Parameters:
pSelfTest flag indicating if the Atollrun_Init() method will perform a selftest (0 = false, else true)


Generated on Mon Feb 16 12:46:17 2004 for Atollrun by doxygen 1.3.5