libxmp/libxmpf in Omni Compiler  1.3.4
xmp_coarray_utofu.c File Reference
#include <stdlib.h>
#include "xmp.h"
#include "xmp_internal.h"
Include dependency graph for xmp_coarray_utofu.c:

Data Structures

struct  _XMP_utofu_vcqid_table
 

Typedefs

typedef struct _XMP_utofu_vcqid_table _XMP_utofu_vcqid_t
 

Functions

void _XMP_utofu_error_check (int utofu_ret)
 
int compare_vcqid_table (const void *a, const void *b)
 
uint64_t _XMP_utofu_check_mrq_notice (struct utofu_mrq_notice *notice)
 
void _XMP_utofu_coarray_malloc (_XMP_coarray_t *coarray_desc, void **addr, const size_t coarray_size)
 
void _XMP_utofu_regmem (_XMP_coarray_t *coarray_desc, void *addr, const size_t coarray_size)
 
void _XMP_utofu_deallocate (_XMP_coarray_t *coarray_desc)
 
void _XMP_utofu_contiguous_put (const int target_rank, const uint64_t dst_offset, const uint64_t src_offset, const _XMP_coarray_t *dst_desc, const _XMP_coarray_t *src_desc, const size_t dst_elmts, const size_t src_elmts, const size_t elmt_size)
 
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)
 
void _XMP_utofu_contiguous_get (const int target_rank, const _XMP_coarray_t *dst_desc, const _XMP_coarray_t *src_desc, const uint64_t dst_offset, const uint64_t src_offset, const size_t dst_elmts, const size_t src_elmts, const size_t elmt_size)
 
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)
 
void _XMP_utofu_sync_memory (void)
 
void _XMP_utofu_sync_all (void)
 
void _XMP_utofu_build_sync_images_table (void)
 
void _XMP_utofu_sync_images (const int num, int *image_set, int *status)
 

Typedef Documentation

◆ _XMP_utofu_vcqid_t

Function Documentation

◆ _XMP_utofu_build_sync_images_table()

void _XMP_utofu_build_sync_images_table ( void  )
984 {
985  _sync_images_table = malloc(sizeof(unsigned int) * _XMP_world_size);
986 
987  for( int i = 0; i < _XMP_world_size; i++ )
988  _sync_images_table[i] = 0;
989 
990  double *token = _XMP_alloc(sizeof(double));
991  utofu_reg_mem(_xmp_utofu_vcq_hdl, token, sizeof(double), 0, &_lcl_stadd);
992  _rmt_stadds = _XMP_alloc(sizeof(utofu_stadd_t) * _XMP_world_size);
993  MPI_Allgather(&_lcl_stadd, 1, MPI_UINT64_T, _rmt_stadds, 1, MPI_UINT64_T, MPI_COMM_WORLD);
994 
995  _xmp_utofu_vcqid_t = (_XMP_utofu_vcqid_t*)malloc(sizeof(_XMP_utofu_vcqid_t) * _XMP_world_size);
996  for( int i = 0; i < _XMP_world_size; i++ ) {
997  _xmp_utofu_vcqid_t[i].rank = i;
998  _xmp_utofu_vcqid_t[i].vcqid = _xmp_utofu_vcq_ids_org[i];
999  }
1000  qsort( _xmp_utofu_vcqid_t, _XMP_world_size, sizeof(_XMP_utofu_vcqid_t), compare_vcqid_table );
1001 }
Here is the caller graph for this function:

◆ _XMP_utofu_check_mrq_notice()

