libxmp/libxmpf in Omni Compiler  1.3.4
xmpco_internal.h File Reference
#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"
Include dependency graph for xmpco_internal.h:
This graph shows which files directly or indirectly include this file:

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_tXMPCO_malloc_coarray (char **addr, int count, size_t element, ResourceSet_t *rset)
 
CoarrayInfo_tXMPCO_regmem_coarray (void *var, int count, size_t element, ResourceSet_t *rset)
 
CoarrayInfo_tXMPCO_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_tXMPCO_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_tXMPCO_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 *)
 

Macro Definition Documentation

◆ _ROUND_UP

#define _ROUND_UP (   n,
 
)    (((((size_t)(n))-1)/(p)+1)*(p))

◆ _ROUND_UP_PLUS

#define _ROUND_UP_PLUS (   n,
 
)    (((n)>0) ? _ROUND_UP(n,p) : (p))

◆ BOOL

#define BOOL   int

◆ FALSE

#define FALSE   0

◆ ROUND_UP_COMM

#define ROUND_UP_COMM (   n)    _ROUND_UP((n),COMM_UNIT)

◆ ROUND_UP_MALLOC

#define ROUND_UP_MALLOC (   n)    _ROUND_UP_PLUS((n),MALLOC_UNIT)

◆ TRUE

#define TRUE   1

Typedef Documentation

◆ CoarrayInfo_t

typedef struct _coarrayInfo_t CoarrayInfo_t

◆ MemoryChunk_t

typedef struct _memoryChunk_t MemoryChunk_t

◆ MemoryChunkOrder_t

◆ ResourceSet_t

typedef struct _resourceSet_t ResourceSet_t

◆ SortedChunkTable_t

◆ SyncMode

typedef enum _SyncMode SyncMode

Enumeration Type Documentation

◆ _SyncMode

enum _SyncMode
Enumerator
syncNONBLOCK 
syncBLOCK 
syncATOMIC 
syncRUNTIME 
23  {
24  syncNONBLOCK = 0,
25  syncBLOCK = 1,
26  syncATOMIC = 2,
27  syncRUNTIME = 3
28 };

Function Documentation

◆ _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 *   
)
1224 {
1225  if(_transfer_coarray_elmts == 0 || _transfer_array_elmts == 0) return;
1226 
1227  if(_transfer_coarray_elmts != _transfer_array_elmts && _transfer_coarray_elmts != 1){
1228  _XMP_fatal("Coarray Error ! transfer size is wrong.\n") ;
1229  // e.g. a[0:3] = b[0:2]:[3] is NG, but a[0:3] = b[0:1]:[3] is OK
1230  }
1231 
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];
1235 
1236  check_target_rank(target_rank);
1237 
1238  for(int i=0;i<_coarray_dims;i++){
1239  _coarray[i].elmts = ((_XMP_coarray_t*)remote_coarray)->coarray_elmts[i];
1240  _coarray[i].distance = ((_XMP_coarray_t*)remote_coarray)->distance_of_coarray_elmts[i];
1241  }
1242 
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);
1245 
1246  // _XMP_local_put(), _XMP_gasnet_put(), ... don't support to transfer long data size now.
1247  // _XMP_check_less_than_SIZE_MAX() checks whether the trasfer size is less than SIZE_MAX, defined in <limits.h>.
1248  size_t elmt_size = ((_XMP_coarray_t*)remote_coarray)->elmt_size;
1249  _XMP_check_less_than_SIZE_MAX(_transfer_coarray_elmts*elmt_size); // fix me
1250  _XMP_check_less_than_SIZE_MAX(_transfer_array_elmts*elmt_size); // fix me
1251 
1252  if(target_rank == _XMP_world_rank){
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);
1255  }
1256  else{
1257 #ifdef _XMP_GASNET
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);
1260 #elif _XMP_FJRDMA
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);
1263 #elif _XMP_UTOFU
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,
1270 #endif
1271  }
1272 
1273  free(_coarray);
1274  free(_array);
1275  free(_image_num);
1276 }

◆ _XMP_coarray_malloc()

void _XMP_coarray_malloc ( void **  ,
void *   
)

Create coarray object and allocate coarray.

334 {
337  *coarray_desc = c;
338 
339  long transfer_size = _total_coarray_elmts*_elmt_size;
340  _XMP_check_less_than_SIZE_MAX(transfer_size);
341 
342 #ifdef _XMP_GASNET
343  _XMP_gasnet_coarray_malloc(*coarray_desc, addr, (size_t)transfer_size);
344 #elif _XMP_FJRDMA
345  _XMP_fjrdma_coarray_malloc(*coarray_desc, addr, (size_t)transfer_size);
346 #elif _XMP_UTOFU
347  _XMP_utofu_coarray_malloc(*coarray_desc, addr, (size_t)transfer_size);
348 #elif _XMP_MPI3_ONESIDED
349  _XMP_mpi_coarray_malloc(*coarray_desc, addr, (size_t)transfer_size, false);
350 #endif
351 
352  _push_coarray_queue(c);
353 }
Here is the call graph for this function:

◆ _XMP_coarray_malloc_image_info_1()

void _XMP_coarray_malloc_image_info_1 ( )

Set 1-dim image information.

156 {
157  _image_dims = 1;
158  _image_elmts = malloc(sizeof(int) * _image_dims);
159  _image_elmts[0] = 1;
160 }

◆ _XMP_coarray_malloc_info_1()

void _XMP_coarray_malloc_info_1 ( const long  ,
const  size_t 
)

Set 1-dim coarray information.

32 {
33  _elmt_size = elmt_size;
34  _coarray_dims = 1;
35  _coarray_elmts = malloc(sizeof(long) * _coarray_dims);
36  _coarray_elmts[0] = n1;
37  _total_coarray_elmts = n1;
38 }

◆ _XMP_coarray_put()

void _XMP_coarray_put ( void *  ,
void *  ,
void *   
)
1161 {
1162  if(_transfer_coarray_elmts == 0 || _transfer_array_elmts == 0) return;
1163 
1164  if(_transfer_coarray_elmts != _transfer_array_elmts && _transfer_array_elmts != 1){
1165  _XMP_fatal("Coarray Error ! transfer size is wrong.\n");
1166  // e.g. a[0:3]:[3] = b[0:2] is NG, but a[0:3]:[3] = b[0:1] is OK.
1167  }
1168 
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];
1172 
1173  check_target_rank(target_rank);
1174 
1175  for(int i=0;i<_coarray_dims;i++){
1176  _coarray[i].elmts = ((_XMP_coarray_t*)remote_coarray)->coarray_elmts[i];
1177  _coarray[i].distance = ((_XMP_coarray_t*)remote_coarray)->distance_of_coarray_elmts[i];
1178  }
1179 
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);
1182 
1183  // _XMP_local_put(), _XMP_gasnet_put(), ... don't support to transfer long data size now.
1184  // _XMP_check_less_than_SIZE_MAX() checks whether the trasfer size is less than SIZE_MAX, defined in <limits.h>.
1185  size_t elmt_size = ((_XMP_coarray_t*)remote_coarray)->elmt_size;
1186  _XMP_check_less_than_SIZE_MAX(_transfer_coarray_elmts*elmt_size); // fix me
1187  _XMP_check_less_than_SIZE_MAX(_transfer_array_elmts*elmt_size); // fix me
1188 
1189  if(target_rank == _XMP_world_rank){
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);
1192  }
1193  else{
1194 #ifdef _XMP_GASNET
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);
1197 #elif _XMP_FJRDMA
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);
1200 #elif _XMP_UTOFU
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,
1207 #endif
1208  }
1209 
1210  free(_coarray);
1211  free(_array);
1212  free(_image_num);
1213 }

◆ _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.

657 {
658  _transfer_array_elmts = length1;
659  _array_dims = 1;
660  _array = malloc(sizeof(_XMP_array_section_t) * _array_dims);
661 
662  _array[0].start = start1;
663  _array[0].length = length1;
664  _array[0].stride = ((length1 == 1)? 1 : stride1);
665  _array[0].elmts = elmts1;
666  _array[0].distance = (long)elmt;
667 }

◆ _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.

435 {
436  _transfer_coarray_elmts = length1;
437  _coarray_dims = 1;
438  _coarray = malloc(sizeof(_XMP_array_section_t) * _coarray_dims);
439 
440  _coarray[0].start = start1;
441  _coarray[0].length = length1;
442  _coarray[0].stride = ((length1 == 1)? 1 : stride1);
443 }

◆ _XMP_coarray_rdma_image_set_1()

void _XMP_coarray_rdma_image_set_1 ( const int  )

Set 1-dim image information.

943 {
944  _image_dims = 1;
945  _image_num = malloc(sizeof(int) * _image_dims);
946  _image_num[0] = n1;
947 }

◆ _XMP_coarray_regmem()

void _XMP_coarray_regmem ( void **  ,
void *   
)

Create coarray object but not allocate coarray.

360 {
363  *coarray_desc = c;
364 
365  long transfer_size = _total_coarray_elmts*_elmt_size;
366  _XMP_check_less_than_SIZE_MAX(transfer_size);
367 
368 #if _XMP_GASNET
369  //not implemented
370  _XMP_fatal("_XMP_coarray_regmem_do is not supported over GASNet.\n");
371 #elif _XMP_FJRDMA
372  _XMP_fjrdma_regmem(*coarray_desc, addr, (size_t)transfer_size);
373 #elif _XMP_UTOFU
374  _XMP_utofu_regmem(*coarray_desc, addr, (size_t)transfer_size);
375 #elif _XMP_MPI3_ONESIDED
376  _XMP_mpi_coarray_regmem(*coarray_desc, addr, (size_t)transfer_size, false);
377 #endif
378 
379  _push_coarray_queue(c);
380 }
Here is the call graph for this function:

