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.
Этот коммит содержится в:
родитель
e648b8573f
Коммит
46cba0e1f8
@ -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);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user