uint64_t _XMP_utofu_check_mrq_notice ( struct utofu_mrq_notice *  notice)
202 {
203  uint64_t rmt_value = 0;
204 
205  if( notice->notice_type == UTOFU_MRQ_TYPE_RMT_PUT ) {
206  if( notice->edata == _xmp_utofu_edata_flag_sync_images ) {
207  _add_sync_images_table_vcqid( notice->vcq_id );
208  }
209  else {
210  _xmp_utofu_add_postreq( notice->vcq_id, (int)notice->edata );
211  }
212  }
213  else if( notice->notice_type == UTOFU_MRQ_TYPE_LCL_GET ) {
214  _xmp_utofu_num_of_gets--;
215  }
216  else if( notice->notice_type == UTOFU_MRQ_TYPE_LCL_PUT ) {
217  _xmp_utofu_num_of_puts--;
218  }
219  else if( notice->notice_type == UTOFU_MRQ_TYPE_LCL_ARMW ) {
220  if( notice->edata == _xmp_utofu_edata_flag_armw_puts ) {
221  _xmp_utofu_num_of_puts--;
222  }
223  else if( notice->edata == _xmp_utofu_edata_flag_armw_gets ) {
224  _xmp_utofu_num_of_gets--;
225  }
226  rmt_value = notice->rmt_value;
227  }
228 
229  return rmt_value;
230 }
Here is the caller graph for this function:

◆ _XMP_utofu_coarray_malloc()

void _XMP_utofu_coarray_malloc ( _XMP_coarray_t coarray_desc,
void **  addr,
const size_t  coarray_size 
)
233 {
234  *addr = _XMP_alloc( coarray_size );
235  _XMP_utofu_regmem( coarray_desc, *addr, coarray_size );
236 }
Here is the call graph for this function:

◆ _XMP_utofu_contiguous_get()

void _XMP_utofu_contiguous_get ( const int  target_rank,
const _XMP_coarray_t dst_desc,
const _XMP_coarray_t src_desc,
const uint64_t  dst_offset,
const uint64_t  src_offset,
const size_t  dst_elmts,
const size_t  src_elmts,
const size_t  elmt_size 
)
732 {
733  int ident_val = _xmp_utofu_num_of_gets;
734  unsigned long int post_flags;
735  post_flags = _XMP_UTOFU_COARRAY_GET_POST_FLAGS;
736  uint64_t edata = ident_val % (1UL << (8 * _xmp_utofu_onesided_caps->max_edata_size));
737  uintptr_t cbvalue = ident_val;
738 
739  size_t transfer_size = dst_elmts * elmt_size;
740  utofu_stadd_t rmt_stadd = src_desc->stadds[target_rank] + src_offset;
741  utofu_stadd_t lcl_stadd = dst_desc->stadds[_XMP_world_rank] + dst_offset;
742 
743  if(dst_elmts == src_elmts){
744  _utofu_get( target_rank, lcl_stadd, rmt_stadd,
745  transfer_size, edata, post_flags, cbvalue );
746  _XMP_utofu_sync_memory_get_all( post_flags );
747  }
748  else if(src_elmts == 1){
749  _utofu_get( target_rank, lcl_stadd, rmt_stadd,
750  elmt_size, edata, post_flags, cbvalue );
751  _XMP_utofu_sync_memory_get_all( post_flags );
752 
753  char *dst = dst_desc->real_addr + dst_offset;
754  for( size_t i = 1; i < dst_elmts; i++ )
755  memcpy( dst + i * elmt_size, dst, elmt_size );
756  }
757  else{
758  _XMP_fatal("Coarray Error ! transfer size is wrong.\n");
759  }
760 }

◆ _XMP_utofu_contiguous_put()

void _XMP_utofu_contiguous_put ( const int  target_rank,
const uint64_t  dst_offset,
const uint64_t  src_offset,
const _XMP_coarray_t dst_desc,
const _XMP_coarray_t src_desc,
const size_t  dst_elmts,
const size_t  src_elmts,
const size_t  elmt_size 
)
447 {
448  int ident_val = _xmp_utofu_num_of_puts;
449  unsigned long int post_flags;
450  post_flags = _XMP_UTOFU_COARRAY_PUT_POST_FLAGS;
451  uint64_t edata = ident_val % (1UL << (8 * _xmp_utofu_onesided_caps->max_edata_size));
452  uintptr_t cbvalue = ident_val;
453 
454  size_t transfer_size = dst_elmts * elmt_size;
455 
456  utofu_stadd_t src_stadd = src_desc->stadds[_XMP_world_rank] + src_offset;
457  utofu_stadd_t dst_stadd = dst_desc->stadds[target_rank] + dst_offset;
458 
459  if( dst_elmts == src_elmts){
460  _utofu_put( target_rank, src_stadd, dst_stadd,
461  transfer_size, edata, post_flags, cbvalue );
462  }
463  else if(src_elmts == 1){
464  utofu_stadd_t dst_stadds[dst_elmts], src_stadds[dst_elmts];
465  size_t lengths[dst_elmts];
466  for( size_t i = 0; i < dst_elmts; i++ ) dst_stadds[i] = dst_stadd + i * elmt_size;
467  for( size_t i = 0; i < dst_elmts; i++ ) src_stadds[i] = src_stadd;
468  for( size_t i = 0; i < dst_elmts; i++ ) lengths[i] = elmt_size;
469  _utofu_scalar_mput_do(target_rank, dst_stadds, src_stadds, lengths, dst_elmts,
470  edata, post_flags, cbvalue);
471  }
472  else{
473  _XMP_fatal("_XMP_utofu_contiguous_put : error");
474  }
475 
476  _XMP_utofu_sync_memory_put_all( post_flags );
477 }

◆ _XMP_utofu_deallocate()

void _XMP_utofu_deallocate ( _XMP_coarray_t coarray_desc)
286 {
288 
289  int image_size = xmp_num_images();
290  if( image_size == _XMP_world_size ) {
291  utofu_dereg_mem(_xmp_utofu_vcq_hdl, coarray_desc->stadds[_XMP_world_rank], 0);
292  }
293  else {
294  int rank = xmpc_node_num();
295  int world_rank;
296  MPI_Comm comm = xmp_get_mpi_comm();
297  MPI_Group grp, world_grp;
298  MPI_Comm_group(MPI_COMM_WORLD, &world_grp);
299  MPI_Comm_group(comm, &grp);
300  MPI_Group_translate_ranks(grp, 1, &rank, world_grp, &world_rank);
301  utofu_dereg_mem(_xmp_utofu_vcq_hdl, coarray_desc->stadds[world_rank], 0);
302  MPI_Group_free(&grp);
303  MPI_Group_free(&world_grp);
304  }
305  free( coarray_desc->stadds );
306 }
Here is the call graph for this function:

◆ _XMP_utofu_error_check()

void _XMP_utofu_error_check ( int  utofu_ret)
7 {
8  fprintf(stderr, "utofu return code : ");
9  switch( utofu_ret ) {
10  case UTOFU_SUCCESS:
11  fprintf(stderr, "UTOFU_SUCCESS\n");
12  break;
13  case UTOFU_ERR_NOT_FOUND:
14  fprintf(stderr, "UTOFU_ERR_NOT_FOUND\n");
15  break;
16  case UTOFU_ERR_NOT_COMPLETED:
17  fprintf(stderr, "UTOFU_ERR_NOT_COMPLETED\n");
18  break;
19  case UTOFU_ERR_NOT_PROCESSED:
20  fprintf(stderr, "UTOFU_ERR_NOT_PROCESSED\n");
21  break;
22  case UTOFU_ERR_BUSY:
23  fprintf(stderr, "UTOFU_ERR_BUSY\n");
24  break;
25  case UTOFU_ERR_USED:
26  fprintf(stderr, "UTOFU_ERR_USED\n");
27  break;
28  case UTOFU_ERR_FULL:
29  fprintf(stderr, "UTOFU_ERR_FULL\n");
30  break;
31  case UTOFU_ERR_NOT_AVAILABLE:
32  fprintf(stderr, "UTOFU_ERR_NOT_AVAILABLE\n");
33  break;
34  case UTOFU_ERR_NOT_SUPPORTED:
35  fprintf(stderr, "UTOFU_ERR_NOT_SUPPORTED\n");
36  break;
37  case UTOFU_ERR_TCQ_OTHER:
38  fprintf(stderr, "UTOFU_ERR_TCQ_OTHER\n");
39  break;
40  case UTOFU_ERR_TCQ_DESC:
41  fprintf(stderr, "UTOFU_ERR_TCQ_DESC\n");
42  break;
43  case UTOFU_ERR_TCQ_MEMORY:
44  fprintf(stderr, "UTOFU_ERR_TCQ_MEMORY\n");
45  break;
46  case UTOFU_ERR_TCQ_STADD:
47  fprintf(stderr, "UTOFU_ERR_TCQ_STADD\n");
48  break;
49  case UTOFU_ERR_TCQ_LENGTH:
50  fprintf(stderr, "UTOFU_ERR_TCQ_LENGTH\n");
51  break;
52  case UTOFU_ERR_MRQ_OTHER:
53  fprintf(stderr, "UTOFU_ERR_MRQ_OTHER\n");
54  break;
55  case UTOFU_ERR_MRQ_PEER:
56  fprintf(stderr, "UTOFU_ERR_MRQ_PEER\n");
57  break;
58  case UTOFU_ERR_MRQ_LCL_MEMORY:
59  fprintf(stderr, "UTOFU_ERR_MRQ_LCL_MEMORY\n");
60  break;
61  case UTOFU_ERR_MRQ_RMT_MEMORY:
62  fprintf(stderr, "UTOFU_ERR_MRQ_RMT_MEMORY\n");
63  break;
64  case UTOFU_ERR_MRQ_LCL_STADD:
65  fprintf(stderr, "UTOFU_ERR_MRQ_LCL_STADD\n");
66  break;
67  case UTOFU_ERR_MRQ_RMT_STADD:
68  fprintf(stderr, "UTOFU_ERR_MRQ_RMT_STADD\n");
69  break;
70  case UTOFU_ERR_MRQ_LCL_LENGTH:
71  fprintf(stderr, "UTOFU_ERR_MRQ_LCL_LENGTH\n");
72  break;
73  case UTOFU_ERR_MRQ_RMT_LENGTH:
74  fprintf(stderr, "UTOFU_ERR_MRQ_RMT_LENGTH\n");
75  break;
76  case UTOFU_ERR_BARRIER_OTHER:
77  fprintf(stderr, "UTOFU_ERR_BARRIER_OTHER\n");
78  break;
79  case UTOFU_ERR_BARRIER_MISMATCH:
80  fprintf(stderr, "UTOFU_ERR_BARRIER_MISMATCH\n");
81  break;
82  case UTOFU_ERR_INVALID_ARG:
83  fprintf(stderr, "UTOFU_ERR_INVALID_ARG\n");
84  break;
85  case UTOFU_ERR_INVALID_POINTER:
86  fprintf(stderr, "UTOFU_ERR_INVALID_POINTER\n");
87  break;
88  case UTOFU_ERR_INVALID_FLAGS:
89  fprintf(stderr, "UTOFU_ERR_INVALID_FLAGS\n");
90  break;
91  case UTOFU_ERR_INVALID_COORDS:
92  fprintf(stderr, "UTOFU_ERR_INVALID_COORDS\n");
93  break;
94  case UTOFU_ERR_INVALID_PATH:
95  fprintf(stderr, "UTOFU_ERR_INVALID_PATH\n");
96  break;
97  case UTOFU_ERR_INVALID_TNI_ID:
98  fprintf(stderr, "UTOFU_ERR_INVALID_TNI_ID\n");
99  break;
100  case UTOFU_ERR_INVALID_CQ_ID:
101  fprintf(stderr, "UTOFU_ERR_INVALID_CQ_ID\n");
102  break;
103  case UTOFU_ERR_INVALID_BG_ID:
104  fprintf(stderr, "UTOFU_ERR_INVALID_BG_ID\n");
105  break;
106  case UTOFU_ERR_INVALID_CMP_ID:
107  fprintf(stderr, "UTOFU_ERR_INVALID_CMP_ID\n");
108  break;
109  case UTOFU_ERR_INVALID_VCQ_HDL:
110  fprintf(stderr, "UTOFU_ERR_INVALID_VCQ_HDL\n");
111  break;
112  case UTOFU_ERR_INVALID_VCQ_ID:
113  fprintf(stderr, "UTOFU_ERR_INVALID_VCQ_ID\n");
114  break;
115  case UTOFU_ERR_INVALID_VBG_ID:
116  fprintf(stderr, "UTOFU_ERR_INVALID_VBG_ID\n");
117  break;
118  case UTOFU_ERR_INVALID_PATH_ID:
119  fprintf(stderr, "UTOFU_ERR_INVALID_PATH_ID\n");
120  break;
121  case UTOFU_ERR_INVALID_STADD:
122  fprintf(stderr, "UTOFU_ERR_INVALID_STADD\n");
123  break;
124  case UTOFU_ERR_INVALID_ADDRESS:
125  fprintf(stderr, "UTOFU_ERR_INVALID_ADDRESS\n");
126  break;
127  case UTOFU_ERR_INVALID_SIZE:
128  fprintf(stderr, "UTOFU_ERR_INVALID_SIZE\n");
129  break;
130  case UTOFU_ERR_INVALID_STAG:
131  fprintf(stderr, "UTOFU_ERR_INVALID_STAG\n");
132  break;
133  case UTOFU_ERR_INVALID_EDATA:
134  fprintf(stderr, "UTOFU_ERR_INVALID_EDATA\n");
135  break;
136  case UTOFU_ERR_INVALID_NUMBER:
137  fprintf(stderr, "UTOFU_ERR_INVALID_NUMBER\n");
138  break;
139  case UTOFU_ERR_INVALID_OP:
140  fprintf(stderr, "UTOFU_ERR_INVALID_OP\n");
141  break;
142  case UTOFU_ERR_INVALID_DESC:
143  fprintf(stderr, "UTOFU_ERR_INVALID_DESC\n");
144  break;
145  case UTOFU_ERR_INVALID_DATA:
146  fprintf(stderr, "UTOFU_ERR_INVALID_DATA\n");
147  break;
148  case UTOFU_ERR_OUT_OF_RESOURCE:
149  fprintf(stderr, "UTOFU_ERR_OUT_OF_RESOURCE\n");
150  break;
151  case UTOFU_ERR_OUT_OF_MEMORY:
152  fprintf(stderr, "UTOFU_ERR_OUT_OF_MEMORY\n");
153  break;
154  case UTOFU_ERR_FATAL:
155  fprintf(stderr, "UTOFU_ERR_FATAL\n");
156  break;
157  default:
158  fprintf(stderr, "unknown return code : %d\n", utofu_ret);
159  }
160 }
Here is the caller graph for this function:

◆ _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 
)
934 {
935  uint64_t dst_offset = (uint64_t)_XMP_get_offset(dst_info, dst_dims);
936  uint64_t src_offset = (uint64_t)_XMP_get_offset(src_info, src_dims);
937  size_t transfer_size = src_desc->elmt_size * src_elmts;
938 
939  if(src_elmts == dst_elmts){
940  if(dst_contiguous == _XMP_N_INT_TRUE && src_contiguous == _XMP_N_INT_TRUE){
941  _utofu_contiguous_get(target_rank, dst_offset, src_offset, dst, dst_desc, src_desc, transfer_size);
942  }
943  else{
944  _utofu_NON_contiguous_get(target_rank, dst_offset, src_offset,
945  dst_info, src_info, dst_dims, src_dims,
946  dst_desc, src_desc, dst, dst_elmts);
947  }
948  }
949  else{
950  if(src_elmts == 1){
951  _utofu_scalar_mget(target_rank, dst_offset, src_offset,
952  dst_info, dst_dims, dst_desc, src_desc, (char *)dst, dst_elmts);
953  }
954  else{
955  _XMP_fatal("Number of elements is invalid");
956  }
957  }
958 }
Here is the call graph for this function:

◆ _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 
)
629 {
630  uint64_t dst_offset = (uint64_t)_XMP_get_offset(dst_info, dst_dims);
631  uint64_t src_offset = (uint64_t)_XMP_get_offset(src_info, src_dims);
632  size_t transfer_size = dst_desc->elmt_size * dst_elmts;
633 
634  if(dst_elmts == src_elmts){
635  if(dst_contiguous == _XMP_N_INT_TRUE && src_contiguous == _XMP_N_INT_TRUE){
636  _utofu_contiguous_put(target_rank, dst_offset, src_offset,
637  dst_desc, src_desc, src, transfer_size);
638  }
639  else{
640  _utofu_NON_contiguous_put(target_rank, dst_offset, src_offset,
641  dst_info, src_info, dst_dims, src_dims,
642  dst_desc, src_desc, src, dst_elmts);
643  }
644  }
645  else{
646  if(src_elmts == 1){
647  _utofu_scalar_mput(target_rank, dst_offset, src_offset,
648  dst_info, dst_dims, dst_desc, src_desc, src, dst_elmts);
649  }
650  else{
651  _XMP_fatal("_XMP_utofu_put : Number of elements is invalid");
652  }
653  }
654 }
Here is the call graph for this function:

