|
libxmp/libxmpf in Omni Compiler
1.3.4
|
#include <stdio.h>#include <stdlib.h>#include <string.h>#include <stdarg.h>#include "xmp_internal.h"#include "xmp_data_struct.h"#include "xmpco_params.h"

Go to the source code of this file.
Macros | |
| #define | BOOL int |
| #define | TRUE 1 |
| #define | FALSE 0 |
| #define | _ROUND_UP(n, p) (((((size_t)(n))-1)/(p)+1)*(p)) |
| #define | _ROUND_UP_PLUS(n, p) (((n)>0) ? _ROUND_UP(n,p) : (p)) |
| #define | ROUND_UP_COMM(n) _ROUND_UP((n),COMM_UNIT) |
| #define | ROUND_UP_MALLOC(n) _ROUND_UP_PLUS((n),MALLOC_UNIT) |
Typedefs | |
| typedef enum _SyncMode | SyncMode |
| typedef struct _resourceSet_t | ResourceSet_t |
| typedef struct _memoryChunk_t | MemoryChunk_t |
| typedef struct _coarrayInfo_t | CoarrayInfo_t |
| typedef struct _memoryChunkOrder_t | MemoryChunkOrder_t |
| typedef struct _sortedChunkTable_t | SortedChunkTable_t |
Enumerations | |
| enum | _SyncMode { syncNONBLOCK = 0 , syncBLOCK = 1 , syncATOMIC = 2 , syncRUNTIME = 3 } |
Functions | |
| size_t | xmp_coarray_malloc_bytes (void) |
| size_t | xmp_coarray_allocated_bytes (void) |
| size_t | xmp_coarray_garbage_bytes (void) |
| CoarrayInfo_t * | XMPCO_malloc_coarray (char **addr, int count, size_t element, ResourceSet_t *rset) |
| CoarrayInfo_t * | XMPCO_regmem_coarray (void *var, int count, size_t element, ResourceSet_t *rset) |
| CoarrayInfo_t * | XMPCO_malloc_staticCoarray (char **addr, int count, size_t element, int namelen, char *name) |
| have a share of memory in the pool (if not larger than threshold) or allocate individually (if larger than threshold) out: return : pointer to descriptor CoarrayInfo_t addr : address of the coarray object to be allocated in: count : count of elements element: element size namelen: character length of name (for debugging) name : name of the coarray (for debugging) More... | |
| CoarrayInfo_t * | XMPCO_regmem_staticCoarray (void *var, int count, size_t element, int namelen, char *name) |
| Similar to _alloc_static_coarray() except that the coarray is allocated not by the runtime but by the Fortran system. More... | |
| void | XMPCO_free_coarray (CoarrayInfo_t *cinfo) |
| void | XMPCO_deregmem_coarray (CoarrayInfo_t *cinfo) |
| void | XMPCO_malloc_pool (void) |
| void | XMPCO_count_size (int count, size_t element) |
| void | XMPCO_prolog (ResourceSet_t **rset, int namelen, char *name) |
| void | XMPCO_epilog (ResourceSet_t **rset) |
| CoarrayInfo_t * | XMPCO_find_descptr (char *addr, int namelen, char *name) |
| generate and return a descriptor for a coarray DUMMY ARGUMENT More... | |
| void | XMPCO_sync_all (void) |
| void | XMPCO_sync_all_auto (void) |
| void | XMPCO_sync_all_withComm (MPI_Comm comm) |
| void | XMPCO_GET_arrayStmt (CoarrayInfo_t *descPtr, char *baseAddr, int element, int coindex, char *localAddr, int rank, int skip[], int skip_local[], int count[]) |
| void | XMPCO_GET_scalarExpr (CoarrayInfo_t *descPtr, char *baseAddr, int element, int coindex, char *result) |
| void | XMPCO_GET_arrayExpr (CoarrayInfo_t *descPtr, char *baseAddr, int element, int coindex, char *result, int rank, int skip[], int count[]) |
| void | XMPCO_PUT_scalarStmt (CoarrayInfo_t *descPtr, char *baseAddr, int element, int coindex, char *rhs, SyncMode sync_mode) |
| void | XMPCO_PUT_arrayStmt (CoarrayInfo_t *descPtr, char *baseAddr, int element, int coindex, char *rhsAddr, int rank, int skip[], int skip_rhs[], int count[], SyncMode sync_mode) |
| void | XMPCO_PUT_spread (CoarrayInfo_t *descPtr, char *baseAddr, int element, int coindex, char *rhs, int rank, int skip[], int count[], SyncMode sync_mode) |
| int | XMPCO_this_image_coarray_dim (CoarrayInfo_t *cinfo, int corank, int dim) |
| void | XMPCO_this_image_coarray (CoarrayInfo_t *cinfo, int corank, int image[]) |
| void | _XMPCO_set_poolThreshold (unsigned size) |
| void | _XMPCO_set_localBufSize (unsigned size) |
| void | _XMPCO_set_isMsgMode (BOOL sw) |
| void | _XMPCO_set_isMsgMode_quietly (BOOL sw) |
| void | _XMPCO_set_isSafeBufferMode (BOOL sw) |
| void | _XMPCO_set_isSyncPutMode (BOOL sw) |
| void | _XMPCO_set_isEagerCommMode (BOOL sw) |
| void | _XMPCO_reset_isMsgMode (void) |
| unsigned | _XMPCO_get_poolThreshold (void) |
| size_t | _XMPCO_get_localBufSize (void) |
| BOOL | _XMPCO_get_isMsgMode (void) |
| BOOL | _XMPCO_get_isSafeBufferMode (void) |
| BOOL | _XMPCO_get_isSyncPutMode (void) |
| BOOL | _XMPCO_get_isEagerCommMode (void) |
| char * | _XMPCO_get_nameOfCoarray (CoarrayInfo_t *cinfo) |
| char * | _XMPCO_get_baseAddrOfCoarray (CoarrayInfo_t *cinfo) |
| size_t | _XMPCO_get_sizeOfCoarray (CoarrayInfo_t *cinfo) |
| size_t | _XMPCO_get_offsetInCoarray (CoarrayInfo_t *cinfo, char *addr) |
| void | _XMPCO_set_corank (CoarrayInfo_t *cp, int corank) |
| void | _XMPCO_set_codim_withBounds (CoarrayInfo_t *cp, int dim, int lb, int ub) |
| void | _XMPCO_set_codim_withSize (CoarrayInfo_t *cp, int dim, int lb, int size) |
| void | _XMPCO_set_varname (CoarrayInfo_t *cp, int namelen, char *name) |
| CoarrayInfo_t * | _XMPCO_set_nodes (CoarrayInfo_t *cinfo, _XMP_nodes_t *nodes) |
| void * | _XMPCO_get_descForMemoryChunk (CoarrayInfo_t *cinfo) |
| char * | _XMPCO_get_orgAddrOfMemoryChunk (CoarrayInfo_t *cinfo) |
| size_t | _XMPCO_get_sizeOfMemoryChunk (CoarrayInfo_t *cinfo) |
| size_t | _XMPCO_get_offsetInMemoryChunk (CoarrayInfo_t *cinfo, char *addr) |
| BOOL | _XMPCO_isAddrInMemoryChunk (char *localAddr, CoarrayInfo_t *cinfo) |
| void * | _XMPCO_get_infoOfCtrlData (char **baseAddr, size_t *offset, char **name) |
| void * | _XMPCO_get_infoOfLocalBuf (char **baseAddr, size_t *offset, char **name) |
| void * | _XMPCO_get_desc_fromLocalAddr (char *localAddr, char **orgAddr, size_t *offset, char **name) |
| MPI_Comm | _XMPCO_get_comm_fromCoarrayInfo (CoarrayInfo_t *cinfo) |
| void | _XMPCO_fatal (char *format,...) |
| void | _XMPCO_debugPrint (char *format,...) |
| void | _XMPCO_coarrayInit_get (void) |
| void | _XMPCO_coarrayInit_getsub (void) |
| void | _XMPCO_coarrayInit_put (void) |
| int | _XMPCO_nowInTask (void) |
| void | _XMPCO_checkIfInTask (char *msgopt) |
| void | _XMPCO_set_initialThisImage (void) |
| void | _XMPCO_set_initialNumImages (void) |
| int | _XMPCO_get_initialThisImage (void) |
| int | _XMPCO_get_initialNumImages (void) |
| int | _XMPCO_get_currentThisImage (void) |
| int | _XMPCO_get_currentNumImages (void) |
| MPI_Comm | _XMPCO_get_currentComm (void) |
| BOOL | _XMPCO_is_subset_exec (void) |
| int | _XMPCO_transImage_withComm (MPI_Comm comm1, int image1, MPI_Comm comm2) |
| int | _XMPCO_transImage_current2initial (int image) |
| int | _XMPCO_get_initial_image_withDescPtr (int image, CoarrayInfo_t *descPtr) |
| void | _XMPCO_clean_imageDirNodes (void) |
| void | _XMPCO_set_imageDirNodes (_XMP_nodes_t *nodes) |
| _XMP_nodes_t * | _XMPCO_get_imageDirNodes (void) |
| _XMP_nodes_t * | _XMPCO_consume_imageDirNodes (void) |
| MPI_Comm | _XMPCO_get_comm_of_nodes (_XMP_nodes_t *nodes) |
| int | _XMPCO_num_images_onNodes (_XMP_nodes_t *nodes) |
| int | _XMPCO_this_image_onNodes (_XMP_nodes_t *nodes) |
| MPI_Comm | _XMPCO_get_comm_current (void) |
| MPI_Comm | _XMPCO_consume_comm_current (void) |
| void | xmp_sync_memory (const int *status) |
| Execute sync_memory() More... | |
| void | xmp_sync_all (const int *status) |
| Execute sync_all() More... | |
| void | xmp_sync_image (int image, int *status) |
| Execute sync_image() More... | |
| void | xmp_sync_images (const int num, int *image_set, int *status) |
| Execute sync_images() More... | |
| void | xmp_sync_images_all (int *status) |
| Execute sync_images_all() More... | |
| void | _XMP_coarray_malloc_info_1 (const long, const size_t) |
| Set 1-dim coarray information. More... | |
| void | _XMP_coarray_malloc_image_info_1 () |
| Set 1-dim image information. More... | |
| void | _XMP_coarray_malloc (void **, void *) |
| Create coarray object and allocate coarray. More... | |
| void | _XMP_coarray_regmem (void **, void *) |
| Create coarray object but not allocate coarray. More... | |
| void | _XMP_coarray_contiguous_put (const int, void *, const void *, const long, const long, const long, const long) |
| void | _XMP_coarray_contiguous_get (const int, void *, const void *, const long, const long, const long, const long) |
| void | _XMP_coarray_rdma_coarray_set_1 (const long, const long, const long) |
| Set transfer 1-dim coarray information. More... | |
| void | _XMP_coarray_rdma_array_set_1 (const long, const long, const long, const long, const size_t) |
| Set transfer 1-dim array information. More... | |
| void | _XMP_coarray_rdma_image_set_1 (const int) |
| Set 1-dim image information. More... | |
| void | _XMP_coarray_put (void *, void *, void *) |
| void | _XMP_coarray_get (void *, void *, void *) |
| #define _ROUND_UP | ( | n, | |
| p | |||
| ) | (((((size_t)(n))-1)/(p)+1)*(p)) |
| #define _ROUND_UP_PLUS | ( | n, | |
| p | |||
| ) | (((n)>0) ? _ROUND_UP(n,p) : (p)) |
| #define BOOL int |
| #define FALSE 0 |
| #define ROUND_UP_MALLOC | ( | n | ) | _ROUND_UP_PLUS((n),MALLOC_UNIT) |
| #define TRUE 1 |
| typedef struct _coarrayInfo_t CoarrayInfo_t |
| typedef struct _memoryChunk_t MemoryChunk_t |
| typedef struct _memoryChunkOrder_t MemoryChunkOrder_t |
| typedef struct _resourceSet_t ResourceSet_t |
| typedef struct _sortedChunkTable_t SortedChunkTable_t |
| enum _SyncMode |
| void _XMP_coarray_contiguous_get | ( | const int | , |
| void * | , | ||
| const void * | , | ||
| const long | , | ||
| const long | , | ||
| const long | , | ||
| const long | |||
| ) |
| void _XMP_coarray_contiguous_put | ( | const int | , |
| void * | , | ||
| const void * | , | ||
| const long | , | ||
| const long | , | ||
| const long | , | ||
| const long | |||
| ) |
| void _XMP_coarray_get | ( | void * | remote_coarray, |
| void * | local_array, | ||
| void * | local_coarray | ||
| ) |
| void _XMP_coarray_malloc | ( | void ** | coarray_desc, |
| void * | addr | ||
| ) |
Create coarray object and allocate coarray.
| void _XMP_coarray_malloc_image_info_1 | ( | ) |
| void _XMP_coarray_malloc_info_1 | ( | const long | n1, |
| const | size_t | ||
| ) |
| void _XMP_coarray_put | ( | void * | remote_coarray, |
| void * | local_array, | ||
| void * | local_coarray | ||
| ) |
| void _XMP_coarray_rdma_array_set_1 | ( | const long | start1, |
| const long | length1, | ||
| const long | stride1, | ||
| const long | elmts1, | ||
| const | size_t | ||
| ) |
Set transfer 1-dim array information.
| void _XMP_coarray_rdma_coarray_set_1 | ( | const long | start1, |
| const long | length1, | ||
| const long | stride1 | ||
| ) |
Set transfer 1-dim coarray information.
| void _XMP_coarray_rdma_image_set_1 | ( | const int | n1 | ) |
| void _XMP_coarray_regmem | ( | void ** | coarray_desc, |
| void * | addr | ||
| ) |
Create coarray object but not allocate coarray.
| void _XMPCO_checkIfInTask | ( | char * | msgopt | ) |

