1
1

* make orte_process_name_t be of fixed size (rather than depending on the size of

size_t).  This should be the last piece of the puzzle required to get 32/64
  interoperability working for ORTE.

This commit was SVN r9476.
Этот коммит содержится в:
Brian Barrett 2006-03-30 14:59:41 +00:00
родитель 6be35fb604
Коммит e0eb9a19e7
5 изменённых файлов: 25 добавлений и 46 удалений

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

@ -128,7 +128,7 @@ int orte_ns_base_pack_cellid(orte_buffer_t *buffer, void *src,
/* Turn around and pack the real type */
if (ORTE_SUCCESS != (
ret = orte_dss_pack_buffer(buffer, src, num_vals, DSS_TYPE_SIZE_T))) {
ret = orte_dss_pack_buffer(buffer, src, num_vals, ORTE_UINT32))) {
ORTE_ERROR_LOG(ret);
}
@ -145,7 +145,7 @@ int orte_ns_base_pack_jobid(orte_buffer_t *buffer, void *src,
/* Turn around and pack the real type */
if (ORTE_SUCCESS != (
ret = orte_dss_pack_buffer(buffer, src, num_vals, DSS_TYPE_SIZE_T))) {
ret = orte_dss_pack_buffer(buffer, src, num_vals, ORTE_UINT32))) {
ORTE_ERROR_LOG(ret);
}
@ -162,7 +162,7 @@ int orte_ns_base_pack_vpid(orte_buffer_t *buffer, void *src,
/* Turn around and pack the real type */
if (ORTE_SUCCESS != (
ret = orte_dss_pack_buffer(buffer, src, num_vals, DSS_TYPE_SIZE_T))) {
ret = orte_dss_pack_buffer(buffer, src, num_vals, ORTE_UINT32))) {
ORTE_ERROR_LOG(ret);
}

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

@ -124,7 +124,7 @@ int orte_ns_base_unpack_cellid(orte_buffer_t *buffer, void *dest,
/* Turn around and unpack the real type */
if (ORTE_SUCCESS != (
ret = orte_dss_unpack_buffer(buffer, dest, num_vals, DSS_TYPE_SIZE_T))) {
ret = orte_dss_unpack_buffer(buffer, dest, num_vals, ORTE_UINT32))) {
ORTE_ERROR_LOG(ret);
}
@ -141,7 +141,7 @@ int orte_ns_base_unpack_jobid(orte_buffer_t *buffer, void *dest,
/* Turn around and unpack the real type */
if (ORTE_SUCCESS != (
ret = orte_dss_unpack_buffer(buffer, dest, num_vals, DSS_TYPE_SIZE_T))) {
ret = orte_dss_unpack_buffer(buffer, dest, num_vals, ORTE_UINT32))) {
ORTE_ERROR_LOG(ret);
}
@ -158,7 +158,7 @@ int orte_ns_base_unpack_vpid(orte_buffer_t *buffer, void *dest,
/* Turn around and unpack the real type */
if (ORTE_SUCCESS != (
ret = orte_dss_unpack_buffer(buffer, dest, num_vals, DSS_TYPE_SIZE_T))) {
ret = orte_dss_unpack_buffer(buffer, dest, num_vals, ORTE_UINT32))) {
ORTE_ERROR_LOG(ret);
}

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

