Files | |
file | score_kvs.h |
int | score_get_nhosts (void) |
int | score_get_hostno (void) |
int | score_get_nprocs (void) |
int | score_get_procno (void) |
int | score_get_nnodes (void) |
int | score_get_nodeno (void) |
int | scoreboard_get_value (const char *name, const char *attr, char **valp) |
int | scorekvs_hostinfo (int node, char **hostname, int *nprocs) |
int | score_barrier (void) |
int | scorekvs_get (const char *key, char **valp) |
int | scorekvs_put (const char *key, const char *value) |
int | scorekvs_get_first (char **key, char **value) |
int | scorekvs_get_next (char **key, char **value) |
SCore KVS (Key Value Space) provides the enough information for cluster computation of a parallel program. User program can get the information of how a cluster is configured and the information of hosts where the program is running. The content of the scorehosts.db(5) file is also vailable via SCore KVS.
int score_barrier | ( | void | ) |
The score_barrier() function synchronizes all nodes. When the SCore KVS is updated by calling the scorekvs_put() or scorekvs_remove() function, the change will not be accesible until calling this score_barrier() function.
int score_get_hostno | ( | void | ) |
Returns the host number where a process of user program is running.
int score_get_nhosts | ( | void | ) |
Returns the number of hosts where the user program is running.
int score_get_nnodes | ( | void | ) |
Returns the total number of processes.
int score_get_nodeno | ( | void | ) |
Returns the process number in the total number of processes running with the calling program.
int score_get_nprocs | ( | void | ) |
Returns the number of processes on the host where the process of user program is running.
int score_get_procno | ( | void | ) |
Returns the process number of the calling process on the host where the process of user program is running.
int scoreboard_get_value | ( | const char * | name, | |
const char * | attr, | |||
char ** | valp | |||
) |
Acessing the content of the scorehosts.db(5) file. The output valp is a malloc()ed string. When the accessing attribute has multiple values, then the output is the comma (,) separated string.
[in] | name | record name |
[in] | name | of attribute of the record |
[out] | value(s) | associated with the key |
int scorekvs_get | ( | const char * | key, | |
char ** | valp | |||
) |
Obtaining the KVS value associated with the specified key.
[in] | key | specifying the key of KVS |
[out] | values | associated with the key (malloc()ed string) |
int scorekvs_get_first | ( | char ** | key, | |
char ** | value | |||
) |
This function is used first time to get all the information int the KVS. The rest of the information must be obtained by calling the scorekvs_get_next() function.
[out] | key | malloc()ed string of the key |
[out] | value | malloc()ed string of the value |
int scorekvs_get_next | ( | char ** | key, | |
char ** | value | |||
) |
This function is to extract rest of the information in the KVS. The very first extraction must be done by calling the scorekvs_get_first() function.
[out] | key | malloc()ed string of the key |
[out] | value | malloc()ed string of the value |
int scorekvs_hostinfo | ( | int | node, | |
char ** | hostname, | |||
int * | nprocs | |||
) |
Obtaining the hostname and the number of processes on the specified host.
[in] | node | the node number (process number) |
[out] | hostname | hostname (malloc()ed string) |
[out] | nprocs | the number of processes on the host |
int scorekvs_put | ( | const char * | key, | |
const char * | value | |||
) |
Adding the key and value pair into the KVS. To reflect the result of calling this function, the score_barrier() function must be called.
[in] | key | |
[in] | value |