◆ _XMP_utofu_regmem()

void _XMP_utofu_regmem ( _XMP_coarray_t coarray_desc,
void *  addr,
const size_t  coarray_size 
)
239 {
240  utofu_stadd_t *each_addr = _XMP_alloc(sizeof(utofu_stadd_t) * _XMP_world_size);
241 
242  coarray_desc->stadds = (utofu_stadd_t*)malloc(sizeof(utofu_stadd_t) * _XMP_world_size);
243  utofu_stadd_t stadds;
244  utofu_reg_mem(_xmp_utofu_vcq_hdl, addr, coarray_size, 0, &stadds);
245 
246  MPI_Comm comm = xmp_get_mpi_comm();
247  int image_size = xmp_num_images();
248  if( image_size == _XMP_world_size ) {
249  MPI_Allgather(&stadds, 1, MPI_UINT64_T,
250  coarray_desc->stadds, 1, MPI_UINT64_T,
251  comm);
252  }
253  else {
254  utofu_stadd_t *tmp_stadds;
255  tmp_stadds = (utofu_stadd_t*)malloc(sizeof(utofu_stadd_t) * image_size);
256  MPI_Allgather(&stadds, 1, MPI_UINT64_T,
257  tmp_stadds, 1, MPI_UINT64_T,
258  comm);
259 
260  MPI_Group grp, world_grp;
261  MPI_Comm_group(MPI_COMM_WORLD, &world_grp);
262  MPI_Comm_group(comm, &grp);
263  int grp_size;
264  MPI_Group_size(grp, &grp_size);
265  int *ranks = malloc(grp_size * sizeof(int));
266  int *world_ranks = malloc(grp_size * sizeof(int));
267  for( int i = 0; i < grp_size; i++ )
268  ranks[i] = i;
269  MPI_Group_translate_ranks(grp, grp_size, ranks, world_grp, world_ranks);
270 
271  for( int i = 0; i < grp_size; i++ )
272  coarray_desc->stadds[world_ranks[i]] = tmp_stadds[ranks[i]];
273 
274  free(ranks);
275  free(world_ranks);
276  MPI_Group_free(&grp);
277  MPI_Group_free(&world_grp);
278  free(tmp_stadds);
279  }
280 
281  coarray_desc->real_addr = addr;
282  coarray_desc->addr = (void *)each_addr;
283 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_utofu_sync_all()

void _XMP_utofu_sync_all ( void  )
976 {
978 
979  MPI_Comm comm = xmp_get_mpi_comm();
980  MPI_Barrier(comm);
981 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_utofu_sync_images()

void _XMP_utofu_sync_images ( const int  num,
int *  image_set,
int *  status 
)
1066 {
1068 
1069  if( num == 0 ) {
1070  return;
1071  }
1072  else if( num < 0 ) {
1073  fprintf(stderr, "Invalid value is used in xmp_sync_memory. The first argument is %d\n", num);
1074  _XMP_fatal_nomsg();
1075  }
1076 
1077  _notify_sync_images( num, image_set );
1078  _wait_sync_images( num, image_set );
1079 
1080  // post-processing
1081  for( int i = 0; i < num; i++ )
1082  _sync_images_table[image_set[i]]--;
1083 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_utofu_sync_memory()

void _XMP_utofu_sync_memory ( void  )
961 {
962  int ret;
963  while( _xmp_utofu_num_of_puts > 0 || _xmp_utofu_num_of_gets > 0 ) {
964  struct utofu_mrq_notice notice;
965  ret = utofu_poll_mrq(_xmp_utofu_vcq_hdl, 0, &notice);
966  if( ret != UTOFU_SUCCESS && ret != UTOFU_ERR_NOT_FOUND ) {
967  _XMP_utofu_error_check( ret );
968  _XMP_fatal("_XMP_utofu_sync_memory : utofu_poll_mrq not success");
969  }
970  if( ret == UTOFU_SUCCESS )
971  _XMP_utofu_check_mrq_notice( &notice );
972  }
973 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ compare_vcqid_table()

int compare_vcqid_table ( const void *  a,
const void *  b 
)
175 {
176  if( ((_XMP_utofu_vcqid_t*)a)->vcqid < ((_XMP_utofu_vcqid_t*)b)->vcqid ) return -1;
177  else if( ((_XMP_utofu_vcqid_t*)a)->vcqid > ((_XMP_utofu_vcqid_t*)b)->vcqid ) return 1;
178  else return 0;
179 }
_XMP_utofu_sync_all
void _XMP_utofu_sync_all(void)
Definition: xmp_coarray_utofu.c:975
_XMP_fatal_nomsg
void _XMP_fatal_nomsg()
Definition: xmp_util.c:48
_XMP_utofu_sync_memory
void _XMP_utofu_sync_memory(void)
Definition: xmp_coarray_utofu.c:960
xmp_get_mpi_comm
MPI_Comm xmp_get_mpi_comm(void)
Definition: xmp_lib.c:11
xmp_coarray::addr
char ** addr
Definition: xmp_data_struct.h:329
_XMP_alloc
void * _XMP_alloc(size_t size)
Definition: xmp_util.c:21
_XMP_utofu_vcqid_table
Definition: xmp_coarray_utofu.c:164
xmp_coarray::real_addr
char * real_addr
Definition: xmp_data_struct.h:336
_XMP_world_size
int _XMP_world_size
Definition: xmp_world.c:8
xmp_coarray::elmt_size
size_t elmt_size
Definition: xmp_data_struct.h:339
compare_vcqid_table
int compare_vcqid_table(const void *a, const void *b)
Definition: xmp_coarray_utofu.c:174
_shift_queue_t::num
int num
How many shifts are in this queue.
Definition: xmp_coarray_gasnet.c:10
_XMP_world_rank
int _XMP_world_rank
Definition: xmp_world.c:9
_XMP_utofu_error_check
void _XMP_utofu_error_check(int utofu_ret)
Definition: xmp_coarray_utofu.c:6
xmpc_node_num
int xmpc_node_num(void)
Definition: xmp_lib.c:56
_XMP_utofu_vcqid_table::rank
int rank
Definition: xmp_coarray_utofu.c:165
_xmp_utofu_add_postreq
void _xmp_utofu_add_postreq(const utofu_vcq_id_t vcqid, const int tag)
Definition: xmp_post_wait_utofu.c:34
_XMP_get_offset
size_t _XMP_get_offset(const _XMP_array_section_t *array_info, const int dims)
Definition: xmp_coarray_utils.c:22
_XMP_utofu_vcqid_table::vcqid
utofu_vcq_id_t vcqid
Definition: xmp_coarray_utofu.c:166
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
xmp_num_images
int xmp_num_images(void)
Definition: xmp_lib.c:46
_XMP_utofu_check_mrq_notice
uint64_t _XMP_utofu_check_mrq_notice(struct utofu_mrq_notice *notice)
Definition: xmp_coarray_utofu.c:201
_XMP_N_INT_TRUE
#define _XMP_N_INT_TRUE
Definition: xmp_constant.h:4
_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