1
1

Clean up the old name server location, modify proc_info to point to the new location.

This commit was SVN r1507.
Этот коммит содержится в:
Ralph Castain 2004-06-29 21:17:46 +00:00
родитель 066063fcef
Коммит dce3b283af
3 изменённых файлов: 1 добавлений и 163 удалений

Просмотреть файл

@ -1,72 +0,0 @@
/*
* $HEADER$
*/
/** @file:
*
* The Open MPI Name Server
*
* The Open MPI Name Server provides unique name ranges for processes within the
* universe. Each universe will have one name server running within the seed daemon.
* This is done to prevent the inadvertent duplication of names.
*
*/
/*
* includes
*/
#include "ompi_config.h"
#include "include/constants.h"
#include "ns/name_server.h"
/*
* defines
*/
#define OMPI_SUCCESS 1
/**
* globals
*/
ompi_process_name_t ompi_name_service = 0;
ompi_process_name_t OMPI_NAME_SERVICE_MAX = 0xffffffffffffffff;
ompi_process_name_t ompi_process_name_new(void)
{
if (OMPI_NAME_SERVICE_MAX > ompi_name_service) {
ompi_name_service = ompi_name_service + 1;
return(ompi_name_service);
} else {
return(0);
}
}
ompi_process_name_t ompi_process_name_get_range (ompi_process_name_t range)
{
if ((OMPI_NAME_SERVICE_MAX-range) > ompi_name_service) {
ompi_name_service = ompi_name_service + range;
return(ompi_name_service);
} else {
return(0);
}
}
int ompi_process_name_free(ompi_process_name_t name)
{
return OMPI_SUCCESS;
}
int ompi_process_name_free_range(ompi_process_name_t name, ompi_process_name_t range)
{
return OMPI_SUCCESS;
}
char *ompi_convert_process_name_to_string(ompi_process_name_t name)
{
char * name_string;
uint32_t *name32;
name32 = (uint32_t*) &name;
sprintf(name_string, "%x%x", name32[0], name32[1]);
return(name_string);
}

Просмотреть файл

@ -1,90 +0,0 @@
/*
* $HEADER$
*/
/** @file:
*
* The Open MPI Name Server
*
* The Open MPI Name Server provides unique name ranges for processes within the
* universe. Each universe will have one name server running within the seed daemon.
* This is done to prevent the inadvertent duplication of names.
*
*/
/*
* includes
*/
#include <sys/types.h>
#include <stdint.h>
#include "ompi_config.h"
/*
* typedefs
*/
typedef uint64_t ompi_process_name_t;
/**
* Obtain a single new process name.
* The ompi_process_name_new() function obtains a single new process name.
*
* @return name An ompi_process_name_t value of the name. A value of
* 0 indicates that the name server is out of names.
*/
ompi_process_name_t ompi_process_name_new(void);
/**
* Obtain a range of process names.
* The ompi_process_name_get_range() function requests reservation of a range of
* names.
*
* @return name An ompi_process_name_t value of the name. A value of
* 0 indicates that the name server is out of names.
*/
ompi_process_name_t ompi_process_name_get_range(ompi_process_name_t range);
/**
* Releases a process name.
* The ompi_process_name_free() function will release a name for re-use. At this
* time, this function does nothing!! It will simply return OMPI_SUCCESS. This is
* here solely to reserve the function for further definition.
*
* @param name An ompi_process_name_t value of the name to be released.
* @return OMPI_SUCCESS At this time, this is always returned.
*/
int ompi_process_name_free(ompi_process_name_t name);
/**
* Release a range of process names.
* The ompi_process_name_free_range() function releases a range of names for re-use.
* At this time, this function does nothing!! This is here solely to reserve the
* function for further definition.
*
* @param name An ompi_process_name_t value indicating
* start of the range being freed.
* @param range An ompi_process_name_t value indicating how many names are being released.
*
* @return OMPI_SUCCESS Always returned at this time.
*/
int ompi_process_name_free_range(ompi_process_name_t name, ompi_process_name_t range);
/**
* Convert the process name to a string.
*
* In a number of places within Open MPI (e.g., the General Purpose Registry), it
* is helpful/required that the process name be treated as a string. This function
* converts the name into a string by expressing the name in hex.
*
* @param name The ompi_process_name_t value to be converted.
*
* @return name_string The name converted to a string expressed in hex format.
*
*/
char *ompi_convert_process_name_to_string(ompi_process_name_t name);

Просмотреть файл

@ -12,7 +12,7 @@
#include <stdbool.h>
#include <sys/types.h>
#include "ns/name_server.h"
#include "mca/ns/ns.h"
/**
* Process information structure