| void _XMPCO_coarrayInit_get | ( | void | ) |

| void _XMPCO_coarrayInit_getsub | ( | void | ) |

| void _XMPCO_coarrayInit_put | ( | void | ) |

| MPI_Comm _XMPCO_consume_comm_current | ( | void | ) |


| _XMP_nodes_t* _XMPCO_consume_imageDirNodes | ( | void | ) |

| void _XMPCO_debugPrint | ( | char * | format, |
| ... | |||
| ) |


| void _XMPCO_fatal | ( | char * | format, |
| ... | |||
| ) |


| char* _XMPCO_get_baseAddrOfCoarray | ( | CoarrayInfo_t * | cinfo | ) |
| MPI_Comm _XMPCO_get_comm_current | ( | void | ) |
| MPI_Comm _XMPCO_get_comm_fromCoarrayInfo | ( | CoarrayInfo_t * | cinfo | ) |

| MPI_Comm _XMPCO_get_comm_of_nodes | ( | _XMP_nodes_t * | nodes | ) |
| MPI_Comm _XMPCO_get_currentComm | ( | void | ) |


| int _XMPCO_get_currentNumImages | ( | void | ) |


| int _XMPCO_get_currentThisImage | ( | void | ) |


| void* _XMPCO_get_desc_fromLocalAddr | ( | char * | localAddr, |
| char ** | orgAddr, | ||
| size_t * | offset, | ||
| char ** | name | ||
| ) |