@ -43,9 +43,9 @@
#include "opal/class/opal_list.h"
#define ORTE_NAME_ARGS(n) \
(unsigned long) ((NULL == n) ? -1 : (ssize_t)(n)->cellid), \
(unsigned long) ((NULL == n) ? -1 : (ssize_t)(n)->jobid), \
(unsigned long) ((NULL == n) ? -1 : (ssize_t)(n)->vpid)
(unsigned long) ((NULL == n) ? -1 : (int32_t)(n)->cellid), \
(unsigned long) ((NULL == n) ? -1 : (int32_t)(n)->jobid), \
(unsigned long) ((NULL == n) ? -1 : (int32_t)(n)->vpid)
/*
@ -61,9 +61,9 @@
/*
* define maximum value for id's in any field
*/
#define ORTE_CELLID_MAX SIZE_MAX
#define ORTE_JOBID_MAX SIZE_MAX
#define ORTE_VPID_MAX SIZE_MAX
#define ORTE_CELLID_MAX (1 << 31)
#define ORTE_JOBID_MAX (1 << 31)
#define ORTE_VPID_MAX (1 << 31)
/*
* general typedefs & structures
@ -73,9 +73,9 @@
* NOTE: Be sure to update the ORTE_NAME_ARGS #define (above) and all
* uses of it if these types change to be larger than (unsigned long)!
*/
typedef size_t orte_jobid_t;
typedef size_t orte_cellid_t;
typedef size_t orte_vpid_t;
typedef uint32_t orte_jobid_t;
typedef uint32_t orte_cellid_t;
typedef uint32_t orte_vpid_t;
typedef uint8_t orte_ns_cmp_bitmask_t; /**< Bit mask for comparing process names */
typedef uint8_t orte_ns_cmd_flag_t;
@ -89,30 +89,6 @@ typedef struct orte_process_name_t orte_process_name_t;
extern orte_process_name_t orte_name_all;
#define ORTE_NAME_ALL &orte_name_all
#if SIZEOF_SIZE_T == 8
/**
* Convert process name from host to network byte order.
*
* @param name
*/
#define OMPI_PROCESS_NAME_HTON(n) \
n.cellid = hton64(n.cellid); \
n.jobid = hton64(n.jobid); \
n.vpid = hton64(n.vpid);
/**
* Convert process name from network to host byte order.
*
* @param name
*/
#define OMPI_PROCESS_NAME_NTOH(n) \
n.cellid = ntoh64(n.cellid); \
n.jobid = ntoh64(n.jobid); \
n.vpid = ntoh64(n.vpid);
#else
/**
* Convert process name from host to network byte order.
*
@ -133,8 +109,6 @@ extern orte_process_name_t orte_name_all;
n.jobid = ntohl(n.jobid); \
n.vpid = ntohl(n.vpid);
#endif
/** List of names for general use
*/

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

@ -155,7 +155,8 @@ int orte_ns_proxy_get_cell_info(orte_cellid_t cellid,
orte_buffer_t* cmd;
orte_buffer_t* answer;
orte_ns_cmd_flag_t command;
size_t i, j, count, index;
orte_cellid_t j;
size_t i, count, index;
orte_ns_proxy_cell_info_t **cell, *new_cell;
int rc, ret=ORTE_SUCCESS;
@ -819,7 +820,8 @@ int orte_ns_proxy_dump_cells(int output_id)
orte_buffer_t cmd;
orte_buffer_t answer;
orte_ns_cmd_flag_t command;
size_t i, j;
size_t i;
orte_cellid_t j;
orte_ns_proxy_cell_info_t **ptr;
int rc;

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

@ -86,7 +86,8 @@ int orte_ns_replica_create_cellid(orte_cellid_t *cellid, char *site, char *resou
int orte_ns_replica_get_cell_info(orte_cellid_t cellid,
char **site, char **resource)
{
size_t i, j;
size_t i;
orte_cellid_t j;
orte_ns_replica_cell_tracker_t **cell;
OPAL_THREAD_LOCK(&orte_ns_replica.mutex);
@ -272,7 +273,8 @@ int orte_ns_replica_dump_cells(int output_id)
int orte_ns_replica_dump_cells_fn(orte_buffer_t *buffer)
{
size_t i, j;
size_t i;
orte_cellid_t j;
orte_ns_replica_cell_tracker_t **cell;
char tmp_out[NS_REPLICA_MAX_STRING_SIZE], *tmp;
int rc;
@ -338,7 +340,8 @@ int orte_ns_replica_dump_jobs(int output_id)
int orte_ns_replica_dump_jobs_fn(orte_buffer_t *buffer)
{
size_t i, j;
size_t i;
orte_cellid_t j;
orte_ns_replica_jobid_tracker_t **ptr;
char tmp_out[NS_REPLICA_MAX_STRING_SIZE], *tmp;
int rc;