Moving all the header files. :-)
This commit was SVN r185.
Этот коммит содержится в:
родитель
03fa5c843b
Коммит
770d49570b
@ -370,6 +370,7 @@ AC_CONFIG_FILES([
|
||||
|
||||
src/Makefile
|
||||
src/include/Makefile
|
||||
src/include/lam/Makefile
|
||||
|
||||
src/lam/Makefile
|
||||
src/lam/ctnetwork/Makefile
|
||||
|
@ -5,33 +5,12 @@
|
||||
|
||||
include $(top_srcdir)/config/Makefile.options
|
||||
|
||||
headers = \
|
||||
communicator.h \
|
||||
datatype.h \
|
||||
group.h \
|
||||
lam_constants.h \
|
||||
lam.h \
|
||||
lam_atomic.h \
|
||||
lam_stdint.h \
|
||||
lam_types.h \
|
||||
proc.h \
|
||||
totalview.h
|
||||
|
||||
include_HEADERS = \
|
||||
lam_config.h \
|
||||
lam_config_bottom.h \
|
||||
mpi.h \
|
||||
mpif.h
|
||||
|
||||
# Conditionally install the header files
|
||||
|
||||
if WANT_INSTALL_HEADERS
|
||||
lamdir = $(includedir)/lam/include
|
||||
lam_HEADERS = $(headers) $(include_HEADERS)
|
||||
else
|
||||
lamdir = $(includedir)
|
||||
endif
|
||||
|
||||
# Add a hook to run *after* the file lam_config.h has been installed
|
||||
# out to the target location. It changes the pesky PACKAGE_* macros
|
||||
# that autoconf automatically generates (and there is no way of
|
||||
|
102
src/lam/atomic.h
Обычный файл
102
src/lam/atomic.h
Обычный файл
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Atomic operations.
|
||||
*
|
||||
* This API is patterned after the FreeBSD kernel atomic interface,
|
||||
* but using C99 integer types. The FreeBSD interface is documented
|
||||
* at
|
||||
*
|
||||
* http://www.freebsd.org/cgi/man.cgi?query=atomic&sektion=9
|
||||
*/
|
||||
|
||||
#ifndef LAM_ATOMIC_H
|
||||
#define LAM_ATOMIC_H 1
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "lam/stdint.h"
|
||||
|
||||
/*
|
||||
* prototypes (we may not implement all of this interface)
|
||||
*/
|
||||
|
||||
static inline int lam_atomic_cmpset_acq_int(volatile int *p, int old, int new);
|
||||
static inline int lam_atomic_cmpset_rel_int(volatile int *p, int old, int new);
|
||||
static inline int lam_atomic_load_acq_int(volatile int *p);
|
||||
static inline int lam_atomic_readandclear_int(volatile int *p);
|
||||
static inline void lam_atomic_add_acq_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_add_rel_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_clear_acq_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_clear_rel_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_set_acq_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_set_rel_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_store_rel_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_subtract_acq_int(volatile int *p, int v);
|
||||
static inline void lam_atomic_subtract_rel_int(volatile int *p, int v);
|
||||
|
||||
static inline int lam_atomic_cmpset_acq_long(volatile long *p, long old, long new);
|
||||
static inline int lam_atomic_cmpset_rel_long(volatile long *p, long old, long new);
|
||||
static inline long lam_atomic_load_acq_long(volatile long *p);
|
||||
static inline long lam_atomic_readandclear_long(volatile long *p);
|
||||
static inline void lam_atomic_add_acq_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_add_rel_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_clear_acq_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_clear_rel_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_set_acq_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_set_rel_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_store_rel_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_subtract_acq_long(volatile long *p, long v);
|
||||
static inline void lam_atomic_subtract_rel_long(volatile long *p, long v);
|
||||
|
||||
static inline int lam_atomic_cmpset_acq_ptr(volatile uintptr_t *p, uintptr_t old, uintptr_t new);
|
||||
static inline int lam_atomic_cmpset_rel_ptr(volatile uintptr_t *p, uintptr_t old, uintptr_t new);
|
||||
static inline uintptr_t lam_atomic_load_acq_ptr(volatile uintptr_t *p);
|
||||
static inline uintptr_t lam_atomic_readandclear_ptr(volatile uintptr_t *p);
|
||||
static inline void lam_atomic_add_acq_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_add_rel_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_clear_acq_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_clear_rel_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_set_acq_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_set_rel_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_store_rel_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_subtract_acq_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
static inline void lam_atomic_subtract_rel_ptr(volatile uintptr_t *p, uintptr_t v);
|
||||
|
||||
static inline int lam_atomic_cmpset_acq_uint32_t(volatile uint32_t *p, uint32_t old, uint32_t new);
|
||||
static inline int lam_atomic_cmpset_rel_uint32_t(volatile uint32_t *p, uint32_t old, uint32_t new);
|
||||
static inline uint32_t lam_atomic_load_acq_uint32_t(volatile uint32_t *p);
|
||||
static inline uint32_t lam_atomic_readandclear_uint32_t(volatile uint32_t *p);
|
||||
static inline void lam_atomic_add_acq_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_add_rel_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_clear_acq_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_clear_rel_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_set_acq_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_set_rel_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_store_rel_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_subtract_acq_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
static inline void lam_atomic_subtract_rel_uint32_t(volatile uint32_t *p, uint32_t v);
|
||||
|
||||
static inline int lam_atomic_cmpset_acq_uint64_t(volatile uint64_t *p, uint64_t old, uint64_t new);
|
||||
static inline int lam_atomic_cmpset_rel_uint64_t(volatile uint64_t *p, uint64_t old, uint64_t new);
|
||||
static inline uint64_t lam_atomic_load_acq_uint64_t(volatile uint64_t *p);
|
||||
static inline uint64_t lam_atomic_readandclear_uint64_t(volatile uint64_t *p);
|
||||
static inline void lam_atomic_add_acq_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_add_rel_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_clear_acq_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_clear_rel_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_set_acq_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_set_rel_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_store_rel_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_subtract_acq_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
static inline void lam_atomic_subtract_rel_uint64_t(volatile uint64_t *p, uint64_t v);
|
||||
|
||||
/*
|
||||
* implementation (system specific)
|
||||
*/
|
||||
|
||||
/* #include "os/XXXX/atomic.h" */
|
||||
|
||||
#endif /* LAM_ATOMIC_H */
|
23
src/lam/constants.h
Обычный файл
23
src/lam/constants.h
Обычный файл
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_CONSTANTS_H
|
||||
#define LAM_CONSTANTS_H
|
||||
|
||||
/* error codes */
|
||||
enum {
|
||||
LAM_SUCCESS = 0,
|
||||
LAM_ERROR = -1,
|
||||
LAM_ERR_OUT_OF_RESOURCE = -2, /* fatal error */
|
||||
LAM_ERR_TEMP_OUT_OF_RESOURCE = -3, /* try again later */
|
||||
LAM_ERR_RESOURCE_BUSY = -4,
|
||||
LAM_ERR_BAD_PARAM = -5, /* equivalent to MPI_ERR_ARG error code */
|
||||
LAM_ERR_RECV_LESS_THAN_POSTED = -6,
|
||||
LAM_ERR_RECV_MORE_THAN_POSTED = -7,
|
||||
LAM_ERR_NO_MATCH_YET = -8,
|
||||
LAM_ERR_FATAL = -9
|
||||
};
|
||||
|
||||
#endif /* LAM_CONSTANTS_H */
|
||||
|
@ -2,5 +2,5 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ctclient.h"
|
||||
#include "lam/ctnetwork/ctclient.h"
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ctpeer.h"
|
||||
#include "lam/ctnetwork/ctpeer.h"
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ctnode.h"
|
||||
#include "lam/ctnetwork/ctnode.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef LAM_CT_NODE_H
|
||||
#define LAM_CT_NODE_H
|
||||
|
||||
#include "lam_stdint.h"
|
||||
#include "lam/stdint.h"
|
||||
#include "lam/lfc/object.h"
|
||||
#include "lam/lfc/hash_table.h"
|
||||
|
||||
|
@ -2,5 +2,5 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "ctpeer.h"
|
||||
#include "lam/ctnetwork/ctpeer.h"
|
||||
|
||||
|
23
src/lam/lam.h
Обычный файл
23
src/lam/lam.h
Обычный файл
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_H
|
||||
#define LAM_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "lam/stdint.h"
|
||||
#include "lam/types.h"
|
||||
#include "lam/constants.h"
|
||||
|
||||
#if LAM_ENABLE_MEM_ZERO
|
||||
#include <string.h>
|
||||
#define LAM_MEM_ZERO(foo) memset(&(foo), 0, sizeof(foo))
|
||||
#else
|
||||
#define LAM_MEM_ZERO(foo)
|
||||
#endif
|
||||
|
||||
#endif /* LAM_H */
|
@ -6,7 +6,7 @@
|
||||
#define LAM_ARRAY_H
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "include/lam_types.h"
|
||||
#include "lam/types.h"
|
||||
#include "lam/lfc/object.h"
|
||||
|
||||
/*
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "include/lam_constants.h"
|
||||
#include "lam/constants.h"
|
||||
#include "lam/lfc/hash_table.h"
|
||||
|
||||
#define BUCKET_ALLOC_SZ 5
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define LAM_HASH_TABLE_H
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "include/lam_stdint.h"
|
||||
#include "lam/stdint.h"
|
||||
#include "lam/lfc/object.h"
|
||||
|
||||
typedef struct lam_fhnode
|
||||
|
@ -6,8 +6,8 @@
|
||||
#define LAM_OBJECT_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "include/lam_types.h"
|
||||
#include "lam/os/atomic.h"
|
||||
#include "lam/types.h"
|
||||
#include "lam/atomic.h"
|
||||
|
||||
/*
|
||||
*
|
||||
@ -83,6 +83,13 @@ typedef struct lam_object
|
||||
void lam_obj_init(lam_object_t *obj);
|
||||
void lam_obj_destroy(lam_object_t *obj);
|
||||
|
||||
/*
|
||||
* This function is used by inline functions later in this file, and
|
||||
* it must be defined by other header files later (eg., one of the
|
||||
* atomic.h's).
|
||||
*/
|
||||
static inline int fetchNadd(volatile int *addr, int inc);
|
||||
|
||||
/*
|
||||
returns 1 if object's class is derived from cls, otherwise 0.
|
||||
*/
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "lam_constants.h"
|
||||
#include "lam/constants.h"
|
||||
#include "lam/lfc/object.h"
|
||||
#include "lam/mem/mem_globals.h"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <string.h>
|
||||
#include <sys/errno.h>
|
||||
#include <unistd.h>
|
||||
#include "lam_constants.h"
|
||||
#include "lam/constants.h"
|
||||
#include "lam/mem/mem_pool.h"
|
||||
#include "lam/mem/sharedmem_util.h"
|
||||
#include "lam/util/lam_log.h"
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef LAM_MEMORY_POOL_H
|
||||
#define LAM_MEMORY_POOL_H
|
||||
|
||||
#include "lam_types.h"
|
||||
#include "lam/types.h"
|
||||
#include "lam/lfc/object.h"
|
||||
#include "lam/mem/allocator.h"
|
||||
#include "lam/threads/mutex.h"
|
||||
|
@ -27,6 +27,7 @@ typedef struct {
|
||||
volatile unsigned long long data;
|
||||
} bigAtomicUnsignedInt;
|
||||
|
||||
/* JMS This section is commented out */
|
||||
/*
|
||||
#ifdef __INTEL_COMPILER
|
||||
|
||||
@ -44,7 +45,6 @@ extern "C"
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#else
|
||||
*/
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_constants.h"
|
||||
#include "lam/constants.h"
|
||||
#include "lam/lfc/object.h"
|
||||
|
||||
typedef int affinity_t;
|
||||
|
174
src/lam/stdint.h
Обычный файл
174
src/lam/stdint.h
Обычный файл
@ -0,0 +1,174 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*
|
||||
* This file includes the C99 stdint.h file if available, and otherwise
|
||||
* defines fixed-width types according to the SIZEOF information
|
||||
* gathered by configure.
|
||||
*/
|
||||
|
||||
#ifndef LAM_STDINT_H
|
||||
#define LAM_STDINT_H 1
|
||||
|
||||
#include "lam_config.h"
|
||||
|
||||
#ifdef HAVE_STDINT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#else
|
||||
|
||||
/*
|
||||
* Include what we can and define what is missing.
|
||||
*/
|
||||
|
||||
#if HAVE_INTTYPES_H
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
#if HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/* 8-bit */
|
||||
|
||||
#if SIZEOF_CHAR == 1
|
||||
|
||||
#ifndef HAVE_INT8_T
|
||||
typedef signed char int8_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT8_T
|
||||
typedef unsigned char uint8_t;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error Failed to define 8-bit types
|
||||
|
||||
#endif
|
||||
|
||||
/* 16-bit */
|
||||
|
||||
#if SIZEOF_SHORT == 2
|
||||
|
||||
#ifndef HAVE_INT16_T
|
||||
typedef signed short int16_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT16_T
|
||||
typedef unsigned short uint16_t;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error Failed to define 16-bit types
|
||||
|
||||
#endif
|
||||
|
||||
/* 32-bit */
|
||||
|
||||
#if SIZEOF_INT == 4
|
||||
|
||||
#ifndef HAVE_INT32_T
|
||||
typedef signed int int32_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT32_T
|
||||
typedef unsigned int uint32_t;
|
||||
#endif
|
||||
|
||||
#elif SIZEOF_LONG == 4
|
||||
|
||||
#ifndef HAVE_INT32_T
|
||||
typedef signed long int32_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT32_T
|
||||
typedef unsigned long uint32_t;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error Failed to define 32-bit types
|
||||
|
||||
#endif
|
||||
|
||||
/* 64-bit */
|
||||
|
||||
#if SIZEOF_INT == 8
|
||||
|
||||
#ifndef HAVE_INT64_T
|
||||
typedef signed int int64_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT64_T
|
||||
typedef unsigned int uint64_t;
|
||||
#endif
|
||||
|
||||
#elif SIZEOF_LONG == 8
|
||||
|
||||
#ifndef HAVE_INT64_T
|
||||
typedef signed long int64_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT64_T
|
||||
typedef unsigned long uint64_t;
|
||||
#endif
|
||||
|
||||
#elif HAVE_LONG_LONG && SIZEOF_LONG_LONG == 8
|
||||
|
||||
#ifndef HAVE_INT64_T
|
||||
typedef signed long long int64_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINT64_T
|
||||
typedef unsigned long long uint64_t;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error Failed to define 64-bit types
|
||||
|
||||
#endif
|
||||
|
||||
/* Pointers */
|
||||
|
||||
#if SIZEOF_VOID_P == SIZEOF_INT
|
||||
|
||||
#ifndef HAVE_INTPTR_T
|
||||
typedef signed int intptr_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINTPTR_T
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
|
||||
#elif SIZEOF_VOID_P == SIZEOF_LONG
|
||||
|
||||
#ifndef HAVE_INTPTR_T
|
||||
typedef signed long intptr_t;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UINTPTR_T
|
||||
typedef unsigned long uintptr_t;
|
||||
#endif
|
||||
|
||||
#elif HAVE_LONG_LONG && SIZEOF_VOID_P == SIZEOF_LONG_LONG
|
||||
|
||||
#ifndef HAVE_INTPTR_T
|
||||
typedef signed long long intptr_t;
|
||||
#endif
|
||||
#ifndef HAVE_UINTPTR_T
|
||||
typedef unsigned long long uintptr_t;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#error Failed to define pointer-sized integer types
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_STDINT_H */
|
||||
|
||||
#endif /* LAM_STDINT_H */
|
||||
|
11
src/lam/totalview.h
Обычный файл
11
src/lam/totalview.h
Обычный файл
@ -0,0 +1,11 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_TOTALVIEW_H
|
||||
#define LAM_TOTALVIEW_H
|
||||
|
||||
extern int lam_tv_comm_sequence_number;
|
||||
|
||||
#endif /* LAM_TOTALVIEW_H */
|
||||
|
32
src/lam/types.h
Обычный файл
32
src/lam/types.h
Обычный файл
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_TYPES_H
|
||||
#define LAM_TYPES_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "lam/stdint.h"
|
||||
|
||||
/*
|
||||
* Increase FD_SETSIZE
|
||||
*/
|
||||
|
||||
#ifndef LAM_FD_SETSIZE
|
||||
#define LAM_FD_SETSIZE 4096
|
||||
#endif
|
||||
|
||||
typedef struct _lam_fd_set {
|
||||
uint32_t fds_bits[LAM_FD_SETSIZE / NFDBITS];
|
||||
} lam_fd_set_t;
|
||||
|
||||
#define LAM_FD_ZERO(fds) FD_ZERO((fd_set*)(fds))
|
||||
#define LAM_FD_SET(fd,fds) FD_SET((fd),(fd_set*)(fds))
|
||||
#define LAM_FD_CLR(fd,fds) FD_CLR((fd),(fd_set*)(fds))
|
||||
#define LAM_FD_ISSET(fd,fds) FD_ISSET((fd),(fd_set*)(fds))
|
||||
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#include "lam_log.h"
|
||||
#include "lam/util/lam_log.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef LAM_REACTOR_H
|
||||
#define LAM_REACTOR_H
|
||||
|
||||
#include "include/lam_types.h"
|
||||
#include "lam/types.h"
|
||||
#include "lam/lfc/list.h"
|
||||
#include "lam/lfc/hash_table.h"
|
||||
#include "lam/threads/mutex.h"
|
||||
|
@ -197,7 +197,7 @@ extern "C" {
|
||||
int mca_coll_base_close(void);
|
||||
int mca_coll_base_init_comm(MPI_Comm comm);
|
||||
int mca_coll_base_get_param(MPI_Comm comm, int keyval);
|
||||
int mca_coll_base_open(lam_cmt_line_t *cmd);
|
||||
int mca_coll_base_open(lam_cmd_line_t *cmd);
|
||||
int mca_coll_base_query(void);
|
||||
|
||||
int mca_coll_base_empty_checkpoint(MPI_Comm comm);
|
||||
@ -227,8 +227,8 @@ extern int mca_coll_did;
|
||||
extern int mca_coll_base_crossover;
|
||||
extern int mca_coll_base_associative;
|
||||
extern int mca_coll_base_reduce_crossover;
|
||||
extern lam_list_t *mca_coll_base_opened;
|
||||
extern lam_list_t *mca_coll_base_available;
|
||||
extern lam_dbl_list_t *mca_coll_base_opened;
|
||||
extern lam_dbl_list_t *mca_coll_base_available;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -6,9 +6,9 @@
|
||||
#ifndef MCA_PML_BASE_REQUEST_H
|
||||
#define MCA_PML_BASE_REQUEST_H
|
||||
|
||||
#include "communicator.h"
|
||||
#include "datatype.h"
|
||||
#include "include/request.h"
|
||||
#include "lam/communicator.h"
|
||||
#include "lam/datatype.h"
|
||||
#include "lam/request.h"
|
||||
#include "lam/mem/free_list.h"
|
||||
#include "mca/mpi/pml/pml.h"
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
#ifndef LAM_MCA_PML_H
|
||||
#define LAM_MCA_PML_H
|
||||
|
||||
#include "lam.h"
|
||||
#include "proc.h"
|
||||
#include "lam/lam.h"
|
||||
#include "lam/proc.h"
|
||||
#include "lam/lfc/list.h"
|
||||
#include "mca/mca.h"
|
||||
|
||||
|
49
src/mpi/communicator/communicator.h
Обычный файл
49
src/mpi/communicator/communicator.h
Обычный файл
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_COMMUNICATOR
|
||||
#define LAM_COMMUNICATOR
|
||||
|
||||
#include "mpi.h"
|
||||
#include "lam/group.h"
|
||||
#include "lam/threads/mutex.h"
|
||||
#include "mca/mpi/coll/coll.h"
|
||||
|
||||
struct lam_communicator_t {
|
||||
char c_name[MPI_MAX_OBJECT_NAME];
|
||||
int c_contextid;
|
||||
int c_refcount;
|
||||
int c_flags;
|
||||
|
||||
lam_group_t c_local_group;
|
||||
lam_group_t c_remote_group;
|
||||
|
||||
|
||||
/* Queues */
|
||||
|
||||
/* Attributes */
|
||||
|
||||
/* Topology information */
|
||||
|
||||
/* Error handling */
|
||||
|
||||
#if 0
|
||||
MPI_Errhandler c_error_handler;
|
||||
#endif
|
||||
|
||||
/* Hooks for PML to hang things */
|
||||
struct mca_pml_comm_t* c_pml_comm;
|
||||
|
||||
#if 0
|
||||
/* Hooks for collectives to hang things */
|
||||
mca_coll_t c_coll;
|
||||
struct mca_coll_comm_t* c_coll_comm;
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct lam_communicator_t lam_communicator_t;
|
||||
|
||||
|
||||
#endif /* LAM_COMMUNICATOR_H */
|
||||
|
@ -7,7 +7,7 @@
|
||||
#ifdef DATATYPES_ARE_READY
|
||||
|
||||
#include "lam_config.h"
|
||||
#include "datatype.h"
|
||||
#include "lam/datatype.h"
|
||||
|
||||
|
||||
lam_class_info_t lam_datatype_cls = {
|
||||
|
23
src/mpi/group/group.h
Обычный файл
23
src/mpi/group/group.h
Обычный файл
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_GROUP_H
|
||||
#define LAM_GROUP_H
|
||||
|
||||
#include "mpi.h"
|
||||
#include "lam/proc.h"
|
||||
|
||||
|
||||
typedef struct lam_group {
|
||||
char g_name[MPI_MAX_OBJECT_NAME];
|
||||
|
||||
/* Processes */
|
||||
|
||||
lam_proc_t **g_procs;
|
||||
size_t g_proc_count;
|
||||
|
||||
} lam_group_t;
|
||||
|
||||
|
||||
#endif /* LAM_GROUP_H */
|
@ -8,8 +8,8 @@
|
||||
|
||||
#include "mpi/c/bindings.h"
|
||||
#include "lam/util/strncpy.h"
|
||||
#include "communicator.h"
|
||||
#include "totalview.h"
|
||||
#include "lam/communicator.h"
|
||||
#include "lam/totalview.h"
|
||||
|
||||
#if LAM_WANT_MPI_PROFILING && LAM_HAVE_WEAK_SYMBOLS
|
||||
#pragma weak PMPI_Comm_set_name = MPI_Comm_set_name
|
||||
|
38
src/mpi/proc/proc.h
Обычный файл
38
src/mpi/proc/proc.h
Обычный файл
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_PROC
|
||||
#define LAM_PROC
|
||||
|
||||
#include "lam/lfc/list.h"
|
||||
|
||||
|
||||
extern lam_class_info_t lam_proc_cls;
|
||||
extern lam_dbl_list_t lam_procs;
|
||||
|
||||
|
||||
struct lam_proc_t {
|
||||
lam_dbl_item_t super; /* allow proc to be placed on a list */
|
||||
pid_t proc_id;
|
||||
int proc_gid; /* globally unique identifier? */
|
||||
struct mca_pml_proc_t* proc_pml; /* PML specific proc data */
|
||||
|
||||
/* JMS: need to have the following information:
|
||||
|
||||
- endian info
|
||||
- type size info
|
||||
- peer parallel job id
|
||||
- how am i [mpi] connected (bitmap): spawn (parent/child),
|
||||
connect, accept, joint
|
||||
*/
|
||||
};
|
||||
typedef struct lam_proc_t lam_proc_t;
|
||||
|
||||
|
||||
void lam_proc_init(lam_proc_t*);
|
||||
void lam_proc_destroy(lam_proc_t*);
|
||||
|
||||
|
||||
#endif /* LAM_PROC */
|
||||
|
31
src/mpi/request/request.h
Обычный файл
31
src/mpi/request/request.h
Обычный файл
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* $HEADER$
|
||||
*/
|
||||
|
||||
#ifndef LAM_REQUEST_H
|
||||
#define LAM_REQUEST_H
|
||||
|
||||
#include "mpi.h"
|
||||
#include "lam/lfc/list.h"
|
||||
|
||||
|
||||
extern lam_class_info_t lam_request_cls;
|
||||
|
||||
typedef enum {
|
||||
LAM_REQUEST_PML,
|
||||
LAM_REQUEST_IO,
|
||||
LAM_REQUEST_GEN,
|
||||
LAM_REQUEST_MAX
|
||||
} lam_request_type_t;
|
||||
|
||||
struct lam_request_t {
|
||||
lam_dbl_item_t super;
|
||||
lam_request_type_t req_type;
|
||||
};
|
||||
typedef struct lam_request_t lam_request_t;
|
||||
|
||||
void lam_request_init(lam_request_t*);
|
||||
void lam_request_destroy(lam_request_t*);
|
||||
|
||||
#endif
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user