◆ _XMPCO_checkIfInTask()

void _XMPCO_checkIfInTask ( char *  msgopt)
1426 {
1427  if (_XMPCO_nowInTask())
1428  _XMPCO_fatal("current restriction: "
1429  "cannot use %s in any task construct\n", msgopt);
1430 }
Here is the call graph for this function:

◆ _XMPCO_clean_imageDirNodes()

void _XMPCO_clean_imageDirNodes ( void  )
273 {
274  _imageDirNodes = NULL;
275 }

◆ _XMPCO_coarrayInit_get()

void _XMPCO_coarrayInit_get ( void  )
Here is the call graph for this function:

◆ _XMPCO_coarrayInit_getsub()

void _XMPCO_coarrayInit_getsub ( void  )
Here is the call graph for this function:

◆ _XMPCO_coarrayInit_put()

void _XMPCO_coarrayInit_put ( void  )
Here is the call graph for this function:

◆ _XMPCO_consume_comm_current()

MPI_Comm _XMPCO_consume_comm_current ( void  )
316 {
318  if (imageNodes != NULL)
319  return *(MPI_Comm*)(imageNodes->comm);
320 
321  MPI_Comm *commp = (MPI_Comm*)(_XMP_get_execution_nodes()->comm);
322  if (commp != NULL)
323  return *commp;
324  return MPI_COMM_WORLD;
325 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_consume_imageDirNodes()

_XMP_nodes_t* _XMPCO_consume_imageDirNodes ( void  )
293 {
294  _XMP_nodes_t *ret = _imageDirNodes;
295  _imageDirNodes = NULL;
296  return ret;
297 }
Here is the caller graph for this function:

◆ _XMPCO_debugPrint()

void _XMPCO_debugPrint ( char *  format,
  ... 
)
21 {
22  int current, initial;
23  char work[800];
24 
25  if (! _XMPCO_get_isMsgMode())
26  return;
27 
28  va_list list;
29  va_start(list, format);
30  vsprintf(work, format, list);
31  va_end(list);
32 
33  current = _XMPCO_get_currentThisImage();
34  initial = _XMPCO_get_initialThisImage();
35  if (current == initial)
36  fprintf(stderr, "XMPCO[%d] %s", initial, work);
37  else
38  fprintf(stderr, "XMPCO[%d(current=%d)] %s", initial, current, work);
39 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_fatal()

void _XMPCO_fatal ( char *  format,
  ... 
)
5 {
6  int rank;
7  char work[800];
8 
9  va_list list;
10  va_start(list, format);
11  vsprintf(work, format, list);
12  va_end(list);
13  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
14  fprintf(stderr, "XMPCO [rank=%d] %s\n", rank, work);
15 
16  _XMP_fatal("...fatal error in XMP/F Coarray runtime");
17 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_get_baseAddrOfCoarray()

char* _XMPCO_get_baseAddrOfCoarray ( CoarrayInfo_t cinfo)
707 {
708  return cinfo->baseAddr;
709 }

◆ _XMPCO_get_comm_current()

MPI_Comm _XMPCO_get_comm_current ( void  )
305 {
306  if (_imageDirNodes != NULL)
307  return *(MPI_Comm*)(_imageDirNodes->comm);
308 
309  MPI_Comm *commp = (MPI_Comm*)(_XMP_get_execution_nodes()->comm);
310  if (commp != NULL)
311  return *commp;
312  return MPI_COMM_WORLD;
313 }

◆ _XMPCO_get_comm_fromCoarrayInfo()

MPI_Comm _XMPCO_get_comm_fromCoarrayInfo ( CoarrayInfo_t cinfo)
528 {
529  if (cinfo == NULL)
530  return MPI_COMM_NULL;
531 
532  _XMP_nodes_t *nodes = cinfo->nodes;
533 
534  if (nodes == NULL)
535  return MPI_COMM_NULL;
536 
537  return *(MPI_Comm*)(nodes->comm);
538 }
Here is the caller graph for this function:

◆ _XMPCO_get_comm_of_nodes()

MPI_Comm _XMPCO_get_comm_of_nodes ( _XMP_nodes_t nodes)
84 {
85  if (!nodes->is_member)
86  return MPI_COMM_NULL;
87  return *(MPI_Comm*)(nodes->comm);
88 }

◆ _XMPCO_get_currentComm()

MPI_Comm _XMPCO_get_currentComm ( void  )
164 {
165  MPI_Comm *commp;
166  _XMP_nodes_t *nodes;
167 
168  if ((nodes = _XMPCO_get_imageDirNodes()) == NULL)
169  nodes = _XMP_get_execution_nodes();
170 
171  commp = (MPI_Comm*)nodes->comm;
172  return *commp;
173 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_get_currentNumImages()

int _XMPCO_get_currentNumImages ( void  )
144 {
145  _XMP_nodes_t *nodes;
146 
147  if ((nodes = _XMPCO_get_imageDirNodes()) == NULL)
148  nodes = _XMP_get_execution_nodes();
149 
150  return nodes->comm_size;
151 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_get_currentThisImage()

int _XMPCO_get_currentThisImage ( void  )
154 {
155  _XMP_nodes_t *nodes;
156 
157  if ((nodes = _XMPCO_get_imageDirNodes()) == NULL)
158  nodes = _XMP_get_execution_nodes();
159 
160  return nodes->comm_rank + 1;
161 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_get_desc_fromLocalAddr()

void* _XMPCO_get_desc_fromLocalAddr ( char *  localAddr,
char **  orgAddr,
size_t *  offset,
char **  name 
)
786 {
787  MemoryChunk_t* chunk = _findMemoryChunkInSortedChunkTable(localAddr);
788  if (chunk == NULL) {
789  *orgAddr = NULL;
790  *offset = 0;
791  *name = "(not found)";
792  return NULL;
793  }
794 
795  *orgAddr = chunk->orgAddr;
796  *offset = localAddr - *orgAddr;
797  *name = chunk->headCoarray->next->name;
798  return chunk->desc;
799 }
Here is the caller graph for this function:

◆ _XMPCO_get_descForMemoryChunk()

void* _XMPCO_get_descForMemoryChunk ( CoarrayInfo_t cinfo)
726 {
727  return cinfo->parent->desc;
728 }
Here is the caller graph for this function:

◆ _XMPCO_get_imageDirNodes()

_XMP_nodes_t* _XMPCO_get_imageDirNodes ( void  )
287 {
288  return _imageDirNodes;
289 }
Here is the caller graph for this function:

◆ _XMPCO_get_infoOfCtrlData()

void* _XMPCO_get_infoOfCtrlData ( char **  baseAddr,
size_t *  offset,
char **  name 
)
760 {
761  MemoryChunk_t *chunk = _cinfo_ctrlData->parent;
762  char *orgAddr = chunk->orgAddr; // origin address of the memory pool
763 
764  *baseAddr = _cinfo_ctrlData->baseAddr; // base address of the control data
765  *offset = orgAddr - *baseAddr; // offset of the control data in the memory pool
766  *name = _cinfo_ctrlData->name; // name of the control data
767  return chunk->desc; // descriptor of the memory pool
768 }

◆ _XMPCO_get_infoOfLocalBuf()

void* _XMPCO_get_infoOfLocalBuf ( char **  baseAddr,
size_t *  offset,
char **  name 
)
771 {
772  MemoryChunk_t *chunk = _cinfo_localBuf->parent;
773  char *orgAddr = chunk->orgAddr; // origin address of the memory pool
774 
775  *baseAddr = _cinfo_localBuf->baseAddr; // base address of the local buffer
776  *offset = orgAddr - *baseAddr; // offset of the local buffer in the memory pool
777  *name = _cinfo_localBuf->name; // name of the local buffer
778  return chunk->desc; // descriptor of the memory pool
779 }
Here is the caller graph for this function:

◆ _XMPCO_get_initial_image_withDescPtr()

int _XMPCO_get_initial_image_withDescPtr ( int  image,
CoarrayInfo_t descPtr 
)
247 {
248  if (descPtr == NULL)
249  return _XMPCO_transImage_current2initial(image);
250 
251  MPI_Comm nodesComm =
253  if (nodesComm == MPI_COMM_NULL)
254  return _XMPCO_transImage_current2initial(image);
255 
256  // The coarray is specified with a COARRAY directive.
257 
258  int initImage = _XMPCO_transImage_withComm(nodesComm, image,
259  MPI_COMM_WORLD);
260 
261  _XMPCO_debugPrint("*** got the initial image (%d) from the image mapping to nodes (%d)\n",
262  initImage, image);
263 
264  return initImage;
265 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_get_initialNumImages()

int _XMPCO_get_initialNumImages ( void  )
134 {
135  return _initialNumImages;
136 }
Here is the caller graph for this function:

◆ _XMPCO_get_initialThisImage()

int _XMPCO_get_initialThisImage ( void  )
129 {
130  return _initialThisImage;
131 }
Here is the caller graph for this function:

◆ _XMPCO_get_isEagerCommMode()

BOOL _XMPCO_get_isEagerCommMode ( void  )
89 { return _isEagerCommMode; }
Here is the caller graph for this function:

◆ _XMPCO_get_isMsgMode()

BOOL _XMPCO_get_isMsgMode ( void  )
86 { return _isMsgMode; }
Here is the caller graph for this function:

◆ _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; }
Here is the caller graph for this function:

◆ _XMPCO_get_nameOfCoarray()

char* _XMPCO_get_nameOfCoarray ( CoarrayInfo_t cinfo)
702 {
703  return cinfo->name;
704 }
Here is the caller graph for this function:

◆ _XMPCO_get_offsetInCoarray()

size_t _XMPCO_get_offsetInCoarray ( CoarrayInfo_t cinfo,
char *  addr 
)
717 {
718  size_t offset = addr - cinfo->baseAddr;
719  return offset;
720 }

◆ _XMPCO_get_offsetInMemoryChunk()

size_t _XMPCO_get_offsetInMemoryChunk ( CoarrayInfo_t cinfo,
char *  addr 
)
741 {
742  char* orgAddr = cinfo->parent->orgAddr;
743  size_t offset = addr - orgAddr;
744  return offset;
745 }
Here is the caller graph for this function:

◆ _XMPCO_get_orgAddrOfMemoryChunk()

char* _XMPCO_get_orgAddrOfMemoryChunk ( CoarrayInfo_t cinfo)
731 {
732  return cinfo->parent->orgAddr;
733 }
Here is the caller graph for this function:

◆ _XMPCO_get_poolThreshold()

unsigned _XMPCO_get_poolThreshold ( void  )
83 { return _poolThreshold; }
Here is the caller graph for this function:

◆ _XMPCO_get_sizeOfCoarray()

size_t _XMPCO_get_sizeOfCoarray ( CoarrayInfo_t cinfo)
712 {
713  return cinfo->size;
714 }

◆ _XMPCO_get_sizeOfMemoryChunk()

size_t _XMPCO_get_sizeOfMemoryChunk ( CoarrayInfo_t cinfo)
736 {
737  return cinfo->parent->nbytes;
738 }
Here is the caller graph for this function:

◆ _XMPCO_is_subset_exec()

BOOL _XMPCO_is_subset_exec ( void  )
177 {
178  if (_XMPCO_get_currentNumImages() < _initialNumImages)
179  // now executing in a task region
180  return TRUE;
181  if (_XMPCO_get_imageDirNodes() != NULL)
182  // image directive is now valid
183  return TRUE;
184  return FALSE;
185 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_isAddrInMemoryChunk()

BOOL _XMPCO_isAddrInMemoryChunk ( char *  localAddr,
CoarrayInfo_t cinfo 
)
748 {
749  char *orgAddr = _XMPCO_get_orgAddrOfMemoryChunk(cinfo);
750  size_t size = _XMPCO_get_sizeOfMemoryChunk(cinfo);
751  size_t offset = localAddr - orgAddr;
752  BOOL result = (offset < size);
753  return result;
754 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_nowInTask()

int _XMPCO_nowInTask ( void  )
1421 {
1423 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_num_images_onNodes()

int _XMPCO_num_images_onNodes ( _XMP_nodes_t nodes)
91 {
92  return nodes->comm_size;
93 }

◆ _XMPCO_reset_isMsgMode()

void _XMPCO_reset_isMsgMode ( void  )
75 {
76  _isMsgMode = _isMsgMode_last;
77 }

◆ _XMPCO_set_codim_withBounds()

void _XMPCO_set_codim_withBounds ( CoarrayInfo_t cp,
int  dim,
int  lb,
int  ub 
)
619 {
620  int i, count, n_images, size;
621 
622  if (0 <= dim && dim < cp->corank - 1) { // not last dimension
623  cp->lcobound[dim] = lb;
624  cp->ucobound[dim] = ub;
625  size = ub - lb + 1;
626  cp->cosize[dim] = size;
627  if (cp->cosize[dim] <= 0)
628  _XMPCO_fatal("upper cobound less than lower cobound");
629  }
630  else if (dim == cp->corank - 1) { // last dimension
631  // ub is ignored.
632  cp->lcobound[dim] = lb;
633  n_images = _XMPCO_get_currentNumImages();
634  for (i = 0, count = 1; i < cp->corank - 1; i++)
635  count *= cp->cosize[i];
636  size = DIV_CEILING(n_images, count);
637  cp->cosize[dim] = size;
638  cp->ucobound[dim] = lb + size - 1;
639  }
640  else { // illegal
641  _XMPCO_fatal("spedified dim (%d) is too large or less than zero.\n", dim);
642  }
643 }
Here is the call graph for this function:

◆ _XMPCO_set_codim_withSize()

void _XMPCO_set_codim_withSize ( CoarrayInfo_t cp,
int  dim,
int  lb,
int  size 
)
646 {
647  int i, count, n_images, ub;
648 
649  if (0 <= dim && dim < cp->corank - 1) { // not last dimension
650  if (size < 0)
651  _XMPCO_fatal("Size should not be less than zero.");
652  cp->lcobound[dim] = lb;
653  cp->cosize[dim] = size;
654  ub = lb + size - 1;
655  cp->ucobound[dim] = ub;
656  }
657  else if (dim == cp->corank - 1) { // last dimension
658  // size is ignored.
659  cp->lcobound[dim] = lb;
660  n_images = _XMPCO_get_currentNumImages();
661  for (i = 0, count = 1; i < cp->corank - 1; i++)
662  count *= cp->cosize[i];
663  size = DIV_CEILING(n_images, count);
664  cp->cosize[dim] = size;
665  cp->ucobound[dim] = lb + size - 1;
666  }
667  else { // last dimension or more
668  _XMPCO_fatal("Spedified dim (%d) is too large or less than zero.\n", dim);
669  }
670 }
Here is the call graph for this function:

◆ _XMPCO_set_corank()

void _XMPCO_set_corank ( CoarrayInfo_t cp,
int  corank 
)
607 {
608  cp->corank = 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);
612 
613  _XMPCO_debugPrint("*** set corank of CoarrayInfo %s, corank=%d\n",
614  _dispCoarrayInfo(cp), cp->corank);
615 }

◆ _XMPCO_set_imageDirNodes()

void _XMPCO_set_imageDirNodes ( _XMP_nodes_t nodes)
278 {
279  if (_imageDirNodes != NULL)
280  _XMP_fatal("INTERNAL: _imageDirNodes was not consumed but is defined.");
281  _imageDirNodes = nodes;
282 
283  _XMPCO_debugPrint("SET _imageDirNodes (%d nodes) done.\n", nodes->comm_size);
284 }

◆ _XMPCO_set_initialNumImages()

void _XMPCO_set_initialNumImages ( void  )
119 {
120  int size;
121 
122  if (MPI_Comm_size(MPI_COMM_WORLD, &size) != 0)
123  _XMPCO_fatal("INTERNAL ERROR: "
124  "MPI_Comm_size(MPI_COMM_WORLD, ) failed");
125  _initialNumImages = size;
126 }
Here is the call graph for this function:

◆ _XMPCO_set_initialThisImage()

void _XMPCO_set_initialThisImage ( void  )
108 {
109  int rank;
110 
111  if (MPI_Comm_rank(MPI_COMM_WORLD, &rank) != 0)
112  _XMPCO_fatal("INTERNAL ERROR: "
113  "MPI_Comm_rank(MPI_COMM_WORLD, ) failed");
114 
115  _initialThisImage = rank + 1;
116 }
Here is the call graph for this function:

◆ _XMPCO_set_isEagerCommMode()

void _XMPCO_set_isEagerCommMode ( BOOL  sw)
26 { _isEagerCommMode = sw; }

◆ _XMPCO_set_isMsgMode()

void _XMPCO_set_isMsgMode ( BOOL  sw)
49 {
50  _isMsgMode_last = _isMsgMode;
51 
52  switch (sw) {
53  case FALSE:
54  default:
56  _XMPCO_debugPrint("Switch off _isMsgMode. Bye!\n");
57  _isMsgMode = FALSE;
58  return;
59 
60  case TRUE:
61  if (_XMPCO_get_isMsgMode() == 0)
62  _XMPCO_debugPrint("Switch on _isMsgMode.\n");
63  _isMsgMode = TRUE;
64  break;
65  }
66 }

◆ _XMPCO_set_isMsgMode_quietly()

void _XMPCO_set_isMsgMode_quietly ( BOOL  sw)
69 {
70  _isMsgMode_last = _isMsgMode;
71  _isMsgMode = sw;
72 }

◆ _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)
38 {
39  unsigned sizeRU = ROUND_UP_MALLOC(size);
40 
41  _localBufSize = sizeRU;
42 
43  _XMPCO_debugPrint("set _localBufSize = %u\n",
44  _localBufSize);
45 }

◆ _XMPCO_set_nodes()

CoarrayInfo_t* _XMPCO_set_nodes ( CoarrayInfo_t cinfo,
_XMP_nodes_t nodes 
)
683 {
684  if (cinfo != NULL) {
685  cinfo->nodes = nodes;
686  return cinfo;
687  }
688 
689  CoarrayInfo_t* cinfo1 = _newCoarrayInfo_empty();
690  cinfo1->nodes = nodes;
691  return cinfo1;
692 }

◆ _XMPCO_set_poolThreshold()

void _XMPCO_set_poolThreshold ( unsigned  size)
29 {
30  _poolThreshold = size;
31 
32  _XMPCO_debugPrint("set _poolThreshold = %u\n",
33  _poolThreshold);
34 }

◆ _XMPCO_set_varname()

void _XMPCO_set_varname ( CoarrayInfo_t cp,
int  namelen,
char *  name 
)
674 {
675  cp->name = _xmp_strndup(name, namelen);
676  _XMPCO_debugPrint("*** set name of CoarrayInfo %s\n",
677  _dispCoarrayInfo(cp));
678 }

◆ _XMPCO_this_image_onNodes()

int _XMPCO_this_image_onNodes ( _XMP_nodes_t nodes)
96 {
97  if (!nodes->is_member)
98  return 0; // This image is out of the node.
99  return nodes->comm_rank + 1;
100 }
Here is the caller graph for this function:

◆ _XMPCO_transImage_current2initial()

int _XMPCO_transImage_current2initial ( int  image)
223 {
224  int num = _XMPCO_get_currentNumImages();
225 
226  if (image <= 0 || num < image)
227  _XMPCO_fatal("ERROR: image index (%d) not specified within the range (1 to %d)\n",
228  image, num);
229 
230  if (!_XMPCO_is_subset_exec())
231  return image;
232 
233  int initImage = _XMPCO_transImage_withComm(_XMPCO_get_currentComm(), image,
234  MPI_COMM_WORLD);
235 
236  _XMPCO_debugPrint("*** got the initial image (%d) from the current image (%d)\n",
237  initImage, image);
238 
239  return initImage;
240 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMPCO_transImage_withComm()

int _XMPCO_transImage_withComm ( MPI_Comm  comm1,
int  image1,
MPI_Comm  comm2 
)
191 {
192  int image2, rank1, rank2;
193  MPI_Group group1, group2;
194  int stat1, stat2, stat3;
195 
196  rank1 = image1 - 1;
197  stat1 = MPI_Comm_group(comm1, &group1);
198  stat2 = MPI_Comm_group(comm2, &group2);
200  _XMPCO_debugPrint("gege comm1=%d, comm2=%d, image1=%d\n", comm1, comm2, image1);
202 
203  stat3 = MPI_Group_translate_ranks(group1, 1, &rank1, group2, &rank2);
204  // (in:Group1, n, rank1[n], Group2, out:rank2[n])
205  if (rank2 == MPI_UNDEFINED)
206  image2 = 0;
207  else
208  image2 = rank2 + 1;
209 
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);
214 
215  _XMPCO_debugPrint("***IMAGE NUMBER translated from %d to %d\n",
216  image1, image2);
217 
218  return image2;
219 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmp_coarray_allocated_bytes()

size_t xmp_coarray_allocated_bytes ( void  )
113 {
114  MemoryChunkOrder_t *chunkp;
115  MemoryChunk_t *chunk;
116  size_t size, size1;
117 
118  // sum all sizes of MemoryChunks
119  size = 0;
120  forallMemoryChunkOrder(chunkp) {
121  chunk = chunkp->chunk;
122  size1 = size + chunk->nbytes;
123  if (size1 < size)
124  _XMPCO_fatal("More than %llu-bytes of memory required for static coarrays\n",
125  ~(size_t)0 );
126  size = size1;
127  }
128 
129  // subtract the size of the localBuf and ctrlData CoarrayInfos
130  // because this is not allocated by the user
131  size -= _cinfo_ctrlData->size + _cinfo_localBuf->size;
132 
133  return size;
134 }
Here is the call graph for this function:

◆ xmp_coarray_garbage_bytes()

size_t xmp_coarray_garbage_bytes ( void  )
138 {
139  MemoryChunkOrder_t *chunkp;
140  MemoryChunk_t *chunk;
141  size_t size;
142 
143  size = 0;
144  forallMemoryChunkOrder(chunkp) {
145  chunk = chunkp->chunk;
146  if (chunk->isGarbage)
147  size += chunk->nbytes;
148  }
149 
150  return size;
151 }

◆ xmp_coarray_malloc_bytes()

size_t xmp_coarray_malloc_bytes ( void  )
108 {
109  return _mallocSize;
110 }

◆ xmp_sync_all()

void xmp_sync_all ( const int *  status)

Execute sync_all()

1424 {
1425 #ifdef _XMP_GASNET
1427 #elif _XMP_FJRDMA
1429 #elif _XMP_UTOFU
1431 #elif _XMP_MPI3_ONESIDED
1433 #endif
1434 }
Here is the call graph for this function:

◆ xmp_sync_image()

void xmp_sync_image ( int  image,
int *  status 
)

Execute sync_image()

1456 {
1457  xmp_sync_images(1, &image, status);
1458 }
Here is the call graph for this function:

◆ xmp_sync_images()

void xmp_sync_images ( const int  num,
int *  image_set,
int *  status 
)

Execute sync_images()

1440 {
1441 #ifdef _XMP_GASNET
1442  _XMP_gasnet_sync_images(num, image_set, status);
1443 #elif _XMP_FJRDMA
1444  _XMP_fjrdma_sync_images(num, image_set, status);
1445 #elif _XMP_UTOFU
1446  _XMP_utofu_sync_images(num, image_set, status);
1447 #elif _XMP_MPI3_ONESIDED
1448  _XMP_mpi_sync_images(num, image_set, status);
1449 #endif
1450 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xmp_sync_images_all()

void xmp_sync_images_all ( int *  status)

Execute sync_images_all()

1464 {
1465  _XMP_fatal("Not implement xmp_sync_images_all()");
1466 }
Here is the call graph for this function:

◆ xmp_sync_memory()

void xmp_sync_memory ( const int *  status)

Execute sync_memory()

1406 {
1407 #ifdef _XMP_GASNET
1409 #elif _XMP_FJRDMA
1411 #elif _XMP_UTOFU
1413 #elif _XMP_TCA
1415 #elif _XMP_MPI3_ONESIDED
1417 #endif
1418 }
Here is the call graph for this function:

◆ XMPCO_count_size()

void XMPCO_count_size ( int  count,
size_t  element 
)
507 {
508  size_t thisSize = count * element;
509  size_t mallocSize = ROUND_UP_MALLOC(thisSize);
510 
511  if (mallocSize > _XMPCO_get_poolThreshold()) {
512  _XMPCO_debugPrint("XMPCO_COUNT_SIZE_: no count because of the large size\n"
513  " pooling threshold :%10u bytes\n"
514  " data size :%10u bytes\n",
515  _XMPCO_get_poolThreshold(), mallocSize);
516  return;
517  }
518 
519  pool_totalSize += mallocSize;
520  _XMPCO_debugPrint("XMPCO_COUNT_SIZE_: count up\n"
521  " %u bytes, totally %u bytes\n",
522  mallocSize, pool_totalSize);
523 }
Here is the call graph for this function:

◆ XMPCO_deregmem_coarray()

void XMPCO_deregmem_coarray ( CoarrayInfo_t cinfo)
375 {
376  MemoryChunk_t *chunk = cinfo->parent;
377 
378  // SYNCALL_AUTO
380 
381  _XMPCO_debugPrint("_XMPCO_DEREGMEM_COARRAY for MemoryChunk %s\n",
382  _dispMemoryChunk(chunk));
383 
384  // unlink and free CoarrayInfo keeping MemoryChunk
385  _unlinkCoarrayInfo(cinfo);
386  _freeCoarrayInfo(cinfo);
387 
388  if (IsEmptyMemoryChunk(chunk)) {
389  // unlink this memory chunk
390  _unlinkMemoryChunk(chunk);
391  }
392 }
Here is the call graph for this function:

◆ XMPCO_epilog()

void XMPCO_epilog ( ResourceSet_t **  rset)
551 {
552  if (*rsetp == NULL)
553  return;
554 
555  _XMPCO_debugPrint("XMPCO_EPILOG_ (procedure name=\'%s\', *rsetp=%p)\n",
556  (*rsetp)->name, *rsetp);
557 
558  _freeResourceSet(*rsetp); // with or without automatic SYNCALL
559  *rsetp = NULL;
560 }
Here is the call graph for this function:

◆ XMPCO_find_descptr()

CoarrayInfo_t* XMPCO_find_descptr ( char *  addr,
int  namelen,
char *  name 
)

generate and return a descriptor for a coarray DUMMY ARGUMENT

  1. find the memory chunk that contains the coarray data object,
  2. generate coarrayInfo for the coarray dummy argument and link it to the memory chunk, and
  3. return coarrayInfo as descPtr
575 {
576  MemoryChunk_t *myChunk;
577 
578  _XMPCO_debugPrint("_XMF_CO_FIND_DESCPTR_ "
579  "(varname=\'%.*s\')\n",
580  namelen, name);
581 
582  // generate a new descPtr for an allocatable dummy coarray
583  CoarrayInfo_t *cinfo = _newCoarrayInfo_empty();
584 
585  // search my MemoryChunk only from addr
586  myChunk = _findMemoryChunkInSortedChunkTable(addr);
587 
588  if (myChunk != NULL) {
589  _XMPCO_debugPrint("*** found my home MemoryChunk %s\n",
590  _dispMemoryChunk(myChunk));
591  // return coarrayInfo as descPtr
592  _addCoarrayInfo(myChunk, cinfo);
593  return cinfo;
594  }
595 
596  _XMPCO_debugPrint("*** found no MemoryChunk of mine\n");
597  return NULL;
598 }
Here is the call graph for this function:

◆ XMPCO_free_coarray()

void XMPCO_free_coarray ( CoarrayInfo_t cinfo)
352 {
353  MemoryChunk_t *chunk = cinfo->parent;
354 
355  // SYNCALL_AUTO
357 
358  _XMPCO_debugPrint("_XMPCO_FREE_COARRAY for MemoryChunk %s\n",
359  _dispMemoryChunk(chunk));
360 
361  // unlink and free CoarrayInfo keeping MemoryChunk
362  _unlinkCoarrayInfo(cinfo);
363  _freeCoarrayInfo(cinfo);
364 
365  if (IsEmptyMemoryChunk(chunk)) {
366  // unlink this memory chunk as a garbage
367  _unlinkMemoryChunk(chunk);
368  // now chance to cellect and free garbages
369  _garbageCollectMallocHistory();
370  }
371 }
Here is the call graph for this function:

◆ XMPCO_GET_arrayExpr()

void XMPCO_GET_arrayExpr ( CoarrayInfo_t descPtr,
char *  baseAddr,
int  element,
int  coindex,
char *  result,
int  rank,
int  skip[],
int  count[] 
)
129 {
130  int coindex0 = _XMPCO_get_initial_image_withDescPtr(coindex, descPtr);
131 
132  if (element % COMM_UNIT != 0) {
133  _XMPCO_fatal("violation of boundary in reference of a coindexed object\n"
134  " xmpf_coarray_get_array_, " __FILE__);
135  return;
136  }
137 
138  /*--------------------------------------*\
139  * Confirm that baseAddr is located in *
140  * the memory chunk corresponding to *
141  * descptr. *
142  \*--------------------------------------*/
143  BOOL pass = _XMPCO_isAddrInMemoryChunk(baseAddr, descPtr);
144  if (!pass) {
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",
148  _XMPCO_get_nameOfCoarray(descPtr),
149  (unsigned)_XMPCO_get_sizeOfMemoryChunk(descPtr),
150  (unsigned)_XMPCO_get_offsetInMemoryChunk(descPtr, baseAddr));
151  }
152 
153  /*--------------------------------------*\
154  * Check whether the local address *
155  * result is already registered for DMA *
156  * and, if so, get the descriptor, etc. *
157  \*--------------------------------------*/
158  void *descDMA;
159  size_t offsetDMA;
160  char *orgAddrDMA;
161  char *nameDMA;
162  BOOL avail_DMA;
163 
164  descDMA = _XMPCO_get_isEagerCommMode() ? NULL :
165  _XMPCO_get_desc_fromLocalAddr(result, &orgAddrDMA, &offsetDMA, &nameDMA);
166  avail_DMA = descDMA ? TRUE : FALSE;
167 
168  /*--------------------------------------*\
169  * select scheme *
170  \*--------------------------------------*/
171  int scheme = _select_scheme_get_array(avail_DMA);
172 
173  /*--------------------------------------*\
174  * action *
175  \*--------------------------------------*/
176  switch (scheme) {
177  case SCHEME_DirectGet:
178  _XMPCO_debugPrint("select SCHEME_DirectGet/array\n");
179  _getCoarray(descPtr, baseAddr, coindex0, result,
180  element, rank, skip, count,
181  descDMA, offsetDMA, nameDMA);
182  break;
183 
184  case SCHEME_BufferGet:
185  _XMPCO_debugPrint("select SCHEME_BufferGet/array\n");
186  _getCoarray(descPtr, baseAddr, coindex0, result,
187  element, rank, skip, count,
188  NULL, 0, "(localBuf)");
189  break;
190 
191  default:
192  _XMPCO_fatal("undefined scheme number in " __FILE__);
193  }
194 }
Here is the call graph for this function:

◆ 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[] 
)
94 {
95  int coindex0 = _XMPCO_get_initial_image_withDescPtr(coindex, descPtr);
96 
97  if (element % COMM_UNIT != 0) {
98  _XMPCO_fatal("violation of boundary writing to a coindexed variable\n"
99  " xmpf_coarray_getsub_array_, " __FILE__);
100  return;
101  }
102 
103  /*--------------------------------------*\
104  * Check whether the local address local *
105  * is already registered for DMA and, *
106  * if so, get the descriptor, etc. *
107  \*--------------------------------------*/
108  void *descDMA;
109  size_t offsetDMA;
110  char *orgAddrDMA;
111  char *nameDMA;
112  BOOL avail_DMA;
113 
114  descDMA = _XMPCO_get_isEagerCommMode() ? NULL :
115  _XMPCO_get_desc_fromLocalAddr(localAddr, &orgAddrDMA, &offsetDMA, &nameDMA);
116  avail_DMA = descDMA ? TRUE : FALSE;
117 
118  /*--------------------------------------*\
119  * select scheme *
120  \*--------------------------------------*/
121  int scheme = _select_scheme_getsub_array(avail_DMA);
122 
123  /*--------------------------------------*\
124  * action *
125  \*--------------------------------------*/
126  switch (scheme) {
127  case SCHEME_DirectGetsub:
128  _XMPCO_debugPrint("SCHEME_DirectGetsub/array selected\n");
129  _getsubCoarray_DMA(descPtr, baseAddr, coindex0, localAddr,
130  element, rank, skip, skip_local, count,
131  descDMA, offsetDMA, nameDMA);
132  break;
133 
134  case SCHEME_BufferGetsub:
135  _XMPCO_debugPrint("SCHEME_BufferGetsub/array selected\n");
136  _getsubCoarray_buffer(descPtr, baseAddr, coindex0, localAddr,
137  element, rank, skip, skip_local, count);
138  break;
139 
140  default:
141  _XMPCO_fatal("unexpected scheme number in " __FILE__);
142  }
143 }
Here is the call graph for this function:

◆ XMPCO_GET_scalarExpr()

void XMPCO_GET_scalarExpr ( CoarrayInfo_t descPtr,
char *  baseAddr,
int  element,
int  coindex,
char *  result 
)
54 {
55  int coindex0 = _XMPCO_get_initial_image_withDescPtr(coindex, descPtr);
56 
57  /*--------------------------------------*\
58  * Confirm that *baseAddr is located in *
59  * the memory chunk corresponding to *
60  * descptr. *
61  \*--------------------------------------*/
62  BOOL pass = _XMPCO_isAddrInMemoryChunk(baseAddr, descPtr);
63  if (!pass) {
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",
67  _XMPCO_get_nameOfCoarray(descPtr),
68  (unsigned)_XMPCO_get_sizeOfMemoryChunk(descPtr),
69  (unsigned)_XMPCO_get_offsetInMemoryChunk(descPtr, baseAddr));
70  }
71 
72  /*--------------------------------------*\
73  * Check whether the local address *
74  * result is already registered for DMA *
75  * and, if so, get the descriptor, etc. *
76  \*--------------------------------------*/
77  void *descDMA;
78  size_t offsetDMA;
79  char *orgAddrDMA;
80  char *nameDMA;
81  BOOL avail_DMA;
82 
83  descDMA = _XMPCO_get_isEagerCommMode() ? NULL :
84  _XMPCO_get_desc_fromLocalAddr(result, &orgAddrDMA, &offsetDMA, &nameDMA);
85  avail_DMA = descDMA ? TRUE : FALSE;
86 
87  /*--------------------------------------*\
88  * select scheme *
89  \*--------------------------------------*/
90  int scheme = _select_scheme_get_scalar(element, avail_DMA);
91 
92  switch (scheme) {
93  case SCHEME_DirectGet:
94  _XMPCO_debugPrint("SCHEME_DirectGet/scalar selected\n");
95 
96  assert(avail_DMA);
97  _XMPCO_getVector_DMA(descPtr, baseAddr, element, coindex0,
98  descDMA, offsetDMA, nameDMA);
99  break;
100 
101  case SCHEME_BufferGet:
102  _XMPCO_debugPrint("select SCHEME_BufferGet/scalar\n");
103 
104  _XMPCO_getVector_buffer(descPtr, baseAddr, element, coindex0,
105  result, element);
106  break;
107 
109  {
110  size_t elementRU = ROUND_UP_COMM(element);
111 
112  _XMPCO_debugPrint("select SCHEME_ExtraBufferGet/scalar. elementRU=%ud\n",
113  elementRU);
114 
115  _XMPCO_getVector_buffer(descPtr, baseAddr, elementRU, coindex0,
116  result, element);
117  }
118  break;
119 
120  default:
121  _XMPCO_fatal("undefined scheme number in " __FILE__);
122  }
123 }
Here is the call graph for this function:

◆ XMPCO_malloc_coarray()

CoarrayInfo_t* XMPCO_malloc_coarray ( char **  addr,
int  count,
size_t  element,
ResourceSet_t rset 
)
161 {
162  size_t nbytes = count * element;
163 
164  _XMPCO_debugPrint("_XMPCO_MALLOC_COARRAY\n");
165 
166  // malloc
167  MemoryChunk_t *chunk = _mallocMemoryChunk(count, element);
168  _XMPCO_debugPrint("*** new MemoryChunk %s\n",
169  _dispMemoryChunk(chunk));
170 
171  if (rset != NULL) {
172  _addMemoryChunkInResourceSet(rset, chunk);
173 
174  _XMPCO_debugPrint("*** MemoryChunk %s added to rset=%p\n",
175  _dispMemoryChunk(chunk), rset);
176  }
177 
178  // make coarrayInfo and linkage
179  CoarrayInfo_t *cinfo = _newCoarrayInfo(chunk->orgAddr, nbytes);
180 
181  _addCoarrayInfo(chunk, cinfo);
182 
183  *addr = cinfo->baseAddr; // == chunk->orgAddr
184  return cinfo;
185 }
Here is the call graph for this function:

◆ XMPCO_malloc_pool()

void XMPCO_malloc_pool ( void  )
456 {
457  size_t ctrlDataSize = sizeof(int) * 8;
458  size_t localBufSize = _XMPCO_get_localBufSize();
459 
460  _XMPCO_debugPrint("XMPCO_MALLOC_POOL_ contains:\n"
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);
465 
466  pool_totalSize += localBufSize + ctrlDataSize;
467 
468  // init malloc/free history (STRUCTURE-II)
469  _initMallocHistory();
470 
471  // init sorted chunk table (STRUCTURE-III)
472  _initSortedChunkTable();
473 
474  // malloc the pool
475  pool_chunk = _mallocMemoryChunk(1, pool_totalSize);
476  pool_currentAddr = pool_chunk->orgAddr;
477 
478  // share communication buffer in the pool
479  _cinfo_localBuf = _getShareOfStaticCoarray(localBufSize);
480  _cinfo_localBuf->name = "(localBuf)";
481  _setSimpleCoshapeToCoarrayInfo(_cinfo_localBuf);
482 
483  // share control data area in the pool
484  _cinfo_ctrlData = _getShareOfStaticCoarray(ctrlDataSize);
485  _cinfo_ctrlData->name = "(ctrlData)";
486  _setSimpleCoshapeToCoarrayInfo(_cinfo_ctrlData);
487 }
Here is the call graph for this function:

◆ 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)

223 {
224  size_t nbytes = count * element;
225  CoarrayInfo_t *cinfo;
226 
227  _XMPCO_debugPrint("_XMPCO_ALLOC_STATIC_COARRAY varname=\'%.*s\'\n"
228  " count=%d, element=%d, nbytes=%u\n",
229  namelen, name, count, element, nbytes);
230 
231  if (nbytes > _XMPCO_get_poolThreshold()) {
232  _XMPCO_debugPrint("*** LARGER (%u bytes) than threshold\n", nbytes);
233  cinfo = _allocLargeStaticCoarray(nbytes);
234  } else {
235  size_t nbytesRU = ROUND_UP_MALLOC(nbytes);
236  _XMPCO_debugPrint("*** Not LARGER (%u bytes) than threshold\n", nbytesRU);
237  cinfo = _getShareOfStaticCoarray(nbytesRU);
238  }
239  cinfo->name = _xmp_strndup(name, namelen);
240 
241  *addr = cinfo->baseAddr;
242  return cinfo;
243 }
Here is the call graph for this function:

◆ XMPCO_prolog()

void XMPCO_prolog ( ResourceSet_t **  rset,
int  namelen,
char *  name 
)
542 {
543  *rsetp = _newResourceSet(name, namelen);
544 
545  _XMPCO_debugPrint("XMPCO_PROLOG (procedure name=\'%s\', *rsetp=%p)\n",
546  (*rsetp)->name, *rsetp);
547 }

◆ 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 
)
193 {
194  int coindex0 = _XMPCO_get_initial_image_withDescPtr(coindex, descPtr);
195 
196  if (element % COMM_UNIT != 0) {
197  _XMPCO_fatal("violation of boundary writing to a coindexed variable\n"
198  " xmpf_coarray_put_array_, " __FILE__);
199  return;
200  }
201 
202  /*--------------------------------------*\
203  * Check whether the local address rhs *
204  * is already registered for DMA and, *
205  * if so, get the descriptor, etc. *
206  \*--------------------------------------*/
207  void *descDMA;
208  size_t offsetDMA;
209  char *orgAddrDMA;
210  char *nameDMA;
211  BOOL avail_DMA;
212  int scheme;
213 
214  descDMA = _XMPCO_get_isEagerCommMode() ? NULL :
215  _XMPCO_get_desc_fromLocalAddr(rhsAddr, &orgAddrDMA, &offsetDMA, &nameDMA);
216  avail_DMA = descDMA ? TRUE : FALSE;
217 
218  /*--------------------------------------*\
219  * select scheme *
220  \*--------------------------------------*/
221  scheme = _select_scheme_put_array(avail_DMA);
222 
223  /*--------------------------------------*\
224  * action *
225  \*--------------------------------------*/
226  switch (scheme) {
227  case SCHEME_DirectPut:
228  _XMPCO_debugPrint("SCHEME_DirectPut/array selected\n");
229  _putCoarray_DMA(descPtr, baseAddr, coindex0, rhsAddr,
230  element, rank, skip, skip_rhs, count,
231  descDMA, offsetDMA, nameDMA, sync_mode);
232  break;
233 
234  case SCHEME_BufferPut:
235  _XMPCO_debugPrint("SCHEME_BufferPut/array selected\n");
236  _putCoarray_buffer(descPtr, baseAddr, coindex0, rhsAddr,
237  element, rank, skip, skip_rhs, count, sync_mode);
238  break;
239 
240  default:
241  _XMPCO_fatal("unexpected scheme number in " __FILE__);
242  }
243 }
Here is the call graph for this function:

◆ XMPCO_PUT_scalarStmt()

void XMPCO_PUT_scalarStmt ( CoarrayInfo_t descPtr,
char *  baseAddr,
int  element,
int  coindex,
char *  rhs,
SyncMode  sync_mode 
)
120 {
121  int coindex0 = _XMPCO_get_initial_image_withDescPtr(coindex, descPtr);
122 
123  /*--------------------------------------*\
124  * Check whether the local address rhs *
125  * is already registered for DMA and, *
126  * if so, get the descriptor, etc. *
127  \*--------------------------------------*/
128  void *descDMA;
129  size_t offsetDMA;
130  char *orgAddrDMA;
131  char *nameDMA;
132  BOOL avail_DMA;
133 
134  descDMA = _XMPCO_get_isEagerCommMode() ? NULL :
135  _XMPCO_get_desc_fromLocalAddr(rhs, &orgAddrDMA, &offsetDMA, &nameDMA);
136  avail_DMA = descDMA ? TRUE : FALSE;
137 
138  /*--------------------------------------*\
139  * select scheme *
140  \*--------------------------------------*/
141  int scheme = _select_scheme_put_scalar(element, avail_DMA);
142 
143  /*--------------------------------------*\
144  * action *
145  \*--------------------------------------*/
146  size_t elementRU;
147 
148  switch (scheme) {
149  case SCHEME_DirectPut:
150  _XMPCO_debugPrint("SCHEME_DirectPut/scalar selected\n");
151  assert(avail_DMA);
152 
153  _putVector_DMA(descPtr, baseAddr, element, coindex0,
154  descDMA, offsetDMA, nameDMA, sync_mode);
155  break;
156 
158  elementRU = ROUND_UP_COMM(element);
159  _XMPCO_debugPrint("SCHEME_ExtraDirectPut/scalar selected. elementRU=%ud\n",
160  elementRU);
161  assert(avail_DMA);
162 
163  _putVector_DMA(descPtr, baseAddr, elementRU, coindex0,
164  descDMA, offsetDMA, nameDMA, sync_mode);
165  break;
166 
167  case SCHEME_BufferPut:
168  _XMPCO_debugPrint("SCHEME_BufferPut/scalar selected\n");
169 
170  _putVector_buffer(descPtr, baseAddr, element, coindex0,
171  rhs, element, sync_mode);
172  break;
173 
175  elementRU = ROUND_UP_COMM(element);
176  _XMPCO_debugPrint("SCHEME_ExtraBufferPut/scalar selected. elementRU=%ud\n",
177  elementRU);
178 
179  _putVector_buffer(descPtr, baseAddr, elementRU, coindex0,
180  rhs, element, sync_mode);
181  break;
182 
183  default:
184  _XMPCO_fatal("unexpected scheme number in " __FILE__);
185  }
186 }
Here is the call graph for this function:

◆ 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 
)
249 {
250  int coindex0 = _XMPCO_get_initial_image_withDescPtr(coindex, descPtr);
251 
252  if (element % COMM_UNIT != 0) {
253  _XMPCO_fatal("violation of boundary writing a scalar to a coindexed variable\n"
254  " xmpf_coarray_put_spread_, " __FILE__);
255  return;
256  }
257 
258 
259  /*--------------------------------------*\
260  * select scheme *
261  \*--------------------------------------*/
262  // only BufferPut
263  _XMPCO_debugPrint("SCHEME_BufferPut/spread selected\n");
264 
265  /*--------------------------------------*\
266  * action *
267  \*--------------------------------------*/
268  _spreadCoarray(descPtr, baseAddr, coindex0, rhs,
269  element, rank, skip, count, element, sync_mode);
270 }
Here is the call graph for this function:

◆ XMPCO_regmem_coarray()

CoarrayInfo_t* XMPCO_regmem_coarray ( void *  var,
int  count,
size_t  element,
ResourceSet_t rset 
)
191 {
192  size_t nbytes = count * element;
193 
194  _XMPCO_debugPrint("_XMPCO_REGMEM_COARRAY\n");
195 
196  // regmem
197  MemoryChunk_t *chunk = _regmemMemoryChunk_core(var, nbytes);
198  _XMPCO_debugPrint("*** new MemoryChunk for RegMem variable %s\n",
199  _dispMemoryChunk(chunk));
200 
201  // make coarrayInfo and linkage
202  CoarrayInfo_t *cinfo = _newCoarrayInfo(chunk->orgAddr, nbytes);
203 
204  _addCoarrayInfo(chunk, cinfo);
205  return cinfo;
206 }
Here is the call graph for this function:

◆ 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)

259 {
260  CoarrayInfo_t *cinfo;
261 
262  _XMPCO_debugPrint("_XMPCO_REGMEM_STATIC_COARRAY varname=\'%.*s\'\n"
263  " count=%d, element=%ud\n",
264  namelen, name, count, element);
265 
266  // boundary check
267  if ((size_t)var % MALLOC_UNIT != 0) { // check base address
268  /* restriction */
269  _XMPCO_fatal("boundary violation detected for coarray \'%.*s\'\n"
270  " var=%p\n",
271  namelen, name, var);
272  }
273 
274  size_t nbytes = count * element;
275  //size_t nbytesRU = ROUND_UP_MALLOC(nbytes);
276 
277  _XMPCO_debugPrint("COARRAY_REGMEM_STATIC_ varname=\'%.*s\'\n",
278  namelen, name);
279 
280  cinfo = _regmemStaticCoarray(var, nbytes);
281  //cinfo = _regmemStaticCoarray(var, nbytesRU);
282  cinfo->name = _xmp_strndup(name, namelen);
283 
284  return cinfo;
285 }
Here is the call graph for this function:

◆ XMPCO_sync_all()

void XMPCO_sync_all ( void  )
12 {
13  int stat = 0;
14 
15  if (_XMPCO_is_subset_exec()) {
17  _XMPCO_debugPrint("SYNCALL on subset(%d images) done\n",
19  return;
20  }
21 
22  _count_syncall += 1;
23  xmp_sync_all(&stat);
24  if (stat != 0)
25  _XMPCO_fatal("SYNCALL failed with stat=%d", stat);
26 
27  _XMPCO_debugPrint("SYNCALL done (_count_syncall=%d, stat=%d)\n",
28  _count_syncall, stat);
29 }
Here is the call graph for this function:

◆ XMPCO_sync_all_auto()

void XMPCO_sync_all_auto ( void  )
35 {
36  int stat = 0;
37 
38  if (_XMPCO_is_subset_exec()) {
40  _XMPCO_debugPrint("SYNCALL AUTO on subset(%d images) done\n",
42  return;
43  }
44 
45  _count_syncall_auto += 1;
46  xmp_sync_all(&stat);
47  if (stat != 0)
48  _XMPCO_fatal("SYNCALL_AUTO failed with stat=%d", stat);
49 
50  _XMPCO_debugPrint("SYNCALL_AUTO done (_count_syncall_auto=%d, stat=%d)\n",
51  _count_syncall_auto, stat);
52 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ XMPCO_sync_all_withComm()

void XMPCO_sync_all_withComm ( MPI_Comm  comm)
55 {
56  int stat = 0;
57 
58  xmp_sync_memory(&stat);
59  if (stat != 0)
60  _XMPCO_fatal("SYNC MEMORY inside SYNC ALL failed with stat=%d", stat);
61  stat = MPI_Barrier(comm);
62  if (stat != 0)
63  _XMPCO_fatal("MPI_Barrier inside SYNC ALL failed with stat=%d", stat);
64  return;
65 }
Here is the caller graph for this function:

◆ XMPCO_this_image_coarray()

void XMPCO_this_image_coarray ( CoarrayInfo_t cinfo,
int  corank,
int  image[] 
)
18 {
19  int size, index, image_coarray, magic;
20  _XMP_nodes_t *nodes;
21 
22  nodes = cinfo->nodes;
23  if (nodes != NULL) {
24  image_coarray = _XMPCO_this_image_onNodes(nodes);
25  } else {
26  image_coarray = _XMPCO_get_currentThisImage();
27  }
28 
29  if (image_coarray == 0) { // This image is out of the nodes.
30  for (int i = 0; i < corank; i++)
31  image[i] = 0;
32  return;
33  }
34 
35  magic = image_coarray - 1;
36  for (int i = 0; i < corank; i++) {
37  size = cinfo->cosize[i];
38  index = magic % size;
39  image[i] = index + cinfo->lcobound[i];
40  magic /= size;
41  }
42 }
Here is the call graph for this function:

◆ XMPCO_this_image_coarray_dim()

int XMPCO_this_image_coarray_dim ( CoarrayInfo_t cinfo,
int  corank,
int  dim 
)
46 {
47  int size, index, image_coarray, magic;
48  //int image_init;
49  int k;
50  _XMP_nodes_t *nodes;
51  //MPI_Comm comm_coarray;
52 
53  if (dim <= 0 || corank < dim)
54  _XMPCO_fatal("Too large or non-positive argument 'dim' of this_image:"
55  "%d\n", dim);
56 
57  nodes = cinfo->nodes;
58  if (nodes != NULL) {
59  image_coarray = _XMPCO_this_image_onNodes(nodes);
60  } else {
61  image_coarray = _XMPCO_get_currentThisImage();
62  }
63 
64  if (image_coarray == 0) // This image is out of the nodes.
65  return 0;
66 
67  magic = image_coarray - 1;
68  k = dim - 1;
69  for (int i = 0; i < k; i++) {
70  size = cinfo->cosize[i];
71  magic /= size;
72  }
73  size = cinfo->cosize[k];
74  index = magic % size;
75  return index + cinfo->lcobound[k];
76 }
Here is the call graph for this function:
_XMP_utofu_sync_all
void _XMP_utofu_sync_all(void)
Definition: xmp_coarray_utofu.c:975
_XMP_gasnet_sync_memory
void _XMP_gasnet_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_gasnet.c:830
_XMP_utofu_coarray_malloc
void _XMP_utofu_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
Definition: xmp_coarray_utofu.c:232
_XMP_fjrdma_sync_all
void _XMP_fjrdma_sync_all()
Execute sync_all.
Definition: xmp_coarray_fjrdma.c:1350
_XMP_nodes_type::comm_size
int comm_size
Definition: xmp_data_struct.h:48
SCHEME_BufferGet
#define SCHEME_BufferGet
Definition: xmpco_get_expr.c:12
_XMPCO_getVector_DMA
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
_XMP_utofu_sync_memory
void _XMP_utofu_sync_memory(void)
Definition: xmp_coarray_utofu.c:960
_XMP_fjrdma_sync_memory
void _XMP_fjrdma_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_fjrdma.c:1338
ROUND_UP_MALLOC
#define ROUND_UP_MALLOC(n)
Definition: xmpco_internal.h:21
_memoryChunk_t::nbytes
size_t nbytes
Definition: _xmpco_alloc.h:82
_XMP_nodes_type::is_member
int is_member
Definition: xmp_data_struct.h:46
_XMP_alloc
void * _XMP_alloc(size_t size)
Definition: xmp_util.c:21
_XMPCO_get_desc_fromLocalAddr
void * _XMPCO_get_desc_fromLocalAddr(char *localAddr, char **orgAddr, size_t *offset, char **name)
Definition: xmpco_alloc.c:784
_XMP_array_section::length
long length
Definition: xmp_data_struct.h:377
SCHEME_ExtraDirectPut
#define SCHEME_ExtraDirectPut
Definition: xmpco_put.c:14
SCHEME_ExtraBufferGet
#define SCHEME_ExtraBufferGet
Definition: xmpco_get_expr.c:14
_memoryChunkOrder_t::chunk
MemoryChunk_t * chunk
Definition: _xmpco_alloc.h:114
_XMPCO_transImage_withComm
int _XMPCO_transImage_withComm(MPI_Comm comm1, int image1, MPI_Comm comm2)
Definition: xmpco_lib.c:190
_XMP_gasnet_coarray_malloc
void _XMP_gasnet_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
Definition: xmp_coarray_gasnet.c:794
_coarrayInfo_t::corank
int corank
Definition: _xmpco_alloc.h:99
_memoryChunk_t::headCoarray
CoarrayInfo_t * headCoarray
Definition: _xmpco_alloc.h:84
_XMPCO_consume_imageDirNodes
_XMP_nodes_t * _XMPCO_consume_imageDirNodes()
Definition: xmpco_lib.c:292
_XMP_fjrdma_get
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
_coarrayInfo_t::baseAddr
char * baseAddr
Definition: _xmpco_alloc.h:97
_XMP_utofu_put
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
_XMPCO_get_currentThisImage
int _XMPCO_get_currentThisImage()
Definition: xmpco_lib.c:153
_XMP_mpi_put
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
FALSE
#define FALSE
Definition: xmpco_internal.h:16
_XMPCO_debugPrint
void _XMPCO_debugPrint(char *format,...)
Definition: xmpco_msg.c:20
_XMP_mpi_sync_memory
void _XMP_mpi_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_mpi.c:542
_XMPCO_get_isMsgMode
BOOL _XMPCO_get_isMsgMode()
Definition: xmpco_params.c:86
_localBuf_name
char * _localBuf_name
Definition: xmpco_get_stmt.c:69
syncRUNTIME
@ syncRUNTIME
Definition: xmpco_internal.h:27
_coarrayInfo_t::size
size_t size
Definition: _xmpco_alloc.h:98
_XMPCO_get_nameOfCoarray
char * _XMPCO_get_nameOfCoarray(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:701
SCHEME_DirectGet
#define SCHEME_DirectGet
Definition: xmpco_get_expr.c:11
_localBuf_desc
void * _localBuf_desc
Definition: xmpco_get_stmt.c:65
_memoryChunk_t::isGarbage
BOOL isGarbage
Definition: _xmpco_alloc.h:80
_XMP_nodes_type::comm_rank
int comm_rank
Definition: xmp_data_struct.h:52
_XMPCO_get_initial_image_withDescPtr
int _XMPCO_get_initial_image_withDescPtr(int image, CoarrayInfo_t *descPtr)
Definition: xmpco_lib.c:246
SCHEME_DirectGetsub
#define SCHEME_DirectGetsub
Definition: xmpco_get_stmt.c:11
_XMP_world_rank
int _XMP_world_rank
Definition: xmp_world.c:9
_XMPCO_get_imageDirNodes
_XMP_nodes_t * _XMPCO_get_imageDirNodes()
Definition: xmpco_lib.c:286
_memoryChunk_t::desc
void * desc
Definition: _xmpco_alloc.h:83
_XMPCO_get_isEagerCommMode
BOOL _XMPCO_get_isEagerCommMode(void)
Definition: xmpco_params.c:89
forallMemoryChunkOrder
#define forallMemoryChunkOrder(cp)
Definition: _xmpco_alloc.h:16
_XMP_mpi_coarray_malloc
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
_XMPCO_get_infoOfLocalBuf
void * _XMPCO_get_infoOfLocalBuf(char **baseAddr, size_t *offset, char **name)
Definition: xmpco_alloc.c:770
_XMP_mpi_sync_all
void _XMP_mpi_sync_all()
Execute sync_all.
Definition: xmp_coarray_mpi.c:603
_XMPCO_get_offsetInMemoryChunk
size_t _XMPCO_get_offsetInMemoryChunk(CoarrayInfo_t *cinfo, char *addr)
Definition: xmpco_alloc.c:740
_XMPCO_consume_comm_current
MPI_Comm _XMPCO_consume_comm_current(void)
Definition: xmpco_lib.c:315
_localBuf_offset
size_t _localBuf_offset
Definition: xmpco_get_stmt.c:66
syncBLOCK
@ syncBLOCK
Definition: xmpco_internal.h:25
_XMP_N_INT_FALSE
#define _XMP_N_INT_FALSE
Definition: xmp_constant.h:5
_coarrayInfo_t::name
char * name
Definition: _xmpco_alloc.h:96
_XMP_local_get
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
_XMP_array_section::start
long start
Definition: xmp_data_struct.h:376
_XMP_gasnet_sync_all
void _XMP_gasnet_sync_all()
Execute sync_all.
Definition: xmp_coarray_gasnet.c:846
_XMP_tca_sync_memory
void _XMP_tca_sync_memory()
Execute sync_memory.
Definition: xmp_coarray_tca.c:177
_XMP_mpi_get
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
_XMP_gasnet_sync_images
void _XMP_gasnet_sync_images(const int num, int image_set[num], int *status)
Execute sync images.
Definition: xmp_coarray_gasnet.c:1677
MALLOC_UNIT
#define MALLOC_UNIT
Definition: xmpco_params.h:38
_XMPCO_get_initialNumImages
int _XMPCO_get_initialNumImages(void)
Definition: xmpco_lib.c:133
XMPCO_sync_all_auto
void XMPCO_sync_all_auto(void)
Definition: xmpco_sync.c:34
_XMPCO_transImage_current2initial
int _XMPCO_transImage_current2initial(int image)
Definition: xmpco_lib.c:222
_coarrayInfo_t::cosize
int * cosize
Definition: _xmpco_alloc.h:102
XMPCO_sync_all_withComm
void XMPCO_sync_all_withComm(MPI_Comm comm)
Definition: xmpco_sync.c:54
_XMPCO_this_image_onNodes
int _XMPCO_this_image_onNodes(_XMP_nodes_t *nodes)
Definition: xmpco_lib.c:95
BOOL
#define BOOL
Definition: xmpco_internal.h:14
_XMPCO_getVector_buffer
void _XMPCO_getVector_buffer(void *descPtr, char *baseAddr, int bytesRU, int coindex, char *result, int bytes)
Definition: xmpco_get_expr.c:342
_XMPCO_get_sizeOfMemoryChunk
size_t _XMPCO_get_sizeOfMemoryChunk(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:735
DIV_CEILING
#define DIV_CEILING(m, n)
Definition: _xmpco_alloc.h:14
_XMP_fjrdma_regmem
void _XMP_fjrdma_regmem(_XMP_coarray_t *coarray_desc, void *addr, const size_t coarray_size)
Definition: xmp_coarray_fjrdma.c:1567
_coarrayInfo_t::nodes
_XMP_nodes_t * nodes
Definition: _xmpco_alloc.h:103
_memoryChunk_t::orgAddr
char * orgAddr
Definition: _xmpco_alloc.h:81
IsEmptyMemoryChunk
#define IsEmptyMemoryChunk(chk)
Definition: _xmpco_alloc.h:51
_XMPCO_get_initialThisImage
int _XMPCO_get_initialThisImage(void)
Definition: xmpco_lib.c:128
_XMPCO_fatal
void _XMPCO_fatal(char *format,...)
Definition: xmpco_msg.c:4
_XMP_mpi_coarray_regmem
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
xmp_coarray
Definition: xmp_data_struct.h:328
TRUE
#define TRUE
Definition: xmpco_internal.h:15
_XMP_mpi_sync_images
void _XMP_mpi_sync_images(const int num, const int *image_set, int *status)
Execute sync images.
Definition: xmp_coarray_mpi.c:1080
xmp_sync_images
void xmp_sync_images(const int num, int *image_set, int *status)
Execute sync_images()
Definition: xmp_coarray.c:1439
_XMPCO_get_currentComm
MPI_Comm _XMPCO_get_currentComm()
Definition: xmpco_lib.c:163
_localBuf_size
int _localBuf_size
Definition: xmpco_get_stmt.c:68
_memoryChunk_t
structure for each malloc/free call Every memory chunk is linked both:
Definition: _xmpco_alloc.h:76
_XMP_coarray_set_info
void _XMP_coarray_set_info(_XMP_coarray_t *c)
Definition: xmp_coarray.c:297
SCHEME_BufferGetsub
#define SCHEME_BufferGetsub
Definition: xmpco_get_stmt.c:12
SCHEME_ExtraBufferPut
#define SCHEME_ExtraBufferPut
Definition: xmpco_put.c:15
xmp_sync_memory
void xmp_sync_memory(const int *status)
Execute sync_memory()
Definition: xmp_coarray.c:1405
_XMP_gasnet_put
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
ROUND_UP_COMM
#define ROUND_UP_COMM(n)
Definition: xmpco_internal.h:20
_XMP_utofu_get
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
_XMPCO_isAddrInMemoryChunk
BOOL _XMPCO_isAddrInMemoryChunk(char *localAddr, CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:747
_XMP_nodes_type::comm
_XMP_comm_t * comm
Definition: xmp_data_struct.h:53
_XMPCO_get_currentNumImages
int _XMPCO_get_currentNumImages(void)
Definition: xmpco_lib.c:143
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
_memoryChunkOrder_t
MEMORY MANAGEMENT STRUCTURE-II (for dynamic ALLOCATE/DEALLOCATE stmts.
Definition: _xmpco_alloc.h:111
_XMP_array_section::stride
long stride
Definition: xmp_data_struct.h:378
_XMPCO_get_currentThisImage
int _XMPCO_get_currentThisImage(void)
Definition: xmpco_lib.c:153
_XMPCO_get_orgAddrOfMemoryChunk
char * _XMPCO_get_orgAddrOfMemoryChunk(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:730
_XMP_fjrdma_put
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
_XMPCO_get_currentNumImages
int _XMPCO_get_currentNumImages()
Definition: xmpco_lib.c:143
_XMPCO_get_localBufSize
size_t _XMPCO_get_localBufSize(void)
Definition: xmpco_params.c:84
_XMPCO_nowInTask
int _XMPCO_nowInTask()
Definition: xmpco_alloc.c:1420
_XMP_array_section::distance
long distance
Definition: xmp_data_struct.h:380
_XMP_array_section
Definition: xmp_data_struct.h:375
_XMP_fjrdma_coarray_malloc
void _XMP_fjrdma_coarray_malloc(_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
Definition: xmp_coarray_fjrdma.c:1553
_XMP_nodes_type
Definition: xmp_data_struct.h:40
_XMP_local_put
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
@ syncATOMIC
Definition: xmpco_internal.h:26
SCHEME_DirectPut
#define SCHEME_DirectPut
Definition: xmpco_put.c:12
_XMP_check_less_than_SIZE_MAX
void _XMP_check_less_than_SIZE_MAX(const long s)
Definition: xmp_coarray_utils.c:9
_XMPCO_get_isMsgMode
BOOL _XMPCO_get_isMsgMode(void)
Definition: xmpco_params.c:86
_coarrayInfo_t::next
CoarrayInfo_t * next
Definition: _xmpco_alloc.h:94
SCHEME_BufferPut
#define SCHEME_BufferPut
Definition: xmpco_put.c:13
_coarrayInfo_t
structure for each coarray variable One or more coarrays can be linked from a single memory chunk and...
Definition: _xmpco_alloc.h:92
_coarrayInfo_t::parent
MemoryChunk_t * parent
Definition: _xmpco_alloc.h:95
_XMP_utofu_sync_images
void _XMP_utofu_sync_images(const int num, int *image_set, int *status)
Definition: xmp_coarray_utofu.c:1065
_XMPCO_is_subset_exec
BOOL _XMPCO_is_subset_exec(void)
Definition: xmpco_lib.c:176
syncNONBLOCK
@ syncNONBLOCK
Definition: xmpco_internal.h:24
_XMP_array_section::elmts
long elmts
Definition: xmp_data_struct.h:379
COMM_UNIT
#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
_XMP_fjrdma_sync_images
void _XMP_fjrdma_sync_images(const int num, int *image_set, int *status)
Execute sync images.
Definition: xmp_coarray_fjrdma.c:2251
_XMP_gasnet_get
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
_XMPCO_is_subset_exec
BOOL _XMPCO_is_subset_exec()
Definition: xmpco_lib.c:176
_XMPCO_get_sizeOfMemoryChunk
size_t _XMPCO_get_sizeOfMemoryChunk(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:735
_coarrayInfo_t::lcobound
int * lcobound
Definition: _xmpco_alloc.h:100
xmp_sync_all
void xmp_sync_all(const int *status)
Execute sync_all()
Definition: xmp_coarray.c:1423
_XMP_utofu_regmem
void _XMP_utofu_regmem(_XMP_coarray_t *coarray_desc, void *addr, const size_t coarray_size)
Definition: xmp_coarray_utofu.c:238
_XMP_get_execution_nodes
void * _XMP_get_execution_nodes(void)
Definition: xmp_nodes_stack.c:46
_localBuf_baseAddr
char * _localBuf_baseAddr
Definition: xmpco_get_stmt.c:67
_coarrayInfo_t::ucobound
int * ucobound
Definition: _xmpco_alloc.h:101
_XMPCO_get_poolThreshold
unsigned _XMPCO_get_poolThreshold(void)
Definition: xmpco_params.c:83
_XMPCO_get_comm_fromCoarrayInfo
MPI_Comm _XMPCO_get_comm_fromCoarrayInfo(CoarrayInfo_t *cinfo)
Definition: xmpco_alloc.c:527