| void* _XMPCO_get_descForMemoryChunk | ( | CoarrayInfo_t * | cinfo | ) |

| _XMP_nodes_t* _XMPCO_get_imageDirNodes | ( | void | ) |
| void* _XMPCO_get_infoOfCtrlData | ( | char ** | baseAddr, |
| size_t * | offset, | ||
| char ** | name | ||
| ) |
| void* _XMPCO_get_infoOfLocalBuf | ( | char ** | baseAddr, |
| size_t * | offset, | ||
| char ** | name | ||
| ) |

| int _XMPCO_get_initial_image_withDescPtr | ( | int | image, |
| CoarrayInfo_t * | descPtr | ||
| ) |


| int _XMPCO_get_initialNumImages | ( | void | ) |
| int _XMPCO_get_initialThisImage | ( | void | ) |
| BOOL _XMPCO_get_isEagerCommMode | ( | void | ) |
| BOOL _XMPCO_get_isMsgMode | ( | void | ) |
| BOOL _XMPCO_get_isSafeBufferMode | ( | void | ) |
| BOOL _XMPCO_get_isSyncPutMode | ( | void | ) |
| size_t _XMPCO_get_localBufSize | ( | void | ) |
| char* _XMPCO_get_nameOfCoarray | ( | CoarrayInfo_t * | cinfo | ) |
| size_t _XMPCO_get_offsetInCoarray | ( | CoarrayInfo_t * | cinfo, |
| char * | addr | ||
| ) |
| size_t _XMPCO_get_offsetInMemoryChunk | ( | CoarrayInfo_t * | cinfo, |
| char * | addr | ||
| ) |
| char* _XMPCO_get_orgAddrOfMemoryChunk | ( | CoarrayInfo_t * | cinfo | ) |
| unsigned _XMPCO_get_poolThreshold | ( | void | ) |
| size_t _XMPCO_get_sizeOfCoarray | ( | CoarrayInfo_t * | cinfo | ) |
| size_t _XMPCO_get_sizeOfMemoryChunk | ( | CoarrayInfo_t * | cinfo | ) |

