libxmp/libxmpf in Omni Compiler
1.3.4
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "mpi.h"
#include "xmp_internal.h"
#include "xmp_math_function.h"
|
void | xmp_dbg_printf (char *fmt,...) |
|
_XMP_nodes_t * | _XMP_create_temporary_nodes (_XMP_nodes_t *n) |
|
_XMP_nodes_t * | _XMP_init_nodes_struct_GLOBAL (int dim, int *dim_size, int is_static) |
|
_XMP_nodes_t * | _XMP_init_nodes_struct_EXEC (int dim, int *dim_size, int is_static) |
|
_XMP_nodes_t * | _XMP_init_nodes_struct_NODES_NUMBER (int dim, int ref_lower, int ref_upper, int ref_stride, int *dim_size, int is_static) |
|
_XMP_nodes_t * | _XMP_init_nodes_struct_NODES_NAMED (int dim, _XMP_nodes_t *ref_nodes, int *shrink, int *ref_lower, int *ref_upper, int *ref_stride, int *dim_size, int is_static) |
|
void | _XMP_init_nodes_STATIC_GLOBAL (_XMP_nodes_t **nodes, int dim,...) |
|
void | _XMP_init_nodes_DYNAMIC_GLOBAL (_XMP_nodes_t **nodes, int dim,...) |
|
void | _XMP_init_nodes_STATIC_EXEC (_XMP_nodes_t **nodes, int dim,...) |
|
void | _XMP_init_nodes_DYNAMIC_EXEC (_XMP_nodes_t **nodes, int dim,...) |
|
void | _XMP_init_nodes_STATIC_NODES_NUMBER (_XMP_nodes_t **nodes, int dim, int ref_lower, int ref_upper, int ref_stride,...) |
|
void | _XMP_init_nodes_DYNAMIC_NODES_NUMBER (_XMP_nodes_t **nodes, int dim, int ref_lower, int ref_upper, int ref_stride,...) |
|
void | _XMP_init_nodes_STATIC_NODES_NAMED (_XMP_nodes_t **nodes, int dim, _XMP_nodes_t *ref_nodes,...) |
|
void | _XMP_init_nodes_DYNAMIC_NODES_NAMED (_XMP_nodes_t **nodes, int dim, _XMP_nodes_t *ref_nodes,...) |
|
void | _XMP_finalize_nodes (_XMP_nodes_t *nodes) |
|
int | _XMP_exec_task_GLOBAL_PART (_XMP_task_desc_t **task_desc, int ref_lower, int ref_upper, int ref_stride) |
|
int | _XMP_exec_task_NODES_ENTIRE (_XMP_task_desc_t **task_desc, _XMP_nodes_t *ref_nodes) |
|
int | _XMP_exec_task_NODES_ENTIRE_nocomm (_XMP_nodes_t *ref_nodes) |
|
void | _XMP_exec_task_NODES_FINALIZE (_XMP_task_desc_t *task_desc) |
|
int | _XMP_exec_task_NODES_PART (_XMP_task_desc_t **task_desc, _XMP_nodes_t *ref_nodes,...) |
|
int | _XMP_exec_task_NODES_PART_nocomm (_XMP_nodes_t *ref_nodes,...) |
|
_XMP_nodes_t * | _XMP_create_nodes_by_comm (int is_member, _XMP_comm_t *comm) |
|
void | _XMP_calc_rank_array (_XMP_nodes_t *n, int *rank_array, int linear_rank) |
|
int | _XMP_calc_linear_rank (_XMP_nodes_t *n, int *rank_array) |
|
int | _XMP_calc_linear_rank_on_target_nodes (_XMP_nodes_t *n, int *rank_array, _XMP_nodes_t *target_nodes) |
|
_Bool | _XMP_calc_coord_on_target_nodes2 (_XMP_nodes_t *n, int *ncoord, _XMP_nodes_t *target_n, int *target_ncoord) |
|
_Bool | _XMP_calc_coord_on_target_nodes (_XMP_nodes_t *n, int *ncoord, _XMP_nodes_t *target_n, int *target_ncoord) |
|
_XMP_nodes_ref_t * | _XMP_init_nodes_ref (_XMP_nodes_t *n, int *rank_array) |
|
void | _XMP_finalize_nodes_ref (_XMP_nodes_ref_t *nodes_ref) |
|
_XMP_nodes_ref_t * | _XMP_create_nodes_ref_for_target_nodes (_XMP_nodes_t *n, int *rank_array, _XMP_nodes_t *target_nodes) |
|
void | _XMP_translate_nodes_rank_array_to_ranks (_XMP_nodes_t *nodes, int *ranks, int *rank_array, int shrink_nodes_size) |
|
int | _XMP_get_next_rank (_XMP_nodes_t *nodes, int *rank_array) |
|
int | _XMP_calc_nodes_index_from_inherit_nodes_index (_XMP_nodes_t *nodes, int inherit_nodes_index) |
|
◆ MPI_PORTABLE_PLATFORM_H
#define MPI_PORTABLE_PLATFORM_H |
◆ _XMP_calc_coord_on_target_nodes()
1167 for(
int i=1;i<dim;i++)
1168 multiplier[i] = multiplier[i-1] * inherit_info[i].size;
1171 for (
int i=dim;i>= 0;i--){
1172 if(inherit_info[i].shrink){
1176 int rank_dim = j / multiplier[i];
1177 pcoord[i] = inherit_info[i].
stride * rank_dim + inherit_info[i].
lower;
1178 j = j % multiplier[i];
◆ _XMP_calc_coord_on_target_nodes2()
1095 memcpy(target_ncoord, ncoord,
sizeof(
int) * n->
dim);
1115 int target_rank = 0;
1118 for (
int i = 0; i < target_p->
dim; i++){
1120 if (inherit_info[i].shrink){
1123 else if (target_pcoord[i] < inherit_info[i].lower || target_pcoord[i] > inherit_info[i].upper){
1124 for (
int i = 0; i < target_n->
dim; i++){
1125 target_ncoord[i] = -1;
1130 int target_rank_dim = (target_pcoord[i] - inherit_info[i].
lower) / inherit_info[i].stride;
1131 target_rank += multiplier * target_rank_dim;
1133 multiplier *=
_XMP_M_COUNT_TRIPLETi(inherit_info[i].lower, inherit_info[i].upper, inherit_info[i].stride);
◆ _XMP_calc_linear_rank()
int _XMP_calc_linear_rank |
( |
_XMP_nodes_t * |
n, |
|
|
int * |
rank_array |
|
) |
| |
1038 int acc_nodes_size = 1;
1039 int nodes_dim = n->
dim;
1041 for(
int i=0;i<nodes_dim;i++){
1042 acc_rank += (rank_array[i]) * acc_nodes_size;
◆ _XMP_calc_linear_rank_on_target_nodes()
1051 if(_XMP_compare_nodes(n, target_nodes)){
1056 if(inherit_nodes == NULL){
1062 int inherit_nodes_dim = inherit_nodes->
dim;
1063 int *new_rank_array =
_XMP_alloc(
sizeof(
int) * inherit_nodes_dim);
1067 for(
int i=0;i<inherit_nodes_dim;i++){
1068 if(inherit_info[i].shrink){
1070 new_rank_array[i] = 0;
1073 new_rank_array[i] = ((inherit_info[i].
stride) * rank_array[j]) + (inherit_info[i].
lower);
◆ _XMP_calc_nodes_index_from_inherit_nodes_index()
int _XMP_calc_nodes_index_from_inherit_nodes_index |
( |
_XMP_nodes_t * |
nodes, |
|
|
int |
inherit_nodes_index |
|
) |
| |
1312 if(inherit_nodes == NULL)
1315 int nodes_index = 0;
1316 int inherit_nodes_index_count = 0;
1317 int inherit_nodes_dim = inherit_nodes->
dim;
1318 for(
int i=0;i<inherit_nodes_dim;i++,inherit_nodes_index_count++){
1319 if(inherit_nodes_index_count == inherit_nodes_index){
1328 _XMP_fatal(
"the function does not reach here");
◆ _XMP_calc_rank_array()
void _XMP_calc_rank_array |
( |
_XMP_nodes_t * |
n, |
|
|
int * |
rank_array, |
|
|
int |
linear_rank |
|
) |
| |
1028 int j = linear_rank;
1029 for(
int i=n->
dim-1;i>=0;i--){
◆ _XMP_create_nodes_by_comm()
1010 MPI_Comm_size(*((MPI_Comm *)comm), &size);
1012 _XMP_nodes_t *n = _XMP_create_new_nodes(is_member, 1, size, comm);
1016 MPI_Comm_rank(*((MPI_Comm *)comm), &(n->
info[0].
rank));
◆ _XMP_create_nodes_ref_for_target_nodes()
1236 if(_XMP_compare_nodes(n, target_nodes)){
1241 if(inherit_nodes == NULL){
1248 int inherit_nodes_dim = inherit_nodes->
dim;
1249 int *new_rank_array =
_XMP_alloc(
sizeof(
int) * inherit_nodes_dim);
1253 for(
int i = 0; i < inherit_nodes_dim; i++){
1254 if(inherit_info[i].shrink){
1258 new_rank_array[i] = ((inherit_info[i].
stride) * rank_array[j]) + (inherit_info[i].
lower);
◆ _XMP_create_temporary_nodes()
260 int onto_nodes_dim = n->
dim;
262 int dim_size[onto_nodes_dim];
263 _XMP_nodes_t *new_node = _XMP_create_new_nodes(is_member, onto_nodes_dim, onto_nodes_size, n->
comm);
266 for(
int i=0;i<onto_nodes_dim;i++){
268 inherit_info[i].
lower = 1;
270 inherit_info[i].
stride = 1;
280 for(
int i=1;i<onto_nodes_dim;i++)
◆ _XMP_exec_task_GLOBAL_PART()
int _XMP_exec_task_GLOBAL_PART |
( |
_XMP_task_desc_t ** |
task_desc, |
|
|
int |
ref_lower, |
|
|
int |
ref_upper, |
|
|
int |
ref_stride |
|
) |
| |
837 int lower[1], upper[1], stride[1];
839 lower[0] = ref_lower;
840 upper[0] = ref_upper;
841 stride[0] = ref_stride;
844 if(*task_desc == NULL){
850 if(_XMP_compare_task_exec_cond(desc,
_XMP_world_nodes, lower, upper, stride)){
860 if(desc->
nodes != NULL){
◆ _XMP_exec_task_NODES_ENTIRE()
◆ _XMP_exec_task_NODES_ENTIRE_nocomm()
int _XMP_exec_task_NODES_ENTIRE_nocomm |
( |
_XMP_nodes_t * |
ref_nodes | ) |
|
◆ _XMP_exec_task_NODES_FINALIZE()
897 if(task_desc == NULL)
return;
◆ _XMP_exec_task_NODES_PART()
914 va_start(args, ref_nodes);
915 int ref_dim = ref_nodes->
dim;
916 int shrink[ref_dim], ref_lower[ref_dim], ref_upper[ref_dim], ref_stride[ref_dim];
918 int acc_dim_size = 1;
919 for(
int i=0;i<ref_dim;i++){
920 shrink[i] = va_arg(args,
int);
922 ref_lower[i] = va_arg(args,
int);
923 ref_upper[i] = va_arg(args,
int);
924 ref_stride[i] = va_arg(args,
int);
936 if(*task_desc == NULL){
943 if(_XMP_compare_task_exec_cond(desc, ref_nodes, ref_lower, ref_upper, ref_stride)){
954 if(desc->
nodes != NULL){
963 _XMP_set_task_desc(desc, n, n->
is_member, ref_nodes, ref_lower, ref_upper, ref_stride);
◆ _XMP_exec_task_NODES_PART_nocomm()
int _XMP_exec_task_NODES_PART_nocomm |
( |
_XMP_nodes_t * |
ref_nodes, |
|
|
|
... |
|
) |
| |
978 int ref_dim = ref_nodes->
dim;
979 int shrink[ref_dim], ref_lower[ref_dim], ref_upper[ref_dim], ref_stride[ref_dim];
982 va_start(args, ref_nodes);
984 for(
int i=0;i<ref_dim;i++){
985 shrink[i] = va_arg(args,
int);
987 ref_lower[i] = va_arg(args,
int);
988 ref_upper[i] = va_arg(args,
int);
989 ref_stride[i] = va_arg(args,
int);
994 for(
int i=0;i<ref_dim;i++){
995 if(shrink[i])
continue;
997 int me = ref_nodes->
info[i].
rank + 1;
◆ _XMP_finalize_nodes()
822 int dim = nodes->
dim;
823 int num_comms = 1<<dim;
824 for(
int i=0;i<num_comms;i++){
825 MPI_Comm *comm = (MPI_Comm *)nodes->
subcomm;
826 MPI_Comm_free(&comm[i]);
◆ _XMP_finalize_nodes_ref()
◆ _XMP_get_next_rank()
int _XMP_get_next_rank |
( |
_XMP_nodes_t * |
nodes, |
|
|
int * |
rank_array |
|
) |
| |
1293 int i, dim = nodes->
dim;
1297 if(rank_array[i] == size)
◆ _XMP_init_nodes_DYNAMIC_EXEC()
void _XMP_init_nodes_DYNAMIC_EXEC |
( |
_XMP_nodes_t ** |
nodes, |
|
|
int |
dim, |
|
|
|
... |
|
) |
| |
658 int dim_size[dim - 1];
662 for(
int i=0;i<dim-1;i++){
663 int dim_size_temp = va_arg(args,
int);
664 if(dim_size_temp <= 0)
665 _XMP_fatal(
"<nodes-size> should be less or equal to zero");
667 dim_size[i] = dim_size_temp;
673 int *last_dim_size_p = va_arg(args,
int *);
674 *last_dim_size_p = n->
info[dim - 1].
size;
675 for(
int i=0;i<dim;i++){
676 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_DYNAMIC_GLOBAL()
void _XMP_init_nodes_DYNAMIC_GLOBAL |
( |
_XMP_nodes_t ** |
nodes, |
|
|
int |
dim, |
|
|
|
... |
|
) |
| |
600 int *dim_size_p[dim];
604 for(
int i=0;i<dim;i++){
605 dim_size_p[i] = NULL;
606 int dim_size_temp = va_arg(args,
int);
607 if(dim_size_temp == -1){
608 dim_size_p[i] = va_arg(args,
int *);
610 else if (dim_size_temp <= 0){
611 _XMP_fatal(
"<nodes-size> should be more than zero");
614 dim_size[i] = dim_size_temp;
622 for(
int i=0;i<dim;i++){
627 for(
int i=0;i<dim;i++){
628 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_DYNAMIC_NODES_NAMED()
778 int ref_dim = ref_nodes->
dim;
780 int ref_lower[ref_dim], ref_upper[ref_dim], ref_stride[ref_dim];
784 va_start(args, ref_nodes);
785 for(
int i=0;i<ref_dim;i++){
786 shrink[i] = va_arg(args,
int);
788 ref_lower[i] = va_arg(args,
int);
789 ref_upper[i] = va_arg(args,
int);
790 ref_stride[i] = va_arg(args,
int);
794 for(
int i=0;i<dim-1;i++){
795 int dim_size_temp = va_arg(args,
int);
796 if(dim_size_temp <= 0)
797 _XMP_fatal(
"<nodes-size> should be less or equal to zero");
799 dim_size[i] = dim_size_temp;
806 int *last_dim_size_p = va_arg(args,
int *);
807 *last_dim_size_p = n->
info[dim - 1].
size;
809 for(
int i=0;i<dim;i++){
810 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_DYNAMIC_NODES_NUMBER()
void _XMP_init_nodes_DYNAMIC_NODES_NUMBER |
( |
_XMP_nodes_t ** |
nodes, |
|
|
int |
dim, |
|
|
int |
ref_lower, |
|
|
int |
ref_upper, |
|
|
int |
ref_stride, |
|
|
|
... |
|
) |
| |
711 int dim_size[dim - 1];
714 va_start(args, ref_stride);
715 for(
int i=0;i<dim-1;i++){
716 int dim_size_temp = va_arg(args,
int);
717 if(dim_size_temp <= 0)
718 _XMP_fatal(
"<nodes-size> should be less or equal to zero");
720 dim_size[i] = dim_size_temp;
727 int *last_dim_size_p = va_arg(args,
int *);
728 *last_dim_size_p = n->
info[dim - 1].
size;
730 for(
int i=0;i<dim;i++){
731 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_ref()
1211 int *new_rank_array =
_XMP_alloc(
sizeof(
int) * dim);
1213 int shrink_nodes_size = 1;
1214 for(
int i=0;i<dim;i++){
1215 new_rank_array[i] = rank_array[i];
1217 shrink_nodes_size *= (n->
info[i].
size);
1221 nodes_ref->
nodes = n;
1222 nodes_ref->
ref = new_rank_array;
◆ _XMP_init_nodes_STATIC_EXEC()
void _XMP_init_nodes_STATIC_EXEC |
( |
_XMP_nodes_t ** |
nodes, |
|
|
int |
dim, |
|
|
|
... |
|
) |
| |
639 for (
int i=0;i<dim;i++){
640 int dim_size_temp = va_arg(args,
int);
641 if(dim_size_temp <= 0)
642 _XMP_fatal(
"<nodes-size> should be less or equal to zero");
644 dim_size[i] = dim_size_temp;
650 for (
int i=0;i<dim;i++) {
651 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_STATIC_GLOBAL()
void _XMP_init_nodes_STATIC_GLOBAL |
( |
_XMP_nodes_t ** |
nodes, |
|
|
int |
dim, |
|
|
|
... |
|
) |
| |
579 for(
int i=0;i<dim;i++){
580 int dim_size_temp = va_arg(args,
int);
581 if(dim_size_temp <= 0){
582 _XMP_fatal(
"<nodes-size> should be more than zero");
584 dim_size[i] = dim_size_temp;
590 for(
int i=0;i<dim;i++){
591 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_STATIC_NODES_NAMED()
739 int ref_dim = ref_nodes->
dim;
741 int ref_lower[ref_dim], ref_upper[ref_dim], ref_stride[ref_dim];
745 va_start(args, ref_nodes);
746 for(
int i=0;i<ref_dim;i++){
747 shrink[i] = va_arg(args,
int);
749 ref_lower[i] = va_arg(args,
int);
750 ref_upper[i] = va_arg(args,
int);
751 ref_stride[i] = va_arg(args,
int);
755 for(
int i=0;i<dim;i++){
756 int dim_size_temp = va_arg(args,
int);
757 if(dim_size_temp <= 0){
758 _XMP_fatal(
"<nodes-size> should be less or equal to zero");
761 dim_size[i] = dim_size_temp;
769 for(
int i=0;i<dim;i++){
770 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_STATIC_NODES_NUMBER()
void _XMP_init_nodes_STATIC_NODES_NUMBER |
( |
_XMP_nodes_t ** |
nodes, |
|
|
int |
dim, |
|
|
int |
ref_lower, |
|
|
int |
ref_upper, |
|
|
int |
ref_stride, |
|
|
|
... |
|
) |
| |
688 va_start(args, ref_stride);
689 for(
int i=0;i<dim;i++){
690 int dim_size_temp = va_arg(args,
int);
691 if(dim_size_temp <= 0)
692 _XMP_fatal(
"<nodes-size> should be less or equal to zero");
694 dim_size[i] = dim_size_temp;
701 for(
int i=0;i<dim;i++){
702 int *rank_p = va_arg(args,
int *);
◆ _XMP_init_nodes_struct_EXEC()
_XMP_nodes_t* _XMP_init_nodes_struct_EXEC |
( |
int |
dim, |
|
|
int * |
dim_size, |
|
|
int |
is_static |
|
) |
| |
397 MPI_Comm *comm =
_XMP_alloc(
sizeof(MPI_Comm));
398 MPI_Comm_dup(*((MPI_Comm *)exec_nodes->
comm), comm);
405 n->
inherit_info = _XMP_calc_inherit_info(inherit_nodes);
409 _XMP_init_nodes_info(n, dim_size, is_static);
412 for(
int i=1;i<dim;i++)
◆ _XMP_init_nodes_struct_GLOBAL()
_XMP_nodes_t* _XMP_init_nodes_struct_GLOBAL |
( |
int |
dim, |
|
|
int * |
dim_size, |
|
|
int |
is_static |
|
) |
| |
346 MPI_Comm *comm =
_XMP_alloc(
sizeof(MPI_Comm));
347 MPI_Comm_dup(MPI_COMM_WORLD, comm);
359 for(
int i=0;i<dim;i++){
360 if(dim_size[i] == -1){
362 sprintf(name,
"XMP_NODE_SIZE%d", i);
363 char *size = getenv(name);
370 else _XMP_fatal(
"XMP_NODE_SIZE not specified although '*' is in the dimension of a node array\n");
373 dim_size[i] = atoi(size);
381 _XMP_init_nodes_info(n, dim_size, is_static);
384 for(
int i=1;i<dim;i++)
387 n->
subcomm = create_subcomm(n);
◆ _XMP_init_nodes_struct_NODES_NAMED()
_XMP_nodes_t* _XMP_init_nodes_struct_NODES_NAMED |
( |
int |
dim, |
|
|
_XMP_nodes_t * |
ref_nodes, |
|
|
int * |
shrink, |
|
|
int * |
ref_lower, |
|
|
int * |
ref_upper, |
|
|
int * |
ref_stride, |
|
|
int * |
dim_size, |
|
|
int |
is_static |
|
) |
| |
501 int ref_dim = ref_nodes->
dim;
502 int is_ref_member = ref_nodes->
is_member;
507 int acc_nodes_size = 1;
508 for(
int i=0;i<ref_dim;i++){
513 color += (acc_nodes_size * rank);
516 _XMP_validate_nodes_ref(&ref_lower[i], &ref_upper[i], &ref_stride[i], size);
517 is_member = is_member && _XMP_check_nodes_ref_inclusion(ref_lower[i], ref_upper[i], ref_stride[i], size, rank);
520 acc_nodes_size *= size;
533 for(
int i=0;i<ref_dim;i++)
539 if(check_subcomm(ref_nodes, ref_lower, ref_upper, ref_stride, shrink)){
541 comm = (MPI_Comm *)get_subcomm(ref_nodes, ref_lower, ref_upper, ref_stride, shrink);
544 else if(comm_size == 1){
547 MPI_Comm_dup(MPI_COMM_SELF, comm);
559 n->
inherit_info = _XMP_calc_inherit_info_by_ref(ref_nodes, shrink, ref_lower, ref_upper, ref_stride);
564 _XMP_init_nodes_info(n, dim_size, is_static);
567 for(
int i=1;i<dim;i++)
◆ _XMP_init_nodes_struct_NODES_NUMBER()
_XMP_nodes_t* _XMP_init_nodes_struct_NODES_NUMBER |
( |
int |
dim, |
|
|
int |
ref_lower, |
|
|
int |
ref_upper, |
|
|
int |
ref_stride, |
|
|
int * |
dim_size, |
|
|
int |
is_static |
|
) |
| |
421 _XMP_validate_nodes_ref(&ref_lower, &ref_upper, &ref_stride,
_XMP_world_size);
424 MPI_Comm *comm =
_XMP_alloc(
sizeof(MPI_Comm));
432 int l[1] = {ref_lower};
433 int u[1] = {ref_upper};
434 int s[1] = {ref_stride};
440 _XMP_init_nodes_info(n, dim_size, is_static);
443 for(
int i=1;i<dim;i++)
446 n->
subcomm = create_subcomm(n);
◆ _XMP_translate_nodes_rank_array_to_ranks()
void _XMP_translate_nodes_rank_array_to_ranks |
( |
_XMP_nodes_t * |
nodes, |
|
|
int * |
ranks, |
|
|
int * |
rank_array, |
|
|
int |
shrink_nodes_size |
|
) |
| |
1273 int nodes_dim = nodes->
dim;
1275 for(
int i=0;i<nodes_dim;i++){
1278 int nodes_size = nodes->
info[i].
size;
1279 int new_shrink_nodes_size = shrink_nodes_size / nodes_size;
1280 for(
int j=0;j<nodes_size;j++){
◆ xmp_dbg_printf()
void xmp_dbg_printf |
( |
char * |
fmt, |
|
|
|
... |
|
) |
| |
43 vsprintf(buf,fmt,args);
int _XMP_calc_linear_rank_on_target_nodes(_XMP_nodes_t *n, int *rank_array, _XMP_nodes_t *target_nodes)
Definition: xmp_nodes.c:1049
int size
Definition: xmp_data_struct.h:32
_XMP_nodes_info_t info[1]
Definition: xmp_data_struct.h:60
int shrink
Definition: xmp_data_struct.h:21
int comm_size
Definition: xmp_data_struct.h:48
_XMP_nodes_t * _XMP_init_nodes_struct_NODES_NAMED(int dim, _XMP_nodes_t *ref_nodes, int *shrink, int *ref_lower, int *ref_upper, int *ref_stride, int *dim_size, int is_static)
Definition: xmp_nodes.c:498
int use_subcomm
Definition: xmp_data_struct.h:55
Definition: xmp_data_struct.h:316
_XMP_comm_t * subcomm
Definition: xmp_data_struct.h:54
_Bool xmp_is_async()
Definition: xmp_async.c:20
int is_member
Definition: xmp_data_struct.h:46
void * _XMP_alloc(size_t size)
Definition: xmp_util.c:21
_XMP_nodes_t * _XMP_init_nodes_struct_EXEC(int dim, int *dim_size, int is_static)
Definition: xmp_nodes.c:392
struct _XMP_nodes_type * inherit_nodes
Definition: xmp_data_struct.h:57
#define _XMP_EQUIVALENCE_NODES
Definition: xmp_constant.h:124
_XMP_nodes_ref_t * _XMP_init_nodes_ref(_XMP_nodes_t *n, int *rank_array)
Definition: xmp_nodes.c:1207
int _XMP_world_size
Definition: xmp_world.c:8
void * _XMP_world_nodes
Definition: xmp_world.c:10
_Bool _XMP_calc_coord_on_target_nodes2(_XMP_nodes_t *n, int *ncoord, _XMP_nodes_t *target_n, int *target_ncoord)
Definition: xmp_nodes.c:1090
int shrink_nodes_size
Definition: xmp_data_struct.h:66
int _XMP_calc_linear_rank(_XMP_nodes_t *n, int *rank_array)
Definition: xmp_nodes.c:1035
void _XMP_finalize_comm(void *comm)
int _XMP_world_rank
Definition: xmp_world.c:9
void _XMP_nodes_dealloc_after_wait_async(_XMP_nodes_t *n)
Definition: xmp_async.c:272
Definition: xmp_data_struct.h:20
int * ref
Definition: xmp_data_struct.h:65
#define _XMP_ENTIRE_NODES
Definition: xmp_constant.h:121
#define _XMP_N_INT_FALSE
Definition: xmp_constant.h:5
#define _XMP_N_UNSPECIFIED_RANK
Definition: xmp_constant.h:22
int stride
Definition: xmp_data_struct.h:25
_XMP_nodes_t * _XMP_init_nodes_struct_NODES_NUMBER(int dim, int ref_lower, int ref_upper, int ref_stride, int *dim_size, int is_static)
Definition: xmp_nodes.c:418
Definition: xmp_data_struct.h:63
_XMP_nodes_inherit_info_t * inherit_info
Definition: xmp_data_struct.h:59
#define _XMP_comm_t
Definition: xmp_data_struct.h:17
_XMP_nodes_t * nodes
Definition: xmp_data_struct.h:317
_XMP_nodes_ref_t * _XMP_create_nodes_ref_for_target_nodes(_XMP_nodes_t *n, int *rank_array, _XMP_nodes_t *target_nodes)
Definition: xmp_nodes.c:1234
void _XMP_translate_nodes_rank_array_to_ranks(_XMP_nodes_t *nodes, int *ranks, int *rank_array, int shrink_nodes_size)
Definition: xmp_nodes.c:1270
int rank
Definition: xmp_data_struct.h:35
_XMP_nodes_t * _XMP_init_nodes_struct_GLOBAL(int dim, int *dim_size, int is_static)
Definition: xmp_nodes.c:344
#define _XMP_N_INVALID_RANK
Definition: xmp_constant.h:21
#define _XMP_EXECUTING_NODES
Definition: xmp_constant.h:122
void _XMP_free(void *p)
Definition: xmp_util.c:37
int lower
Definition: xmp_data_struct.h:23
int multiplier
Definition: xmp_data_struct.h:37
_Bool _XMP_calc_coord_on_target_nodes(_XMP_nodes_t *n, int *ncoord, _XMP_nodes_t *target_n, int *target_ncoord)
Definition: xmp_nodes.c:1150
_XMP_comm_t * comm
Definition: xmp_data_struct.h:53
void _XMP_fatal(char *msg)
Definition: xmp_util.c:42
void _XMP_calc_rank_array(_XMP_nodes_t *n, int *rank_array, int linear_rank)
Definition: xmp_nodes.c:1026
_XMP_nodes_t * nodes
Definition: xmp_data_struct.h:64
void _XMP_push_nodes(void *nodes)
int dim
Definition: xmp_data_struct.h:47
int attr
Definition: xmp_data_struct.h:49
Definition: xmp_data_struct.h:40
#define _XMP_M_COUNT_TRIPLETi(l_, u_, s_)
Definition: xmp_gpu_func.hpp:25
#define _XMP_N_MAX_DIM
Definition: xmp_constant.h:6
void _XMP_finalize_nodes(_XMP_nodes_t *nodes)
Definition: xmp_nodes.c:816
#define _XMP_N_INT_TRUE
Definition: xmp_constant.h:4
void _XMP_init_nodes_STATIC_NODES_NUMBER(_XMP_nodes_t **nodes, int dim, int ref_lower, int ref_upper, int ref_stride,...)
Definition: xmp_nodes.c:682
int execute
Definition: xmp_data_struct.h:318
void * _XMP_get_execution_nodes(void)
Definition: xmp_nodes_stack.c:46
int upper
Definition: xmp_data_struct.h:24