23 static struct intracomm_info {
26 struct intracomm_info *next;
33 static struct intercomm_info {
38 struct intercomm_info *next;
47 static struct couple_info {
59 struct couple_info *next;
75 static int is_initialized = 0;
80 if (comm ==
NULL)
return;
109 static void free_intracomm_info(
void) {
110 struct intracomm_info *p, *q;
112 for (p = intracomm_root.next; p; p = q) {
119 static void free_intercomm_info(
void) {
120 struct intercomm_info *p, *q;
122 for (p = intercomm_root.next; p; p = q) {
129 static void free_couple_info(
void) {
130 struct couple_info *p, *q;
132 for (p = couple_root.next; p; p = q) {
141 free_intracomm_info();
142 free_intercomm_info();
148 static struct intracomm_info *get_intracomm_info(
const char *unit_id) {
149 struct intracomm_info *p;
151 for (p = intracomm_root.next; p; p = p->next) {
152 if (strcmp(unit_id, p->unit_id) == 0)
return p;
158 static struct intercomm_info *get_intercomm_info(
const char *couple_id) {
159 struct intercomm_info *p;
161 for (p = intercomm_root.next; p; p = p->next) {
162 if (strcmp(couple_id, p->couple_id) == 0)
return p;
168 static struct couple_info *get_couple_info(
const char *boundary_id) {
169 struct couple_info *p;
171 for (p = couple_root.next; p; p = p->next) {
172 if (strcmp(boundary_id, p->boundary_id) == 0)
return p;
180 static int init_intracomm_info(
void) {
183 struct intracomm_info *p;
185 char *couple_id, *unit1_id, *unit2_id;
198 for (i = 0; i < unit_ids->
n_unit; i++) {
201 for (i = 0; i < boundary_ids->
n_boundary; i++) {
203 if (couple_id ==
NULL)
goto error;
206 if (unit1_id ==
NULL)
goto error;
209 if (unit2_id ==
NULL)
goto error;
211 for (j = 0; j < unit_ids->
n_unit; j++) {
212 if (strcmp(unit1_id, unit_ids->
ids[j]) == 0) {
215 if (strcmp(unit2_id, unit_ids->
ids[j]) == 0) {
223 for (i = 0; i < unit_ids->
n_unit; i++) {
226 (
struct intracomm_info *)
HECMW_malloc(
sizeof(
struct intracomm_info));
227 if (p->next ==
NULL) {
235 p->comm = alloc_struct_comm();
236 if (p->comm ==
NULL)
goto error;
247 free_intracomm_info();
251 static int init_intercomm_info(
void) {
254 struct intercomm_info *p;
269 for (i = 0; i < couple_ids->
n_couple; i++) {
272 for (i = 0; i < boundary_ids->
n_boundary; i++) {
274 if (couple_id ==
NULL)
goto error;
276 for (j = 0; j < couple_ids->
n_couple; j++) {
277 if (strcmp(couple_id, couple_ids->
ids[j]) == 0) {
285 for (i = 0; i < couple_ids->
n_couple; i++) {
288 (
struct intercomm_info *)
HECMW_malloc(
sizeof(
struct intercomm_info));
289 if (p->next ==
NULL) {
308 if ((p->comm = alloc_struct_comm()) ==
NULL)
goto error;
319 free_intercomm_info();
323 static int init_couple_info(
void) {
325 struct couple_info *p;
326 char *boundary_id, *unit1_id, *unit2_id;
333 for (i = 0; i < boundary_ids->
n_boundary; i++) {
334 boundary_id = boundary_ids->
ids[i];
336 p->next = (
struct couple_info *)
HECMW_malloc(
sizeof(
struct couple_info));
337 if (p->next ==
NULL) {
374 if (p->unit1_grp ==
NULL)
goto error;
376 if (p->unit2_grp ==
NULL)
goto error;
388 static int set_couple_type(
int *couple_type) {
389 struct couple_info *p;
390 int is_specified_mxn = 0;
391 int is_specified_maxmn = 0;
392 int is_specified_manual = 0;
394 for (p = couple_root.next; p; p = p->next) {
396 is_specified_mxn = 1;
398 is_specified_maxmn = 1;
400 is_specified_manual = 1;
407 if (is_specified_mxn + is_specified_maxmn + is_specified_manual != 1) {
412 if (is_specified_mxn) {
414 }
else if (is_specified_maxmn) {
416 }
else if (is_specified_manual) {
425 static int check_intracomm_psize_mxn(
void) {
427 struct intracomm_info *p;
430 for (p = intracomm_root.next; p; p = p->next) {
434 psize_sum += proc->
n_proc;
448 static int check_intracomm_psize_maxmn(
void) {
450 struct intracomm_info *p;
453 for (p = intracomm_root.next; p; p = p->next) {
471 static int check_intracomm_psize_manual(
void) {
473 struct intracomm_info *p;
475 int psize_sum = 0, psize_max = 0;
478 for (p = intracomm_root.next; p; p = p->next) {
482 psize_sum += proc->
n_proc;
493 for (i = 0; i < psize_sum; i++) {
496 for (p = intracomm_root.next; p; p = p->next) {
500 for (i = 0; i < proc->
n_proc; i++) {
501 rank = proc->
ranks[i];
504 "specified rank number is too small (%d)", rank);
508 if (rank >= psize_sum) {
510 "specified rank number is too large (%d)", rank);
519 for (i = 0; i < psize_sum; i++) {
520 if (mask[i]) psize_max = i;
522 for (n = 0, i = 0; i <= psize_max; i++) {
525 "Process No. %d is not used");
543 static int check_intracomm_psize(
int couple_type) {
557 static int set_intracomm_psize(
void) {
559 struct intracomm_info *p;
561 for (p = intracomm_root.next; p; p = p->next) {
566 p->comm->psize = proc->
n_proc;
574 static int set_intracomm_ranks_mxn(
void) {
575 struct intracomm_info *p;
579 for (p = intracomm_root.next; p; p = p->next) {
580 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
581 if (p->comm->ranks ==
NULL) {
583 free_intracomm_info();
586 for (i = 0; i < p->comm->psize; i++) {
587 p->comm->ranks[i] = n;
595 static int set_intracomm_ranks_maxmn(
void) {
596 struct intracomm_info *p;
599 for (p = intracomm_root.next; p; p = p->next) {
600 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
601 if (p->comm->ranks ==
NULL) {
603 free_intracomm_info();
606 for (i = 0; i < p->comm->psize; i++) {
607 p->comm->ranks[i] = i;
614 static int set_intracomm_ranks_manual(
void) {
616 struct intracomm_info *p;
619 for (p = intracomm_root.next; p; p = p->next) {
623 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
624 if (p->comm->ranks ==
NULL) {
627 free_intracomm_info();
630 for (i = 0; i < p->comm->psize; i++) {
631 p->comm->ranks[i] = proc->
ranks[i];
640 static int set_intracomm_ranks(
int couple_type) {
656 static int set_intercomm_psize_mxn(
void) {
657 struct intercomm_info *p;
658 struct intracomm_info *q1, *q2;
660 for (p = intercomm_root.next; p; p = p->next) {
661 q1 = get_intracomm_info(p->unit1_id);
663 q2 = get_intracomm_info(p->unit2_id);
666 p->comm->psize = q1->comm->psize + q2->comm->psize;
672 static int set_intercomm_psize_maxmn(
void) {
673 struct intercomm_info *p;
674 struct intracomm_info *q1, *q2;
676 for (p = intercomm_root.next; p; p = p->next) {
677 q1 = get_intracomm_info(p->unit1_id);
679 q2 = get_intracomm_info(p->unit2_id);
682 if (q1->comm->psize >= q2->comm->psize) {
683 p->comm->psize = q1->comm->psize;
685 p->comm->psize = q2->comm->psize;
692 static int set_intercomm_psize_manual(
void) {
693 struct intercomm_info *p;
694 struct intracomm_info *q1, *q2;
696 int global_psize, n, i;
706 for (p = intercomm_root.next; p; p = p->next) {
707 q1 = get_intracomm_info(p->unit1_id);
708 if (q1 ==
NULL)
goto error;
709 q2 = get_intracomm_info(p->unit2_id);
710 if (q2 ==
NULL)
goto error;
712 for (i = 0; i < global_psize; i++) {
715 for (i = 0; i < q1->comm->psize; i++) {
718 for (i = 0; i < q2->comm->psize; i++) {
721 for (n = 0, i = 0; i < global_psize; i++) {
736 static int set_intercomm_psize(
int couple_type) {
753 static int set_intercomm_ranks_mxn(
void) {
754 struct intercomm_info *p;
755 struct intracomm_info *q1, *q2;
758 for (p = intercomm_root.next; p; p = p->next) {
759 q1 = get_intracomm_info(p->unit1_id);
760 if (q1 ==
NULL)
goto error;
761 q2 = get_intracomm_info(p->unit2_id);
762 if (q2 ==
NULL)
goto error;
764 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
765 if (p->comm->ranks ==
NULL) {
769 HECMW_assert(p->comm->psize == q1->comm->psize + q2->comm->psize);
770 for (n = 0, i = 0; i < q1->comm->psize; i++, n++) {
771 p->comm->ranks[n] = q1->comm->ranks[i];
773 for (i = 0; i < q2->comm->psize; i++, n++) {
774 p->comm->ranks[n] = q2->comm->ranks[i];
785 static int set_intercomm_ranks_maxmn(
void) {
786 struct intercomm_info *p;
787 struct intracomm_info *q1, *q2;
790 for (p = intercomm_root.next; p; p = p->next) {
791 q1 = get_intracomm_info(p->unit1_id);
792 if (q1 ==
NULL)
goto error;
793 q2 = get_intracomm_info(p->unit2_id);
794 if (q2 ==
NULL)
goto error;
796 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
797 if (p->comm->ranks ==
NULL) {
801 if (q1->comm->psize >= q2->comm->psize) {
803 for (i = 0; i < q1->comm->psize; i++) {
804 p->comm->ranks[i] = q1->comm->ranks[i];
808 for (i = 0; i < q2->comm->psize; i++) {
809 p->comm->ranks[i] = q2->comm->ranks[i];
821 static int set_intercomm_ranks_manual(
void) {
822 struct intercomm_info *p;
823 struct intracomm_info *q1, *q2;
825 int global_psize, n, i;
835 for (p = intercomm_root.next; p; p = p->next) {
836 q1 = get_intracomm_info(p->unit1_id);
837 if (q1 ==
NULL)
goto error;
838 q2 = get_intracomm_info(p->unit2_id);
839 if (q2 ==
NULL)
goto error;
841 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
842 if (p->comm->ranks ==
NULL) {
847 for (i = 0; i < global_psize; i++) {
850 for (i = 0; i < q1->comm->psize; i++) {
853 for (i = 0; i < q2->comm->psize; i++) {
856 for (n = 0, i = 0; i < global_psize; i++) {
859 p->comm->ranks[n] = i;
874 static int set_intercomm_ranks(
int couple_type) {
898 for (i = 0; i < comm->
psize; i++) {
899 if (comm->
ranks[i] == global_rank) {
908 static int allgather_root(
int *root) {
909 int *send_buf =
NULL, *recv_buf =
NULL;
916 if (send_buf ==
NULL) {
921 if (recv_buf ==
NULL) {
933 if (recv_buf[i] >= 0) {
950 if (comm->
rank == 0) {
987 struct intracomm_info *p;
988 struct intercomm_info *q;
997 if (set_couple_type(&couple_type) !=
HECMW_SUCCESS)
goto error;
998 if (check_intracomm_psize(couple_type) !=
HECMW_SUCCESS)
goto error;
1002 if (set_intracomm_ranks(couple_type) !=
HECMW_SUCCESS)
goto error;
1004 for (p = intracomm_root.next; p; p = p->next) {
1009 if (set_intercomm_psize(couple_type) !=
HECMW_SUCCESS)
goto error;
1010 if (set_intercomm_ranks(couple_type) !=
HECMW_SUCCESS)
goto error;
1012 for (q = intercomm_root.next; q; q = q->next) {
1026 int unit_specifier,
char *buf,
1028 struct couple_info *couple;
1030 char *unit_id, *ret_buf;
1033 if (boundary_id ==
NULL) {
1035 "Invalid NULL pointer is found (boundary_id)");
1039 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return NULL;
1042 unit_id = couple->unit1_id;
1044 unit_id = couple->unit2_id;
1052 if (ret_buf ==
NULL) {
1057 len = strlen(unit_id);
1058 if (bufsize <= len) {
1061 strncpy(buf, unit_id, len);
1070 struct couple_info *couple;
1071 struct intercomm_info *intercomm;
1073 if (boundary_id ==
NULL) {
1075 "Invalid NULL pointer is found (boundary_id)");
1079 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1080 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1082 if (intercomm->comm->is_member)
return 1;
1087 int unit_specifier) {
1088 struct couple_info *couple;
1089 struct intracomm_info *intracomm;
1091 if (boundary_id ==
NULL) {
1093 "Invalid NULL pointer is found (boundary_id)");
1097 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1100 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1102 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1108 if (intracomm->comm->is_member)
return 1;
1113 struct intracomm_info *intracomm;
1115 if (unit_id ==
NULL) {
1117 "Invalid NULL pointer is found (unit_id)");
1121 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1123 if (intracomm->comm->is_member)
return 1;
1128 struct couple_info *couple;
1129 struct intercomm_info *intercomm;
1131 if (boundary_id ==
NULL) {
1133 "Invalid NULL pointer is found (boundary_id)");
1137 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1138 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1140 if (intercomm->comm->is_root)
return 1;
1145 int unit_specifier) {
1146 struct couple_info *couple;
1147 struct intracomm_info *intracomm;
1149 if (boundary_id ==
NULL) {
1151 "Invalid NULL pointer is found (boundary_id)");
1155 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1158 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1160 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1166 if (intracomm->comm->is_root)
return 1;
1171 struct intracomm_info *intracomm;
1173 if (unit_id ==
NULL) {
1175 "Invalid NULL pointer is found (unit_id)");
1179 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1181 if (intracomm->comm->is_root)
return 1;
1186 struct couple_info *couple;
1187 struct intercomm_info *intercomm;
1189 if (boundary_id ==
NULL) {
1191 "Invalid NULL pointer is found (boundary_id)");
1195 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1196 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1198 return intercomm->comm->psize;
1202 int unit_specifier) {
1203 struct couple_info *couple;
1204 struct intracomm_info *intracomm;
1206 if (boundary_id ==
NULL) {
1208 "Invalid NULL pointer is found (boundary_id)");
1212 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1215 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1217 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1223 return intracomm->comm->psize;
1227 struct intracomm_info *intracomm;
1229 if (unit_id ==
NULL) {
1231 "Invalid NULL pointer is found (unit_id)");
1235 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1237 return intracomm->comm->psize;
1241 struct couple_info *couple;
1242 struct intercomm_info *intercomm;
1244 if (boundary_id ==
NULL) {
1246 "Invalid NULL pointer is found (boundary_id)");
1250 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1251 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1253 return intercomm->comm->rank;
1257 int unit_specifier) {
1258 struct couple_info *couple;
1259 struct intracomm_info *intracomm;
1261 if (boundary_id ==
NULL) {
1263 "Invalid NULL pointer is found (boundary_id)");
1267 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1270 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1272 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1278 return intracomm->comm->rank;
1282 struct intracomm_info *intracomm;
1284 if (unit_id ==
NULL) {
1286 "Invalid NULL pointer is found (unit_id)");
1290 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1292 return intracomm->comm->rank;
1296 struct couple_info *couple;
1297 struct intercomm_info *intercomm;
1299 if (boundary_id ==
NULL) {
1301 "Invalid NULL pointer is found (boundary_id)");
1305 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1306 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1308 return intercomm->comm->comm;
1312 int unit_specifier) {
1313 struct couple_info *couple;
1314 struct intracomm_info *intracomm;
1316 if (boundary_id ==
NULL) {
1318 "Invalid NULL pointer is found (boundary_id)");
1322 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1325 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1327 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1333 return intracomm->comm->comm;
1337 struct intracomm_info *intracomm;
1339 if (unit_id ==
NULL) {
1341 "Invalid NULL pointer is found (unit_id)");
1345 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1347 return intracomm->comm->comm;
1351 struct couple_info *couple;
1352 struct intercomm_info *intercomm;
1354 if (boundary_id ==
NULL) {
1356 "Invalid NULL pointer is found (boundary_id)");
1360 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1361 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1363 return intercomm->comm->group;
1367 int unit_specifier) {
1368 struct couple_info *couple;
1369 struct intracomm_info *intracomm;
1371 if (boundary_id ==
NULL) {
1373 "Invalid NULL pointer is found (boundary_id)");
1377 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1380 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1382 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1388 return intracomm->comm->group;
1392 struct intracomm_info *intracomm;
1394 if (unit_id ==
NULL) {
1396 "Invalid NULL pointer is found (unit_id)");
1400 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1402 return intracomm->comm->group;
1406 const char *boundary_id,
int unit_specifier) {
1407 struct couple_info *couple =
NULL;
1408 struct intracomm_info *intracomm =
NULL;
1413 if (boundary_id ==
NULL) {
1415 "Invalid NULL pointer is found (boundary_id)");
1419 couple = get_couple_info(boundary_id);
1423 unit_id = couple->unit1_id;
1425 unit_id = couple->unit2_id;
1431 intracomm = get_intracomm_info(unit_id);
1432 if (intracomm ==
NULL)
return NULL;
1434 comm = alloc_struct_comm();
1437 comm->psize = intracomm->comm->psize;
1438 comm->rank = intracomm->comm->rank;
1445 for (i = 0; i <
comm->psize; i++) {
1446 comm->ranks[i] = intracomm->comm->ranks[i];
1448 comm->comm = intracomm->comm->comm;
1449 comm->group = intracomm->comm->group;
1450 comm->root = intracomm->comm->root;
1451 comm->is_member = intracomm->comm->is_member;
1452 comm->is_root = intracomm->comm->is_root;
1458 const char *unit_id) {
1459 struct intracomm_info *intracomm =
NULL;
1463 if (unit_id ==
NULL) {
1465 "Invalid NULL pointer is found (boundary_id)");
1469 intracomm = get_intracomm_info(unit_id);
1470 if (intracomm ==
NULL)
return NULL;
1472 comm = alloc_struct_comm();
1475 comm->psize = intracomm->comm->psize;
1476 comm->rank = intracomm->comm->rank;
1483 for (i = 0; i <
comm->psize; i++) {
1484 comm->ranks[i] = intracomm->comm->ranks[i];
1486 comm->comm = intracomm->comm->comm;
1487 comm->group = intracomm->comm->group;
1488 comm->root = intracomm->comm->root;
1489 comm->is_member = intracomm->comm->is_member;
1490 comm->is_root = intracomm->comm->is_root;
1496 const char *boundary_id) {
1497 struct couple_info *couple;
1498 struct intercomm_info *intercomm;
1502 if (boundary_id ==
NULL) {
1504 "Invalid NULL pointer is found (boundary_id)");
1508 couple = get_couple_info(boundary_id);
1511 intercomm = get_intercomm_info(couple->couple_id);
1512 if (intercomm ==
NULL)
return NULL;
1514 comm = alloc_struct_comm();
1517 comm->psize = intercomm->comm->psize;
1518 comm->rank = intercomm->comm->rank;
1525 for (i = 0; i <
comm->psize; i++) {
1526 comm->ranks[i] = intercomm->comm->ranks[i];
1528 comm->comm = intercomm->comm->comm;
1529 comm->group = intercomm->comm->group;
1530 comm->root = intercomm->comm->root;
1531 comm->is_member = intercomm->comm->is_member;
1532 comm->is_root = intercomm->comm->is_root;
int HECMW_Comm_create(HECMW_Comm comm, HECMW_Group group, HECMW_Comm *comm_out)
HECMW_Comm HECMW_comm_get_comm(void)
int HECMW_Group_size(HECMW_Group group, int *size)
int HECMW_comm_get_rank(void)
int HECMW_comm_get_size(void)
HECMW_Group HECMW_comm_get_group(void)
int HECMW_Group_rank(HECMW_Group group, int *rank)
int HECMW_Group_incl(HECMW_Group group, int n, int *ranks, HECMW_Group *newgroup)
int HECMW_Allgather(void *sendbuf, int sendcount, HECMW_Datatype sendtype, void *recvbuf, int recvcount, HECMW_Datatype recvtype, HECMW_Comm comm)
int HECMW_couple_ctrl_get_type(const char *couple_id, int *couple_type)
void HECMW_couple_ctrl_free_proc(struct hecmw_couple_ctrl_proc *proc_info)
int HECMW_couple_ctrl_get_direction(const char *boundary_id, int *direction)
int HECMW_couple_ctrl_get_tolerance(const char *boundary_id, double *tolerance)
struct hecmw_couple_group * HECMW_couple_ctrl_get_group(const char *boundary_id, int unit_specifier)
int HECMW_couple_ctrl_get_bgcoef(const char *boundary_id, double *bgcoef)
char * HECMW_couple_ctrl_get_couple_id(const char *boundary_id, char *buf, int bufsize)
char * HECMW_couple_ctrl_get_unit_id(const char *couple_id, int unit_specifier, char *buf, int bufsize)
void HECMW_couple_ctrl_free_group(struct hecmw_couple_group *grp_info)
struct hecmw_couple_ctrl_boundary_ids * HECMW_couple_get_boundary_ids(void)
struct hecmw_couple_ctrl_unit_ids * HECMW_couple_get_unit_ids(void)
struct hecmw_couple_ctrl_proc * HECMW_couple_ctrl_get_proc(const char *unit_id)
int HECMW_couple_ctrl_get_bbcoef(const char *boundary_id, double *bbcoef)
int HECMW_couple_ctrl_get_n_boundary(void)
struct hecmw_couple_ctrl_couple_ids * HECMW_couple_get_couple_ids(void)
#define HECMWCPL_E_INVALID_UNITTYPE
#define HECMW_COUPLE_TRUE
#define HECMW_COUPLE_TYPE_UNDEF
#define HECMW_COUPLE_UNIT1
#define HECMWCPL_E_INVALID_CPLTYPE
#define HECMWCPL_E_MULTIPLE_CPLTYPE
#define HECMW_COUPLE_DIRECTION_UNDEF
#define HECMWCPL_E_INVALID_RANKS
#define HECMW_COUPLE_FALSE
#define HECMWCPL_E_DISCONTINUOUS_RANKS
#define HECMW_COUPLE_TYPE_MAXMN
#define HECMWCPL_E_INVALID_ARG
#define HECMW_COUPLE_TYPE_MXN
#define HECMWCPL_E_UNMATCH_PSIZE
#define HECMW_COUPLE_UNIT2
#define HECMW_COUPLE_TYPE_MANUAL
struct hecmw_couple_comm * HECMW_couple_get_intracomm_u(const char *unit_id)
int HECMW_couple_is_member(const char *boundary_id)
void HECMW_couple_free_couple_info(void)
int HECMW_intracomm_get_size(const char *boundary_id, int unit_specifier)
int HECMW_couple_is_unit_member(const char *boundary_id, int unit_specifier)
HECMW_Group HECMW_intercomm_get_group(const char *boundary_id)
int HECMW_intracomm_get_size_u(const char *unit_id)
int HECMW_couple_is_unit_root_u(const char *unit_id)
int HECMW_couple_is_unit_root(const char *boundary_id, int unit_specifier)
HECMW_Group HECMW_intracomm_get_group_u(const char *unit_id)
HECMW_Comm HECMW_intercomm_get_comm(const char *boundary_id)
HECMW_Comm HECMW_intracomm_get_comm_u(const char *unit_id)
char * HECMW_couple_get_unit_id(const char *boundary_id, int unit_specifier, char *buf, int bufsize)
int HECMW_intracomm_get_rank_u(const char *unit_id)
int HECMW_couple_is_root(const char *boundary_id)
int HECMW_couple_comm_init(void)
int HECMW_intercomm_get_size(const char *boundary_id)
int HECMW_intracomm_get_rank(const char *boundary_id, int unit_specifier)
int HECMW_intercomm_get_rank(const char *boundary_id)
HECMW_Group HECMW_intracomm_get_group(const char *boundary_id, int unit_specifier)
void HECMW_couple_free_comm(struct hecmw_couple_comm *comm)
int HECMW_couple_is_unit_member_u(const char *unit_id)
struct hecmw_couple_comm * HECMW_couple_get_intracomm(const char *boundary_id, int unit_specifier)
HECMW_Comm HECMW_intracomm_get_comm(const char *boundary_id, int unit_specifier)
struct hecmw_couple_comm * HECMW_couple_get_intercomm(const char *boundary_id)
int HECMW_set_error(int errorno, const char *fmt,...)
#define HECMW_calloc(nmemb, size)
#define HECMW_malloc(size)
#define HECMW_assert(cond)