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.
|
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 *) |
|
◆ _ROUND_UP
#define _ROUND_UP |
( |
|
n, |
|
|
|
p |
|
) |
| (((((size_t)(n))-1)/(p)+1)*(p)) |
◆ _ROUND_UP_PLUS
#define _ROUND_UP_PLUS |
( |
|
n, |
|
|
|
p |
|
) |
| (((n)>0) ? _ROUND_UP(n,p) : (p)) |
◆ BOOL
◆ FALSE
◆ ROUND_UP_COMM
◆ ROUND_UP_MALLOC
◆ TRUE
◆ CoarrayInfo_t
◆ MemoryChunk_t
◆ MemoryChunkOrder_t
◆ ResourceSet_t
◆ SortedChunkTable_t
◆ SyncMode
◆ _SyncMode
Enumerator |
---|
syncNONBLOCK | |
syncBLOCK | |
syncATOMIC | |
syncRUNTIME | |
◆ _XMP_coarray_contiguous_get()
void _XMP_coarray_contiguous_get |
( |
const int |
, |
|
|
void * |
, |
|
|
const void * |
, |
|
|
const long |
, |
|
|
const long |
, |
|
|
const long |
, |
|
|
const long |
|
|
) |
| |
◆ _XMP_coarray_contiguous_put()
void _XMP_coarray_contiguous_put |
( |
const int |
, |
|
|
void * |
, |
|
|
const void * |
, |
|
|
const long |
, |
|
|
const long |
, |
|
|
const long |
, |
|
|
const long |
|
|
) |
| |
◆ _XMP_coarray_get()
void _XMP_coarray_get |
( |
void * |
, |
|
|
void * |
, |
|
|
void * |
|
|
) |
| |
1225 if(_transfer_coarray_elmts == 0 || _transfer_array_elmts == 0)
return;
1227 if(_transfer_coarray_elmts != _transfer_array_elmts && _transfer_coarray_elmts != 1){
1228 _XMP_fatal(
"Coarray Error ! transfer size is wrong.\n") ;
1232 int target_rank = 0;
1233 for(
int i=0;i<_image_dims;i++)
1234 target_rank += ((
_XMP_coarray_t*)remote_coarray)->distance_of_image_elmts[i] * _image_num[i];
1236 check_target_rank(target_rank);
1238 for(
int i=0;i<_coarray_dims;i++){
1243 int remote_coarray_is_contiguous = _check_contiguous(_coarray, _coarray_dims, _transfer_coarray_elmts);
1244 int local_array_is_contiguous = _check_contiguous(_array, _array_dims, _transfer_array_elmts);
1253 _XMP_local_get(local_array, remote_coarray, local_array_is_contiguous, remote_coarray_is_contiguous,
1254 _array_dims, _coarray_dims, _array, _coarray, (
size_t)_transfer_array_elmts, (
size_t)_transfer_coarray_elmts);
1258 _XMP_gasnet_get(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank,
1259 _coarray_dims, _array_dims, _coarray, _array, remote_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1261 _XMP_fjrdma_get(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1262 _coarray, _array, remote_coarray, local_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1264 _XMP_utofu_get(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1265 _coarray, _array, remote_coarray, local_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1266 #elif _XMP_MPI3_ONESIDED
1267 _XMP_mpi_get(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1268 _coarray, _array, remote_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts,
◆ _XMP_coarray_malloc()
void _XMP_coarray_malloc |
( |
void ** |
, |
|
|
void * |
|
|
) |
| |
Create coarray object and allocate coarray.
339 long transfer_size = _total_coarray_elmts*_elmt_size;
348 #elif _XMP_MPI3_ONESIDED
352 _push_coarray_queue(c);
◆ _XMP_coarray_malloc_image_info_1()
void _XMP_coarray_malloc_image_info_1 |
( |
| ) |
|
Set 1-dim image information.
158 _image_elmts = malloc(
sizeof(
int) * _image_dims);
◆ _XMP_coarray_malloc_info_1()
void _XMP_coarray_malloc_info_1 |
( |
const long |
, |
|
|
const |
size_t |
|
) |
| |
Set 1-dim coarray information.
33 _elmt_size = elmt_size;
35 _coarray_elmts = malloc(
sizeof(
long) * _coarray_dims);
36 _coarray_elmts[0] = n1;
37 _total_coarray_elmts = n1;
◆ _XMP_coarray_put()
void _XMP_coarray_put |
( |
void * |
, |
|
|
void * |
, |
|
|
void * |
|
|
) |
| |
1162 if(_transfer_coarray_elmts == 0 || _transfer_array_elmts == 0)
return;
1164 if(_transfer_coarray_elmts != _transfer_array_elmts && _transfer_array_elmts != 1){
1165 _XMP_fatal(
"Coarray Error ! transfer size is wrong.\n");
1169 int target_rank = 0;
1170 for(
int i=0;i<_image_dims;i++)
1171 target_rank += ((
_XMP_coarray_t*)remote_coarray)->distance_of_image_elmts[i] * _image_num[i];
1173 check_target_rank(target_rank);
1175 for(
int i=0;i<_coarray_dims;i++){
1180 int remote_coarray_is_contiguous = _check_contiguous(_coarray, _coarray_dims, _transfer_coarray_elmts);
1181 int local_array_is_contiguous = _check_contiguous(_array, _array_dims, _transfer_array_elmts);
1190 _XMP_local_put(remote_coarray, local_array, remote_coarray_is_contiguous, local_array_is_contiguous,
1191 _coarray_dims, _array_dims, _coarray, _array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1195 _XMP_gasnet_put(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1196 _coarray, _array, remote_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1198 _XMP_fjrdma_put(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1199 _coarray, _array, remote_coarray, local_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1201 _XMP_utofu_put(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1202 _coarray, _array, remote_coarray, local_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts);
1203 #elif _XMP_MPI3_ONESIDED
1204 _XMP_mpi_put(remote_coarray_is_contiguous, local_array_is_contiguous, target_rank, _coarray_dims, _array_dims,
1205 _coarray, _array, remote_coarray, local_array, (
size_t)_transfer_coarray_elmts, (
size_t)_transfer_array_elmts,
◆ _XMP_coarray_rdma_array_set_1()
void _XMP_coarray_rdma_array_set_1 |
( |
const long |
, |
|
|
const long |
, |
|
|
const long |
, |
|
|
const long |
, |
|
|
const |
size_t |
|
) |
| |
Set transfer 1-dim array information.
658 _transfer_array_elmts = length1;
662 _array[0].
start = start1;
663 _array[0].
length = length1;
664 _array[0].
stride = ((length1 == 1)? 1 : stride1);
665 _array[0].
elmts = elmts1;
◆ _XMP_coarray_rdma_coarray_set_1()
void _XMP_coarray_rdma_coarray_set_1 |
( |
const long |
, |
|
|
const long |
, |
|
|
const long |
|
|
) |
| |
Set transfer 1-dim coarray information.
436 _transfer_coarray_elmts = length1;
440 _coarray[0].
start = start1;
441 _coarray[0].
length = length1;
442 _coarray[0].
stride = ((length1 == 1)? 1 : stride1);
◆ _XMP_coarray_rdma_image_set_1()
void _XMP_coarray_rdma_image_set_1 |
( |
const int |
| ) |
|
Set 1-dim image information.
945 _image_num = malloc(
sizeof(
int) * _image_dims);
◆ _XMP_coarray_regmem()
void _XMP_coarray_regmem |
( |
void ** |
, |
|
|
void * |
|
|
) |
| |
Create coarray object but not allocate coarray.
365 long transfer_size = _total_coarray_elmts*_elmt_size;
370 _XMP_fatal(
"_XMP_coarray_regmem_do is not supported over GASNet.\n");
375 #elif _XMP_MPI3_ONESIDED
379 _push_coarray_queue(c);
◆ _XMPCO_checkIfInTask()
void _XMPCO_checkIfInTask |
( |
char * |
msgopt | ) |
|
1429 "cannot use %s in any task construct\n", msgopt);
◆ _XMPCO_clean_imageDirNodes()
void _XMPCO_clean_imageDirNodes |
( |
void |
| ) |
|
274 _imageDirNodes = NULL;
◆ _XMPCO_coarrayInit_get()
void _XMPCO_coarrayInit_get |
( |
void |
| ) |
|
◆ _XMPCO_coarrayInit_getsub()
void _XMPCO_coarrayInit_getsub |
( |
void |
| ) |
|
◆ _XMPCO_coarrayInit_put()
void _XMPCO_coarrayInit_put |
( |
void |
| ) |
|
◆ _XMPCO_consume_comm_current()
MPI_Comm _XMPCO_consume_comm_current |
( |
void |
| ) |
|
318 if (imageNodes != NULL)
319 return *(MPI_Comm*)(imageNodes->
comm);
324 return MPI_COMM_WORLD;
◆ _XMPCO_consume_imageDirNodes()
295 _imageDirNodes = NULL;
◆ _XMPCO_debugPrint()
void _XMPCO_debugPrint |
( |
char * |
format, |
|
|
|
... |
|
) |
| |
29 va_start(list, format);
30 vsprintf(work, format, list);
35 if (current == initial)
36 fprintf(stderr,
"XMPCO[%d] %s", initial, work);
38 fprintf(stderr,
"XMPCO[%d(current=%d)] %s", initial, current, work);
◆ _XMPCO_fatal()
void _XMPCO_fatal |
( |
char * |
format, |
|
|
|
... |
|
) |
| |
10 va_start(list, format);
11 vsprintf(work, format, list);
13 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
14 fprintf(stderr,
"XMPCO [rank=%d] %s\n", rank, work);
16 _XMP_fatal(
"...fatal error in XMP/F Coarray runtime");
◆ _XMPCO_get_baseAddrOfCoarray()
◆ _XMPCO_get_comm_current()
MPI_Comm _XMPCO_get_comm_current |
( |
void |
| ) |
|
306 if (_imageDirNodes != NULL)
307 return *(MPI_Comm*)(_imageDirNodes->
comm);
312 return MPI_COMM_WORLD;
◆ _XMPCO_get_comm_fromCoarrayInfo()
MPI_Comm _XMPCO_get_comm_fromCoarrayInfo |
( |
CoarrayInfo_t * |
cinfo | ) |
|
530 return MPI_COMM_NULL;
535 return MPI_COMM_NULL;
537 return *(MPI_Comm*)(nodes->
comm);
◆ _XMPCO_get_comm_of_nodes()
87 return *(MPI_Comm*)(nodes->
comm);
◆ _XMPCO_get_currentComm()
MPI_Comm _XMPCO_get_currentComm |
( |
void |
| ) |
|
171 commp = (MPI_Comm*)nodes->
comm;
◆ _XMPCO_get_currentNumImages()
int _XMPCO_get_currentNumImages |
( |
void |
| ) |
|
◆ _XMPCO_get_currentThisImage()
int _XMPCO_get_currentThisImage |
( |
void |
| ) |
|
◆ _XMPCO_get_desc_fromLocalAddr()
void* _XMPCO_get_desc_fromLocalAddr |
( |
char * |
localAddr, |
|
|
char ** |
orgAddr, |
|
|
size_t * |
offset, |
|
|
char ** |
name |
|
) |
| |
787 MemoryChunk_t* chunk = _findMemoryChunkInSortedChunkTable(localAddr);
791 *name =
"(not found)";
796 *offset = localAddr - *orgAddr;
◆ _XMPCO_get_descForMemoryChunk()
◆ _XMPCO_get_imageDirNodes()
288 return _imageDirNodes;
◆ _XMPCO_get_infoOfCtrlData()
void* _XMPCO_get_infoOfCtrlData |
( |
char ** |
baseAddr, |
|
|
size_t * |
offset, |
|
|
char ** |
name |
|
) |
| |
762 char *orgAddr = chunk->
orgAddr;
764 *baseAddr = _cinfo_ctrlData->
baseAddr;
765 *offset = orgAddr - *baseAddr;
766 *name = _cinfo_ctrlData->
name;
◆ _XMPCO_get_infoOfLocalBuf()
void* _XMPCO_get_infoOfLocalBuf |
( |
char ** |
baseAddr, |
|
|
size_t * |
offset, |
|
|
char ** |
name |
|
) |
| |
773 char *orgAddr = chunk->
orgAddr;
775 *baseAddr = _cinfo_localBuf->
baseAddr;
776 *offset = orgAddr - *baseAddr;
777 *name = _cinfo_localBuf->
name;
◆ _XMPCO_get_initial_image_withDescPtr()
int _XMPCO_get_initial_image_withDescPtr |
( |
int |
image, |
|
|
CoarrayInfo_t * |
descPtr |
|
) |
| |
253 if (nodesComm == MPI_COMM_NULL)
261 _XMPCO_debugPrint(
"*** got the initial image (%d) from the image mapping to nodes (%d)\n",
◆ _XMPCO_get_initialNumImages()
int _XMPCO_get_initialNumImages |
( |
void |
| ) |
|
135 return _initialNumImages;
◆ _XMPCO_get_initialThisImage()
int _XMPCO_get_initialThisImage |
( |
void |
| ) |
|
130 return _initialThisImage;
◆ _XMPCO_get_isEagerCommMode()
BOOL _XMPCO_get_isEagerCommMode |
( |
void |
| ) |
|
89 {
return _isEagerCommMode; }
◆ _XMPCO_get_isMsgMode()
BOOL _XMPCO_get_isMsgMode |
( |
void |
| ) |
|
86 {
return _isMsgMode; }
◆ _XMPCO_get_isSafeBufferMode()
BOOL _XMPCO_get_isSafeBufferMode |
( |
void |
| ) |
|
87 {
return _isSafeBufferMode; }
◆ _XMPCO_get_isSyncPutMode()
BOOL _XMPCO_get_isSyncPutMode |
( |
void |
| ) |
|
88 {
return _isSyncPutMode; }
◆ _XMPCO_get_localBufSize()
size_t _XMPCO_get_localBufSize |
( |
void |
| ) |
|
84 {
return _localBufSize; }
◆ _XMPCO_get_nameOfCoarray()
◆ _XMPCO_get_offsetInCoarray()
size_t _XMPCO_get_offsetInCoarray |
( |
CoarrayInfo_t * |
cinfo, |
|
|
char * |
addr |
|
) |
| |
718 size_t offset = addr - cinfo->
baseAddr;
◆ _XMPCO_get_offsetInMemoryChunk()
size_t _XMPCO_get_offsetInMemoryChunk |
( |
CoarrayInfo_t * |
cinfo, |
|
|
char * |
addr |
|
) |
| |
743 size_t offset = addr - orgAddr;
◆ _XMPCO_get_orgAddrOfMemoryChunk()
◆ _XMPCO_get_poolThreshold()
unsigned _XMPCO_get_poolThreshold |
( |
void |
| ) |
|
83 {
return _poolThreshold; }
◆ _XMPCO_get_sizeOfCoarray()
◆ _XMPCO_get_sizeOfMemoryChunk()
◆ _XMPCO_is_subset_exec()
BOOL _XMPCO_is_subset_exec |
( |
void |
| ) |
|
◆ _XMPCO_isAddrInMemoryChunk()
751 size_t offset = localAddr - orgAddr;
752 BOOL result = (offset < size);
◆ _XMPCO_nowInTask()
int _XMPCO_nowInTask |
( |
void |
| ) |
|
◆ _XMPCO_num_images_onNodes()
◆ _XMPCO_reset_isMsgMode()
void _XMPCO_reset_isMsgMode |
( |
void |
| ) |
|
76 _isMsgMode = _isMsgMode_last;
◆ _XMPCO_set_codim_withBounds()
void _XMPCO_set_codim_withBounds |
( |
CoarrayInfo_t * |
cp, |
|
|
int |
dim, |
|
|
int |
lb, |
|
|
int |
ub |
|
) |
| |
620 int i, count, n_images, size;
622 if (0 <= dim && dim < cp->corank - 1) {
630 else if (dim == cp->
corank - 1) {
634 for (i = 0, count = 1; i < cp->
corank - 1; i++)
641 _XMPCO_fatal(
"spedified dim (%d) is too large or less than zero.\n", dim);
◆ _XMPCO_set_codim_withSize()
void _XMPCO_set_codim_withSize |
( |
CoarrayInfo_t * |
cp, |
|
|
int |
dim, |
|
|
int |
lb, |
|
|
int |
size |
|
) |
| |
647 int i, count, n_images, ub;
649 if (0 <= dim && dim < cp->corank - 1) {
657 else if (dim == cp->
corank - 1) {
661 for (i = 0, count = 1; i < cp->
corank - 1; i++)
668 _XMPCO_fatal(
"Spedified dim (%d) is too large or less than zero.\n", dim);
◆ _XMPCO_set_corank()
609 cp->
lcobound = (
int*)_MALLOC(
sizeof(
int) * corank);
610 cp->
ucobound = (
int*)_MALLOC(
sizeof(
int) * corank);
611 cp->
cosize = (
int*)_MALLOC(
sizeof(
int) * corank);
614 _dispCoarrayInfo(cp), cp->
corank);
◆ _XMPCO_set_imageDirNodes()
279 if (_imageDirNodes != NULL)
280 _XMP_fatal(
"INTERNAL: _imageDirNodes was not consumed but is defined.");
281 _imageDirNodes = nodes;
◆ _XMPCO_set_initialNumImages()
void _XMPCO_set_initialNumImages |
( |
void |
| ) |
|
122 if (MPI_Comm_size(MPI_COMM_WORLD, &size) != 0)
124 "MPI_Comm_size(MPI_COMM_WORLD, ) failed");
125 _initialNumImages = size;
◆ _XMPCO_set_initialThisImage()
void _XMPCO_set_initialThisImage |
( |
void |
| ) |
|
111 if (MPI_Comm_rank(MPI_COMM_WORLD, &rank) != 0)
113 "MPI_Comm_rank(MPI_COMM_WORLD, ) failed");
115 _initialThisImage = rank + 1;
◆ _XMPCO_set_isEagerCommMode()
void _XMPCO_set_isEagerCommMode |
( |
BOOL |
sw | ) |
|
26 { _isEagerCommMode = sw; }
◆ _XMPCO_set_isMsgMode()
void _XMPCO_set_isMsgMode |
( |
BOOL |
sw | ) |
|
50 _isMsgMode_last = _isMsgMode;
◆ _XMPCO_set_isMsgMode_quietly()
void _XMPCO_set_isMsgMode_quietly |
( |
BOOL |
sw | ) |
|
70 _isMsgMode_last = _isMsgMode;
◆ _XMPCO_set_isSafeBufferMode()
void _XMPCO_set_isSafeBufferMode |
( |
BOOL |
sw | ) |
|
24 { _isSafeBufferMode = sw; }
◆ _XMPCO_set_isSyncPutMode()
void _XMPCO_set_isSyncPutMode |
( |
BOOL |
sw | ) |
|
25 { _isSyncPutMode = sw; }
◆ _XMPCO_set_localBufSize()
void _XMPCO_set_localBufSize |
( |
unsigned |
size | ) |
|
41 _localBufSize = sizeRU;
◆ _XMPCO_set_nodes()
685 cinfo->
nodes = nodes;
690 cinfo1->
nodes = nodes;
◆ _XMPCO_set_poolThreshold()
void _XMPCO_set_poolThreshold |
( |
unsigned |
size | ) |
|
30 _poolThreshold = size;
◆ _XMPCO_set_varname()
void _XMPCO_set_varname |
( |
CoarrayInfo_t * |
cp, |
|
|
int |
namelen, |
|
|
char * |
name |
|
) |
| |
675 cp->
name = _xmp_strndup(name, namelen);
677 _dispCoarrayInfo(cp));
◆ _XMPCO_this_image_onNodes()
◆ _XMPCO_transImage_current2initial()
int _XMPCO_transImage_current2initial |
( |
int |
image | ) |
|
226 if (image <= 0 || num < image)
227 _XMPCO_fatal(
"ERROR: image index (%d) not specified within the range (1 to %d)\n",
236 _XMPCO_debugPrint(
"*** got the initial image (%d) from the current image (%d)\n",
◆ _XMPCO_transImage_withComm()
int _XMPCO_transImage_withComm |
( |
MPI_Comm |
comm1, |
|
|
int |
image1, |
|
|
MPI_Comm |
comm2 |
|
) |
| |
192 int image2, rank1, rank2;
193 MPI_Group group1, group2;
194 int stat1, stat2, stat3;
197 stat1 = MPI_Comm_group(comm1, &group1);
198 stat2 = MPI_Comm_group(comm2, &group2);
203 stat3 = MPI_Group_translate_ranks(group1, 1, &rank1, group2, &rank2);
205 if (rank2 == MPI_UNDEFINED)
210 if (stat1 != 0 || stat2 != 0 || stat3 != 0)
211 _XMPCO_fatal(
"INTERNAL: _transimage_withComm failed with "
212 "stat1=%d, stat2=%d, stat3=%d",
213 stat1, stat2, stat3);
◆ xmp_coarray_allocated_bytes()
size_t xmp_coarray_allocated_bytes |
( |
void |
| ) |
|
121 chunk = chunkp->
chunk;
122 size1 = size + chunk->
nbytes;
124 _XMPCO_fatal(
"More than %llu-bytes of memory required for static coarrays\n",
131 size -= _cinfo_ctrlData->
size + _cinfo_localBuf->
size;
◆ xmp_coarray_garbage_bytes()
size_t xmp_coarray_garbage_bytes |
( |
void |
| ) |
|
145 chunk = chunkp->
chunk;
◆ xmp_coarray_malloc_bytes()
size_t xmp_coarray_malloc_bytes |
( |
void |
| ) |
|
◆ xmp_sync_all()
void xmp_sync_all |
( |
const int * |
status | ) |
|
Execute sync_all()
1431 #elif _XMP_MPI3_ONESIDED
◆ xmp_sync_image()
void xmp_sync_image |
( |
int |
image, |
|
|
int * |
status |
|
) |
| |
◆ xmp_sync_images()
void xmp_sync_images |
( |
const int |
num, |
|
|
int * |
image_set, |
|
|
int * |
status |
|
) |
| |
Execute sync_images()
1447 #elif _XMP_MPI3_ONESIDED
◆ xmp_sync_images_all()
void xmp_sync_images_all |
( |
int * |
status | ) |
|
Execute sync_images_all()
1465 _XMP_fatal(
"Not implement xmp_sync_images_all()");
◆ xmp_sync_memory()
void xmp_sync_memory |
( |
const int * |
status | ) |
|
Execute sync_memory()
1415 #elif _XMP_MPI3_ONESIDED
◆ XMPCO_count_size()
void XMPCO_count_size |
( |
int |
count, |
|
|
size_t |
element |
|
) |
| |
508 size_t thisSize = count * element;
513 " pooling threshold :%10u bytes\n"
514 " data size :%10u bytes\n",
519 pool_totalSize += mallocSize;
521 " %u bytes, totally %u bytes\n",
522 mallocSize, pool_totalSize);
◆ XMPCO_deregmem_coarray()
382 _dispMemoryChunk(chunk));
385 _unlinkCoarrayInfo(cinfo);
386 _freeCoarrayInfo(cinfo);
390 _unlinkMemoryChunk(chunk);
◆ XMPCO_epilog()
556 (*rsetp)->name, *rsetp);
558 _freeResourceSet(*rsetp);
◆ XMPCO_find_descptr()
CoarrayInfo_t* XMPCO_find_descptr |
( |
char * |
addr, |
|
|
int |
namelen, |
|
|
char * |
name |
|
) |
| |
generate and return a descriptor for a coarray DUMMY ARGUMENT
- find the memory chunk that contains the coarray data object,
- generate coarrayInfo for the coarray dummy argument and link it to the memory chunk, and
- return coarrayInfo as descPtr
579 "(varname=\'%.*s\')\n",
586 myChunk = _findMemoryChunkInSortedChunkTable(addr);
588 if (myChunk != NULL) {
590 _dispMemoryChunk(myChunk));
592 _addCoarrayInfo(myChunk, cinfo);
◆ XMPCO_free_coarray()
359 _dispMemoryChunk(chunk));
362 _unlinkCoarrayInfo(cinfo);
363 _freeCoarrayInfo(cinfo);
367 _unlinkMemoryChunk(chunk);
369 _garbageCollectMallocHistory();
◆ XMPCO_GET_arrayExpr()
void XMPCO_GET_arrayExpr |
( |
CoarrayInfo_t * |
descPtr, |
|
|
char * |
baseAddr, |
|
|
int |
element, |
|
|
int |
coindex, |
|
|
char * |
result, |
|
|
int |
rank, |
|
|
int |
skip[], |
|
|
int |
count[] |
|
) |
| |
133 _XMPCO_fatal(
"violation of boundary in reference of a coindexed object\n"
134 " xmpf_coarray_get_array_, " __FILE__);
145 _XMPCO_fatal(
"INTERNAL : illegal baseAddr of mold coarray (in xmpf_coarray_get_array_)\n"
146 " possibly because of unexpected copy-in interface\n"
147 " coarray_name=\"%s\", chunk_size=%ud; offset_in_chunk=%ud",
171 int scheme = _select_scheme_get_array(avail_DMA);
179 _getCoarray(descPtr, baseAddr, coindex0, result,
180 element, rank, skip, count,
181 descDMA, offsetDMA, nameDMA);
186 _getCoarray(descPtr, baseAddr, coindex0, result,
187 element, rank, skip, count,
188 NULL, 0,
"(localBuf)");
◆ XMPCO_GET_arrayStmt()
void XMPCO_GET_arrayStmt |
( |
CoarrayInfo_t * |
descPtr, |
|
|
char * |
baseAddr, |
|
|
int |
element, |
|
|
int |
coindex, |
|
|
char * |
localAddr, |
|
|
int |
rank, |
|
|
int |
skip[], |
|
|
int |
skip_local[], |
|
|
int |
count[] |
|
) |
| |
98 _XMPCO_fatal(
"violation of boundary writing to a coindexed variable\n"
99 " xmpf_coarray_getsub_array_, " __FILE__);
121 int scheme = _select_scheme_getsub_array(avail_DMA);
129 _getsubCoarray_DMA(descPtr, baseAddr, coindex0, localAddr,
130 element, rank, skip, skip_local, count,
131 descDMA, offsetDMA, nameDMA);
136 _getsubCoarray_buffer(descPtr, baseAddr, coindex0, localAddr,
137 element, rank, skip, skip_local, count);
◆ XMPCO_GET_scalarExpr()
void XMPCO_GET_scalarExpr |
( |
CoarrayInfo_t * |
descPtr, |
|
|
char * |
baseAddr, |
|
|
int |
element, |
|
|
int |
coindex, |
|
|
char * |
result |
|
) |
| |
64 _XMPCO_fatal(
"INTERNAL: illegal baseAddr of mold coarray (in xmpf_coarray_get_scalar_)\n"
65 " possibly because of unexpected copy-in interface\n"
66 " coarray_name=\"%s\", chunk_size=%ud; offset_in_chunk=%ud",
90 int scheme = _select_scheme_get_scalar(element, avail_DMA);
98 descDMA, offsetDMA, nameDMA);
◆ XMPCO_malloc_coarray()
162 size_t nbytes = count * element;
169 _dispMemoryChunk(chunk));
172 _addMemoryChunkInResourceSet(rset, chunk);
175 _dispMemoryChunk(chunk), rset);
181 _addCoarrayInfo(chunk, cinfo);
◆ XMPCO_malloc_pool()
void XMPCO_malloc_pool |
( |
void |
| ) |
|
457 size_t ctrlDataSize =
sizeof(int) * 8;
461 " system-defined local buffer :%10u bytes\n"
462 " system-defined control data :%10u bytes\n"
463 " user-defined coarays :%10u bytes\n",
464 localBufSize, ctrlDataSize, pool_totalSize);
466 pool_totalSize += localBufSize + ctrlDataSize;
469 _initMallocHistory();
472 _initSortedChunkTable();
475 pool_chunk = _mallocMemoryChunk(1, pool_totalSize);
476 pool_currentAddr = pool_chunk->
orgAddr;
479 _cinfo_localBuf = _getShareOfStaticCoarray(localBufSize);
480 _cinfo_localBuf->
name =
"(localBuf)";
481 _setSimpleCoshapeToCoarrayInfo(_cinfo_localBuf);
484 _cinfo_ctrlData = _getShareOfStaticCoarray(ctrlDataSize);
485 _cinfo_ctrlData->
name =
"(ctrlData)";
486 _setSimpleCoshapeToCoarrayInfo(_cinfo_ctrlData);
◆ XMPCO_malloc_staticCoarray()
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)
224 size_t nbytes = count * element;
228 " count=%d, element=%d, nbytes=%u\n",
229 namelen, name, count, element, nbytes);
233 cinfo = _allocLargeStaticCoarray(nbytes);
237 cinfo = _getShareOfStaticCoarray(nbytesRU);
239 cinfo->
name = _xmp_strndup(name, namelen);
◆ XMPCO_prolog()
void XMPCO_prolog |
( |
ResourceSet_t ** |
rset, |
|
|
int |
namelen, |
|
|
char * |
name |
|
) |
| |
543 *rsetp = _newResourceSet(name, namelen);
546 (*rsetp)->name, *rsetp);
◆ XMPCO_PUT_arrayStmt()
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 |
|
) |
| |
197 _XMPCO_fatal(
"violation of boundary writing to a coindexed variable\n"
198 " xmpf_coarray_put_array_, " __FILE__);
221 scheme = _select_scheme_put_array(avail_DMA);
229 _putCoarray_DMA(descPtr, baseAddr, coindex0, rhsAddr,
230 element, rank, skip, skip_rhs, count,
231 descDMA, offsetDMA, nameDMA, sync_mode);
236 _putCoarray_buffer(descPtr, baseAddr, coindex0, rhsAddr,
237 element, rank, skip, skip_rhs, count, sync_mode);
◆ XMPCO_PUT_scalarStmt()
void XMPCO_PUT_scalarStmt |
( |
CoarrayInfo_t * |
descPtr, |
|
|
char * |
baseAddr, |
|
|
int |
element, |
|
|
int |
coindex, |
|
|
char * |
rhs, |
|
|
SyncMode |
sync_mode |
|
) |
| |
141 int scheme = _select_scheme_put_scalar(element, avail_DMA);
153 _putVector_DMA(descPtr, baseAddr, element, coindex0,
154 descDMA, offsetDMA, nameDMA, sync_mode);
163 _putVector_DMA(descPtr, baseAddr, elementRU, coindex0,
164 descDMA, offsetDMA, nameDMA, sync_mode);
170 _putVector_buffer(descPtr, baseAddr, element, coindex0,
171 rhs, element, sync_mode);
179 _putVector_buffer(descPtr, baseAddr, elementRU, coindex0,
180 rhs, element, sync_mode);
◆ XMPCO_PUT_spread()
void XMPCO_PUT_spread |
( |
CoarrayInfo_t * |
descPtr, |
|
|
char * |
baseAddr, |
|
|
int |
element, |
|
|
int |
coindex, |
|
|
char * |
rhs, |
|
|
int |
rank, |
|
|
int |
skip[], |
|
|
int |
count[], |
|
|
SyncMode |
sync_mode |
|
) |
| |
253 _XMPCO_fatal(
"violation of boundary writing a scalar to a coindexed variable\n"
254 " xmpf_coarray_put_spread_, " __FILE__);
268 _spreadCoarray(descPtr, baseAddr, coindex0, rhs,
269 element, rank, skip, count, element, sync_mode);
◆ XMPCO_regmem_coarray()
192 size_t nbytes = count * element;
199 _dispMemoryChunk(chunk));
204 _addCoarrayInfo(chunk, cinfo);
◆ XMPCO_regmem_staticCoarray()
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)
263 " count=%d, element=%ud\n",
264 namelen, name, count, element);
269 _XMPCO_fatal(
"boundary violation detected for coarray \'%.*s\'\n"
274 size_t nbytes = count * element;
280 cinfo = _regmemStaticCoarray(var, nbytes);
282 cinfo->
name = _xmp_strndup(name, namelen);
◆ XMPCO_sync_all()
void XMPCO_sync_all |
( |
void |
| ) |
|
28 _count_syncall, stat);
◆ XMPCO_sync_all_auto()
void XMPCO_sync_all_auto |
( |
void |
| ) |
|
45 _count_syncall_auto += 1;
51 _count_syncall_auto, stat);
◆ XMPCO_sync_all_withComm()
void XMPCO_sync_all_withComm |
( |
MPI_Comm |
comm | ) |
|
60 _XMPCO_fatal(
"SYNC MEMORY inside SYNC ALL failed with stat=%d", stat);
61 stat = MPI_Barrier(comm);
63 _XMPCO_fatal(
"MPI_Barrier inside SYNC ALL failed with stat=%d", stat);
◆ XMPCO_this_image_coarray()
void XMPCO_this_image_coarray |
( |
CoarrayInfo_t * |
cinfo, |
|
|
int |
corank, |
|
|
int |
image[] |
|
) |
| |
19 int size, index, image_coarray, magic;
29 if (image_coarray == 0) {
30 for (
int i = 0; i < corank; i++)
35 magic = image_coarray - 1;
36 for (
int i = 0; i < corank; i++) {
39 image[i] = index + cinfo->
lcobound[i];
◆ XMPCO_this_image_coarray_dim()
int XMPCO_this_image_coarray_dim |
( |
CoarrayInfo_t * |
cinfo, |
|
|
int |
corank, |
|
|
int |
dim |
|
) |
| |
47 int size, index, image_coarray, magic;
53 if (dim <= 0 || corank < dim)
54 _XMPCO_fatal(
"Too large or non-positive argument 'dim' of this_image:"
64 if (image_coarray == 0)
67 magic = image_coarray - 1;
69 for (
int i = 0; i < k; i++) {
void _XMP_utofu_sync_all(void)
Definition: xmp_coarray_utofu.c:975
void _XMP_gasnet_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_gasnet.c:830
void _XMP_utofu_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
Definition: xmp_coarray_utofu.c:232
void _XMP_fjrdma_sync_all()
Execute sync_all.
Definition: xmp_coarray_fjrdma.c:1350
int comm_size
Definition: xmp_data_struct.h:48
#define SCHEME_BufferGet
Definition: xmpco_get_expr.c:12
void _XMPCO_getVector_DMA(void *descPtr, char *baseAddr, int bytes, int coindex, void *descDMA, size_t offsetDMA, char *nameDMA)
Definition: xmpco_get_expr.c:321
void _XMP_utofu_sync_memory(void)
Definition: xmp_coarray_utofu.c:960
void _XMP_fjrdma_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_fjrdma.c:1338
#define ROUND_UP_MALLOC(n)
Definition: xmpco_internal.h:21
size_t nbytes
Definition: _xmpco_alloc.h:82
int is_member
Definition: xmp_data_struct.h:46
void * _XMP_alloc(size_t size)
Definition: xmp_util.c:21
void * _XMPCO_get_desc_fromLocalAddr(char *localAddr, char **orgAddr, size_t *offset, char **name)
Definition: xmpco_alloc.c:784
long length
Definition: xmp_data_struct.h:377
#define SCHEME_ExtraDirectPut
Definition: xmpco_put.c:14
#define SCHEME_ExtraBufferGet
Definition: xmpco_get_expr.c:14
MemoryChunk_t * chunk
Definition: _xmpco_alloc.h:114
int _XMPCO_transImage_withComm(MPI_Comm comm1, int image1, MPI_Comm comm2)
Definition: xmpco_lib.c:190
void _XMP_gasnet_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
Definition: xmp_coarray_gasnet.c:794
int corank
Definition: _xmpco_alloc.h:99
CoarrayInfo_t * headCoarray
Definition: _xmpco_alloc.h:84
_XMP_nodes_t * _XMPCO_consume_imageDirNodes()
Definition: xmpco_lib.c:292
void _XMP_fjrdma_get(const int src_contiguous, const int dst_contiguous, const int target_rank, const int src_dims, const int dst_dims, const _XMP_array_section_t *src_info, const _XMP_array_section_t *dst_info, const _XMP_coarray_t *src_desc, const _XMP_coarray_t *dst_desc, void *dst, const size_t src_elmts, const size_t dst_elmts)
Definition: xmp_coarray_fjrdma.c:2114
char * baseAddr
Definition: _xmpco_alloc.h:97
void _XMP_utofu_put(const int dst_contiguous, const int src_contiguous, const int target_rank, const int dst_dims, const int src_dims, const _XMP_array_section_t *dst_info, const _XMP_array_section_t *src_info, const _XMP_coarray_t *dst_desc, const _XMP_coarray_t *src_desc, void *src, const size_t dst_elmts, const size_t src_elmts)
Definition: xmp_coarray_utofu.c:625
int _XMPCO_get_currentThisImage()
Definition: xmpco_lib.c:153
void _XMP_mpi_put(const int dst_contiguous, const int src_contiguous, const int org_target_rank, const int dst_dims, const int src_dims, const _XMP_array_section_t *dst_info, const _XMP_array_section_t *src_info, const _XMP_coarray_t *dst_desc, const void *src, const int dst_elmts, const int src_elmts, const int is_dst_on_acc)
Definition: xmp_coarray_mpi.c:424
#define FALSE
Definition: xmpco_internal.h:16
void _XMPCO_debugPrint(char *format,...)
Definition: xmpco_msg.c:20
void _XMP_mpi_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_mpi.c:542
BOOL _XMPCO_get_isMsgMode()
Definition: xmpco_params.c:86
char * _localBuf_name
Definition: xmpco_get_stmt.c:69
@ syncRUNTIME
Definition: xmpco_internal.h:27
size_t size
Definition: _xmpco_alloc.h:98
char * _XMPCO_get_nameOfCoarray(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:701
#define SCHEME_DirectGet
Definition: xmpco_get_expr.c:11
void * _localBuf_desc
Definition: xmpco_get_stmt.c:65
BOOL isGarbage
Definition: _xmpco_alloc.h:80
int comm_rank
Definition: xmp_data_struct.h:52
int _XMPCO_get_initial_image_withDescPtr(int image, CoarrayInfo_t *descPtr)
Definition: xmpco_lib.c:246
#define SCHEME_DirectGetsub
Definition: xmpco_get_stmt.c:11
int _XMP_world_rank
Definition: xmp_world.c:9
_XMP_nodes_t * _XMPCO_get_imageDirNodes()
Definition: xmpco_lib.c:286
void * desc
Definition: _xmpco_alloc.h:83
BOOL _XMPCO_get_isEagerCommMode(void)
Definition: xmpco_params.c:89
#define forallMemoryChunkOrder(cp)
Definition: _xmpco_alloc.h:16
void _XMP_mpi_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size, bool is_acc)
Definition: xmp_coarray_mpi.c:237
void * _XMPCO_get_infoOfLocalBuf(char **baseAddr, size_t *offset, char **name)
Definition: xmpco_alloc.c:770
void _XMP_mpi_sync_all()
Execute sync_all.
Definition: xmp_coarray_mpi.c:603
size_t _XMPCO_get_offsetInMemoryChunk(CoarrayInfo_t *cinfo, char *addr)
Definition: xmpco_alloc.c:740
MPI_Comm _XMPCO_consume_comm_current(void)
Definition: xmpco_lib.c:315
size_t _localBuf_offset
Definition: xmpco_get_stmt.c:66
@ syncBLOCK
Definition: xmpco_internal.h:25
#define _XMP_N_INT_FALSE
Definition: xmp_constant.h:5
char * name
Definition: _xmpco_alloc.h:96
void _XMP_local_get(void *, const _XMP_coarray_t *, const int, const int, const int, const int, const _XMP_array_section_t *, const _XMP_array_section_t *, const size_t, const size_t)
Definition: xmp_coarray_local.c:597
long start
Definition: xmp_data_struct.h:376
void _XMP_gasnet_sync_all()
Execute sync_all.
Definition: xmp_coarray_gasnet.c:846
void _XMP_tca_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_tca.c:177
void _XMP_mpi_get(const int src_contiguous, const int dst_contiguous, const int org_target_rank, const int src_dims, const int dst_dims, const _XMP_array_section_t *src_info, const _XMP_array_section_t *dst_info, const _XMP_coarray_t *src_desc, void *dst, const int src_elmts, const int dst_elmts, const int is_src_on_acc)
Definition: xmp_coarray_mpi.c:483
void _XMP_gasnet_sync_images(const int num, int image_set[num], int *status)
Execute sync images.
Definition: xmp_coarray_gasnet.c:1677
#define MALLOC_UNIT
Definition: xmpco_params.h:38
int _XMPCO_get_initialNumImages(void)
Definition: xmpco_lib.c:133
void XMPCO_sync_all_auto(void)
Definition: xmpco_sync.c:34
int _XMPCO_transImage_current2initial(int image)
Definition: xmpco_lib.c:222
int * cosize
Definition: _xmpco_alloc.h:102
void XMPCO_sync_all_withComm(MPI_Comm comm)
Definition: xmpco_sync.c:54
int _XMPCO_this_image_onNodes(_XMP_nodes_t *nodes)
Definition: xmpco_lib.c:95
#define BOOL
Definition: xmpco_internal.h:14
void _XMPCO_getVector_buffer(void *descPtr, char *baseAddr, int bytesRU, int coindex, char *result, int bytes)
Definition: xmpco_get_expr.c:342
size_t _XMPCO_get_sizeOfMemoryChunk(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:735
#define DIV_CEILING(m, n)
Definition: _xmpco_alloc.h:14
void _XMP_fjrdma_regmem(_XMP_coarray_t *coarray_desc, void *addr, const size_t coarray_size)
Definition: xmp_coarray_fjrdma.c:1567
_XMP_nodes_t * nodes
Definition: _xmpco_alloc.h:103
char * orgAddr
Definition: _xmpco_alloc.h:81
#define IsEmptyMemoryChunk(chk)
Definition: _xmpco_alloc.h:51
int _XMPCO_get_initialThisImage(void)
Definition: xmpco_lib.c:128
void _XMPCO_fatal(char *format,...)
Definition: xmpco_msg.c:4
void _XMP_mpi_coarray_regmem(_XMP_coarray_t *coarray_desc, void *real_addr, const size_t coarray_size, bool is_acc)
Definition: xmp_coarray_mpi.c:1157
Definition: xmp_data_struct.h:328
#define TRUE
Definition: xmpco_internal.h:15
void _XMP_mpi_sync_images(const int num, const int *image_set, int *status)
Execute sync images.
Definition: xmp_coarray_mpi.c:1080
void xmp_sync_images(const int num, int *image_set, int *status)
Execute sync_images()
Definition: xmp_coarray.c:1439
MPI_Comm _XMPCO_get_currentComm()
Definition: xmpco_lib.c:163
int _localBuf_size
Definition: xmpco_get_stmt.c:68
structure for each malloc/free call Every memory chunk is linked both:
Definition: _xmpco_alloc.h:76
void _XMP_coarray_set_info(_XMP_coarray_t *c)
Definition: xmp_coarray.c:297
#define SCHEME_BufferGetsub
Definition: xmpco_get_stmt.c:12
#define SCHEME_ExtraBufferPut
Definition: xmpco_put.c:15
void xmp_sync_memory(const int *status)
Execute sync_memory()
Definition: xmp_coarray.c:1405
void _XMP_gasnet_put(const int dst_contiguous, const int src_contiguous, const int target_rank, const int dst_dims, const int src_dims, const _XMP_array_section_t *dst_info, const _XMP_array_section_t *src_info, const _XMP_coarray_t *dst_desc, const void *src, const size_t dst_elmts, const size_t src_elmts)
Definition: xmp_coarray_gasnet.c:1095
#define ROUND_UP_COMM(n)
Definition: xmpco_internal.h:20
void _XMP_utofu_get(const int src_contiguous, const int dst_contiguous, const int target_rank, const int src_dims, const int dst_dims, const _XMP_array_section_t *src_info, const _XMP_array_section_t *dst_info, const _XMP_coarray_t *src_desc, const _XMP_coarray_t *dst_desc, void *dst, const size_t src_elmts, const size_t dst_elmts)
Definition: xmp_coarray_utofu.c:929
BOOL _XMPCO_isAddrInMemoryChunk(char *localAddr, CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:747
_XMP_comm_t * comm
Definition: xmp_data_struct.h:53
int _XMPCO_get_currentNumImages(void)
Definition: xmpco_lib.c:143
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
MEMORY MANAGEMENT STRUCTURE-II (for dynamic ALLOCATE/DEALLOCATE stmts.
Definition: _xmpco_alloc.h:111
long stride
Definition: xmp_data_struct.h:378
int _XMPCO_get_currentThisImage(void)
Definition: xmpco_lib.c:153
char * _XMPCO_get_orgAddrOfMemoryChunk(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:730
void _XMP_fjrdma_put(const int dst_contiguous, const int src_contiguous, const int target_rank, const int dst_dims, const int src_dims, const _XMP_array_section_t *dst_info, const _XMP_array_section_t *src_info, const _XMP_coarray_t *dst_desc, const _XMP_coarray_t *src_desc, void *src, const size_t dst_elmts, const size_t src_elmts)
Definition: xmp_coarray_fjrdma.c:1866
int _XMPCO_get_currentNumImages()
Definition: xmpco_lib.c:143
size_t _XMPCO_get_localBufSize(void)
Definition: xmpco_params.c:84
int _XMPCO_nowInTask()
Definition: xmpco_alloc.c:1420
long distance
Definition: xmp_data_struct.h:380
Definition: xmp_data_struct.h:375
void _XMP_fjrdma_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
Definition: xmp_coarray_fjrdma.c:1553
Definition: xmp_data_struct.h:40
void _XMP_local_put(_XMP_coarray_t *, const void *, const int, const int, const int, const int, const _XMP_array_section_t *, const _XMP_array_section_t *, const size_t, const size_t)
Definition: xmp_coarray_local.c:563
@ syncATOMIC
Definition: xmpco_internal.h:26
#define SCHEME_DirectPut
Definition: xmpco_put.c:12
void _XMP_check_less_than_SIZE_MAX(const long s)
Definition: xmp_coarray_utils.c:9
BOOL _XMPCO_get_isMsgMode(void)
Definition: xmpco_params.c:86
CoarrayInfo_t * next
Definition: _xmpco_alloc.h:94
#define SCHEME_BufferPut
Definition: xmpco_put.c:13
structure for each coarray variable One or more coarrays can be linked from a single memory chunk and...
Definition: _xmpco_alloc.h:92
MemoryChunk_t * parent
Definition: _xmpco_alloc.h:95
void _XMP_utofu_sync_images(const int num, int *image_set, int *status)
Definition: xmp_coarray_utofu.c:1065
BOOL _XMPCO_is_subset_exec(void)
Definition: xmpco_lib.c:176
@ syncNONBLOCK
Definition: xmpco_internal.h:24
long elmts
Definition: xmp_data_struct.h:379
#define COMM_UNIT
COMM_UNIT : minimum unit of size for PUT/GET communication MALLOC_UNIT : minimum unit of size for mem...
Definition: xmpco_params.h:37
void _XMP_fjrdma_sync_images(const int num, int *image_set, int *status)
Execute sync images.
Definition: xmp_coarray_fjrdma.c:2251
void _XMP_gasnet_get(const int src_contiguous, const int dst_contiguous, const int target_rank, const int src_dims, const int dst_dims, const _XMP_array_section_t *src_info, const _XMP_array_section_t *dst_info, const _XMP_coarray_t *src_desc, const void *dst, const size_t src_elmts, const size_t dst_elmts)
Definition: xmp_coarray_gasnet.c:1430
BOOL _XMPCO_is_subset_exec()
Definition: xmpco_lib.c:176
size_t _XMPCO_get_sizeOfMemoryChunk(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:735
int * lcobound
Definition: _xmpco_alloc.h:100
void xmp_sync_all(const int *status)
Execute sync_all()
Definition: xmp_coarray.c:1423
void _XMP_utofu_regmem(_XMP_coarray_t *coarray_desc, void *addr, const size_t coarray_size)
Definition: xmp_coarray_utofu.c:238
void * _XMP_get_execution_nodes(void)
Definition: xmp_nodes_stack.c:46
char * _localBuf_baseAddr
Definition: xmpco_get_stmt.c:67
int * ucobound
Definition: _xmpco_alloc.h:101
unsigned _XMPCO_get_poolThreshold(void)
Definition: xmpco_params.c:83
MPI_Comm _XMPCO_get_comm_fromCoarrayInfo(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:527