1
1

Add a function to convert the name to a character string. Still need to add the oob interface functions so the name server can be reached from anywhere.

This commit was SVN r1303.
Этот коммит содержится в:
Ralph Castain 2004-06-16 04:38:36 +00:00
родитель e648b8573f
Коммит 46cba0e1f8
2 изменённых файлов: 26 добавлений и 0 удалений

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

@ -59,3 +59,14 @@ int ompi_process_name_free_range(ompi_process_name_t name, ompi_process_name_t r
{
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);
}

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

@ -73,3 +73,18 @@ int ompi_process_name_free(ompi_process_name_t name);
*/
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);