| BOOL _XMPCO_is_subset_exec | ( | void | ) |


| BOOL _XMPCO_isAddrInMemoryChunk | ( | char * | localAddr, |
| CoarrayInfo_t * | cinfo | ||
| ) |


| int _XMPCO_nowInTask | ( | void | ) |


| int _XMPCO_num_images_onNodes | ( | _XMP_nodes_t * | nodes | ) |
| void _XMPCO_set_codim_withBounds | ( | CoarrayInfo_t * | cp, |
| int | dim, | ||
| int | lb, | ||
| int | ub | ||
| ) |

| void _XMPCO_set_codim_withSize | ( | CoarrayInfo_t * | cp, |
| int | dim, | ||
| int | lb, | ||
| int | size | ||
| ) |

| void _XMPCO_set_corank | ( | CoarrayInfo_t * | cp, |
| int | corank | ||
| ) |
| void _XMPCO_set_imageDirNodes | ( | _XMP_nodes_t * | nodes | ) |
| void _XMPCO_set_initialNumImages | ( | void | ) |

| void _XMPCO_set_initialThisImage | ( | void | ) |

| void _XMPCO_set_isEagerCommMode | ( | BOOL | sw | ) |
| void _XMPCO_set_isMsgMode | ( | BOOL | sw | ) |
| void _XMPCO_set_isMsgMode_quietly | ( | BOOL | sw | ) |
| void _XMPCO_set_isSafeBufferMode | ( | BOOL | sw | ) |
| void _XMPCO_set_isSyncPutMode | ( | BOOL | sw | ) |
| void _XMPCO_set_localBufSize | ( | unsigned | size | ) |
| CoarrayInfo_t* _XMPCO_set_nodes | ( | CoarrayInfo_t * | cinfo, |
| _XMP_nodes_t * | nodes | ||
| ) |
| void _XMPCO_set_poolThreshold | ( | unsigned | size | ) |
| void _XMPCO_set_varname | ( | CoarrayInfo_t * | cp, |
| int | namelen, | ||
| char * | name | ||
| ) |
| int _XMPCO_this_image_onNodes | ( | _XMP_nodes_t * | nodes | ) |
| int _XMPCO_transImage_current2initial | ( | int | image | ) |


| int _XMPCO_transImage_withComm | ( | MPI_Comm | comm1, |
| int | image1, | ||
| MPI_Comm | comm2 | ||
| ) |


| size_t xmp_coarray_allocated_bytes | ( | void | ) |

| size_t xmp_coarray_garbage_bytes | ( | void | ) |
| void xmp_sync_all | ( | const int * | status | ) |
Execute sync_all()
| void xmp_sync_image | ( | int | image, |
| int * | status | ||
| ) |
Execute sync_image()
| void xmp_sync_images | ( | const int | num, |
| int * | image_set, | ||
| int * | status | ||
| ) |
Execute sync_images()

| void xmp_sync_images_all | ( | int * | status | ) |
Execute sync_images_all()
| void xmp_sync_memory | ( | const int * | status | ) |
Execute sync_memory()
| void XMPCO_count_size | ( | int | count, |
| size_t | element | ||
| ) |

| void XMPCO_deregmem_coarray | ( | CoarrayInfo_t * | cinfo | ) |

| void XMPCO_epilog | ( | ResourceSet_t ** | rset | ) |

| CoarrayInfo_t* XMPCO_find_descptr | ( | char * | addr, |
| int | namelen, | ||
| char * | name | ||
| ) |
generate and return a descriptor for a coarray DUMMY ARGUMENT

