1
1

And ORTE is ready for prime-time. All Windows tricks are in:

- use the OPAL functions for PATH and environment variables
- make all headers C++ friendly
- no unamed structures
- no implicit cast.

Plus a full implementation for the orte_wait functions.

This commit was SVN r11347.
Этот коммит содержится в:
George Bosilca 2006-08-23 03:32:36 +00:00
родитель aecdfc80eb
Коммит f52c10d18e
122 изменённых файлов: 1144 добавлений и 650 удалений

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -47,6 +47,7 @@
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
struct orte_bitmap_t { struct orte_bitmap_t {
opal_object_t super; /**< Subclass of opal_object_t */ opal_object_t super; /**< Subclass of opal_object_t */
unsigned char *bitmap; /**< The actual bitmap array of characters */ unsigned char *bitmap; /**< The actual bitmap array of characters */
@ -155,7 +156,7 @@ ORTE_DECLSPEC int orte_bitmap_set_all_bits(orte_bitmap_t *bm);
*/ */
static inline int orte_bitmap_size(orte_bitmap_t *bm) static inline int orte_bitmap_size(orte_bitmap_t *bm)
{ {
return (NULL == bm) ? 0 : bm->legal_numbits; return (NULL == bm) ? 0 : (int)bm->legal_numbits;
} }
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -94,7 +94,7 @@ int orte_pointer_array_init(orte_pointer_array_t **array,
(*array)->size = block_size; (*array)->size = block_size;
} }
(*array)->addr = (void *)malloc(num_bytes); (*array)->addr = (void **)malloc(num_bytes);
if (NULL == (*array)->addr) { /* out of memory */ if (NULL == (*array)->addr) { /* out of memory */
OBJ_RELEASE(*array); OBJ_RELEASE(*array);
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
@ -396,7 +396,7 @@ static bool grow_table(orte_pointer_array_t *table)
/* Adjust structure counters and pointers */ /* Adjust structure counters and pointers */
table->number_free += new_size - table->size; table->number_free += new_size - table->size;
table->addr = p; table->addr = (void**)p;
for (i = table->size; i < new_size; ++i) { for (i = table->size; i < new_size; ++i) {
table->addr[i] = NULL; table->addr[i] = NULL;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -39,9 +39,6 @@
extern "C" { extern "C" {
#endif #endif
ORTE_DECLSPEC extern opal_class_t orte_value_array_t_class;
struct orte_value_array_t struct orte_value_array_t
{ {
opal_object_t super; opal_object_t super;
@ -52,7 +49,7 @@ struct orte_value_array_t
}; };
typedef struct orte_value_array_t orte_value_array_t; typedef struct orte_value_array_t orte_value_array_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_value_array_t);
/** /**
* Initialize the array to hold items by value. This routine must * Initialize the array to hold items by value. This routine must

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -61,56 +63,56 @@ int orte_dss_arith(orte_data_value_t *value, orte_data_value_t *operand, orte_ds
switch(operand->type) { switch(operand->type) {
case ORTE_INT: case ORTE_INT:
orte_dss_arith_int(value->data, operand->data, operation); orte_dss_arith_int((int*)value->data, (int*)operand->data, operation);
break; break;
case ORTE_UINT: case ORTE_UINT:
orte_dss_arith_uint(value->data, operand->data, operation); orte_dss_arith_uint((uint*)value->data, (uint*)operand->data, operation);
break; break;
case ORTE_SIZE: case ORTE_SIZE:
orte_dss_arith_size(value->data, operand->data, operation); orte_dss_arith_size((size_t*)value->data, (size_t*)operand->data, operation);
break; break;
case ORTE_PID: case ORTE_PID:
orte_dss_arith_pid(value->data, operand->data, operation); orte_dss_arith_pid((pid_t*)value->data, (pid_t*)operand->data, operation);
break; break;
case ORTE_BYTE: case ORTE_BYTE:
case ORTE_UINT8: case ORTE_UINT8:
orte_dss_arith_byte(value->data, operand->data, operation); orte_dss_arith_byte((uint8_t*)value->data, (uint8_t*)operand->data, operation);
break; break;
case ORTE_INT8: case ORTE_INT8:
orte_dss_arith_int8(value->data, operand->data, operation); orte_dss_arith_int8((int8_t*)value->data, (int8_t*)operand->data, operation);
break; break;
case ORTE_INT16: case ORTE_INT16:
orte_dss_arith_int16(value->data, operand->data, operation); orte_dss_arith_int16((int16_t*)value->data, (int16_t*)operand->data, operation);
break; break;
case ORTE_UINT16: case ORTE_UINT16:
orte_dss_arith_uint16(value->data, operand->data, operation); orte_dss_arith_uint16((uint16_t*)value->data, (uint16_t*)operand->data, operation);
break; break;
case ORTE_INT32: case ORTE_INT32:
orte_dss_arith_int32(value->data, operand->data, operation); orte_dss_arith_int32((int32_t*)value->data, (int32_t*)operand->data, operation);
break; break;
case ORTE_UINT32: case ORTE_UINT32:
orte_dss_arith_uint32(value->data, operand->data, operation); orte_dss_arith_uint32((uint32_t*)value->data, (uint32_t*)operand->data, operation);
break; break;
case ORTE_INT64: case ORTE_INT64:
orte_dss_arith_int64(value->data, operand->data, operation); orte_dss_arith_int64((int64_t*)value->data, (int64_t*)operand->data, operation);
break; break;
case ORTE_UINT64: case ORTE_UINT64:
orte_dss_arith_uint64(value->data, operand->data, operation); orte_dss_arith_uint64((uint64_t*)value->data, (uint64_t*)operand->data, operation);
break; break;
case ORTE_STD_CNTR: case ORTE_STD_CNTR:
orte_dss_arith_std_cntr(value->data, operand->data, operation); orte_dss_arith_std_cntr((orte_std_cntr_t*)value->data, (orte_std_cntr_t*)operand->data, operation);
break; break;
default: default:
@ -149,78 +151,78 @@ int orte_dss_increment(orte_data_value_t *value)
switch(value->type) { switch(value->type) {
case ORTE_INT: case ORTE_INT:
one = 1; one = 1;
orte_dss_arith_int(value->data, &one, ORTE_DSS_ADD); orte_dss_arith_int((int*)value->data, &one, ORTE_DSS_ADD);
break; break;
case ORTE_UINT: case ORTE_UINT:
uone = 1; uone = 1;
orte_dss_arith_uint(value->data, &uone, ORTE_DSS_ADD); orte_dss_arith_uint((uint*)value->data, &uone, ORTE_DSS_ADD);
break; break;
case ORTE_SIZE: case ORTE_SIZE:
sone = 1; sone = 1;
orte_dss_arith_size(value->data, &sone, ORTE_DSS_ADD); orte_dss_arith_size((size_t*)value->data, &sone, ORTE_DSS_ADD);
break; break;
case ORTE_PID: case ORTE_PID:
pone = 1; pone = 1;
orte_dss_arith_pid(value->data, &pone, ORTE_DSS_ADD); orte_dss_arith_pid((pid_t*)value->data, &pone, ORTE_DSS_ADD);
break; break;
case ORTE_BYTE: case ORTE_BYTE:
case ORTE_UINT8: case ORTE_UINT8:
u8one = 1; u8one = 1;
orte_dss_arith_byte(value->data, &u8one, ORTE_DSS_ADD); orte_dss_arith_byte((uint8_t*)value->data, &u8one, ORTE_DSS_ADD);
break; break;
case ORTE_INT8: case ORTE_INT8:
i8one = 1; i8one = 1;
orte_dss_arith_int8(value->data, &i8one, ORTE_DSS_ADD); orte_dss_arith_int8((int8_t*)value->data, &i8one, ORTE_DSS_ADD);
break; break;
case ORTE_INT16: case ORTE_INT16:
i16one = 1; i16one = 1;
orte_dss_arith_int16(value->data, &i16one, ORTE_DSS_ADD); orte_dss_arith_int16((int16_t*)value->data, &i16one, ORTE_DSS_ADD);
break; break;
case ORTE_UINT16: case ORTE_UINT16:
u16one = 1; u16one = 1;
orte_dss_arith_uint16(value->data, &u16one, ORTE_DSS_ADD); orte_dss_arith_uint16((uint16_t*)value->data, &u16one, ORTE_DSS_ADD);
break; break;
case ORTE_INT32: case ORTE_INT32:
i32one = 1; i32one = 1;
orte_dss_arith_int32(value->data, &i32one, ORTE_DSS_ADD); orte_dss_arith_int32((int32_t*)value->data, &i32one, ORTE_DSS_ADD);
break; break;
case ORTE_UINT32: case ORTE_UINT32:
u32one = 1; u32one = 1;
orte_dss_arith_uint32(value->data, &u32one, ORTE_DSS_ADD); orte_dss_arith_uint32((uint32_t*)value->data, &u32one, ORTE_DSS_ADD);
break; break;
case ORTE_INT64: case ORTE_INT64:
i64one = 1; i64one = 1;
orte_dss_arith_int64(value->data, &i64one, ORTE_DSS_ADD); orte_dss_arith_int64((int64_t*)value->data, &i64one, ORTE_DSS_ADD);
break; break;
case ORTE_UINT64: case ORTE_UINT64:
u64one = 1; u64one = 1;
orte_dss_arith_uint64(value->data, &u64one, ORTE_DSS_ADD); orte_dss_arith_uint64((uint64_t*)value->data, &u64one, ORTE_DSS_ADD);
break; break;
case ORTE_DAEMON_CMD: case ORTE_DAEMON_CMD:
daemoncmdone = 1; daemoncmdone = 1;
orte_dss_arith_daemon_cmd(value->data, &daemoncmdone, ORTE_DSS_ADD); orte_dss_arith_daemon_cmd((orte_daemon_cmd_flag_t*)value->data, &daemoncmdone, ORTE_DSS_ADD);
break; break;
case ORTE_DATA_TYPE: case ORTE_DATA_TYPE:
datatypeone = 1; datatypeone = 1;
orte_dss_arith_data_type(value->data, &datatypeone, ORTE_DSS_ADD); orte_dss_arith_data_type((orte_data_type_t*)value->data, &datatypeone, ORTE_DSS_ADD);
break; break;
case ORTE_STD_CNTR: case ORTE_STD_CNTR:
stdcntrone = 1; stdcntrone = 1;
orte_dss_arith_std_cntr(value->data, &stdcntrone, ORTE_DSS_ADD); orte_dss_arith_std_cntr((orte_std_cntr_t*)value->data, &stdcntrone, ORTE_DSS_ADD);
break; break;
default: default:
@ -259,78 +261,78 @@ int orte_dss_decrement(orte_data_value_t *value)
switch(value->type) { switch(value->type) {
case ORTE_INT: case ORTE_INT:
one = 1; one = 1;
orte_dss_arith_int(value->data, &one, ORTE_DSS_SUB); orte_dss_arith_int((int*)value->data, &one, ORTE_DSS_SUB);
break; break;
case ORTE_UINT: case ORTE_UINT:
uone = 1; uone = 1;
orte_dss_arith_uint(value->data, &uone, ORTE_DSS_SUB); orte_dss_arith_uint((uint*)value->data, &uone, ORTE_DSS_SUB);
break; break;
case ORTE_SIZE: case ORTE_SIZE:
sone = 1; sone = 1;
orte_dss_arith_size(value->data, &sone, ORTE_DSS_SUB); orte_dss_arith_size((size_t*)value->data, &sone, ORTE_DSS_SUB);
break; break;
case ORTE_PID: case ORTE_PID:
pone = 1; pone = 1;
orte_dss_arith_pid(value->data, &pone, ORTE_DSS_SUB); orte_dss_arith_pid((pid_t*)value->data, &pone, ORTE_DSS_SUB);
break; break;
case ORTE_BYTE: case ORTE_BYTE:
case ORTE_UINT8: case ORTE_UINT8:
u8one = 1; u8one = 1;
orte_dss_arith_byte(value->data, &u8one, ORTE_DSS_SUB); orte_dss_arith_byte((uint8_t*)value->data, &u8one, ORTE_DSS_SUB);
break; break;
case ORTE_INT8: case ORTE_INT8:
i8one = 1; i8one = 1;
orte_dss_arith_int8(value->data, &i8one, ORTE_DSS_SUB); orte_dss_arith_int8((int8_t*)value->data, &i8one, ORTE_DSS_SUB);
break; break;
case ORTE_INT16: case ORTE_INT16:
i16one = 1; i16one = 1;
orte_dss_arith_int16(value->data, &i16one, ORTE_DSS_SUB); orte_dss_arith_int16((int16_t*)value->data, &i16one, ORTE_DSS_SUB);
break; break;
case ORTE_UINT16: case ORTE_UINT16:
u16one = 1; u16one = 1;
orte_dss_arith_uint16(value->data, &u16one, ORTE_DSS_SUB); orte_dss_arith_uint16((uint16_t*)value->data, &u16one, ORTE_DSS_SUB);
break; break;
case ORTE_INT32: case ORTE_INT32:
i32one = 1; i32one = 1;
orte_dss_arith_int32(value->data, &i32one, ORTE_DSS_SUB); orte_dss_arith_int32((int32_t*)value->data, &i32one, ORTE_DSS_SUB);
break; break;
case ORTE_UINT32: case ORTE_UINT32:
u32one = 1; u32one = 1;
orte_dss_arith_uint32(value->data, &u32one, ORTE_DSS_SUB); orte_dss_arith_uint32((uint32_t*)value->data, &u32one, ORTE_DSS_SUB);
break; break;
case ORTE_INT64: case ORTE_INT64:
i64one = 1; i64one = 1;
orte_dss_arith_int64(value->data, &i64one, ORTE_DSS_SUB); orte_dss_arith_int64((int64_t*)value->data, &i64one, ORTE_DSS_SUB);
break; break;
case ORTE_UINT64: case ORTE_UINT64:
u64one = 1; u64one = 1;
orte_dss_arith_uint64(value->data, &u64one, ORTE_DSS_SUB); orte_dss_arith_uint64((uint64_t*)value->data, &u64one, ORTE_DSS_SUB);
break; break;
case ORTE_DAEMON_CMD: case ORTE_DAEMON_CMD:
daemoncmdone = 1; daemoncmdone = 1;
orte_dss_arith_daemon_cmd(value->data, &daemoncmdone, ORTE_DSS_SUB); orte_dss_arith_daemon_cmd((orte_daemon_cmd_flag_t*)value->data, &daemoncmdone, ORTE_DSS_SUB);
break; break;
case ORTE_DATA_TYPE: case ORTE_DATA_TYPE:
datatypeone = 1; datatypeone = 1;
orte_dss_arith_data_type(value->data, &datatypeone, ORTE_DSS_SUB); orte_dss_arith_data_type((orte_data_type_t*)value->data, &datatypeone, ORTE_DSS_SUB);
break; break;
case ORTE_STD_CNTR: case ORTE_STD_CNTR:
stdcntrone = 1; stdcntrone = 1;
orte_dss_arith_std_cntr(value->data, &stdcntrone, ORTE_DSS_SUB); orte_dss_arith_std_cntr((orte_std_cntr_t*)value->data, &stdcntrone, ORTE_DSS_SUB);
break; break;
default: default:

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -40,7 +42,7 @@ int orte_dss_compare(void *value1, void *value2, orte_data_type_t type)
/* Lookup the compare function for this type and call it */ /* Lookup the compare function for this type and call it */
if (!(type < orte_dss_types->size) || if (!(type < orte_dss_types->size) ||
(NULL == (info = orte_pointer_array_get_item(orte_dss_types, type)))) { (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type)))) {
ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE); ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE);
return ORTE_ERR_UNKNOWN_DATA_TYPE; return ORTE_ERR_UNKNOWN_DATA_TYPE;
} }

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -44,7 +46,7 @@ int orte_dss_copy(void **dest, void *src, orte_data_type_t type)
/* Lookup the copy function for this type and call it */ /* Lookup the copy function for this type and call it */
if (!(type < orte_dss_types->size) || if (!(type < orte_dss_types->size) ||
(NULL == (info = orte_pointer_array_get_item(orte_dss_types, type)))) { (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type)))) {
ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE); ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE);
return ORTE_ERR_UNKNOWN_DATA_TYPE; return ORTE_ERR_UNKNOWN_DATA_TYPE;
} }

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -142,7 +142,7 @@ struct orte_dss_type_info_t {
* Convenience typedef * Convenience typedef
*/ */
typedef struct orte_dss_type_info_t orte_dss_type_info_t; typedef struct orte_dss_type_info_t orte_dss_type_info_t;
OBJ_CLASS_DECLARATION(orte_dss_type_info_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_dss_type_info_t);
/* /*
* globals needed within dss * globals needed within dss

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -60,13 +60,13 @@ char* orte_dss_buffer_extend(orte_buffer_t *buffer, size_t bytes_to_add)
pack_offset = ((char*) buffer->pack_ptr) - ((char*) buffer->base_ptr); pack_offset = ((char*) buffer->pack_ptr) - ((char*) buffer->base_ptr);
unpack_offset = ((char*) buffer->unpack_ptr) - unpack_offset = ((char*) buffer->unpack_ptr) -
((char*) buffer->base_ptr); ((char*) buffer->base_ptr);
buffer->base_ptr = realloc(buffer->base_ptr, buffer->base_ptr = (char*)realloc(buffer->base_ptr,
num_pages * orte_dss_page_size); num_pages * orte_dss_page_size);
} else { } else {
pack_offset = 0; pack_offset = 0;
unpack_offset = 0; unpack_offset = 0;
buffer->bytes_used = 0; buffer->bytes_used = 0;
buffer->base_ptr = malloc(num_pages * orte_dss_page_size); buffer->base_ptr = (char*)malloc(num_pages * orte_dss_page_size);
} }
if (NULL == buffer->base_ptr) { if (NULL == buffer->base_ptr) {
@ -113,7 +113,7 @@ int orte_dss_store_data_type(orte_buffer_t *buffer, orte_data_type_t type)
/* Lookup the pack function for the actual orte_data_type type and call it */ /* Lookup the pack function for the actual orte_data_type type and call it */
if (NULL == (info = orte_pointer_array_get_item(orte_dss_types, ORTE_DATA_TYPE_T))) { if (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, ORTE_DATA_TYPE_T))) {
ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE); ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE);
return ORTE_ERR_PACK_FAILURE; return ORTE_ERR_PACK_FAILURE;
} }
@ -133,7 +133,7 @@ int orte_dss_get_data_type(orte_buffer_t *buffer, orte_data_type_t *type)
/* Lookup the unpack function for the actual orte_data_type type and call it */ /* Lookup the unpack function for the actual orte_data_type type and call it */
if (NULL == (info = orte_pointer_array_get_item(orte_dss_types, ORTE_DATA_TYPE_T))) { if (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, ORTE_DATA_TYPE_T))) {
ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE); ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE);
return ORTE_ERR_PACK_FAILURE; return ORTE_ERR_PACK_FAILURE;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -90,7 +90,7 @@ int orte_dss_load(orte_buffer_t *buffer, void *payload,
} }
/* populate the buffer */ /* populate the buffer */
buffer->base_ptr = payload; buffer->base_ptr = (char*)payload;
/* set pack/unpack pointers */ /* set pack/unpack pointers */
buffer->pack_ptr = ((char*)buffer->base_ptr) + bytes_used; buffer->pack_ptr = ((char*)buffer->base_ptr) + bytes_used;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -34,7 +34,7 @@ char *orte_dss_lookup_data_type(orte_data_type_t type)
return NULL; return NULL;
} }
info = orte_pointer_array_get_item(orte_dss_types, type); info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type);
if (NULL != info) { /* type found on list */ if (NULL != info) { /* type found on list */
name = strdup(info->odti_name); name = strdup(info->odti_name);
return name; return name;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -466,7 +466,7 @@ int orte_dss_close(void)
orte_dss_initialized = false; orte_dss_initialized = false;
for (i = 0 ; i < orte_pointer_array_get_size(orte_dss_types) ; ++i) { for (i = 0 ; i < orte_pointer_array_get_size(orte_dss_types) ; ++i) {
orte_dss_type_info_t *info = orte_pointer_array_get_item(orte_dss_types, i); orte_dss_type_info_t *info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, i);
if (NULL != info) { if (NULL != info) {
OBJ_RELEASE(info); OBJ_RELEASE(info);
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -79,7 +79,7 @@ int orte_dss_pack_buffer(orte_buffer_t *buffer, void *src, orte_std_cntr_t num_v
/* Lookup the pack function for this type and call it */ /* Lookup the pack function for this type and call it */
if (NULL == (info = orte_pointer_array_get_item(orte_dss_types, type))) { if (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type))) {
ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE); ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE);
return ORTE_ERR_PACK_FAILURE; return ORTE_ERR_PACK_FAILURE;
} }
@ -396,7 +396,7 @@ int orte_dss_pack_data_value(orte_buffer_t *buffer, void *src, orte_std_cntr_t n
/* Lookup the pack function for this type and call it */ /* Lookup the pack function for this type and call it */
if (NULL == (info = orte_pointer_array_get_item(orte_dss_types, sdv[i]->type))) { if (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, sdv[i]->type))) {
ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE); ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE);
return ORTE_ERR_PACK_FAILURE; return ORTE_ERR_PACK_FAILURE;
} }

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -41,7 +43,7 @@ int orte_dss_print(char **output, char *prefix, void *src, orte_data_type_t type
/* Lookup the print function for this type and call it */ /* Lookup the print function for this type and call it */
if (!(type < orte_dss_types->size) || if (!(type < orte_dss_types->size) ||
(NULL == (info = orte_pointer_array_get_item(orte_dss_types, type)))) { (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type)))) {
ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE); ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE);
return ORTE_ERR_UNKNOWN_DATA_TYPE; return ORTE_ERR_UNKNOWN_DATA_TYPE;
} }
@ -303,8 +305,13 @@ int orte_dss_print_int32(char **output, char *prefix, int32_t *src, orte_data_ty
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
int orte_dss_print_uint64(char **output, char *prefix,
int orte_dss_print_uint64(char **output, char *prefix, uint64_t *src, orte_data_type_t type) #ifdef HAVE_INT64_T
uint64_t *src,
#else
void *src,
#endif /* HAVE_INT64_T */
orte_data_type_t type)
{ {
char *prefx; char *prefx;
@ -318,12 +325,22 @@ int orte_dss_print_uint64(char **output, char *prefix, uint64_t *src, orte_data_
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
#ifdef HAVE_INT64_T
asprintf(output, "%sData type: ORTE_UINT64\tValue: %lu", prefx, (unsigned long) *src); asprintf(output, "%sData type: ORTE_UINT64\tValue: %lu", prefx, (unsigned long) *src);
#else
asprintf(output, "%sData type: ORTE_UINT64\tValue: unsupported", prefx);
#endif /* HAVE_INT64_T */
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
int orte_dss_print_int64(char **output, char *prefix, int64_t *src, orte_data_type_t type) int orte_dss_print_int64(char **output, char *prefix,
#ifdef HAVE_INT64_T
int64_t *src,
#else
void *src,
#endif /* HAVE_INT64_T */
orte_data_type_t type)
{ {
char *prefx; char *prefx;
@ -337,7 +354,11 @@ int orte_dss_print_int64(char **output, char *prefix, int64_t *src, orte_data_ty
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
#ifdef HAVE_INT64_T
asprintf(output, "%sData type: ORTE_INT64\tValue: %ld", prefx, (long) *src); asprintf(output, "%sData type: ORTE_INT64\tValue: %ld", prefx, (long) *src);
#else
asprintf(output, "%sData type: ORTE_INT64\tValue: unsupported", prefx);
#endif /* HAVE_INT64_T */
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -39,7 +41,7 @@ void orte_dss_release(orte_data_value_t *value)
/* Lookup the release function for this type and call it */ /* Lookup the release function for this type and call it */
if (!(value->type < orte_dss_types->size) || if (!(value->type < orte_dss_types->size) ||
(NULL == (info = orte_pointer_array_get_item(orte_dss_types, value->type)))) { (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, value->type)))) {
ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE); ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE);
return; return;
} }
@ -72,7 +74,7 @@ void orte_dss_release_byte_object(orte_data_value_t *value)
{ {
orte_byte_object_t *bo; orte_byte_object_t *bo;
bo = value->data; bo = (orte_byte_object_t*)value->data;
free(bo->bytes); free(bo->bytes);
free(value->data); free(value->data);

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -41,7 +43,7 @@ int orte_dss_size(size_t *size, void *src, orte_data_type_t type)
/* Lookup the size function for this type and call it */ /* Lookup the size function for this type and call it */
if (!(type < orte_dss_types->size) || if (!(type < orte_dss_types->size) ||
(NULL == (info = orte_pointer_array_get_item(orte_dss_types, type)))) { (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type)))) {
ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE); ORTE_ERROR_LOG(ORTE_ERR_UNKNOWN_DATA_TYPE);
return ORTE_ERR_UNKNOWN_DATA_TYPE; return ORTE_ERR_UNKNOWN_DATA_TYPE;
} }

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -49,7 +49,7 @@ typedef struct {
orte_data_type_t type; /* the type of value stored */ orte_data_type_t type; /* the type of value stored */
void *data; void *data;
} orte_data_value_t; } orte_data_value_t;
OBJ_CLASS_DECLARATION(orte_data_value_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_data_value_t);
#define ORTE_DATA_VALUE_EMPTY {{OBJ_CLASS(orte_data_value_t),0}, ORTE_UNDEF, NULL} #define ORTE_DATA_VALUE_EMPTY {{OBJ_CLASS(orte_data_value_t),0}, ORTE_UNDEF, NULL}

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -67,15 +67,15 @@
/* NOTE: do not need to deal with endianness here, as the unpacking of /* NOTE: do not need to deal with endianness here, as the unpacking of
the underling sender-side type will do that for us. Repeat: the the underling sender-side type will do that for us. Repeat: the
data in tmpbuf[] is already in host byte order. */ data in tmpbuf[] is already in host byte order. */
#define UNPACK_SIZE_MISMATCH_FOUND(unpack_type, tmptype, tmpdsstype) \ #define UNPACK_SIZE_MISMATCH_FOUND(unpack_type, tmptype, tmpdsstype) \
do { \ do { \
orte_std_cntr_t i; \ orte_std_cntr_t i; \
tmptype *tmpbuf = malloc(sizeof(tmptype) * *num_vals); \ tmptype *tmpbuf = (tmptype*)malloc(sizeof(tmptype) * (*num_vals)); \
ret = orte_dss_unpack_buffer(buffer, tmpbuf, num_vals, tmpdsstype); \ ret = orte_dss_unpack_buffer(buffer, tmpbuf, num_vals, tmpdsstype); \
for (i = 0 ; i < *num_vals ; ++i) { \ for (i = 0 ; i < *num_vals ; ++i) { \
((unpack_type*) dest)[i] = tmpbuf[i]; \ ((unpack_type*) dest)[i] = (unpack_type)(tmpbuf[i]); \
} \ } \
free(tmpbuf); \ free(tmpbuf); \
} while (0) } while (0)
@ -181,7 +181,7 @@ int orte_dss_unpack_buffer(orte_buffer_t *buffer, void *dst, orte_std_cntr_t *nu
/* Lookup the unpack function for this type and call it */ /* Lookup the unpack function for this type and call it */
if (NULL == (info = orte_pointer_array_get_item(orte_dss_types, type))) { if (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, type))) {
ORTE_ERROR_LOG(ORTE_ERR_UNPACK_FAILURE); ORTE_ERROR_LOG(ORTE_ERR_UNPACK_FAILURE);
return ORTE_ERR_UNPACK_FAILURE; return ORTE_ERR_UNPACK_FAILURE;
} }
@ -499,7 +499,7 @@ int orte_dss_unpack_string(orte_buffer_t *buffer, void *dest,
if (0 == len) { /* zero-length string - unpack the NULL */ if (0 == len) { /* zero-length string - unpack the NULL */
sdest[i] = NULL; sdest[i] = NULL;
} else { } else {
sdest[i] = malloc(len); sdest[i] = (char*)malloc(len);
if (NULL == sdest[i]) { if (NULL == sdest[i]) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
@ -687,7 +687,7 @@ int orte_dss_unpack_data_value(orte_buffer_t *buffer, void *dest, orte_std_cntr_
/* Lookup the unpack function for this type and call it */ /* Lookup the unpack function for this type and call it */
if (NULL == (info = orte_pointer_array_get_item(orte_dss_types, ddv[i]->type))) { if (NULL == (info = (orte_dss_type_info_t*)orte_pointer_array_get_item(orte_dss_types, ddv[i]->type))) {
ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE); ORTE_ERROR_LOG(ORTE_ERR_PACK_FAILURE);
return ORTE_ERR_PACK_FAILURE; return ORTE_ERR_PACK_FAILURE;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -20,6 +20,11 @@
#define ORTE_CONSTANTS_H #define ORTE_CONSTANTS_H
#include "opal/constants.h" #include "opal/constants.h"
#include "orte_config.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
#define ORTE_ERR_BASE OPAL_ERR_MAX #define ORTE_ERR_BASE OPAL_ERR_MAX
@ -93,7 +98,11 @@ enum {
#define ORTE_ERR_MAX (ORTE_ERR_BASE - 100) #define ORTE_ERR_MAX (ORTE_ERR_BASE - 100)
/* include the prototype for the error-to-string converter */ /* include the prototype for the error-to-string converter */
const char * orte_err2str(int errnum); ORTE_DECLSPEC const char* orte_err2str(int errnum);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif /* ORTE_CONSTANTS_H */ #endif /* ORTE_CONSTANTS_H */

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -64,9 +64,6 @@
#include "orte/orte_constants.h" #include "orte/orte_constants.h"
#include "orte/orte_types.h" #include "orte/orte_types.h"
#include "opal/threads/mutex.h"
#include "opal/threads/condition.h"
#include "opal/class/opal_list.h" #include "opal/class/opal_list.h"
#include "orte/dss/dss_types.h" #include "orte/dss/dss_types.h"
@ -120,16 +117,16 @@ typedef uint8_t orte_gpr_cmd_flag_t;
ORTE_DECLSPEC int orte_gpr_base_select(void); ORTE_DECLSPEC int orte_gpr_base_select(void);
ORTE_DECLSPEC int orte_gpr_base_close(void); ORTE_DECLSPEC int orte_gpr_base_close(void);
int orte_gpr_base_create_value(orte_gpr_value_t **value, ORTE_DECLSPEC int orte_gpr_base_create_value(orte_gpr_value_t **value,
orte_gpr_addr_mode_t addr_mode, orte_gpr_addr_mode_t addr_mode,
char *segment, char *segment,
orte_std_cntr_t cnt, /**< Number of keyval objects */ orte_std_cntr_t cnt, /**< Number of keyval objects */
orte_std_cntr_t num_tokens); orte_std_cntr_t num_tokens);
int orte_gpr_base_create_keyval(orte_gpr_keyval_t **keyval, ORTE_DECLSPEC int orte_gpr_base_create_keyval(orte_gpr_keyval_t **keyval,
char *key, char *key,
orte_data_type_t type, orte_data_type_t type,
void *data); void *data);
ORTE_DECLSPEC int orte_gpr_base_put_1(orte_gpr_addr_mode_t addr_mode, ORTE_DECLSPEC int orte_gpr_base_put_1(orte_gpr_addr_mode_t addr_mode,
char *segment, char **tokens, char *segment, char **tokens,

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

@ -1,8 +1,10 @@
/* /*
* Copyright (c) 2004-2005 The Trustees of Indiana University. * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* All rights reserved. * University Research and Technology
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee. * Corporation. All rights reserved.
* All rights reserved. * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved. * University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California. * Copyright (c) 2004-2005 The Regents of the University of California.
@ -227,7 +229,7 @@ int orte_gpr_base_print_gpr_value(char **output, char *prefix, orte_gpr_value_t
asprintf(&pfx, "%s\t", prefx); asprintf(&pfx, "%s\t", prefx);
for (j=0; j < value->cnt; j++) { for (j=0; j < value->cnt; j++) {
if (ORTE_SUCCESS != (rc = orte_gpr_base_print_keyval(&tmp2, pfx, if (ORTE_SUCCESS != (rc = orte_gpr_base_print_keyval(&tmp2, pfx,
(void*)(value->keyvals[j]), ORTE_GPR_KEYVAL))) { (orte_gpr_keyval_t*)(value->keyvals[j]), ORTE_GPR_KEYVAL))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
free(tmp); free(tmp);
free(pfx); free(pfx);
@ -315,7 +317,7 @@ int orte_gpr_base_print_subscription(char **output, char *prefix, orte_gpr_subsc
/* indent another level for values */ /* indent another level for values */
asprintf(&pfx, "%s\t", prefx); asprintf(&pfx, "%s\t", prefx);
for (j=0; j < sub->cnt; j++) { for (j=0; j < sub->cnt; j++) {
if (ORTE_SUCCESS != (rc = orte_gpr_base_print_gpr_value(&tmp2, pfx, (void*)(sub->values[j]), ORTE_GPR_VALUE))) { if (ORTE_SUCCESS != (rc = orte_gpr_base_print_gpr_value(&tmp2, pfx, (orte_gpr_value_t*)(sub->values[j]), ORTE_GPR_VALUE))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
free(tmp); free(tmp);
free(pfx); free(pfx);
@ -392,7 +394,7 @@ int orte_gpr_base_print_trigger(char **output, char *prefix, orte_gpr_trigger_t
/* indent another level for values */ /* indent another level for values */
asprintf(&pfx, "%s\t", prefx); asprintf(&pfx, "%s\t", prefx);
for (j=0; j < trig->cnt; j++) { for (j=0; j < trig->cnt; j++) {
if (ORTE_SUCCESS != (rc = orte_gpr_base_print_gpr_value(&tmp2, pfx, (void*)(trig->values[j]), ORTE_GPR_VALUE))) { if (ORTE_SUCCESS != (rc = orte_gpr_base_print_gpr_value(&tmp2, pfx, (orte_gpr_value_t*)(trig->values[j]), ORTE_GPR_VALUE))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
free(tmp); free(tmp);
free(pfx); free(pfx);
@ -442,7 +444,7 @@ int orte_gpr_base_print_notify_data(char **output, char *prefix, orte_gpr_notify
i < (data->values)->size; i++) { i < (data->values)->size; i++) {
if (NULL != values[i]) { if (NULL != values[i]) {
j++; j++;
if (ORTE_SUCCESS != (rc = orte_gpr_base_print_gpr_value(&tmp2, pfx, (void*)values[i], ORTE_GPR_VALUE))) { if (ORTE_SUCCESS != (rc = orte_gpr_base_print_gpr_value(&tmp2, pfx, (orte_gpr_value_t*)values[i], ORTE_GPR_VALUE))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
free(tmp); free(tmp);
return rc; return rc;
@ -505,7 +507,7 @@ int orte_gpr_base_print_notify_msg(char **output, char *prefix, orte_gpr_notify_
i < (msg->data)->size; i++) { i < (msg->data)->size; i++) {
if (NULL != data[i]) { if (NULL != data[i]) {
j++; j++;
if (ORTE_SUCCESS != (rc = orte_gpr_base_print_notify_data(&tmp2, pfx, (void*)data[i], ORTE_GPR_NOTIFY_DATA))) { if (ORTE_SUCCESS != (rc = orte_gpr_base_print_notify_data(&tmp2, pfx, (orte_gpr_notify_data_t*)data[i], ORTE_GPR_NOTIFY_DATA))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
free(tmp); free(tmp);
return rc; return rc;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -318,7 +318,8 @@ int orte_gpr_base_open(void)
kill_prefix.lds_verbose_level = value; kill_prefix.lds_verbose_level = value;
} }
orte_gpr_base_output = opal_output_open(&kill_prefix); orte_gpr_base_output = opal_output_open(&kill_prefix);
OBJ_DESTRUCT(&kill_prefix);
id = mca_base_param_register_int("gpr", "base", "maxsize", NULL, id = mca_base_param_register_int("gpr", "base", "maxsize", NULL,
ORTE_GPR_ARRAY_MAX_SIZE); ORTE_GPR_ARRAY_MAX_SIZE);
mca_base_param_lookup_int(id, &param); mca_base_param_lookup_int(id, &param);
@ -513,7 +514,6 @@ int orte_gpr_base_open(void)
} }
/* Open up all available components */ /* Open up all available components */
if (ORTE_SUCCESS != if (ORTE_SUCCESS !=
mca_base_components_open("gpr", mca_base_components_open("gpr",
orte_gpr_base_output, orte_gpr_base_output,

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -159,7 +159,7 @@ ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_gpr_value_t);
* Each block of data is associated with a specified callback function and contains * Each block of data is associated with a specified callback function and contains
* data from a single segment, one or more containers with one or more keyvals/container. * data from a single segment, one or more containers with one or more keyvals/container.
*/ */
typedef struct { typedef struct orte_gpr_notify_data_t {
opal_object_t super; /**< Makes this an object */ opal_object_t super; /**< Makes this an object */
char *target; /**< Name of the associated subscripton, if provided */ char *target; /**< Name of the associated subscripton, if provided */
orte_gpr_subscription_id_t id; /**< Number of the associated subscription */ orte_gpr_subscription_id_t id; /**< Number of the associated subscription */

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -21,7 +21,7 @@
#include "orte/mca/gpr/gpr.h" #include "orte/mca/gpr/gpr.h"
#include "orte/orte_constants.h" #include "orte/orte_constants.h"
#include "orte/mca/gpr/null/gpr_null.h"
extern orte_gpr_base_module_t orte_gpr_null_module; extern orte_gpr_base_module_t orte_gpr_null_module;

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -25,6 +25,8 @@
#include "orte/orte_types.h" #include "orte/orte_types.h"
#include "opal/class/opal_object.h" #include "opal/class/opal_object.h"
#include "opal/threads/mutex.h"
#include "opal/threads/condition.h"
#include "orte/class/orte_pointer_array.h" #include "orte/class/orte_pointer_array.h"
#include "orte/dss/dss_types.h" #include "orte/dss/dss_types.h"
#include "orte/util/proc_info.h" #include "orte/util/proc_info.h"
@ -95,7 +97,6 @@ typedef struct {
int compound_cmd_waiting; int compound_cmd_waiting;
} orte_gpr_proxy_globals_t; } orte_gpr_proxy_globals_t;
extern orte_gpr_proxy_globals_t orte_gpr_proxy_globals; extern orte_gpr_proxy_globals_t orte_gpr_proxy_globals;
/* /*
@ -242,6 +243,11 @@ orte_gpr_proxy_enter_trigger(orte_std_cntr_t cnt, orte_gpr_trigger_t **triggers)
int int
orte_gpr_proxy_remove_trigger(orte_gpr_proxy_trigger_t *trig); orte_gpr_proxy_remove_trigger(orte_gpr_proxy_trigger_t *trig);
/*
*
*/
ORTE_MODULE_DECLSPEC extern mca_gpr_base_component_t mca_gpr_proxy_component;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -50,8 +50,6 @@ typedef struct {
orte_data_value_t value; orte_data_value_t value;
} orte_gpr_replica_ival_list_t; } orte_gpr_replica_ival_list_t;
OBJ_CLASS_DECLARATION(orte_gpr_replica_ival_list_t);
/* constructor */ /* constructor */
static void orte_gpr_replica_ival_list_constructor(orte_gpr_replica_ival_list_t* ptr) static void orte_gpr_replica_ival_list_constructor(orte_gpr_replica_ival_list_t* ptr)
{ {
@ -82,8 +80,6 @@ typedef struct {
opal_list_t *ival_list; /* list of ival_list_t of values found by get */ opal_list_t *ival_list; /* list of ival_list_t of values found by get */
} orte_gpr_replica_get_list_t; } orte_gpr_replica_get_list_t;
OBJ_CLASS_DECLARATION(orte_gpr_replica_get_list_t);
/* constructor */ /* constructor */
static void orte_gpr_replica_get_list_constructor(orte_gpr_replica_get_list_t* ptr) static void orte_gpr_replica_get_list_constructor(orte_gpr_replica_get_list_t* ptr)
{ {

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -441,6 +441,8 @@ orte_gpr_base_module_t *orte_gpr_replica_init(bool *allow_multi_user_threads, bo
int orte_gpr_replica_finalize(void); int orte_gpr_replica_finalize(void);
int orte_gpr_replica_module_init(void); int orte_gpr_replica_module_init(void);
ORTE_MODULE_DECLSPEC extern mca_gpr_base_component_t mca_gpr_replica_component;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -66,7 +66,6 @@ ORTE_DECLSPEC int orte_iof_base_close(void);
ORTE_DECLSPEC int orte_iof_base_select(void); ORTE_DECLSPEC int orte_iof_base_select(void);
ORTE_DECLSPEC int orte_iof_base_flush(void); ORTE_DECLSPEC int orte_iof_base_flush(void);
ORTE_DECLSPEC extern orte_iof_base_t orte_iof_base; ORTE_DECLSPEC extern orte_iof_base_t orte_iof_base;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h" #include "orte_config.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -120,7 +138,16 @@ static void orte_iof_base_endpoint_read_handler(int fd, short flags, void *cbdat
OPAL_THREAD_LOCK(&orte_iof_base.iof_lock); OPAL_THREAD_LOCK(&orte_iof_base.iof_lock);
/* read up to the fragment size */ /* read up to the fragment size */
#if !defined(__WINDOWS__)
rc = read(fd, frag->frag_data, sizeof(frag->frag_data)); rc = read(fd, frag->frag_data, sizeof(frag->frag_data));
#else
{
DWORD readed;
HANDLE handle = (HANDLE)_get_osfhandle(fd);
ReadFile(handle, frag->frag_data, sizeof(frag->frag_data), &readed, NULL);
rc = (int)readed;
}
#endif /* !defined(__WINDOWS__) */
if(rc < 0) { if(rc < 0) {
/* non-blocking, retry */ /* non-blocking, retry */
if(errno == EAGAIN || errno == EINTR) { if(errno == EAGAIN || errno == EINTR) {

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef _IOF_BASE_ENDPOINT_ #ifndef _IOF_BASE_ENDPOINT_
#define _IOF_BASE_ENDPOINT_ #define _IOF_BASE_ENDPOINT_
@ -7,6 +25,9 @@
#include "orte/mca/iof/iof.h" #include "orte/mca/iof/iof.h"
#include "orte/mca/iof/base/iof_base_header.h" #include "orte/mca/iof/base/iof_base_header.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/** /**
* Structure store callbacks * Structure store callbacks
@ -19,7 +40,7 @@ struct orte_iof_base_callback_t {
}; };
typedef struct orte_iof_base_callback_t orte_iof_base_callback_t; typedef struct orte_iof_base_callback_t orte_iof_base_callback_t;
OBJ_CLASS_DECLARATION(orte_iof_base_callback_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_iof_base_callback_t);
/** /**
* Structure that represents a published endpoint. * Structure that represents a published endpoint.
@ -40,7 +61,7 @@ struct orte_iof_base_endpoint_t {
}; };
typedef struct orte_iof_base_endpoint_t orte_iof_base_endpoint_t; typedef struct orte_iof_base_endpoint_t orte_iof_base_endpoint_t;
OBJ_CLASS_DECLARATION(orte_iof_base_endpoint_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_iof_base_endpoint_t);
/* /*
* Diff between two sequence numbers allowing for rollover * Diff between two sequence numbers allowing for rollover
@ -59,7 +80,7 @@ OBJ_CLASS_DECLARATION(orte_iof_base_endpoint_t);
* @aram fd Local file descriptor corresponding to endpoint. * @aram fd Local file descriptor corresponding to endpoint.
*/ */
int orte_iof_base_endpoint_create( ORTE_DECLSPEC int orte_iof_base_endpoint_create(
const orte_process_name_t* name, const orte_process_name_t* name,
orte_iof_base_mode_t mode, orte_iof_base_mode_t mode,
int tag, int tag,
@ -73,13 +94,13 @@ int orte_iof_base_endpoint_create(
* @aram cbdata Local file descriptor corresponding to endpoint. * @aram cbdata Local file descriptor corresponding to endpoint.
*/ */
int orte_iof_base_callback_create( ORTE_DECLSPEC int orte_iof_base_callback_create(
const orte_process_name_t *name, const orte_process_name_t *name,
int tag, int tag,
orte_iof_base_callback_fn_t cbfunc, orte_iof_base_callback_fn_t cbfunc,
void* cbdata); void* cbdata);
int orte_iof_base_callback_delete( ORTE_DECLSPEC int orte_iof_base_callback_delete(
const orte_process_name_t *name, const orte_process_name_t *name,
int tag); int tag);
@ -93,7 +114,7 @@ int orte_iof_base_callback_delete(
* @param tag Tag for matching endpoints. * @param tag Tag for matching endpoints.
*/ */
int orte_iof_base_endpoint_delete( ORTE_DECLSPEC int orte_iof_base_endpoint_delete(
const orte_process_name_t* name, const orte_process_name_t* name,
orte_ns_cmp_bitmask_t mask, orte_ns_cmp_bitmask_t mask,
int tag); int tag);
@ -102,7 +123,7 @@ int orte_iof_base_endpoint_delete(
* Disable forwarding through the specified endpoint. * Disable forwarding through the specified endpoint.
*/ */
int orte_iof_base_endpoint_close( ORTE_DECLSPEC int orte_iof_base_endpoint_close(
orte_iof_base_endpoint_t* endpoint); orte_iof_base_endpoint_t* endpoint);
/** /**
@ -110,7 +131,7 @@ int orte_iof_base_endpoint_close(
* process name/mask/tag. * process name/mask/tag.
*/ */
orte_iof_base_endpoint_t* orte_iof_base_endpoint_match( ORTE_DECLSPEC orte_iof_base_endpoint_t* orte_iof_base_endpoint_match(
const orte_process_name_t* dst_name, const orte_process_name_t* dst_name,
orte_ns_cmp_bitmask_t dst_mask, orte_ns_cmp_bitmask_t dst_mask,
int dst_tag); int dst_tag);
@ -119,7 +140,7 @@ orte_iof_base_endpoint_t* orte_iof_base_endpoint_match(
* Forward the specified message out the endpoint. * Forward the specified message out the endpoint.
*/ */
int orte_iof_base_endpoint_forward( ORTE_DECLSPEC int orte_iof_base_endpoint_forward(
orte_iof_base_endpoint_t* endpoint, orte_iof_base_endpoint_t* endpoint,
const orte_process_name_t* src, const orte_process_name_t* src,
orte_iof_base_msg_header_t* hdr, orte_iof_base_msg_header_t* hdr,
@ -129,7 +150,7 @@ int orte_iof_base_endpoint_forward(
* Callback when peer has closed endpoint. * Callback when peer has closed endpoint.
*/ */
void orte_iof_base_endpoint_closed( ORTE_DECLSPEC void orte_iof_base_endpoint_closed(
orte_iof_base_endpoint_t* endpoint); orte_iof_base_endpoint_t* endpoint);
/** /**
@ -137,7 +158,7 @@ void orte_iof_base_endpoint_closed(
* acknowledged. * acknowledged.
*/ */
int orte_iof_base_endpoint_ack( ORTE_DECLSPEC int orte_iof_base_endpoint_ack(
orte_iof_base_endpoint_t* endpoint, orte_iof_base_endpoint_t* endpoint,
uint32_t seq); uint32_t seq);
@ -151,5 +172,9 @@ static inline bool orte_iof_base_endpoint_pending(
return opal_list_get_size(&endpoint->ep_frags) || (endpoint->ep_seq != endpoint->ep_ack); return opal_list_get_size(&endpoint->ep_frags) || (endpoint->ep_seq != endpoint->ep_ack);
} }
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h" #include "orte_config.h"
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
@ -31,18 +49,18 @@ static void orte_iof_base_frag_construct(orte_iof_base_frag_t* frag)
OMPI_DEBUG_ZERO(*frag); OMPI_DEBUG_ZERO(*frag);
frag->frag_owner = NULL; frag->frag_owner = NULL;
frag->frag_len = 0; frag->frag_len = 0;
frag->frag_iov[0].iov_base = (void*)&frag->frag_hdr; frag->frag_iov[0].iov_base = (IOVBASE_TYPE*)&frag->frag_hdr;
frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr); frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr);
frag->frag_iov[1].iov_base = (void*)frag->frag_data; frag->frag_iov[1].iov_base = (IOVBASE_TYPE*)frag->frag_data;
frag->frag_iov[1].iov_len = sizeof(frag->frag_data); frag->frag_iov[1].iov_len = sizeof(frag->frag_data);
} }
static void orte_iof_base_frag_destruct(orte_iof_base_frag_t* frag) static void orte_iof_base_frag_destruct(orte_iof_base_frag_t* frag)
{ {
frag->frag_iov[0].iov_base = (void*)&frag->frag_hdr; frag->frag_iov[0].iov_base = (IOVBASE_TYPE*)&frag->frag_hdr;
frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr); frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr);
frag->frag_iov[1].iov_base = (void*)frag->frag_data; frag->frag_iov[1].iov_base = (IOVBASE_TYPE*)frag->frag_data;
frag->frag_iov[1].iov_len = sizeof(frag->frag_data); frag->frag_iov[1].iov_len = sizeof(frag->frag_data);
} }

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef _IOF_BASE_FRAGMENT_ #ifndef _IOF_BASE_FRAGMENT_
#define _IOF_BASE_FRAGMENT_ #define _IOF_BASE_FRAGMENT_
@ -9,6 +27,9 @@
#include "orte/mca/iof/base/base.h" #include "orte/mca/iof/base/base.h"
#include "orte/mca/iof/base/iof_base_header.h" #include "orte/mca/iof/base/iof_base_header.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/** /**
* Fragment used to hold message header/data. * Fragment used to hold message header/data.
@ -26,7 +47,7 @@ struct orte_iof_base_frag_t {
}; };
typedef struct orte_iof_base_frag_t orte_iof_base_frag_t; typedef struct orte_iof_base_frag_t orte_iof_base_frag_t;
OBJ_CLASS_DECLARATION(orte_iof_base_frag_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_iof_base_frag_t);
/** /**
@ -56,6 +77,9 @@ OBJ_CLASS_DECLARATION(orte_iof_base_frag_t);
#define orte_iof_base_frag_ack(frag) _orte_iof_base_frag_ack(frag,__FILE__,__LINE__) #define orte_iof_base_frag_ack(frag) _orte_iof_base_frag_ack(frag,__FILE__,__LINE__)
int _orte_iof_base_frag_ack(orte_iof_base_frag_t*, const char*, int); int _orte_iof_base_frag_ack(orte_iof_base_frag_t*, const char*, int);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -77,7 +77,7 @@ orte_iof_base_setup_prefork(orte_iof_base_io_conf_t *opts)
#if OMPI_ENABLE_PTY_SUPPORT #if OMPI_ENABLE_PTY_SUPPORT
if (opts->usepty) { if (opts->usepty) {
ret = opal_openpty(&(opts->p_stdout[0]), &(opts->p_stdout[1]), ret = opal_openpty(&(opts->p_stdout[0]), &(opts->p_stdout[1]),
NULL, NULL, NULL); (char*)NULL, (struct termios*)NULL, (struct winsize*)NULL);
} else { } else {
ret = -1; ret = -1;
} }
@ -165,7 +165,7 @@ orte_iof_base_setup_child(orte_iof_base_io_conf_t *opts)
close(opts->p_stdin[0]); close(opts->p_stdin[0]);
/* connect input to /dev/null */ /* connect input to /dev/null */
fd = open("/dev/null", O_RDONLY); fd = open("/dev/null", O_RDONLY, 0);
if(fd > fileno(stdin)) { if(fd > fileno(stdin)) {
dup2(fd, fileno(stdin)); dup2(fd, fileno(stdin));
close(fd); close(fd);
@ -190,7 +190,7 @@ orte_iof_base_setup_parent(const orte_process_name_t* name,
if (! opts->usepty) { if (! opts->usepty) {
close(opts->p_stdout[1]); close(opts->p_stdout[1]);
} }
close(opts->p_stdin[0]); close(opts->p_stdin[0]);
close(opts->p_stderr[1]); close(opts->p_stderr[1]);
/* connect stdin endpoint */ /* connect stdin endpoint */
@ -203,7 +203,7 @@ orte_iof_base_setup_parent(const orte_process_name_t* name,
return ret; return ret;
} }
} else { } else {
close(opts->p_stdin[0]); close(opts->p_stdin[1]);
} }
/* connect read end to IOF */ /* connect read end to IOF */

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -136,9 +136,8 @@ struct orte_iof_null_component_t {
}; };
typedef struct orte_iof_null_component_t orte_iof_null_component_t; typedef struct orte_iof_null_component_t orte_iof_null_component_t;
ORTE_DECLSPEC extern orte_iof_null_component_t mca_iof_null_component; ORTE_MODULE_DECLSPEC extern orte_iof_null_component_t mca_iof_null_component;
ORTE_DECLSPEC extern orte_iof_base_module_t orte_iof_null_module; extern orte_iof_base_module_t orte_iof_null_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -66,7 +66,7 @@ orte_iof_null_component_t mca_iof_null_component = {
orte_iof_null_init orte_iof_null_init
}, },
false, false,
{{NULL, 0}} /*{{NULL, 0}}*/
}; };
static int orte_iof_null_param_register_int( static int orte_iof_null_param_register_int(

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -15,9 +15,12 @@
* *
* $HEADER$ * $HEADER$
*/ */
#include "orte_config.h" #include "orte_config.h"
#include <errno.h> #include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
#endif /* HAVE_UNISTD_H */
#include <string.h> #include <string.h>
#include "orte/orte_constants.h" #include "orte/orte_constants.h"

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -22,11 +22,11 @@
#define ORTE_IOF_PROXY_H #define ORTE_IOF_PROXY_H
#include "orte/mca/iof/iof.h" #include "orte/mca/iof/iof.h"
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif
/** /**
* Publish a local file descriptor as an endpoint that is logically * Publish a local file descriptor as an endpoint that is logically
* associated with the specified process name (e.g. master side of a * associated with the specified process name (e.g. master side of a
@ -136,9 +136,8 @@ struct orte_iof_proxy_component_t {
}; };
typedef struct orte_iof_proxy_component_t orte_iof_proxy_component_t; typedef struct orte_iof_proxy_component_t orte_iof_proxy_component_t;
ORTE_DECLSPEC extern orte_iof_proxy_component_t mca_iof_proxy_component; ORTE_MODULE_DECLSPEC extern orte_iof_proxy_component_t mca_iof_proxy_component;
ORTE_DECLSPEC extern orte_iof_base_module_t orte_iof_proxy_module; extern orte_iof_base_module_t orte_iof_proxy_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -73,7 +73,9 @@ orte_iof_proxy_component_t mca_iof_proxy_component = {
orte_iof_proxy_init orte_iof_proxy_init
}, },
false, false,
{{NULL, 0}} /* {{NULL, 0}} - Let the compiler initialize it so it won't complain on Windows
* where the order of the length and the pointer is different.
*/
}; };
#if 0 #if 0

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h" #include "orte_config.h"
#include "opal/util/output.h" #include "opal/util/output.h"
#include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml.h"
@ -45,7 +63,7 @@ int orte_iof_proxy_svc_publish(
hdr.hdr_pub.pub_tag = tag; hdr.hdr_pub.pub_tag = tag;
ORTE_IOF_BASE_HDR_PUB_NTOH(hdr.hdr_pub); ORTE_IOF_BASE_HDR_PUB_NTOH(hdr.hdr_pub);
iov.iov_base = (void*)&hdr; iov.iov_base = (IOVBASE_TYPE*)&hdr;
iov.iov_len = sizeof(hdr); iov.iov_len = sizeof(hdr);
rc = orte_rml.send( rc = orte_rml.send(
@ -83,7 +101,7 @@ int orte_iof_proxy_svc_unpublish(
hdr.hdr_pub.pub_tag = tag; hdr.hdr_pub.pub_tag = tag;
ORTE_IOF_BASE_HDR_PUB_NTOH(hdr.hdr_pub); ORTE_IOF_BASE_HDR_PUB_NTOH(hdr.hdr_pub);
iov.iov_base = (void*)&hdr; iov.iov_base = (IOVBASE_TYPE*)&hdr;
iov.iov_len = sizeof(hdr); iov.iov_len = sizeof(hdr);
rc = orte_rml.send( rc = orte_rml.send(
@ -128,7 +146,7 @@ int orte_iof_proxy_svc_subscribe(
hdr.hdr_sub.dst_tag = dst_tag; hdr.hdr_sub.dst_tag = dst_tag;
ORTE_IOF_BASE_HDR_SUB_NTOH(hdr.hdr_sub); ORTE_IOF_BASE_HDR_SUB_NTOH(hdr.hdr_sub);
iov.iov_base = (void*)&hdr; iov.iov_base = (IOVBASE_TYPE*)&hdr;
iov.iov_len = sizeof(hdr); iov.iov_len = sizeof(hdr);
rc = orte_rml.send( rc = orte_rml.send(
@ -163,6 +181,8 @@ int orte_iof_proxy_svc_unsubscribe(
int rc; int rc;
hdr.hdr_common.hdr_type = ORTE_IOF_BASE_HDR_UNSUB; hdr.hdr_common.hdr_type = ORTE_IOF_BASE_HDR_UNSUB;
hdr.hdr_common.hdr_reserve = (uint8_t)0;
hdr.hdr_common.hdr_status = (int16_t)0;
hdr.hdr_sub.src_name = *src_name; hdr.hdr_sub.src_name = *src_name;
hdr.hdr_sub.src_mask = src_mask; hdr.hdr_sub.src_mask = src_mask;
hdr.hdr_sub.src_tag = src_tag; hdr.hdr_sub.src_tag = src_tag;
@ -171,7 +191,7 @@ int orte_iof_proxy_svc_unsubscribe(
hdr.hdr_sub.dst_tag = dst_tag; hdr.hdr_sub.dst_tag = dst_tag;
ORTE_IOF_BASE_HDR_SUB_NTOH(hdr.hdr_sub); ORTE_IOF_BASE_HDR_SUB_NTOH(hdr.hdr_sub);
iov.iov_base = (void*)&hdr; iov.iov_base = (IOVBASE_TYPE*)&hdr;
iov.iov_len = sizeof(hdr); iov.iov_len = sizeof(hdr);
rc = orte_rml.send( rc = orte_rml.send(

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -148,10 +148,9 @@ struct orte_iof_svc_component_t {
}; };
typedef struct orte_iof_svc_component_t orte_iof_svc_component_t; typedef struct orte_iof_svc_component_t orte_iof_svc_component_t;
extern orte_iof_svc_component_t mca_iof_svc_component; ORTE_MODULE_DECLSPEC extern orte_iof_svc_component_t mca_iof_svc_component;
extern orte_iof_base_module_t orte_iof_svc_module; extern orte_iof_base_module_t orte_iof_svc_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#include "orte_config.h" #include "orte_config.h"
#include "opal/util/output.h" #include "opal/util/output.h"
#include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml.h"
@ -6,6 +24,7 @@
#include "orte/mca/iof/base/iof_base_endpoint.h" #include "orte/mca/iof/base/iof_base_endpoint.h"
#include "orte/mca/iof/base/iof_base_fragment.h" #include "orte/mca/iof/base/iof_base_fragment.h"
#include "orte/mca/errmgr/errmgr.h" #include "orte/mca/errmgr/errmgr.h"
#include "orte/class/orte_proc_table.h"
#include "iof_svc.h" #include "iof_svc.h"
#include "iof_svc_proxy.h" #include "iof_svc_proxy.h"
#include "iof_svc_pub.h" #include "iof_svc_pub.h"
@ -155,7 +174,7 @@ static void orte_iof_svc_proxy_msg(
frag->frag_hdr.hdr_msg = *hdr; frag->frag_hdr.hdr_msg = *hdr;
frag->frag_hdr.hdr_common.hdr_type = ORTE_IOF_BASE_HDR_ACK; frag->frag_hdr.hdr_common.hdr_type = ORTE_IOF_BASE_HDR_ACK;
frag->frag_iov[0].iov_base = (void*)&frag->frag_hdr; frag->frag_iov[0].iov_base = (IOVBASE_TYPE*)&frag->frag_hdr;
frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr); frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr);
ORTE_IOF_BASE_HDR_MSG_HTON(frag->frag_hdr.hdr_msg); ORTE_IOF_BASE_HDR_MSG_HTON(frag->frag_hdr.hdr_msg);
@ -266,7 +285,7 @@ static void orte_iof_svc_proxy_ack(
} }
frag->frag_hdr.hdr_msg = *hdr; frag->frag_hdr.hdr_msg = *hdr;
frag->frag_iov[0].iov_base = (void*)&frag->frag_hdr; frag->frag_iov[0].iov_base = (IOVBASE_TYPE*)&frag->frag_hdr;
frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr); frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr);
ORTE_IOF_BASE_HDR_MSG_HTON(frag->frag_hdr.hdr_msg); ORTE_IOF_BASE_HDR_MSG_HTON(frag->frag_hdr.hdr_msg);

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

@ -1,3 +1,21 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef ORTE_IOF_SVC_PUBLISH_H #ifndef ORTE_IOF_SVC_PUBLISH_H
#define ORTE_IOF_SVC_PUBLISH_H #define ORTE_IOF_SVC_PUBLISH_H
@ -7,7 +25,9 @@
#include "orte/mca/iof/base/iof_base_endpoint.h" #include "orte/mca/iof/base/iof_base_endpoint.h"
#include "iof_svc.h" #include "iof_svc.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/** /**
* Endpoints that are sinks of data are published by the * Endpoints that are sinks of data are published by the
@ -67,5 +87,9 @@ int orte_iof_svc_pub_delete(
void orte_iof_svc_pub_delete_all( void orte_iof_svc_pub_delete_all(
const orte_process_name_t* name); const orte_process_name_t* name);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -220,9 +220,9 @@ int orte_iof_svc_sub_forward(
ORTE_IOF_BASE_FRAG_ALLOC(frag,rc); ORTE_IOF_BASE_FRAG_ALLOC(frag,rc);
frag->frag_hdr.hdr_msg = *hdr; frag->frag_hdr.hdr_msg = *hdr;
frag->frag_len = frag->frag_hdr.hdr_msg.msg_len; frag->frag_len = frag->frag_hdr.hdr_msg.msg_len;
frag->frag_iov[0].iov_base = (void*)&frag->frag_hdr; frag->frag_iov[0].iov_base = (IOVBASE_TYPE*)&frag->frag_hdr;
frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr); frag->frag_iov[0].iov_len = sizeof(frag->frag_hdr);
frag->frag_iov[1].iov_base = (void*)frag->frag_data; frag->frag_iov[1].iov_base = (IOVBASE_TYPE*)frag->frag_data;
frag->frag_iov[1].iov_len = frag->frag_len; frag->frag_iov[1].iov_len = frag->frag_len;
memcpy(frag->frag_data, data, frag->frag_len); memcpy(frag->frag_data, data, frag->frag_len);
ORTE_IOF_BASE_HDR_MSG_NTOH(frag->frag_hdr.hdr_msg); ORTE_IOF_BASE_HDR_MSG_NTOH(frag->frag_hdr.hdr_msg);

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

@ -1,15 +1,35 @@
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef MCA_IOF_SVC_SUBSCRIPT_H #ifndef MCA_IOF_SVC_SUBSCRIPT_H
#define MCA_IOF_SVC_SUBSCRIPT_H #define MCA_IOF_SVC_SUBSCRIPT_H
#include "orte/class/orte_pointer_array.h"
#include "orte/class/orte_proc_table.h"
/** /**
* A subscription routes data from a specified set * A subscription routes data from a specified set
* of source endpoints to one or more destination * of source endpoints to one or more destination
* endpoints. * endpoints.
*/ */
#include "opal/class/opal_hash_table.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
struct orte_iof_svc_fwd_t { struct orte_iof_svc_fwd_t {
opal_list_item_t super; opal_list_item_t super;
@ -106,5 +126,9 @@ int orte_iof_svc_fwd_delete(
orte_iof_svc_sub_t* sub, orte_iof_svc_sub_t* sub,
orte_iof_svc_pub_t* pub); orte_iof_svc_pub_t* pub);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -43,6 +43,10 @@
#include "opal/types.h" #include "opal/types.h"
#include "opal/class/opal_list.h" #include "opal/class/opal_list.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
#define ORTE_NAME_ARGS(n) \ #define ORTE_NAME_ARGS(n) \
(unsigned long) ((NULL == n) ? -1 : (int32_t)(n)->cellid), \ (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)->jobid), \
@ -87,7 +91,7 @@ typedef struct orte_process_name_t orte_process_name_t;
#define ORTE_JOBID_MAX ORTE_STD_CNTR_MAX #define ORTE_JOBID_MAX ORTE_STD_CNTR_MAX
#define ORTE_VPID_MAX ORTE_STD_CNTR_MAX #define ORTE_VPID_MAX ORTE_STD_CNTR_MAX
extern orte_process_name_t orte_name_all; ORTE_DECLSPEC extern orte_process_name_t orte_name_all;
#define ORTE_NAME_ALL &orte_name_all #define ORTE_NAME_ALL &orte_name_all
/** /**
@ -119,6 +123,10 @@ struct orte_name_services_namelist_t {
}; };
typedef struct orte_name_services_namelist_t orte_name_services_namelist_t; typedef struct orte_name_services_namelist_t orte_name_services_namelist_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_name_services_namelist_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_name_services_namelist_t);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -701,7 +701,7 @@ int orte_ns_proxy_define_data_type(const char *name,
return rc; return rc;
} }
if (ORTE_SUCCESS != (rc = orte_dss.pack(cmd, &name, 1, ORTE_STRING))) { if (ORTE_SUCCESS != (rc = orte_dss.pack(cmd, (void*)&name, 1, ORTE_STRING))) {
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
OBJ_RELEASE(cmd); OBJ_RELEASE(cmd);
OPAL_THREAD_UNLOCK(&orte_ns_proxy.mutex); OPAL_THREAD_UNLOCK(&orte_ns_proxy.mutex);

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -127,7 +127,10 @@ int orte_ns_proxy_dump_tags(void);
int orte_ns_proxy_dump_datatypes(void); int orte_ns_proxy_dump_datatypes(void);
/*
*
*/
ORTE_MODULE_DECLSPEC extern mca_ns_base_component_t mca_ns_proxy_component;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -46,7 +46,6 @@ typedef struct orte_ns_replica_cell_tracker_t orte_ns_replica_cell_tracker_t;
OBJ_CLASS_DECLARATION(orte_ns_replica_cell_tracker_t); OBJ_CLASS_DECLARATION(orte_ns_replica_cell_tracker_t);
/* /*
* object for tracking vpids/jobids * object for tracking vpids/jobids
* This structure is used to track jobid-max vpid pairs. Basically, we * This structure is used to track jobid-max vpid pairs. Basically, we
@ -183,6 +182,11 @@ int orte_ns_replica_define_data_type(const char *name,
int orte_ns_replica_create_my_name(void); int orte_ns_replica_create_my_name(void);
/*
*
*/
ORTE_MODULE_DECLSPEC extern mca_ns_base_component_t mca_ns_replica_component;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -102,7 +102,6 @@ int mca_oob_base_init(void)
mca_base_component_list_item_t *cli; mca_base_component_list_item_t *cli;
mca_oob_base_component_t *component; mca_oob_base_component_t *component;
mca_oob_t *module; mca_oob_t *module;
extern opal_list_t mca_oob_base_components;
mca_oob_t *s_module = NULL; mca_oob_t *s_module = NULL;
int s_priority = -1; int s_priority = -1;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -104,7 +104,7 @@ int mca_oob_recv_packed_nb(
mca_oob_callback_packed_fn_t cbfunc, mca_oob_callback_packed_fn_t cbfunc,
void* cbdata) void* cbdata)
{ {
mca_oob_recv_cbdata_t *oob_cbdata = malloc(sizeof(mca_oob_recv_cbdata_t)); mca_oob_recv_cbdata_t *oob_cbdata = (mca_oob_recv_cbdata_t*)malloc(sizeof(mca_oob_recv_cbdata_t));
int rc; int rc;
if(NULL == oob_cbdata) { if(NULL == oob_cbdata) {
@ -141,7 +141,7 @@ static void mca_oob_recv_callback(
int tag, int tag,
void* cbdata) void* cbdata)
{ {
mca_oob_recv_cbdata_t *oob_cbdata = cbdata; mca_oob_recv_cbdata_t *oob_cbdata = (mca_oob_recv_cbdata_t*)cbdata;
orte_buffer_t buffer; orte_buffer_t buffer;
/* validate status */ /* validate status */

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -72,7 +72,7 @@ int mca_oob_send_packed (orte_process_name_t* peer, orte_buffer_t* buffer, int t
} }
orte_dss.load(buffer, dataptr, datalen); orte_dss.load(buffer, dataptr, datalen);
msg[0].iov_base = dataptr; msg[0].iov_base = (IOVBASE_TYPE*)dataptr;
msg[0].iov_len = datalen; msg[0].iov_len = datalen;
return(mca_oob.oob_send(peer, msg, 1, tag, flags)); return(mca_oob.oob_send(peer, msg, 1, tag, flags));

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -109,13 +109,13 @@ int mca_oob_send_packed_nb(
orte_dss.load(buffer, dataptr, datalen); orte_dss.load(buffer, dataptr, datalen);
/* allocate a struct to pass into callback */ /* allocate a struct to pass into callback */
if(NULL == (oob_cbdata = malloc(sizeof(mca_oob_send_cbdata_t)))) { if(NULL == (oob_cbdata = (mca_oob_send_cbdata_t*)malloc(sizeof(mca_oob_send_cbdata_t)))) {
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
oob_cbdata->cbbuf = buffer; oob_cbdata->cbbuf = buffer;
oob_cbdata->cbfunc = cbfunc; oob_cbdata->cbfunc = cbfunc;
oob_cbdata->cbdata = cbdata; oob_cbdata->cbdata = cbdata;
oob_cbdata->cbiov.iov_base = dataptr; oob_cbdata->cbiov.iov_base = (IOVBASE_TYPE*)dataptr;
oob_cbdata->cbiov.iov_len = datalen; oob_cbdata->cbiov.iov_len = datalen;
/* queue up the request */ /* queue up the request */
@ -147,7 +147,7 @@ static void mca_oob_send_callback(
void* cbdata) void* cbdata)
{ {
/* validate status */ /* validate status */
mca_oob_send_cbdata_t *oob_cbdata = cbdata; mca_oob_send_cbdata_t *oob_cbdata = (mca_oob_send_cbdata_t*)cbdata;
if(status < 0) { if(status < 0) {
oob_cbdata->cbfunc(status, peer, NULL, tag, oob_cbdata->cbdata); oob_cbdata->cbfunc(status, peer, NULL, tag, oob_cbdata->cbdata);
free(oob_cbdata); free(oob_cbdata);

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -275,7 +275,7 @@ typedef struct mca_oob_base_info_t mca_oob_base_info_t;
/** /**
* declare the association structure as a class * declare the association structure as a class
*/ */
OBJ_CLASS_DECLARATION(mca_oob_base_info_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_info_t);
/** /**
* List of registrations of exception callbacks * List of registrations of exception callbacks
@ -293,7 +293,7 @@ typedef struct mca_oob_base_exception_handler_t mca_oob_base_exception_handler_t
/** /**
* declare the association structure as a class * declare the association structure as a class
*/ */
OBJ_CLASS_DECLARATION(mca_oob_base_exception_handler_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(mca_oob_base_exception_handler_t);
/* /*

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -260,7 +260,7 @@ static void mca_oob_tcp_accept(void)
if(sd < 0) { if(sd < 0) {
if(opal_socket_errno == EINTR) if(opal_socket_errno == EINTR)
continue; continue;
if(opal_socket_errno != EAGAIN || opal_socket_errno != EWOULDBLOCK) if(opal_socket_errno != EAGAIN && opal_socket_errno != EWOULDBLOCK)
opal_output(0, "mca_oob_tcp_accept: accept() failed with errno %d.", opal_socket_errno); opal_output(0, "mca_oob_tcp_accept: accept() failed with errno %d.", opal_socket_errno);
return; return;
} }
@ -373,14 +373,14 @@ static void mca_oob_tcp_recv_probe(int sd, mca_oob_tcp_hdr_t* hdr)
ORTE_NAME_ARGS(orte_process_info.my_name), ORTE_NAME_ARGS(orte_process_info.my_name),
ORTE_NAME_ARGS(&(hdr->msg_src)), ORTE_NAME_ARGS(&(hdr->msg_src)),
opal_socket_errno); opal_socket_errno);
close(sd); CLOSE_THE_SOCKET(sd);
return; return;
} }
continue; continue;
} }
cnt += retval; cnt += retval;
} }
close(sd); CLOSE_THE_SOCKET(sd);
} }
/* /*
@ -425,7 +425,7 @@ static void mca_oob_tcp_recv_connect(int sd, mca_oob_tcp_hdr_t* hdr)
if(NULL == peer) { if(NULL == peer) {
opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: unable to locate peer", opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: unable to locate peer",
ORTE_NAME_ARGS(orte_process_info.my_name)); ORTE_NAME_ARGS(orte_process_info.my_name));
close(sd); CLOSE_THE_SOCKET(sd);
return; return;
} }
/* is the peer instance willing to accept this connection */ /* is the peer instance willing to accept this connection */
@ -438,7 +438,7 @@ static void mca_oob_tcp_recv_connect(int sd, mca_oob_tcp_hdr_t* hdr)
ORTE_NAME_ARGS(&(hdr->msg_src)), ORTE_NAME_ARGS(&(hdr->msg_src)),
peer->peer_state); peer->peer_state);
} }
close(sd); CLOSE_THE_SOCKET(sd);
return; return;
} }
} }
@ -472,13 +472,13 @@ static void mca_oob_tcp_recv_handler(int sd, short flags, void* user)
opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: peer closed connection", opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: peer closed connection",
ORTE_NAME_ARGS(orte_process_info.my_name)); ORTE_NAME_ARGS(orte_process_info.my_name));
} }
close(sd); CLOSE_THE_SOCKET(sd);
return; return;
} }
if(opal_socket_errno != EINTR) { if(opal_socket_errno != EINTR) {
opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: recv() failed with errno=%d\n", opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: recv() failed with errno=%d\n",
ORTE_NAME_ARGS(orte_process_info.my_name), opal_socket_errno); ORTE_NAME_ARGS(orte_process_info.my_name), opal_socket_errno);
close(sd); CLOSE_THE_SOCKET(sd);
return; return;
} }
} }
@ -495,7 +495,7 @@ static void mca_oob_tcp_recv_handler(int sd, short flags, void* user)
default: default:
opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: invalid message type: %d\n", opal_output(0, "[%lu,%lu,%lu] mca_oob_tcp_recv_handler: invalid message type: %d\n",
ORTE_NAME_ARGS(orte_process_info.my_name), hdr.msg_type); ORTE_NAME_ARGS(orte_process_info.my_name), hdr.msg_type);
close(sd); CLOSE_THE_SOCKET(sd);
break; break;
} }
} }
@ -755,7 +755,7 @@ int mca_oob_tcp_init(void)
/* random delay to stagger connections back to seed */ /* random delay to stagger connections back to seed */
#if defined(__WINDOWS__) #if defined(__WINDOWS__)
sleep((orte_process_info.my_name->vpid % orte_process_info.num_procs % 1000) * 1000); Sleep((orte_process_info.my_name->vpid % orte_process_info.num_procs % 1000) * 100);
#else #else
usleep((orte_process_info.my_name->vpid % orte_process_info.num_procs % 1000) * 1000); usleep((orte_process_info.my_name->vpid % orte_process_info.num_procs % 1000) * 1000);
#endif #endif
@ -933,7 +933,7 @@ int mca_oob_tcp_fini(void)
/* close listen socket */ /* close listen socket */
if (mca_oob_tcp_component.tcp_listen_sd >= 0) { if (mca_oob_tcp_component.tcp_listen_sd >= 0) {
opal_event_del(&mca_oob_tcp_component.tcp_recv_event); opal_event_del(&mca_oob_tcp_component.tcp_recv_event);
close(mca_oob_tcp_component.tcp_listen_sd); CLOSE_THE_SOCKET(mca_oob_tcp_component.tcp_listen_sd);
mca_oob_tcp_component.tcp_listen_sd = -1; mca_oob_tcp_component.tcp_listen_sd = -1;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -40,8 +40,6 @@
extern "C" { extern "C" {
#endif #endif
/* /*
* standard component functions * standard component functions
*/ */
@ -225,6 +223,11 @@ void mca_oob_tcp_registry_callback(
void mca_oob_tcp_set_socket_options(int sd); void mca_oob_tcp_set_socket_options(int sd);
typedef enum {
OOB_TCP_EVENT,
OOB_TCP_LISTEN_THREAD
} mca_oob_tcp_listen_type_t;
/** /**
* OOB TCP Component * OOB TCP Component
*/ */
@ -262,8 +265,13 @@ struct mca_oob_tcp_component_t {
*/ */
typedef struct mca_oob_tcp_component_t mca_oob_tcp_component_t; typedef struct mca_oob_tcp_component_t mca_oob_tcp_component_t;
ORTE_DECLSPEC extern mca_oob_tcp_component_t mca_oob_tcp_component; ORTE_MODULE_DECLSPEC extern mca_oob_tcp_component_t mca_oob_tcp_component;
#if defined(__WINDOWS__)
#define CLOSE_THE_SOCKET(socket) closesocket(socket)
#else
#define CLOSE_THE_SOCKET(socket) close(socket)
#endif /* defined(__WINDOWS__) */
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -33,6 +33,7 @@
#include "orte/dss/dss.h" #include "orte/dss/dss.h"
#include "opal/class/opal_object.h" #include "opal/class/opal_object.h"
#include "orte/mca/ns/ns_types.h" #include "orte/mca/ns/ns_types.h"
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
extern "C" { extern "C" {
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -490,7 +490,7 @@ void mca_oob_tcp_peer_shutdown(mca_oob_tcp_peer_t* peer)
if (peer->peer_sd >= 0) { if (peer->peer_sd >= 0) {
opal_event_del(&peer->peer_recv_event); opal_event_del(&peer->peer_recv_event);
opal_event_del(&peer->peer_send_event); opal_event_del(&peer->peer_send_event);
close(peer->peer_sd); CLOSE_THE_SOCKET(peer->peer_sd);
peer->peer_sd = -1; peer->peer_sd = -1;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -72,12 +72,6 @@ struct mca_oob_tcp_peer_t {
*/ */
typedef struct mca_oob_tcp_peer_t mca_oob_tcp_peer_t; typedef struct mca_oob_tcp_peer_t mca_oob_tcp_peer_t;
/*
* Class declaration.
*/
OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t);
/** /**
* Get a new peer data structure * Get a new peer data structure
*/ */
@ -103,6 +97,12 @@ OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t);
extern "C" { extern "C" {
#endif #endif
/*
* Class declaration.
*/
OBJ_CLASS_DECLARATION(mca_oob_tcp_peer_t);
/** /**
* Lookup a peer in the cache - if it doesn't exists * Lookup a peer in the cache - if it doesn't exists
* create one and cache it. * create one and cache it.

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -73,6 +73,7 @@ int mca_oob_tcp_ping(
fd_set fdset; fd_set fdset;
mca_oob_tcp_hdr_t hdr; mca_oob_tcp_hdr_t hdr;
struct timeval tv; struct timeval tv;
struct iovec iov;
#ifndef __WINDOWS__ #ifndef __WINDOWS__
struct opal_event sigpipe_handler; struct opal_event sigpipe_handler;
#endif #endif
@ -119,7 +120,7 @@ int mca_oob_tcp_ping(
if(connect(sd, (struct sockaddr*)&inaddr, sizeof(inaddr)) < 0) { if(connect(sd, (struct sockaddr*)&inaddr, sizeof(inaddr)) < 0) {
/* connect failed? */ /* connect failed? */
if(opal_socket_errno != EINPROGRESS && opal_socket_errno != EWOULDBLOCK) { if(opal_socket_errno != EINPROGRESS && opal_socket_errno != EWOULDBLOCK) {
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_ERR_UNREACH; return ORTE_ERR_UNREACH;
} }
@ -128,7 +129,7 @@ int mca_oob_tcp_ping(
tv = *timeout; tv = *timeout;
rc = select(sd+1, NULL, &fdset, NULL, &tv); rc = select(sd+1, NULL, &fdset, NULL, &tv);
if(rc <= 0) { if(rc <= 0) {
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_ERR_UNREACH; return ORTE_ERR_UNREACH;
} }
} }
@ -160,14 +161,19 @@ int mca_oob_tcp_ping(
noop, &sigpipe_handler); noop, &sigpipe_handler);
opal_signal_add(&sigpipe_handler, NULL); opal_signal_add(&sigpipe_handler, NULL);
#endif #endif
/* Do the write and see what happens */ /* Do the write and see what happens. Use the writev version just to
rc = write(sd, &hdr, sizeof(hdr)); * make Windows happy as there the write function is limitted to
* file operations.
*/
iov.iov_base = (IOVBASE_TYPE*)&hdr;
iov.iov_len = sizeof(hdr);
rc = writev(sd, &iov, 1 );
#ifndef __WINDOWS__ #ifndef __WINDOWS__
/* Now de-register the handler */ /* Now de-register the handler */
opal_signal_del(&sigpipe_handler); opal_signal_del(&sigpipe_handler);
#endif #endif
if (rc != sizeof(hdr)) { if (rc != sizeof(hdr)) {
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_ERR_UNREACH; return ORTE_ERR_UNREACH;
} }
@ -176,19 +182,19 @@ int mca_oob_tcp_ping(
tv = *timeout; tv = *timeout;
rc = select(sd+1, &fdset, NULL, NULL, &tv); rc = select(sd+1, &fdset, NULL, NULL, &tv);
if(rc <= 0) { if(rc <= 0) {
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_ERR_UNREACH; return ORTE_ERR_UNREACH;
} }
if((rc = read(sd, &hdr, sizeof(hdr))) != sizeof(hdr)) { if((rc = read(sd, &hdr, sizeof(hdr))) != sizeof(hdr)) {
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_ERR_UNREACH; return ORTE_ERR_UNREACH;
} }
MCA_OOB_TCP_HDR_NTOH(&hdr); MCA_OOB_TCP_HDR_NTOH(&hdr);
if(hdr.msg_type != MCA_OOB_TCP_PROBE) { if(hdr.msg_type != MCA_OOB_TCP_PROBE) {
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_ERR_UNREACH; return ORTE_ERR_UNREACH;
} }
close(sd); CLOSE_THE_SOCKET(sd);
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -136,8 +136,8 @@ extern "C" {
* string pointing to the home directory name (owned by the * string pointing to the home directory name (owned by the
* context; safe to free at destruction). * context; safe to free at destruction).
*/ */
int orte_pls_base_check_context_cwd(orte_app_context_t *context, ORTE_DECLSPEC int orte_pls_base_check_context_cwd(orte_app_context_t *context,
bool do_chdir); bool do_chdir);
/** /**
* Check that the app exists and is executable. If it is not, * Check that the app exists and is executable. If it is not,
@ -146,7 +146,8 @@ extern "C" {
* app with the string containing the absolute pathname to the * app with the string containing the absolute pathname to the
* exectuable (owned by the context; safe to free at destruction). * exectuable (owned by the context; safe to free at destruction).
*/ */
int orte_pls_base_check_context_app(orte_app_context_t *context); ORTE_DECLSPEC int orte_pls_base_check_context_app(orte_app_context_t *context);
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -3,7 +3,7 @@
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana # Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
# University Research and Technology # University Research and Technology
# Corporation. All rights reserved. # Corporation. All rights reserved.
# Copyright (c) 2004-2005 The University of Tennessee and The University # Copyright (c) 2004-2006 The University of Tennessee and The University
# of Tennessee Research Foundation. All rights # of Tennessee Research Foundation. All rights
# reserved. # reserved.
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, # Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -20,8 +20,8 @@
No available launching agents were found. No available launching agents were found.
This is an unusual error; it means that Open RTE was unable to find This is an unusual error; it means that Open RTE was unable to find
any mechanism to launch proceses, and therefore is unable start the any mechanism to launch proceses, and therefore is unable to start the
process(es) in your application. process(es) required by your application.
[chdir-error] [chdir-error]
Failed to change to the working directory: Failed to change to the working directory:

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

@ -42,12 +42,14 @@
#include "orte/mca/pls/base/base.h" #include "orte/mca/pls/base/base.h"
#include "orte/mca/errmgr/errmgr.h" #include "orte/mca/errmgr/errmgr.h"
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
int orte_pls_base_check_context_cwd(orte_app_context_t *context, int orte_pls_base_check_context_cwd(orte_app_context_t *context,
bool want_chdir) bool want_chdir)
{ {
bool good; bool good = true;
char *tmp; char *tmp;
char hostname[MAXHOSTNAMELEN]; char hostname[MAXHOSTNAMELEN];
struct stat buf; struct stat buf;
@ -57,7 +59,6 @@ int orte_pls_base_check_context_cwd(orte_app_context_t *context,
/* If the directory does not exist, or stat() otherwise fails to /* If the directory does not exist, or stat() otherwise fails to
get info about it, then set good = false. */ get info about it, then set good = false. */
good = true;
if (!(0 == stat(context->cwd, &buf) && S_ISDIR(buf.st_mode))) { if (!(0 == stat(context->cwd, &buf) && S_ISDIR(buf.st_mode))) {
good = false; good = false;
} }

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -72,7 +72,9 @@
/** /**
* Our current evironment * Our current evironment
*/ */
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS
int orte_pls_bproc_launch_threaded(orte_jobid_t); int orte_pls_bproc_launch_threaded(orte_jobid_t);
@ -585,9 +587,8 @@ static int orte_pls_bproc_launch_daemons(orte_cellid_t cellid, char *** envp,
} else { } else {
orted_path = opal_path_findv(mca_pls_bproc_component.orted, 0, environ, NULL); orted_path = opal_path_findv(mca_pls_bproc_component.orted, 0, environ, NULL);
if(NULL == orted_path) { if(NULL == orted_path) {
asprintf(&orted_path, "%s/%s", OPAL_BINDIR, orted_path = opal_os_path( false, OPAL_BINDIR, mca_pls_bproc_component.orted, NULL );
mca_pls_bproc_component.orted); if( (NULL != orted_path) || (0 != stat(orted_path, &buf)) ) {
if (0 != stat(orted_path, &buf)) {
char *path = getenv("PATH"); char *path = getenv("PATH");
if (NULL == path) { if (NULL == path) {
path = ("PATH is empty!"); path = ("PATH is empty!");

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -114,8 +114,8 @@ struct orte_pls_bproc_component_t {
*/ */
typedef struct orte_pls_bproc_component_t orte_pls_bproc_component_t; typedef struct orte_pls_bproc_component_t orte_pls_bproc_component_t;
ORTE_DECLSPEC extern orte_pls_bproc_component_t mca_pls_bproc_component; ORTE_DECLSPEC orte_pls_bproc_component_t mca_pls_bproc_component;
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_bproc_module; ORTE_DECLSPEC orte_pls_base_module_t orte_pls_bproc_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -77,8 +77,8 @@ struct orte_pls_bproc_orted_component_t {
*/ */
typedef struct orte_pls_bproc_orted_component_t orte_pls_bproc_orted_component_t; typedef struct orte_pls_bproc_orted_component_t orte_pls_bproc_orted_component_t;
ORTE_DECLSPEC extern orte_pls_bproc_orted_component_t mca_pls_bproc_orted_component; ORTE_DECLSPEC orte_pls_bproc_orted_component_t mca_pls_bproc_orted_component;
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_bproc_orted_module; ORTE_DECLSPEC orte_pls_base_module_t orte_pls_bproc_orted_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -52,7 +52,6 @@
#include "opal/mca/paffinity/base/base.h" #include "opal/mca/paffinity/base/base.h"
#include "opal/util/show_help.h" #include "opal/util/show_help.h"
#include "opal/util/path.h" #include "opal/util/path.h"
#include "opal/util/basename.h"
#include "opal/class/opal_value_array.h" #include "opal/class/opal_value_array.h"
#include "orte/util/sys_info.h" #include "orte/util/sys_info.h"
#include "orte/util/univ_info.h" #include "orte/util/univ_info.h"
@ -75,7 +74,9 @@
#include "orte/mca/smr/smr.h" #include "orte/mca/smr/smr.h"
#include "orte/mca/pls/fork/pls_fork.h" #include "orte/mca/pls/fork/pls_fork.h"
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
static int orte_pls_fork_launch_threaded(orte_jobid_t); static int orte_pls_fork_launch_threaded(orte_jobid_t);
@ -256,36 +257,6 @@ static int orte_pls_fork_proc(
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }
#if 0
{
/* Do fork the windows way: see opal_few() for example */
HANDLE new_process;
STARTUPINFO si;
PROCESS_INFORMATION pi;
DWORD process_id;
ZeroMemory (&si, sizeof(si));
ZeroMemory (&pi, sizeof(pi));
GetStartupInfo (&si);
if (!CreateProcess (NULL,
"new process",
NULL,
NULL,
TRUE,
0,
NULL,
NULL,
&si,
&pi)){
/* actual error can be got by simply calling GetLastError() */
return ORTE_ERROR;
}
/* get child pid */
process_id = GetProcessId(&pi);
pid = (int) process_id;
}
#endif
/* A pipe is used to communicate between the parent and child to /* A pipe is used to communicate between the parent and child to
indicate whether the exec ultiimately succeeded or failed. The indicate whether the exec ultiimately succeeded or failed. The
child sets the pipe to be close-on-exec; the child only ever child sets the pipe to be close-on-exec; the child only ever

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -62,10 +62,8 @@ struct orte_pls_poe_component_t {
typedef struct orte_pls_poe_component_t orte_pls_poe_component_t; typedef struct orte_pls_poe_component_t orte_pls_poe_component_t;
ORTE_DECLSPEC extern orte_pls_poe_component_t mca_pls_poe_component; ORTE_DECLSPEC orte_pls_poe_component_t mca_pls_poe_component;
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_poe_module; ORTE_DECLSPEC orte_pls_base_module_t orte_pls_poe_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -150,13 +150,16 @@ int orte_pls_poe_component_open(void)
return ORTE_SUCCESS; return ORTE_SUCCESS;
} }
#if !defined(__WINDOWS__)
extern char **environ;
#endif /* !defined(__WINDOWS__) */
/** /**
orte_pls_poe_component_init - initialize component, check if we can run on this machine. orte_pls_poe_component_init - initialize component, check if we can run on this machine.
@return error number @return error number
*/ */
orte_pls_base_module_t *orte_pls_poe_component_init(int *priority) orte_pls_base_module_t *orte_pls_poe_component_init(int *priority)
{ {
extern char **environ;
mca_pls_poe_component.path = opal_path_findv(mca_pls_poe_component.argv[0], 0, environ, NULL); mca_pls_poe_component.path = opal_path_findv(mca_pls_poe_component.argv[0], 0, environ, NULL);
if (NULL == mca_pls_poe_component.path) { if (NULL == mca_pls_poe_component.path) {
return NULL; return NULL;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -48,7 +48,9 @@
#include "orte/util/session_dir.h" #include "orte/util/session_dir.h"
#include "orte/runtime/orte_wait.h" #include "orte/runtime/orte_wait.h"
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
/* /*
* Local functions * Local functions

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -76,8 +76,8 @@ struct orte_pls_rsh_component_t {
}; };
typedef struct orte_pls_rsh_component_t orte_pls_rsh_component_t; typedef struct orte_pls_rsh_component_t orte_pls_rsh_component_t;
ORTE_DECLSPEC extern orte_pls_rsh_component_t mca_pls_rsh_component; ORTE_MODULE_DECLSPEC extern orte_pls_rsh_component_t mca_pls_rsh_component;
ORTE_DECLSPEC extern orte_pls_base_module_t orte_pls_rsh_module; extern orte_pls_base_module_t orte_pls_rsh_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -40,8 +40,9 @@
#include "opal/mca/base/mca_base_param.h" #include "opal/mca/base/mca_base_param.h"
#include "orte/mca/rml/rml.h" #include "orte/mca/rml/rml.h"
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
/* /*
* Local function * Local function
@ -118,7 +119,7 @@ int orte_pls_rsh_component_open(void)
mca_base_param_reg_int(c, "debug", mca_base_param_reg_int(c, "debug",
"Whether or not to enable debugging output for the rsh pls component (0 or 1)", "Whether or not to enable debugging output for the rsh pls component (0 or 1)",
false, false, false, &tmp); false, false, false, &tmp);
mca_pls_rsh_component.debug = tmp; mca_pls_rsh_component.debug = (tmp != 0 ? true : false);
mca_base_param_reg_int(c, "num_concurrent", mca_base_param_reg_int(c, "num_concurrent",
"How many pls_rsh_agent instances to invoke concurrently (must be > 0)", "How many pls_rsh_agent instances to invoke concurrently (must be > 0)",
false, false, 128, &tmp); false, false, 128, &tmp);
@ -127,12 +128,12 @@ int orte_pls_rsh_component_open(void)
true, tmp); true, tmp);
tmp = 1; tmp = 1;
} }
mca_pls_rsh_component.num_concurrent = tmp; mca_pls_rsh_component.num_concurrent = (tmp != 0 ? true : false);
if (mca_pls_rsh_component.debug == 0) { if (mca_pls_rsh_component.debug == 0) {
mca_base_param_reg_int_name("orte", "debug", mca_base_param_reg_int_name("orte", "debug",
"Whether or not to enable debugging output for all ORTE components (0 or 1)", "Whether or not to enable debugging output for all ORTE components (0 or 1)",
false, false, false, &tmp); false, false, false, &tmp);
mca_pls_rsh_component.debug = tmp; mca_pls_rsh_component.debug = (tmp != 0 ? true : false);
} }
mca_base_param_reg_string(c, "orted", mca_base_param_reg_string(c, "orted",
@ -150,11 +151,11 @@ int orte_pls_rsh_component_open(void)
mca_base_param_reg_int(c, "reap", mca_base_param_reg_int(c, "reap",
"If set to 1, wait for all the processes to complete before exiting. Otherwise, quit immediately -- without waiting for confirmation that all other processes in the job have completed.", "If set to 1, wait for all the processes to complete before exiting. Otherwise, quit immediately -- without waiting for confirmation that all other processes in the job have completed.",
false, false, 1, &tmp); false, false, 1, &tmp);
mca_pls_rsh_component.reap = tmp; mca_pls_rsh_component.reap = (tmp != 0 ? true : false);
mca_base_param_reg_int(c, "assume_same_shell", mca_base_param_reg_int(c, "assume_same_shell",
"If set to 1, assume that the shell on the remote node is the same as the shell on the local node. Otherwise, probe for what the remote shell.", "If set to 1, assume that the shell on the remote node is the same as the shell on the local node. Otherwise, probe for what the remote shell.",
false, false, 1, &tmp); false, false, 1, &tmp);
mca_pls_rsh_component.assume_same_shell = tmp; mca_pls_rsh_component.assume_same_shell = (tmp != 0 ? true : false);
mca_base_param_reg_string(c, "agent", mca_base_param_reg_string(c, "agent",
"The command used to launch executables on remote nodes (typically either \"ssh\" or \"rsh\")", "The command used to launch executables on remote nodes (typically either \"ssh\" or \"rsh\")",
@ -165,11 +166,14 @@ int orte_pls_rsh_component_open(void)
} }
#if !defined(__WINDOWS__)
extern char **environ;
#endif /* !defined(__WINDOWS__) */
orte_pls_base_module_t *orte_pls_rsh_component_init(int *priority) orte_pls_base_module_t *orte_pls_rsh_component_init(int *priority)
{ {
char *bname; char *bname;
size_t i; size_t i;
extern char **environ;
/* Take the string that was given to us by the pla_rsh_agent MCA /* Take the string that was given to us by the pla_rsh_agent MCA
param and search for it */ param and search for it */

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -58,7 +58,7 @@
#include "opal/install_dirs.h" #include "opal/install_dirs.h"
#include "opal/mca/base/mca_base_param.h" #include "opal/mca/base/mca_base_param.h"
#include "opal/util/if.h" #include "opal/util/if.h"
#include "opal/util/if.h" #include "opal/util/os_path.h"
#include "opal/util/path.h" #include "opal/util/path.h"
#include "opal/event/event.h" #include "opal/event/event.h"
#include "opal/util/show_help.h" #include "opal/util/show_help.h"
@ -83,8 +83,9 @@
#include "orte/mca/pls/rsh/pls_rsh.h" #include "orte/mca/pls/rsh/pls_rsh.h"
#include "orte/util/sys_info.h" #include "orte/util/sys_info.h"
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
#if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS #if OMPI_HAVE_POSIX_THREADS && OMPI_THREADS_HAVE_DIFFERENT_PIDS && OMPI_ENABLE_PROGRESS_THREADS
static int orte_pls_rsh_launch_threaded(orte_jobid_t jobid); static int orte_pls_rsh_launch_threaded(orte_jobid_t jobid);
@ -764,8 +765,7 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
} }
} else { } else {
if (NULL != prefix_dir) { if (NULL != prefix_dir) {
asprintf(&exec_path, "%s/%s/orted", exec_path = opal_os_path( false, prefix_dir, bin_base, "orted", NULL );
prefix_dir, bin_base);
} }
/* If we yet did not fill up the execpath, do so now */ /* If we yet did not fill up the execpath, do so now */
if (NULL == exec_path) { if (NULL == exec_path) {
@ -784,12 +784,13 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
char *oldenv, *newenv; char *oldenv, *newenv;
/* Reset PATH */ /* Reset PATH */
newenv = opal_os_path( false, prefix_dir, bin_base, NULL );
oldenv = getenv("PATH"); oldenv = getenv("PATH");
if (NULL != oldenv) { if (NULL != oldenv) {
asprintf(&newenv, "%s/%s:%s", prefix_dir, char *temp;
bin_base, oldenv); asprintf(&temp, "%s:%s", newenv, oldenv );
} else { free( newenv );
asprintf(&newenv, "%s/%s", prefix_dir, bin_base); newenv = temp;
} }
opal_setenv("PATH", newenv, true, &environ); opal_setenv("PATH", newenv, true, &environ);
if (mca_pls_rsh_component.debug) { if (mca_pls_rsh_component.debug) {
@ -798,12 +799,13 @@ int orte_pls_rsh_launch(orte_jobid_t jobid)
free(newenv); free(newenv);
/* Reset LD_LIBRARY_PATH */ /* Reset LD_LIBRARY_PATH */
newenv = opal_os_path( false, prefix_dir, lib_base, NULL );
oldenv = getenv("LD_LIBRARY_PATH"); oldenv = getenv("LD_LIBRARY_PATH");
if (NULL != oldenv) { if (NULL != oldenv) {
asprintf(&newenv, "%s/%s:%s", prefix_dir, char* temp;
lib_base, oldenv); asprintf(&temp, "%s:%s", newenv, lib_base, oldenv, NULL);
} else { free(newenv);
asprintf(&newenv, "%s/%s", prefix_dir, lib_base); newenv = temp;
} }
opal_setenv("LD_LIBRARY_PATH", newenv, true, &environ); opal_setenv("LD_LIBRARY_PATH", newenv, true, &environ);
if (mca_pls_rsh_component.debug) { if (mca_pls_rsh_component.debug) {

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -99,8 +99,9 @@ static pid_t srun_pid = 0;
/* /*
* External * External
*/ */
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
static int pls_slurm_launch(orte_jobid_t jobid) static int pls_slurm_launch(orte_jobid_t jobid)
{ {

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -44,9 +44,8 @@ extern "C" {
ORTE_DECLSPEC extern orte_pls_tm_component_t mca_pls_tm_component; ORTE_DECLSPEC extern orte_pls_tm_component_t mca_pls_tm_component;
extern orte_pls_base_module_1_0_0_t orte_pls_tm_module; extern orte_pls_base_module_1_0_0_t orte_pls_tm_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif
#endif /* ORTE_PLS_TM_EXPORT_H */ #endif /* ORTE_PLS_TM_EXPORT_H */

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -93,9 +93,9 @@ orte_pls_base_module_1_0_0_t orte_pls_tm_module = {
pls_tm_finalize pls_tm_finalize
}; };
#if !defined(__WINDOWS__)
extern char **environ; extern char **environ;
#endif /* !defined(__WINDOWS__) */
static int static int
pls_tm_launch(orte_jobid_t jobid) pls_tm_launch(orte_jobid_t jobid)

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -32,38 +32,38 @@ extern "C" {
/* /*
* Query the registry for all available nodes * Query the registry for all available nodes
*/ */
int orte_ras_base_node_query(opal_list_t*); ORTE_DECLSPEC int orte_ras_base_node_query(opal_list_t*);
/* /*
* Query the registry for a specific node * Query the registry for a specific node
*/ */
orte_ras_node_t* orte_ras_base_node_lookup(orte_cellid_t, const char* nodename); ORTE_DECLSPEC orte_ras_node_t* orte_ras_base_node_lookup(orte_cellid_t, const char* nodename);
/** /**
* Query the registry for all nodes allocated to a specific job * Query the registry for all nodes allocated to a specific job
*/ */
int orte_ras_base_node_query_alloc(opal_list_t*, orte_jobid_t); ORTE_DECLSPEC int orte_ras_base_node_query_alloc(opal_list_t*, orte_jobid_t);
/** /**
* Add the specified node definitions to the registry * Add the specified node definitions to the registry
*/ */
int orte_ras_base_node_insert(opal_list_t*); ORTE_DECLSPEC int orte_ras_base_node_insert(opal_list_t*);
/** /**
* Delete the specified nodes from the registry * Delete the specified nodes from the registry
*/ */
int orte_ras_base_node_delete(opal_list_t*); ORTE_DECLSPEC int orte_ras_base_node_delete(opal_list_t*);
/** /**
* Assign the allocated slots on the specified nodes to the * Assign the allocated slots on the specified nodes to the
* indicated jobid. * indicated jobid.
*/ */
int orte_ras_base_node_assign(opal_list_t*, orte_jobid_t); ORTE_DECLSPEC int orte_ras_base_node_assign(opal_list_t*, orte_jobid_t);
/** /**
* Check to see if the node segment is empty * Check to see if the node segment is empty
*/ */
int orte_ras_base_node_segment_empty(bool *empty); ORTE_DECLSPEC int orte_ras_base_node_segment_empty(bool *empty);
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -43,7 +43,6 @@ typedef struct orte_ras_bjs_component_t orte_ras_bjs_component_t;
ORTE_DECLSPEC extern orte_ras_bjs_component_t mca_ras_bjs_component; ORTE_DECLSPEC extern orte_ras_bjs_component_t mca_ras_bjs_component;
ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_bjs_module; ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_bjs_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -45,7 +45,7 @@ extern "C" {
/** /**
* Component export structure * Component export structure
*/ */
ORTE_DECLSPEC extern orte_ras_dash_host_component_t mca_ras_dash_host_component; ORTE_MODULE_DECLSPEC extern orte_ras_dash_host_component_t mca_ras_dash_host_component;
/** /**
* Module init function * Module init function

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -45,7 +45,7 @@ extern "C" {
/** /**
* Component export structure * Component export structure
*/ */
ORTE_DECLSPEC extern orte_ras_hostfile_component_t mca_ras_hostfile_component; ORTE_MODULE_DECLSPEC extern orte_ras_hostfile_component_t mca_ras_hostfile_component;
/** /**
* Module init function * Module init function

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -45,7 +45,7 @@ extern "C" {
/** /**
* Component export structure * Component export structure
*/ */
ORTE_DECLSPEC extern orte_ras_localhost_component_t mca_ras_localhost_component; ORTE_MODULE_DECLSPEC extern orte_ras_localhost_component_t mca_ras_localhost_component;
/** /**
* Module init function * Module init function

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -42,7 +42,6 @@ typedef struct orte_ras_lsf_bproc_component_t orte_ras_lsf_bproc_component_t;
ORTE_DECLSPEC extern orte_ras_lsf_bproc_component_t mca_ras_lsf_bproc_component; ORTE_DECLSPEC extern orte_ras_lsf_bproc_component_t mca_ras_lsf_bproc_component;
ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_lsf_bproc_module; ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_lsf_bproc_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -42,7 +42,6 @@ typedef struct orte_ras_poe_component_t orte_ras_poe_component_t;
ORTE_DECLSPEC extern orte_ras_poe_component_t mca_ras_poe_component; ORTE_DECLSPEC extern orte_ras_poe_component_t mca_ras_poe_component;
ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_poe_module; ORTE_DECLSPEC extern orte_ras_base_module_t orte_ras_poe_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -16,13 +16,18 @@
* $HEADER$ * $HEADER$
*/ */
#ifndef ORTE_MCA_RAS_TYPES_H
#define ORTE_MCA_RAS_TYPES_H
#include "orte_config.h" #include "orte_config.h"
#include "opal/class/opal_list.h" #include "opal/class/opal_list.h"
#include "orte/mca/smr/smr_types.h" #include "orte/mca/smr/smr_types.h"
#ifndef ORTE_MCA_RAS_TYPES_H
#define ORTE_MCA_RAS_TYPES_H #if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/** /**
* Struct for holding information about a node (a local copy of what * Struct for holding information about a node (a local copy of what
@ -75,8 +80,10 @@ struct orte_ras_node_t {
*/ */
typedef struct orte_ras_node_t orte_ras_node_t; typedef struct orte_ras_node_t orte_ras_node_t;
ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_ras_node_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_ras_node_t);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -79,7 +79,7 @@ ORTE_DECLSPEC extern orte_rds_base_t orte_rds_base;
/* /*
* utility functions for use within the RDS * utility functions for use within the RDS
*/ */
int orte_rds_base_store_resource(opal_list_t *resource_list); ORTE_DECLSPEC int orte_rds_base_store_resource(opal_list_t *resource_list);
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -43,8 +43,8 @@ struct orte_rds_hostfile_component_t {
}; };
typedef struct orte_rds_hostfile_component_t orte_rds_hostfile_component_t; typedef struct orte_rds_hostfile_component_t orte_rds_hostfile_component_t;
ORTE_DECLSPEC extern orte_rds_hostfile_component_t mca_rds_hostfile_component; ORTE_MODULE_DECLSPEC extern orte_rds_hostfile_component_t mca_rds_hostfile_component;
ORTE_DECLSPEC extern orte_rds_base_module_t orte_rds_hostfile_module; extern orte_rds_base_module_t orte_rds_hostfile_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)

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

@ -3,7 +3,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -28,7 +28,23 @@
/* /*
* local functions * local functions
*/ */
static int orte_rds_hostfile_wrap(void); #ifndef YY_SKIP_YYWRAP
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif /* defined(c_plusplus) || defined(__cplusplus) */
int orte_rds_hostfile_wrap(void);
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif /* defined(c_plusplus) || defined(__cplusplus) */
#endif /* !defined(YY_SKIP_YYWRAP) */
int orte_rds_hostfile_wrap(void)
{
orte_rds_hostfile_done = true;
return 1;
}
/* /*
* global variables * global variables
@ -129,11 +145,3 @@ username { orte_rds_hostfile_value.sval = yytext;
return ORTE_RDS_HOSTFILE_ERROR; } return ORTE_RDS_HOSTFILE_ERROR; }
%% %%
static int orte_rds_hostfile_wrap(void)
{
orte_rds_hostfile_done = true;
return 1;
}

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -16,14 +16,18 @@
* $HEADER$ * $HEADER$
*/ */
#ifndef ORTE_MCA_RDS_TYPES_H
#define ORTE_MCA_RDS_TYPES_H
#include "orte_config.h" #include "orte_config.h"
#include "opal/class/opal_list.h" #include "opal/class/opal_list.h"
#include "orte/mca/gpr/gpr_types.h" #include "orte/mca/gpr/gpr_types.h"
#include "orte/mca/ns/ns_types.h" #include "orte/mca/ns/ns_types.h"
#ifndef ORTE_MCA_RDS_TYPES_H #if defined(c_plusplus) || defined(__cplusplus)
#define ORTE_MCA_RDS_TYPES_H extern "C" {
#endif
/* resource descriptor object */ /* resource descriptor object */
typedef struct { typedef struct {
@ -41,7 +45,7 @@ typedef struct {
opal_list_t attributes; opal_list_t attributes;
} orte_rds_cell_desc_t; } orte_rds_cell_desc_t;
OBJ_CLASS_DECLARATION(orte_rds_cell_desc_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rds_cell_desc_t);
/* resource attribute object */ /* resource attribute object */
typedef struct { typedef struct {
@ -51,7 +55,7 @@ typedef struct {
orte_gpr_keyval_t keyval; orte_gpr_keyval_t keyval;
} orte_rds_cell_attr_t; } orte_rds_cell_attr_t;
OBJ_CLASS_DECLARATION(orte_rds_cell_attr_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rds_cell_attr_t);
/* name of resource */ /* name of resource */
@ -147,4 +151,8 @@ OBJ_CLASS_DECLARATION(orte_rds_cell_attr_t);
#define ORTE_RDS_INTERCONNECT "orte-rds-arch-interconnect*" #define ORTE_RDS_INTERCONNECT "orte-rds-arch-interconnect*"
#define ORTE_RDS_CPU "orte-rds-arch-cpu*" #define ORTE_RDS_CPU "orte-rds-arch-cpu*"
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -33,9 +33,6 @@
extern "C" { extern "C" {
#endif #endif
/* resfile internal globals */
extern opal_list_t resource_list;
/* /*
* RDS Resource file functions * RDS Resource file functions
*/ */
@ -72,8 +69,8 @@ struct orte_rds_resfile_component_t {
}; };
typedef struct orte_rds_resfile_component_t orte_rds_resfile_component_t; typedef struct orte_rds_resfile_component_t orte_rds_resfile_component_t;
ORTE_DECLSPEC extern orte_rds_resfile_component_t mca_rds_resfile_component; ORTE_MODULE_DECLSPEC extern orte_rds_resfile_component_t mca_rds_resfile_component;
ORTE_DECLSPEC extern orte_rds_base_module_t orte_rds_resfile_module; extern orte_rds_base_module_t orte_rds_resfile_module;
extern bool orte_rds_resfile_queried; extern bool orte_rds_resfile_queried;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -337,7 +337,7 @@ int orte_rmaps_base_get_map(orte_jobid_t jobid, opal_list_t* mapping_list)
} }
/* build the mapping */ /* build the mapping */
if(NULL == (mapping = malloc(sizeof(orte_rmaps_base_map_t*) * num_context))) { if(NULL == (mapping = (orte_rmaps_base_map_t**)malloc(sizeof(orte_rmaps_base_map_t*) * num_context))) {
rc = ORTE_ERR_OUT_OF_RESOURCE; rc = ORTE_ERR_OUT_OF_RESOURCE;
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto cleanup; goto cleanup;
@ -348,7 +348,7 @@ int orte_rmaps_base_get_map(orte_jobid_t jobid, opal_list_t* mapping_list)
orte_app_context_t* app = app_context[i]; orte_app_context_t* app = app_context[i];
map->app = app; map->app = app;
if (0 < app->num_procs) { if (0 < app->num_procs) {
map->procs = malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs); map->procs = (orte_rmaps_base_proc_t**)malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs);
if(NULL == map->procs) { if(NULL == map->procs) {
OBJ_RELEASE(map); OBJ_RELEASE(map);
rc = ORTE_ERR_OUT_OF_RESOURCE; rc = ORTE_ERR_OUT_OF_RESOURCE;
@ -563,7 +563,7 @@ int orte_rmaps_base_get_node_map(
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
return rc; return rc;
} }
if(NULL == (mapping = malloc(sizeof(orte_rmaps_base_map_t*) * num_context))) { if(NULL == (mapping = (orte_rmaps_base_map_t**)malloc(sizeof(orte_rmaps_base_map_t*) * num_context))) {
rc = ORTE_ERR_OUT_OF_RESOURCE; rc = ORTE_ERR_OUT_OF_RESOURCE;
ORTE_ERROR_LOG(rc); ORTE_ERROR_LOG(rc);
goto cleanup; goto cleanup;
@ -574,7 +574,7 @@ int orte_rmaps_base_get_node_map(
orte_app_context_t* app = app_context[i]; orte_app_context_t* app = app_context[i];
OBJ_RETAIN(app); OBJ_RETAIN(app);
map->app = app; map->app = app;
map->procs = malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs); map->procs = (orte_rmaps_base_proc_t**)malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs);
if(NULL == map->procs) { if(NULL == map->procs) {
OBJ_RELEASE(map); OBJ_RELEASE(map);
rc = ORTE_ERR_OUT_OF_RESOURCE; rc = ORTE_ERR_OUT_OF_RESOURCE;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -62,7 +62,7 @@ struct orte_rmaps_base_node_t {
}; };
typedef struct orte_rmaps_base_node_t orte_rmaps_base_node_t; typedef struct orte_rmaps_base_node_t orte_rmaps_base_node_t;
OBJ_CLASS_DECLARATION(orte_rmaps_base_node_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rmaps_base_node_t);
/* /*
@ -80,7 +80,7 @@ struct orte_rmaps_base_proc_t {
}; };
typedef struct orte_rmaps_base_proc_t orte_rmaps_base_proc_t; typedef struct orte_rmaps_base_proc_t orte_rmaps_base_proc_t;
OBJ_CLASS_DECLARATION(orte_rmaps_base_proc_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rmaps_base_proc_t);
/* /*
@ -97,12 +97,12 @@ struct orte_rmaps_base_map_t {
}; };
typedef struct orte_rmaps_base_map_t orte_rmaps_base_map_t; typedef struct orte_rmaps_base_map_t orte_rmaps_base_map_t;
OBJ_CLASS_DECLARATION(orte_rmaps_base_map_t); ORTE_DECLSPEC OBJ_CLASS_DECLARATION(orte_rmaps_base_map_t);
int orte_rmaps_base_mapped_node_query(opal_list_t* mapping_list, opal_list_t* nodes_alloc, orte_jobid_t jobid); ORTE_DECLSPEC int orte_rmaps_base_mapped_node_query(opal_list_t* mapping_list, opal_list_t* nodes_alloc, orte_jobid_t jobid);
int orte_rmaps_base_get_map(orte_jobid_t, opal_list_t* mapping); ORTE_DECLSPEC int orte_rmaps_base_get_map(orte_jobid_t, opal_list_t* mapping);
int orte_rmaps_base_set_map(orte_jobid_t, opal_list_t* mapping); ORTE_DECLSPEC int orte_rmaps_base_set_map(orte_jobid_t, opal_list_t* mapping);
int orte_rmaps_base_get_node_map(orte_cellid_t, orte_jobid_t, const char*, opal_list_t* mapping); ORTE_DECLSPEC int orte_rmaps_base_get_node_map(orte_cellid_t, orte_jobid_t, const char*, opal_list_t* mapping);
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -45,18 +45,18 @@ extern "C" {
* RMAPS * RMAPS
*/ */
int orte_rmaps_base_get_target_nodes(opal_list_t* node_list, orte_jobid_t jobid, orte_std_cntr_t *total_num_slots); ORTE_DECLSPEC int orte_rmaps_base_get_target_nodes(opal_list_t* node_list, orte_jobid_t jobid, orte_std_cntr_t *total_num_slots);
int orte_rmaps_base_update_node_usage(opal_list_t *nodes); ORTE_DECLSPEC int orte_rmaps_base_update_node_usage(opal_list_t *nodes);
int orte_rmaps_base_get_mapped_targets(opal_list_t *mapped_node_list, ORTE_DECLSPEC int orte_rmaps_base_get_mapped_targets(opal_list_t *mapped_node_list,
orte_app_context_t *app, orte_app_context_t *app,
opal_list_t *master_node_list, opal_list_t *master_node_list,
orte_std_cntr_t *total_num_slots); orte_std_cntr_t *total_num_slots);
int orte_rmaps_base_claim_slot(orte_rmaps_base_map_t *map, ORTE_DECLSPEC int orte_rmaps_base_claim_slot(orte_rmaps_base_map_t *map,
orte_ras_node_t *current_node, orte_ras_node_t *current_node,
orte_jobid_t jobid, orte_vpid_t vpid, orte_jobid_t jobid, orte_vpid_t vpid,
int proc_index, int proc_index,
opal_list_t *nodes, opal_list_t *nodes,
opal_list_t *fully_used_nodes); opal_list_t *fully_used_nodes);
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -85,7 +85,7 @@ static orte_rmaps_base_module_t *select_any(void)
/* If the list is empty, return NULL */ /* If the list is empty, return NULL */
if (opal_list_is_empty(&orte_rmaps_base.rmaps_available) > 0) { if (true == opal_list_is_empty(&orte_rmaps_base.rmaps_available)) {
opal_output(orte_rmaps_base.rmaps_output, opal_output(orte_rmaps_base.rmaps_output,
"orte:base:select: no components available!"); "orte:base:select: no components available!");
return NULL; return NULL;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -358,7 +358,7 @@ static int orte_rmaps_rr_map(orte_jobid_t jobid)
map->app = app; map->app = app;
map->procs = malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs); map->procs = (orte_rmaps_base_proc_t**)malloc(sizeof(orte_rmaps_base_proc_t*) * app->num_procs);
if(NULL == map->procs) { if(NULL == map->procs) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
rc = ORTE_ERR_OUT_OF_RESOURCE; rc = ORTE_ERR_OUT_OF_RESOURCE;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -40,8 +40,8 @@ struct orte_rmaps_round_robin_component_t {
}; };
typedef struct orte_rmaps_round_robin_component_t orte_rmaps_round_robin_component_t; typedef struct orte_rmaps_round_robin_component_t orte_rmaps_round_robin_component_t;
ORTE_DECLSPEC extern orte_rmaps_round_robin_component_t mca_rmaps_round_robin_component; ORTE_MODULE_DECLSPEC extern orte_rmaps_round_robin_component_t mca_rmaps_round_robin_component;
ORTE_DECLSPEC extern orte_rmaps_base_module_t orte_rmaps_round_robin_module; extern orte_rmaps_base_module_t orte_rmaps_round_robin_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -127,11 +127,11 @@ int orte_rmgr_base_terminate_job_not_available(orte_jobid_t);
int orte_rmgr_base_terminate_proc_not_available(const orte_process_name_t*); int orte_rmgr_base_terminate_proc_not_available(const orte_process_name_t*);
int orte_rmgr_base_signal_job_not_available(orte_jobid_t, int32_t); int orte_rmgr_base_signal_job_not_available(orte_jobid_t, int32_t);
int orte_rmgr_base_signal_proc_not_available(const orte_process_name_t*, int32_t); int orte_rmgr_base_signal_proc_not_available(const orte_process_name_t*, int32_t);
int orte_rmgr_base_proc_stage_gate_init(orte_jobid_t job); ORTE_DECLSPEC int orte_rmgr_base_proc_stage_gate_init(orte_jobid_t job);
int orte_rmgr_base_proc_stage_gate_subscribe(orte_jobid_t job, orte_gpr_notify_cb_fn_t, void*, orte_proc_state_t); ORTE_DECLSPEC int orte_rmgr_base_proc_stage_gate_subscribe(orte_jobid_t job, orte_gpr_notify_cb_fn_t, void*, orte_proc_state_t);
int orte_rmgr_base_proc_stage_gate_mgr( ORTE_DECLSPEC int orte_rmgr_base_proc_stage_gate_mgr(
orte_gpr_notify_message_t *msg); orte_gpr_notify_message_t *msg);
int orte_rmgr_base_proc_stage_gate_mgr_abort( ORTE_DECLSPEC int orte_rmgr_base_proc_stage_gate_mgr_abort(
orte_gpr_notify_message_t *msg); orte_gpr_notify_message_t *msg);
int orte_rmgr_base_spawn_not_available( int orte_rmgr_base_spawn_not_available(
orte_app_context_t** app_context, orte_app_context_t** app_context,

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -153,7 +153,7 @@ int orte_rmgr_base_unpack_app_context(orte_buffer_t *buffer, void *dest,
} }
if (app_context[i]->num_map > 0) { if (app_context[i]->num_map > 0) {
app_context[i]->map_data = malloc(sizeof(orte_app_context_map_t*) * app_context[i]->num_map); app_context[i]->map_data = (orte_app_context_map_t**)malloc(sizeof(orte_app_context_map_t*) * app_context[i]->num_map);
if (NULL == app_context[i]->map_data) { if (NULL == app_context[i]->map_data) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -58,7 +58,7 @@ static int orte_rmgr_base_cmd_create(orte_buffer_t* req, orte_buffer_t* rsp)
return rc; return rc;
} }
if(NULL == (context = malloc(sizeof(orte_app_context_t*)*num_context))) { if(NULL == (context = (orte_app_context_t**)malloc(sizeof(orte_app_context_t*)*num_context))) {
ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE); ORTE_ERROR_LOG(ORTE_ERR_OUT_OF_RESOURCE);
return ORTE_ERR_OUT_OF_RESOURCE; return ORTE_ERR_OUT_OF_RESOURCE;
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -30,7 +30,7 @@ extern "C" {
/** Global URM component */ /** Global URM component */
ORTE_DECLSPEC extern orte_rmgr_base_component_t mca_rmgr_cnos_component; ORTE_DECLSPEC extern orte_rmgr_base_component_t mca_rmgr_cnos_component;
/** Global URM module */ /** Global URM module */
ORTE_DECLSPEC extern orte_rmgr_base_module_t orte_rmgr_cnos_module; extern orte_rmgr_base_module_t orte_rmgr_cnos_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -39,9 +39,9 @@ struct orte_rmgr_proxy_component_t {
typedef struct orte_rmgr_proxy_component_t orte_rmgr_proxy_component_t; typedef struct orte_rmgr_proxy_component_t orte_rmgr_proxy_component_t;
/** Global URM component */ /** Global URM component */
ORTE_DECLSPEC extern orte_rmgr_proxy_component_t mca_rmgr_proxy_component; ORTE_MODULE_DECLSPEC extern orte_rmgr_proxy_component_t mca_rmgr_proxy_component;
/** Global URM module */ /** Global URM module */
ORTE_DECLSPEC extern orte_rmgr_base_module_t orte_rmgr_proxy_module; extern orte_rmgr_base_module_t orte_rmgr_proxy_module;
#if defined(c_plusplus) || defined(__cplusplus) #if defined(c_plusplus) || defined(__cplusplus)
} }

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

@ -2,7 +2,7 @@
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology * University Research and Technology
* Corporation. All rights reserved. * Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University * Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights * of Tennessee Research Foundation. All rights
* reserved. * reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart, * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
@ -41,6 +41,10 @@
#include "orte/mca/smr/smr_types.h" #include "orte/mca/smr/smr_types.h"
#include "rmgr_types.h" #include "rmgr_types.h"
#if defined(c_plusplus) || defined(__cplusplus)
extern "C" {
#endif
/* /*
* Component functions - all MUST be provided! * Component functions - all MUST be provided!
*/ */
@ -252,4 +256,8 @@ typedef orte_rmgr_base_component_1_0_0_t orte_rmgr_base_component_t;
*/ */
ORTE_DECLSPEC extern orte_rmgr_base_module_t orte_rmgr; /* holds selected module's function pointers */ ORTE_DECLSPEC extern orte_rmgr_base_module_t orte_rmgr; /* holds selected module's function pointers */
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif
#endif #endif

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше