libxmp/libxmpf in Omni Compiler  1.3.4
xmp_shadow.c File Reference
#include <stdarg.h>
#include <string.h>
#include "mpi.h"
#include "xmp_internal.h"
#include "xmp_math_function.h"
Include dependency graph for xmp_shadow.c:

Macros

#define MPI_PORTABLE_PLATFORM_H
 

Functions

void _XMP_create_shadow_comm (_XMP_array_t *array, int array_index)
 
void _XMP_init_reflect_sched (_XMP_reflect_sched_t *sched)
 
void _XMP_finalize_reflect_sched (_XMP_reflect_sched_t *sched, _Bool free_buf)
 
void _XMP_init_shadow (_XMP_array_t *array,...)
 
void _XMP_init_shadow_dim (_XMP_array_t *array, int i, int type, int lo, int hi)
 
void _XMP_init_shadow_noalloc (_XMP_array_t *a,...)
 
void _XMP_pack_shadow_NORMAL (void **lo_buffer, void **hi_buffer, void *array_addr, _XMP_array_t *array_desc, int array_index)
 
void _XMP_unpack_shadow_NORMAL (void *lo_buffer, void *hi_buffer, void *array_addr, _XMP_array_t *array_desc, int array_index)
 
void _XMP_exchange_shadow_NORMAL (void **lo_recv_buffer, void **hi_recv_buffer, void *lo_send_buffer, void *hi_send_buffer, _XMP_array_t *array_desc, int array_index)
 
void _XMP_reflect_shadow_FULL (void *array_addr, _XMP_array_t *array_desc, int array_index)
 

Macro Definition Documentation

◆ MPI_PORTABLE_PLATFORM_H

#define MPI_PORTABLE_PLATFORM_H

Function Documentation

◆ _XMP_create_shadow_comm()

void _XMP_create_shadow_comm ( _XMP_array_t array,
int  array_index 
)
16  {
17  _XMP_nodes_t *onto_nodes = (array->align_template)->onto_nodes;
18  _XMP_array_info_t *ai = &(array->info[array_index]);
19 
20  _XMP_template_t *align_template = array->align_template;
21 
22  int color = 1;
23  if (onto_nodes->is_member) {
26 
27  _XMP_template_chunk_t *chunk = &(align_template->chunk[ai->align_template_index]);
29 
30  int onto_nodes_index = chunk->onto_nodes_index;
31 
32  int acc_nodes_size = 1;
33  int nodes_dim = onto_nodes->dim;
34  for (int i = 0; i < nodes_dim; i++) {
35  _XMP_nodes_info_t *onto_nodes_info = &(onto_nodes->info[i]);
36  int size = onto_nodes_info->size;
37  int rank = onto_nodes_info->rank;
38 
39  if (i != onto_nodes_index) {
40  color += (acc_nodes_size * rank);
41  }
42 
43  acc_nodes_size *= size;
44  }
45 
46  if (!array->is_allocated) {
47  color = 0;
48  }
49  } else {
50  color = 0;
51  }
52 
53  MPI_Comm *comm = _XMP_alloc(sizeof(MPI_Comm));
54  MPI_Comm_split(*((MPI_Comm *)(_XMP_get_execution_nodes())->comm), color, _XMP_world_rank, comm);
55 
56  // set members
57  if (array->is_allocated) {
58  ai->is_shadow_comm_member = true;
59 
60  ai->shadow_comm = comm;
61  MPI_Comm_size(*comm, &(ai->shadow_comm_size));
62  MPI_Comm_rank(*comm, &(ai->shadow_comm_rank));
63  } else {
64  _XMP_finalize_comm(comm);
65  }
66 }
Here is the caller graph for this function:

◆ _XMP_exchange_shadow_NORMAL()