| void XMPCO_free_coarray | ( | CoarrayInfo_t * | cinfo | ) |

| void XMPCO_GET_arrayExpr | ( | CoarrayInfo_t * | descPtr, |
| char * | baseAddr, | ||
| int | element, | ||
| int | coindex, | ||
| char * | result, | ||
| int | rank, | ||
| int | skip[], | ||
| int | count[] | ||
| ) |

| void XMPCO_GET_arrayStmt | ( | CoarrayInfo_t * | descPtr, |
| char * | baseAddr, | ||
| int | element, | ||
| int | coindex, | ||
| char * | localAddr, | ||
| int | rank, | ||
| int | skip[], | ||
| int | skip_local[], | ||
| int | count[] | ||
| ) |

| void XMPCO_GET_scalarExpr | ( | CoarrayInfo_t * | descPtr, |
| char * | baseAddr, | ||
| int | element, | ||
| int | coindex, | ||
| char * | result | ||
| ) |

| CoarrayInfo_t* XMPCO_malloc_coarray | ( | char ** | addr, |
| int | count, | ||
| size_t | element, | ||
| ResourceSet_t * | rset | ||
| ) |

| void XMPCO_malloc_pool | ( | void | ) |

| CoarrayInfo_t* XMPCO_malloc_staticCoarray | ( | char ** | addr, |
| int | count, | ||
| size_t | element, | ||
| int | namelen, | ||
| char * | name | ||
| ) |
have a share of memory in the pool (if not larger than threshold) or allocate individually (if larger than threshold) out: return : pointer to descriptor CoarrayInfo_t addr : address of the coarray object to be allocated in: count : count of elements element: element size namelen: character length of name (for debugging) name : name of the coarray (for debugging)

| void XMPCO_prolog | ( | ResourceSet_t ** | rset, |
| int | namelen, | ||
| char * | name | ||
| ) |
| void XMPCO_PUT_arrayStmt | ( | CoarrayInfo_t * | descPtr, |
| char * | baseAddr, | ||
| int | element, | ||
| int | coindex, | ||
| char * | rhsAddr, | ||
| int | rank, | ||
| int | skip[], | ||
| int | skip_rhs[], | ||
| int | count[], | ||
| SyncMode | sync_mode | ||
| ) |

| void XMPCO_PUT_scalarStmt | ( | CoarrayInfo_t * | descPtr, |
| char * | baseAddr, | ||
| int | element, | ||
| int | coindex, | ||
| char * | rhs, | ||
| SyncMode | sync_mode | ||
| ) |

| void XMPCO_PUT_spread | ( | CoarrayInfo_t * | descPtr, |
| char * | baseAddr, | ||
| int | element, | ||
| int | coindex, | ||
| char * | rhs, | ||
| int | rank, | ||
| int | skip[], | ||
| int | count[], | ||
| SyncMode | sync_mode | ||
| ) |

| CoarrayInfo_t* XMPCO_regmem_coarray | ( | void * | var, |
| int | count, | ||
| size_t | element, | ||
| ResourceSet_t * | rset | ||
| ) |

| CoarrayInfo_t* XMPCO_regmem_staticCoarray | ( | void * | var, |
| int | count, | ||
| size_t | element, | ||
| int | namelen, | ||
| char * | name | ||
| ) |
Similar to _alloc_static_coarray() except that the coarray is allocated not by the runtime but by the Fortran system.
out: return : pointer to descriptor CoarrayInfo_t in: var : pointer to the coarray count : count of elements element : element size name : name of the coarray (for debugging) namelen : character length of name (for debugging)

| void XMPCO_sync_all | ( | void | ) |

| void XMPCO_sync_all_auto | ( | void | ) |


| void XMPCO_sync_all_withComm | ( | MPI_Comm | comm | ) |

| void XMPCO_this_image_coarray | ( | CoarrayInfo_t * | cinfo, |
| int | corank, | ||
| int | image[] | ||
| ) |

| int XMPCO_this_image_coarray_dim | ( | CoarrayInfo_t * | cinfo, |
| int | corank, | ||
| int | dim | ||
| ) |
