From dce3b283af0f288b1877aa33de4e65f1679fbbcb Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 29 Jun 2004 21:17:46 +0000 Subject: [PATCH] Clean up the old name server location, modify proc_info to point to the new location. This commit was SVN r1507. --- src/ns/name_server.c | 72 ----------------------------------- src/ns/name_server.h | 90 -------------------------------------------- src/util/proc_info.h | 2 +- 3 files changed, 1 insertion(+), 163 deletions(-) delete mode 100644 src/ns/name_server.c delete mode 100644 src/ns/name_server.h diff --git a/src/ns/name_server.c b/src/ns/name_server.c deleted file mode 100644 index a4d9f9fb75..0000000000 --- a/src/ns/name_server.c +++ /dev/null @@ -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); -} - diff --git a/src/ns/name_server.h b/src/ns/name_server.h deleted file mode 100644 index 2d3c12d30a..0000000000 --- a/src/ns/name_server.h +++ /dev/null @@ -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 -#include - - -#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); diff --git a/src/util/proc_info.h b/src/util/proc_info.h index e62b283b86..c92f099a17 100644 --- a/src/util/proc_info.h +++ b/src/util/proc_info.h @@ -12,7 +12,7 @@ #include #include -#include "ns/name_server.h" +#include "mca/ns/ns.h" /** * Process information structure