void _XMP_exchange_shadow_NORMAL ( void **  lo_recv_buffer,
void **  hi_recv_buffer,
void *  lo_send_buffer,
void *  hi_send_buffer,
_XMP_array_t array_desc,
int  array_index 
)
643  {
645 
646  if (!array_desc->is_allocated) {
647  return;
648  }
649 
650  _XMP_array_info_t *ai = &(array_desc->info[array_index]);
653 
654  // get communicator info
655  int size = ai->shadow_comm_size;
656  if (size == 1) {
657  return;
658  }
659 
660  int rank = ai->shadow_comm_rank;
661  MPI_Comm *comm = ai->shadow_comm;
662 
663  // setup type
664  MPI_Datatype mpi_datatype;
665  MPI_Type_contiguous(array_desc->type_size, MPI_BYTE, &mpi_datatype);
666  MPI_Type_commit(&mpi_datatype);
667 
668  // exchange shadow
669  MPI_Request send_req[2];
670  MPI_Request recv_req[2];
671 
672  if (ai->shadow_size_lo > 0) {
673  if (rank != 0) {
674  *lo_recv_buffer = _XMP_alloc((ai->shadow_size_lo) * (ai->dim_elmts) * (array_desc->type_size));
675  MPI_Irecv(*lo_recv_buffer, (ai->shadow_size_lo) * (ai->dim_elmts), mpi_datatype,
676  rank - 1, _XMP_N_MPI_TAG_REFLECT_LO, *comm, &(recv_req[0]));
677  }
678 
679  if (rank != (size - 1)) {
680  MPI_Isend(lo_send_buffer, (ai->shadow_size_lo) * (ai->dim_elmts), mpi_datatype,
681  rank + 1, _XMP_N_MPI_TAG_REFLECT_LO, *comm, &(send_req[0]));
682  }
683  }
684 
685  if (ai->shadow_size_hi > 0) {
686  if (rank != (size - 1)) {
687  *hi_recv_buffer = _XMP_alloc((ai->shadow_size_hi) * (ai->dim_elmts) * (array_desc->type_size));
688  MPI_Irecv(*hi_recv_buffer, (ai->shadow_size_hi) * (ai->dim_elmts), mpi_datatype,
689  rank + 1, _XMP_N_MPI_TAG_REFLECT_HI, *comm, &(recv_req[1]));
690  }
691 
692  if (rank != 0) {
693  MPI_Isend(hi_send_buffer, (ai->shadow_size_hi) * (ai->dim_elmts), mpi_datatype,
694  rank - 1, _XMP_N_MPI_TAG_REFLECT_HI, *comm, &(send_req[1]));
695  }
696  }
697 
698  // wait & free
699  MPI_Status stat;
700 
701  if (ai->shadow_size_lo > 0) {
702  if (rank != 0) {
703  MPI_Wait(&(recv_req[0]), &stat);
704  }
705 
706  if (rank != (size - 1)) {
707  MPI_Wait(&(send_req[0]), &stat);
708  _XMP_free(lo_send_buffer);
709  }
710  }
711 
712  if (ai->shadow_size_hi > 0) {
713  if (rank != (size - 1)) {
714  MPI_Wait(&(recv_req[1]), &stat);
715  }
716 
717  if (rank != 0) {
718  MPI_Wait(&(send_req[1]), &stat);
719  _XMP_free(hi_send_buffer);
720  }
721  }
722 
723  MPI_Type_free(&mpi_datatype);
724 }

◆ _XMP_finalize_reflect_sched()

void _XMP_finalize_reflect_sched ( _XMP_reflect_sched_t sched,
_Bool  free_buf 
)
236  {
237 
238  if (sched->datatype_lo != MPI_DATATYPE_NULL)
239  MPI_Type_free(&sched->datatype_lo);
240  if (sched->datatype_hi != MPI_DATATYPE_NULL)
241  MPI_Type_free(&sched->datatype_hi);
242 
243  for (int j = 0; j < 4; j++){
244  if (sched->req[j] != MPI_REQUEST_NULL){
245  MPI_Request_free(&sched->req[j]);
246  }
247  if (sched->req_reduce[j] != MPI_REQUEST_NULL){
248  MPI_Request_free(&sched->req_reduce[j]);
249  }
250  }
251 
252  if (free_buf){
253  _XMP_free(sched->lo_send_buf);
254  _XMP_free(sched->lo_recv_buf);
255  _XMP_free(sched->hi_send_buf);
256  _XMP_free(sched->hi_recv_buf);
257  }
258 
259 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_init_reflect_sched()

void _XMP_init_reflect_sched ( _XMP_reflect_sched_t sched)
218  {
219  //sched->is_periodic = -1; /* not used yet */
220  sched->reflect_is_initialized = 0;
221  sched->reduce_is_initialized = 0;
222  sched->prev_pcopy_sched_type = 0;
223  sched->datatype_lo = MPI_DATATYPE_NULL;
224  sched->datatype_hi = MPI_DATATYPE_NULL;
225  for (int j = 0; j < 4; j++){
226  sched->req[j] = MPI_REQUEST_NULL;
227  sched->req_reduce[j] = MPI_REQUEST_NULL;
228  }
229  sched->lo_send_buf = NULL;
230  sched->lo_recv_buf = NULL;
231  sched->hi_send_buf = NULL;
232  sched->hi_recv_buf = NULL;
233 }
Here is the caller graph for this function:

◆ _XMP_init_shadow()

void _XMP_init_shadow ( _XMP_array_t array,
  ... 
)
261  {
262  int dim = array->dim;
263  va_list args;
264  va_start(args, array);
265  for (int i = 0; i < dim; i++) {
266  _XMP_array_info_t *ai = &(array->info[i]);
267 
268  int type = va_arg(args, int);
269  switch (type) {
270  case _XMP_N_SHADOW_NONE:
272  break;
274  {
276 
277  int lo = va_arg(args, int);
278  if (lo < 0) {
279  _XMP_fatal("<shadow-width> should be a nonnegative integer");
280  }
281 
282  int hi = va_arg(args, int);
283  if (hi < 0) {
284  _XMP_fatal("<shadow-width> should be a nonnegative integer");
285  }
286 
287  if ((lo == 0) && (hi == 0)) {
289  }
290  else {
292  ai->shadow_size_lo = lo;
293  ai->shadow_size_hi = hi;
294 
295  if (array->is_allocated) {
296  ai->local_lower += lo;
297  ai->local_upper += lo;
298  // ai->local_stride is not changed
299  ai->alloc_size += lo + hi;
300 
301  *(ai->temp0) -= lo;
302  ai->temp0_v -= lo;
303  }
304 
305  if (!ai->reflect_sched){
308  ai->reflect_sched = sched;
309  }
310 #ifdef _XMP_XACC
311  if (!ai->reflect_acc_sched){
314  ai->reflect_acc_sched = sched;
315  }
316 #endif
317 
318  _XMP_create_shadow_comm(array, i);
319  }
320 
321  break;
322  }
323  case _XMP_N_SHADOW_FULL:
324  {
326 
327  if (array->is_allocated) {
328  ai->shadow_size_lo = ai->par_lower - ai->ser_lower;
329  ai->shadow_size_hi = ai->ser_upper - ai->par_upper;
330 
331  ai->local_lower = ai->par_lower - ai->ser_lower;
332  ai->local_upper = ai->par_upper - ai->ser_lower;
333  ai->local_stride = ai->par_stride;
334  ai->alloc_size = ai->ser_size;
335  }
336 
337  _XMP_create_shadow_comm(array, i);
338  break;
339  }
340  default:
341  _XMP_fatal("unknown shadow type");
342  }
343  }
344 }
Here is the call graph for this function:

◆ _XMP_init_shadow_dim()

void _XMP_init_shadow_dim ( _XMP_array_t array,
int  i,
int  type,
int  lo,
int  hi 
)
347  {
348 
349  _XMP_array_info_t *ai = &(array->info[i]);
350 
351  switch (type) {
352  case _XMP_N_SHADOW_NONE:
354  break;
356  {
358 
359  if (lo < 0) {
360  _XMP_fatal("<shadow-width> should be a nonnegative integer");
361  }
362 
363  if (hi < 0) {
364  _XMP_fatal("<shadow-width> should be a nonnegative integer");
365  }
366 
367  if ((lo == 0) && (hi == 0)) {
369  }
370  else {
372  ai->shadow_size_lo = lo;
373  ai->shadow_size_hi = hi;
374 
375  if (array->is_allocated) {
376  ai->local_lower += lo;
377  ai->local_upper += lo;
378  // ai->local_stride is not changed
379  ai->alloc_size += lo + hi;
380 
381  *(ai->temp0) -= lo;
382  ai->temp0_v -= lo;
383  }
384 
385  if (!ai->reflect_sched){
388  /* sched->is_periodic = -1; /\* not used yet *\/ */
389  /* sched->datatype_lo = MPI_DATATYPE_NULL; */
390  /* sched->datatype_hi = MPI_DATATYPE_NULL; */
391  /* for (int j = 0; j < 4; j++){ */
392  /* sched->req[j] = MPI_REQUEST_NULL; */
393  /* sched->req_reduce[j] = MPI_REQUEST_NULL; */
394  /* } */
395  /* sched->lo_send_buf = NULL; */
396  /* sched->lo_recv_buf = NULL; */
397  /* sched->hi_send_buf = NULL; */
398  /* sched->hi_recv_buf = NULL; */
399  ai->reflect_sched = sched;
400  }
401  ai->reflect_acc_sched = NULL;
402 
403  _XMP_create_shadow_comm(array, i);
404  }
405 
406  break;
407  }
408  case _XMP_N_SHADOW_FULL:
409  {
411 
412  if (array->is_allocated) {
413  ai->shadow_size_lo = ai->par_lower - ai->ser_lower;
414  ai->shadow_size_hi = ai->ser_upper - ai->par_upper;
415 
416  ai->local_lower = ai->par_lower;
417  ai->local_upper = ai->par_upper;
418  ai->local_stride = ai->par_stride;
419  ai->alloc_size = ai->ser_size;
420  }
421 
422  _XMP_create_shadow_comm(array, i);
423  break;
424  }
425  default:
426  _XMP_fatal("unknown shadow type");
427  }
428 
429 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _XMP_init_shadow_noalloc()

void _XMP_init_shadow_noalloc ( _XMP_array_t a,
  ... 
)
440  {
441 
442  int dim = a->dim;
443 
444  va_list args;
445  va_start(args, a);
446 
447  for (int i = 0; i < dim; i++) {
448  _XMP_array_info_t *ai = &(a->info[i]);
449  ai->shadow_type = va_arg(args, int);
450  if (ai->shadow_type == _XMP_N_SHADOW_NORMAL){
451  ai->shadow_size_lo = va_arg(args, int);
452  ai->shadow_size_hi = va_arg(args, int);
453  }
454  }
455 
456  va_end(args);
457 }

◆ _XMP_pack_shadow_NORMAL()

void _XMP_pack_shadow_NORMAL ( void **  lo_buffer,
void **  hi_buffer,
void *  array_addr,
_XMP_array_t array_desc,
int  array_index 
)
460  {
462 
463  if (!array_desc->is_allocated) {
464  return;
465  }
466 
467  _XMP_array_info_t *ai = &(array_desc->info[array_index]);
470 
471  int size = ai->shadow_comm_size;
472  if (size == 1) {
473  return;
474  }
475 
476  int rank = ai->shadow_comm_rank;
477  int array_type = array_desc->type;
478  int array_dim = array_desc->dim;
479 
480  int lower[array_dim], upper[array_dim], stride[array_dim];
481  unsigned long long dim_acc[array_dim];
482 
483  // pack lo shadow
484  if (rank != (size - 1)) {
485  if (ai->shadow_size_lo > 0) {
486  // FIXME strict condition
487  if (ai->shadow_size_lo > ai->par_size) {
488  _XMP_fatal("shadow size is too big");
489  }
490 
491  // alloc buffer
492  *lo_buffer = _XMP_alloc((ai->shadow_size_lo) * (ai->dim_elmts) * (array_desc->type_size));
493 
494  // calc index
495  for (int i = 0; i < array_dim; i++) {
496  if (i == array_index) {
497  lower[i] = array_desc->info[i].local_upper - array_desc->info[i].shadow_size_lo + 1;
498  upper[i] = lower[i] + array_desc->info[i].shadow_size_lo - 1;
499  stride[i] = 1;
500  }
501  else {
502  lower[i] = array_desc->info[i].local_lower;
503  upper[i] = array_desc->info[i].local_upper;
504  stride[i] = array_desc->info[i].local_stride;
505  }
506 
507  dim_acc[i] = array_desc->info[i].dim_acc;
508  }
509 
510  // pack data
511  (*_xmp_pack_array)(*lo_buffer, array_addr, array_type, array_desc->type_size,
512  array_dim, lower, upper, stride, dim_acc);
513  }
514  }
515 
516  // pack hi shadow
517  if (rank != 0) {
518  if (ai->shadow_size_hi > 0) {
519  // FIXME strict condition
520  if (ai->shadow_size_hi > ai->par_size) {
521  _XMP_fatal("shadow size is too big");
522  }
523 
524  // alloc buffer
525  *hi_buffer = _XMP_alloc((ai->shadow_size_hi) * (ai->dim_elmts) * (array_desc->type_size));
526 
527  // calc index
528  for (int i = 0; i < array_dim; i++) {
529  if (i == array_index) {
530  lower[i] = array_desc->info[i].local_lower;
531  upper[i] = lower[i] + array_desc->info[i].shadow_size_hi - 1;
532  stride[i] = 1;
533  }
534  else {
535  lower[i] = array_desc->info[i].local_lower;
536  upper[i] = array_desc->info[i].local_upper;
537  stride[i] = array_desc->info[i].local_stride;
538  }
539 
540  dim_acc[i] = array_desc->info[i].dim_acc;
541  }
542 
543  // pack data
544  (*_xmp_pack_array)(*hi_buffer, array_addr, array_type, array_desc->type_size,
545  array_dim, lower, upper, stride, dim_acc);
546  }
547  }
548 }
Here is the call graph for this function:

◆ _XMP_reflect_shadow_FULL()

void _XMP_reflect_shadow_FULL ( void *  array_addr,
_XMP_array_t array_desc,
int  array_index 
)
726  {
728 
729  if (!array_desc->is_allocated) {
730  return;
731  }
732 
733  _XMP_array_info_t *ai = &(array_desc->info[array_index]);
734  if ((ai->shadow_comm_size) == 1) {
735  return;
736  }
737 
738  int array_dim = array_desc->dim;
739 
740  // using allgather/allgatherv in special cases
741  if ((array_dim == 1) && (ai->align_manner == _XMP_N_ALIGN_BLOCK) && (ai->is_regular_chunk)) {
742  _XMP_reflect_shadow_FULL_ALLGATHER(array_addr, array_desc, array_index);
743  }
744  else {
745  _XMP_reflect_shadow_FULL_BCAST(array_addr, array_desc, array_index);
746  }
747 }

◆ _XMP_unpack_shadow_NORMAL()

void _XMP_unpack_shadow_NORMAL ( void *  lo_buffer,
void *  hi_buffer,
void *  array_addr,
_XMP_array_t array_desc,
int  array_index 
)
551  {
553 
554  if (!array_desc->is_allocated) {
555  return;
556  }
557 
558  _XMP_array_info_t *ai = &(array_desc->info[array_index]);
561 
562  int size = ai->shadow_comm_size;
563  if (size == 1) {
564  return;
565  }
566 
567  int rank = ai->shadow_comm_rank;
568  int array_type = array_desc->type;
569  int array_dim = array_desc->dim;
570 
571  int lower[array_dim], upper[array_dim], stride[array_dim];
572  unsigned long long dim_acc[array_dim];
573 
574  // unpack lo shadow
575  if (rank != 0) {
576  if (ai->shadow_size_lo > 0) {
577  // FIXME strict condition
578  if (ai->shadow_size_lo > ai->par_size) {
579  _XMP_fatal("shadow size is too big");
580  }
581 
582  // calc index
583  for (int i = 0; i < array_dim; i++) {
584  if (i == array_index) {
585  lower[i] = 0;
586  upper[i] = array_desc->info[i].shadow_size_lo - 1;
587  stride[i] = 1;
588  }
589  else {
590  lower[i] = array_desc->info[i].local_lower;
591  upper[i] = array_desc->info[i].local_upper;
592  stride[i] = array_desc->info[i].local_stride;
593  }
594 
595  dim_acc[i] = array_desc->info[i].dim_acc;
596  }
597 
598  // unpack data
599  (*_xmp_unpack_array)(array_addr, lo_buffer, array_type, array_desc->type_size,
600  array_dim, lower, upper, stride, dim_acc);
601 
602  // free buffer
603  _XMP_free(lo_buffer);
604  }
605  }
606 
607  // unpack hi shadow
608  if (rank != (size - 1)) {
609  if (ai->shadow_size_hi > 0) {
610  // FIXME strict condition
611  if (ai->shadow_size_hi > ai->par_size) {
612  _XMP_fatal("shadow size is too big");
613  }
614 
615  // calc index
616  for (int i = 0; i < array_dim; i++) {
617  if (i == array_index) {
618  lower[i] = array_desc->info[i].local_upper + 1;
619  upper[i] = lower[i] + array_desc->info[i].shadow_size_hi - 1;
620  stride[i] = 1;
621  }
622  else {
623  lower[i] = array_desc->info[i].local_lower;
624  upper[i] = array_desc->info[i].local_upper;
625  stride[i] = array_desc->info[i].local_stride;
626  }
627 
628  dim_acc[i] = array_desc->info[i].dim_acc;
629  }
630 
631  // unpack data
632  (*_xmp_unpack_array)(array_addr, hi_buffer, array_type, array_desc->type_size,
633  array_dim, lower, upper, stride, dim_acc);
634 
635  // free buffer
636  _XMP_free(hi_buffer);
637  }
638  }
639 }
Here is the call graph for this function:
_XMP_nodes_info_type::size
int size
Definition: xmp_data_struct.h:32
_XMP_nodes_type::info
_XMP_nodes_info_t info[1]
Definition: xmp_data_struct.h:60
_XMP_nodes_info_type
Definition: xmp_data_struct.h:31
_XMP_array_info_type::align_template_index
int align_template_index
Definition: xmp_data_struct.h:260
_XMP_array_info_type::shadow_comm_rank
int shadow_comm_rank
Definition: xmp_data_struct.h:257
_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
_XMP_reflect_sched_type::datatype_hi
MPI_Datatype datatype_hi
Definition: xmp_data_struct.h:129
_XMP_array_info_type
Definition: xmp_data_struct.h:194
_XMP_array_info_type::reflect_acc_sched
_XMP_reflect_sched_t * reflect_acc_sched
Definition: xmp_data_struct.h:253
_XMP_template_type::chunk
_XMP_template_chunk_t * chunk
Definition: xmp_data_struct.h:112
_XMP_array_info_type::ser_upper
int ser_upper
Definition: xmp_data_struct.h:200
_XMP_array_info_type::shadow_comm_size
int shadow_comm_size
Definition: xmp_data_struct.h:256
_XMP_reflect_sched_type::lo_recv_buf
void * lo_recv_buf
Definition: xmp_data_struct.h:134
_XMP_array_info_type::shadow_type
int shadow_type
Definition: xmp_data_struct.h:248
_XMP_array_info_type::ser_size
int ser_size
Definition: xmp_data_struct.h:201
_XMP_reflect_sched_type
Definition: xmp_data_struct.h:119
_XMP_init_reflect_sched_acc
void _XMP_init_reflect_sched_acc(_XMP_reflect_sched_t *sched)
Definition: xmp_reflect_acc.c:74
_XMP_reflect_sched_type::req
MPI_Request req[4]
Definition: xmp_data_struct.h:131
_XMP_finalize_comm
void _XMP_finalize_comm(void *comm)
_XMP_array_info_type::is_regular_chunk
_Bool is_regular_chunk
Definition: xmp_data_struct.h:196
_XMP_reflect_sched_type::reflect_is_initialized
int reflect_is_initialized
Definition: xmp_data_struct.h:121
_XMP_array_info_type::dim_elmts
unsigned long long dim_elmts
Definition: xmp_data_struct.h:243
_XMP_world_rank
int _XMP_world_rank
Definition: xmp_world.c:9
_XMP_reflect_sched_type::hi_send_buf
void * hi_send_buf
Definition: xmp_data_struct.h:135
_XMP_reflect_sched_type::datatype_lo
MPI_Datatype datatype_lo
Definition: xmp_data_struct.h:128
_XMP_array_info_type::par_upper
int par_upper
Definition: xmp_data_struct.h:205
_XMP_array_info_type::local_stride
int local_stride
Definition: xmp_data_struct.h:211
_XMP_array_info_type::temp0_v
int temp0_v
Definition: xmp_data_struct.h:240
_XMP_array_info_type::shadow_size_lo
int shadow_size_lo
Definition: xmp_data_struct.h:249
_XMP_array_type::align_template
_XMP_template_t * align_template
Definition: xmp_data_struct.h:312
_XMP_create_shadow_comm
void _XMP_create_shadow_comm(_XMP_array_t *array, int array_index)
Definition: xmp_shadow.c:16
_XMP_array_info_type::align_manner
int align_manner
Definition: xmp_data_struct.h:197
_XMP_template_type
Definition: xmp_data_struct.h:98
_XMP_N_SHADOW_FULL
#define _XMP_N_SHADOW_FULL
Definition: xmp_constant.h:66
_XMP_array_info_type::ser_lower
int ser_lower
Definition: xmp_data_struct.h:199
_XMP_template_chunk_type
Definition: xmp_data_struct.h:78
_XMP_template_chunk_type::onto_nodes_index
int onto_nodes_index
Definition: xmp_data_struct.h:92
_XMP_array_info_type::local_lower
int local_lower
Definition: xmp_data_struct.h:209
_XMP_N_DIST_DUPLICATION
#define _XMP_N_DIST_DUPLICATION
Definition: xmp_constant.h:28
_XMP_N_MPI_TAG_REFLECT_HI
#define _XMP_N_MPI_TAG_REFLECT_HI
Definition: xmp_constant.h:12
_XMP_array_info_type::shadow_size_hi
int shadow_size_hi
Definition: xmp_data_struct.h:250
_XMP_nodes_info_type::rank
int rank
Definition: xmp_data_struct.h:35
_XMP_template_chunk_type::dist_manner
int dist_manner
Definition: xmp_data_struct.h:87
_XMP_array_type::type_size
size_t type_size
Definition: xmp_data_struct.h:274
_XMP_array_info_type::alloc_size
int alloc_size
Definition: xmp_data_struct.h:212
_XMP_N_ALIGN_BLOCK
#define _XMP_N_ALIGN_BLOCK
Definition: xmp_constant.h:37
_XMP_N_ALIGN_DUPLICATION
#define _XMP_N_ALIGN_DUPLICATION
Definition: xmp_constant.h:36
_XMP_array_type::info
_XMP_array_info_t info[1]
Definition: xmp_data_struct.h:313
_XMP_reflect_sched_type::req_reduce
MPI_Request req_reduce[4]
Definition: xmp_data_struct.h:132
_XMP_free
void _XMP_free(void *p)
Definition: xmp_util.c:37
_XMP_ASSERT
#define _XMP_ASSERT(_flag)
Definition: xmp_internal.h:34
_XMP_N_ALIGN_NOT_ALIGNED
#define _XMP_N_ALIGN_NOT_ALIGNED
Definition: xmp_constant.h:35
_XMP_array_info_type::par_stride
int par_stride
Definition: xmp_data_struct.h:206
_XMP_array_type::dim
int dim
Definition: xmp_data_struct.h:272
_XMP_fatal
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
_XMP_reflect_sched_type::prev_pcopy_sched_type
int prev_pcopy_sched_type
Definition: xmp_data_struct.h:123
_XMP_array_info_type::dim_acc
unsigned long long dim_acc
Definition: xmp_data_struct.h:242
_XMP_array_info_type::par_size
int par_size
Definition: xmp_data_struct.h:207
_XMP_array_info_type::reflect_sched
_XMP_reflect_sched_t * reflect_sched
Definition: xmp_data_struct.h:252
_XMP_N_MPI_TAG_REFLECT_LO
#define _XMP_N_MPI_TAG_REFLECT_LO
Definition: xmp_constant.h:11
_XMP_reflect_sched_type::reduce_is_initialized
int reduce_is_initialized
Definition: xmp_data_struct.h:122
_XMP_nodes_type::dim
int dim
Definition: xmp_data_struct.h:47
_XMP_nodes_type
Definition: xmp_data_struct.h:40
_XMP_array_info_type::temp0
int * temp0
Definition: xmp_data_struct.h:239
_XMP_RETURN_IF_SINGLE
#define _XMP_RETURN_IF_SINGLE
Definition: xmp_internal.h:37
_XMP_reflect_sched_type::lo_send_buf
void * lo_send_buf
Definition: xmp_data_struct.h:134
_XMP_reflect_sched_type::hi_recv_buf
void * hi_recv_buf
Definition: xmp_data_struct.h:135
_XMP_N_SHADOW_NORMAL
#define _XMP_N_SHADOW_NORMAL
Definition: xmp_constant.h:65
_XMP_N_SHADOW_NONE
#define _XMP_N_SHADOW_NONE
Definition: xmp_constant.h:64
_XMP_array_type::type
int type
Definition: xmp_data_struct.h:273
_XMP_array_type::is_allocated
_Bool is_allocated
Definition: xmp_data_struct.h:270
_XMP_array_info_type::shadow_comm
_XMP_comm_t * shadow_comm
Definition: xmp_data_struct.h:255
_XMP_get_execution_nodes
void * _XMP_get_execution_nodes(void)
Definition: xmp_nodes_stack.c:46
_XMP_array_info_type::par_lower
int par_lower
Definition: xmp_data_struct.h:204
_XMP_init_reflect_sched
void _XMP_init_reflect_sched(_XMP_reflect_sched_t *sched)
Definition: xmp_shadow.c:218
_XMP_array_info_type::is_shadow_comm_member
_Bool is_shadow_comm_member
Definition: xmp_data_struct.h:195
_XMP_array_info_type::local_upper
int local_upper
Definition: xmp_data_struct.h:210