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) {
233 snprintf(p->unit_id,
sizeof(p->unit_id),
"%s", unit_ids->
ids[i]);
234 p->comm = alloc_struct_comm();
235 if (p->comm ==
NULL)
goto error;
246 free_intracomm_info();
250 static int init_intercomm_info(
void) {
253 struct intercomm_info *p;
268 for (i = 0; i < couple_ids->
n_couple; i++) {
271 for (i = 0; i < boundary_ids->
n_boundary; i++) {
273 if (couple_id ==
NULL)
goto error;
275 for (j = 0; j < couple_ids->
n_couple; j++) {
276 if (strcmp(couple_id, couple_ids->
ids[j]) == 0) {
284 for (i = 0; i < couple_ids->
n_couple; i++) {
287 (
struct intercomm_info *)
HECMW_malloc(
sizeof(
struct intercomm_info));
288 if (p->next ==
NULL) {
301 snprintf(p->couple_id,
sizeof(p->couple_id),
"%s", couple_ids->
ids[i]);
302 snprintf(p->unit1_id,
sizeof(p->unit1_id),
"%s", unit1_id);
303 snprintf(p->unit2_id,
sizeof(p->unit2_id),
"%s", unit2_id);
304 if ((p->comm = alloc_struct_comm()) ==
NULL)
goto error;
315 free_intercomm_info();
319 static int init_couple_info(
void) {
321 struct couple_info *p;
322 char *boundary_id, *unit1_id, *unit2_id;
329 for (i = 0; i < boundary_ids->
n_boundary; i++) {
330 boundary_id = boundary_ids->
ids[i];
332 p->next = (
struct couple_info *)
HECMW_malloc(
sizeof(
struct couple_info));
333 if (p->next ==
NULL) {
342 snprintf(p->boundary_id,
sizeof(p->boundary_id),
"%s", boundary_id);
369 if (p->unit1_grp ==
NULL)
goto error;
371 if (p->unit2_grp ==
NULL)
goto error;
383 static int set_couple_type(
int *couple_type) {
384 struct couple_info *p;
385 int is_specified_mxn = 0;
386 int is_specified_maxmn = 0;
387 int is_specified_manual = 0;
389 for (p = couple_root.next; p; p = p->next) {
391 is_specified_mxn = 1;
393 is_specified_maxmn = 1;
395 is_specified_manual = 1;
402 if (is_specified_mxn + is_specified_maxmn + is_specified_manual != 1) {
407 if (is_specified_mxn) {
409 }
else if (is_specified_maxmn) {
411 }
else if (is_specified_manual) {
420 static int check_intracomm_psize_mxn(
void) {
422 struct intracomm_info *p;
425 for (p = intracomm_root.next; p; p = p->next) {
429 psize_sum += proc->
n_proc;
443 static int check_intracomm_psize_maxmn(
void) {
445 struct intracomm_info *p;
448 for (p = intracomm_root.next; p; p = p->next) {
466 static int check_intracomm_psize_manual(
void) {
468 struct intracomm_info *p;
470 int psize_sum = 0, psize_max = 0;
473 for (p = intracomm_root.next; p; p = p->next) {
477 psize_sum += proc->
n_proc;
488 for (i = 0; i < psize_sum; i++) {
491 for (p = intracomm_root.next; p; p = p->next) {
495 for (i = 0; i < proc->
n_proc; i++) {
496 rank = proc->
ranks[i];
499 "specified rank number is too small (%d)", rank);
503 if (rank >= psize_sum) {
505 "specified rank number is too large (%d)", rank);
514 for (i = 0; i < psize_sum; i++) {
515 if (mask[i]) psize_max = i;
517 for (n = 0, i = 0; i <= psize_max; i++) {
520 "Process No. %d is not used");
538 static int check_intracomm_psize(
int couple_type) {
552 static int set_intracomm_psize(
void) {
554 struct intracomm_info *p;
556 for (p = intracomm_root.next; p; p = p->next) {
561 p->comm->psize = proc->
n_proc;
569 static int set_intracomm_ranks_mxn(
void) {
570 struct intracomm_info *p;
574 for (p = intracomm_root.next; p; p = p->next) {
575 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
576 if (p->comm->ranks ==
NULL) {
578 free_intracomm_info();
581 for (i = 0; i < p->comm->psize; i++) {
582 p->comm->ranks[i] = n;
590 static int set_intracomm_ranks_maxmn(
void) {
591 struct intracomm_info *p;
594 for (p = intracomm_root.next; p; p = p->next) {
595 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
596 if (p->comm->ranks ==
NULL) {
598 free_intracomm_info();
601 for (i = 0; i < p->comm->psize; i++) {
602 p->comm->ranks[i] = i;
609 static int set_intracomm_ranks_manual(
void) {
611 struct intracomm_info *p;
614 for (p = intracomm_root.next; p; p = p->next) {
618 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
619 if (p->comm->ranks ==
NULL) {
622 free_intracomm_info();
625 for (i = 0; i < p->comm->psize; i++) {
626 p->comm->ranks[i] = proc->
ranks[i];
635 static int set_intracomm_ranks(
int couple_type) {
651 static int set_intercomm_psize_mxn(
void) {
652 struct intercomm_info *p;
653 struct intracomm_info *q1, *q2;
655 for (p = intercomm_root.next; p; p = p->next) {
656 q1 = get_intracomm_info(p->unit1_id);
658 q2 = get_intracomm_info(p->unit2_id);
661 p->comm->psize = q1->comm->psize + q2->comm->psize;
667 static int set_intercomm_psize_maxmn(
void) {
668 struct intercomm_info *p;
669 struct intracomm_info *q1, *q2;
671 for (p = intercomm_root.next; p; p = p->next) {
672 q1 = get_intracomm_info(p->unit1_id);
674 q2 = get_intracomm_info(p->unit2_id);
677 if (q1->comm->psize >= q2->comm->psize) {
678 p->comm->psize = q1->comm->psize;
680 p->comm->psize = q2->comm->psize;
687 static int set_intercomm_psize_manual(
void) {
688 struct intercomm_info *p;
689 struct intracomm_info *q1, *q2;
691 int global_psize, n, i;
701 for (p = intercomm_root.next; p; p = p->next) {
702 q1 = get_intracomm_info(p->unit1_id);
703 if (q1 ==
NULL)
goto error;
704 q2 = get_intracomm_info(p->unit2_id);
705 if (q2 ==
NULL)
goto error;
707 for (i = 0; i < global_psize; i++) {
710 for (i = 0; i < q1->comm->psize; i++) {
713 for (i = 0; i < q2->comm->psize; i++) {
716 for (n = 0, i = 0; i < global_psize; i++) {
731 static int set_intercomm_psize(
int couple_type) {
748 static int set_intercomm_ranks_mxn(
void) {
749 struct intercomm_info *p;
750 struct intracomm_info *q1, *q2;
753 for (p = intercomm_root.next; p; p = p->next) {
754 q1 = get_intracomm_info(p->unit1_id);
755 if (q1 ==
NULL)
goto error;
756 q2 = get_intracomm_info(p->unit2_id);
757 if (q2 ==
NULL)
goto error;
759 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
760 if (p->comm->ranks ==
NULL) {
764 HECMW_assert(p->comm->psize == q1->comm->psize + q2->comm->psize);
765 for (n = 0, i = 0; i < q1->comm->psize; i++, n++) {
766 p->comm->ranks[n] = q1->comm->ranks[i];
768 for (i = 0; i < q2->comm->psize; i++, n++) {
769 p->comm->ranks[n] = q2->comm->ranks[i];
780 static int set_intercomm_ranks_maxmn(
void) {
781 struct intercomm_info *p;
782 struct intracomm_info *q1, *q2;
785 for (p = intercomm_root.next; p; p = p->next) {
786 q1 = get_intracomm_info(p->unit1_id);
787 if (q1 ==
NULL)
goto error;
788 q2 = get_intracomm_info(p->unit2_id);
789 if (q2 ==
NULL)
goto error;
791 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
792 if (p->comm->ranks ==
NULL) {
796 if (q1->comm->psize >= q2->comm->psize) {
798 for (i = 0; i < q1->comm->psize; i++) {
799 p->comm->ranks[i] = q1->comm->ranks[i];
803 for (i = 0; i < q2->comm->psize; i++) {
804 p->comm->ranks[i] = q2->comm->ranks[i];
816 static int set_intercomm_ranks_manual(
void) {
817 struct intercomm_info *p;
818 struct intracomm_info *q1, *q2;
820 int global_psize, n, i;
830 for (p = intercomm_root.next; p; p = p->next) {
831 q1 = get_intracomm_info(p->unit1_id);
832 if (q1 ==
NULL)
goto error;
833 q2 = get_intracomm_info(p->unit2_id);
834 if (q2 ==
NULL)
goto error;
836 p->comm->ranks = (
int *)
HECMW_calloc(p->comm->psize,
sizeof(
int));
837 if (p->comm->ranks ==
NULL) {
842 for (i = 0; i < global_psize; i++) {
845 for (i = 0; i < q1->comm->psize; i++) {
848 for (i = 0; i < q2->comm->psize; i++) {
851 for (n = 0, i = 0; i < global_psize; i++) {
854 p->comm->ranks[n] = i;
869 static int set_intercomm_ranks(
int couple_type) {
893 for (i = 0; i < comm->
psize; i++) {
894 if (comm->
ranks[i] == global_rank) {
903 static int allgather_root(
int *root) {
904 int *send_buf =
NULL, *recv_buf =
NULL;
911 if (send_buf ==
NULL) {
916 if (recv_buf ==
NULL) {
928 if (recv_buf[i] >= 0) {
945 if (comm->
rank == 0) {
982 struct intracomm_info *p;
983 struct intercomm_info *q;
992 if (set_couple_type(&couple_type) !=
HECMW_SUCCESS)
goto error;
993 if (check_intracomm_psize(couple_type) !=
HECMW_SUCCESS)
goto error;
997 if (set_intracomm_ranks(couple_type) !=
HECMW_SUCCESS)
goto error;
999 for (p = intracomm_root.next; p; p = p->next) {
1004 if (set_intercomm_psize(couple_type) !=
HECMW_SUCCESS)
goto error;
1005 if (set_intercomm_ranks(couple_type) !=
HECMW_SUCCESS)
goto error;
1007 for (q = intercomm_root.next; q; q = q->next) {
1021 int unit_specifier,
char *buf,
1023 struct couple_info *couple;
1025 char *unit_id, *ret_buf;
1027 if (boundary_id ==
NULL) {
1029 "Invalid NULL pointer is found (boundary_id)");
1033 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return NULL;
1036 unit_id = couple->unit1_id;
1038 unit_id = couple->unit2_id;
1046 if (ret_buf ==
NULL) {
1051 snprintf(buf, bufsize,
"%s", unit_id);
1059 struct couple_info *couple;
1060 struct intercomm_info *intercomm;
1062 if (boundary_id ==
NULL) {
1064 "Invalid NULL pointer is found (boundary_id)");
1068 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1069 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1071 if (intercomm->comm->is_member)
return 1;
1076 int unit_specifier) {
1077 struct couple_info *couple;
1078 struct intracomm_info *intracomm;
1080 if (boundary_id ==
NULL) {
1082 "Invalid NULL pointer is found (boundary_id)");
1086 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1089 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1091 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1097 if (intracomm->comm->is_member)
return 1;
1102 struct intracomm_info *intracomm;
1104 if (unit_id ==
NULL) {
1106 "Invalid NULL pointer is found (unit_id)");
1110 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1112 if (intracomm->comm->is_member)
return 1;
1117 struct couple_info *couple;
1118 struct intercomm_info *intercomm;
1120 if (boundary_id ==
NULL) {
1122 "Invalid NULL pointer is found (boundary_id)");
1126 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1127 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1129 if (intercomm->comm->is_root)
return 1;
1134 int unit_specifier) {
1135 struct couple_info *couple;
1136 struct intracomm_info *intracomm;
1138 if (boundary_id ==
NULL) {
1140 "Invalid NULL pointer is found (boundary_id)");
1144 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1147 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1149 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1155 if (intracomm->comm->is_root)
return 1;
1160 struct intracomm_info *intracomm;
1162 if (unit_id ==
NULL) {
1164 "Invalid NULL pointer is found (unit_id)");
1168 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1170 if (intracomm->comm->is_root)
return 1;
1175 struct couple_info *couple;
1176 struct intercomm_info *intercomm;
1178 if (boundary_id ==
NULL) {
1180 "Invalid NULL pointer is found (boundary_id)");
1184 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1185 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1187 return intercomm->comm->psize;
1191 int unit_specifier) {
1192 struct couple_info *couple;
1193 struct intracomm_info *intracomm;
1195 if (boundary_id ==
NULL) {
1197 "Invalid NULL pointer is found (boundary_id)");
1201 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1204 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1206 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1212 return intracomm->comm->psize;
1216 struct intracomm_info *intracomm;
1218 if (unit_id ==
NULL) {
1220 "Invalid NULL pointer is found (unit_id)");
1224 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1226 return intracomm->comm->psize;
1230 struct couple_info *couple;
1231 struct intercomm_info *intercomm;
1233 if (boundary_id ==
NULL) {
1235 "Invalid NULL pointer is found (boundary_id)");
1239 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1240 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1242 return intercomm->comm->rank;
1246 int unit_specifier) {
1247 struct couple_info *couple;
1248 struct intracomm_info *intracomm;
1250 if (boundary_id ==
NULL) {
1252 "Invalid NULL pointer is found (boundary_id)");
1256 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1259 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1261 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1267 return intracomm->comm->rank;
1271 struct intracomm_info *intracomm;
1273 if (unit_id ==
NULL) {
1275 "Invalid NULL pointer is found (unit_id)");
1279 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1281 return intracomm->comm->rank;
1285 struct couple_info *couple;
1286 struct intercomm_info *intercomm;
1288 if (boundary_id ==
NULL) {
1290 "Invalid NULL pointer is found (boundary_id)");
1294 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1295 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1297 return intercomm->comm->comm;
1301 int unit_specifier) {
1302 struct couple_info *couple;
1303 struct intracomm_info *intracomm;
1305 if (boundary_id ==
NULL) {
1307 "Invalid NULL pointer is found (boundary_id)");
1311 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1314 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1316 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1322 return intracomm->comm->comm;
1326 struct intracomm_info *intracomm;
1328 if (unit_id ==
NULL) {
1330 "Invalid NULL pointer is found (unit_id)");
1334 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1336 return intracomm->comm->comm;
1340 struct couple_info *couple;
1341 struct intercomm_info *intercomm;
1343 if (boundary_id ==
NULL) {
1345 "Invalid NULL pointer is found (boundary_id)");
1349 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1350 if ((intercomm = get_intercomm_info(couple->couple_id)) ==
NULL)
return -1;
1352 return intercomm->comm->group;
1356 int unit_specifier) {
1357 struct couple_info *couple;
1358 struct intracomm_info *intracomm;
1360 if (boundary_id ==
NULL) {
1362 "Invalid NULL pointer is found (boundary_id)");
1366 if ((couple = get_couple_info(boundary_id)) ==
NULL)
return -1;
1369 if ((intracomm = get_intracomm_info(couple->unit1_id)) ==
NULL)
return -1;
1371 if ((intracomm = get_intracomm_info(couple->unit2_id)) ==
NULL)
return -1;
1377 return intracomm->comm->group;
1381 struct intracomm_info *intracomm;
1383 if (unit_id ==
NULL) {
1385 "Invalid NULL pointer is found (unit_id)");
1389 if ((intracomm = get_intracomm_info(unit_id)) ==
NULL)
return -1;
1391 return intracomm->comm->group;
1395 const char *boundary_id,
int unit_specifier) {
1396 struct couple_info *couple =
NULL;
1397 struct intracomm_info *intracomm =
NULL;
1402 if (boundary_id ==
NULL) {
1404 "Invalid NULL pointer is found (boundary_id)");
1408 couple = get_couple_info(boundary_id);
1412 unit_id = couple->unit1_id;
1414 unit_id = couple->unit2_id;
1420 intracomm = get_intracomm_info(unit_id);
1421 if (intracomm ==
NULL)
return NULL;
1423 comm = alloc_struct_comm();
1426 comm->psize = intracomm->comm->psize;
1427 comm->rank = intracomm->comm->rank;
1434 for (i = 0; i <
comm->psize; i++) {
1435 comm->ranks[i] = intracomm->comm->ranks[i];
1437 comm->comm = intracomm->comm->comm;
1438 comm->group = intracomm->comm->group;
1439 comm->root = intracomm->comm->root;
1440 comm->is_member = intracomm->comm->is_member;
1441 comm->is_root = intracomm->comm->is_root;
1447 const char *unit_id) {
1448 struct intracomm_info *intracomm =
NULL;
1452 if (unit_id ==
NULL) {
1454 "Invalid NULL pointer is found (boundary_id)");
1458 intracomm = get_intracomm_info(unit_id);
1459 if (intracomm ==
NULL)
return NULL;
1461 comm = alloc_struct_comm();
1464 comm->psize = intracomm->comm->psize;
1465 comm->rank = intracomm->comm->rank;
1472 for (i = 0; i <
comm->psize; i++) {
1473 comm->ranks[i] = intracomm->comm->ranks[i];
1475 comm->comm = intracomm->comm->comm;
1476 comm->group = intracomm->comm->group;
1477 comm->root = intracomm->comm->root;
1478 comm->is_member = intracomm->comm->is_member;
1479 comm->is_root = intracomm->comm->is_root;
1485 const char *boundary_id) {
1486 struct couple_info *couple;
1487 struct intercomm_info *intercomm;
1491 if (boundary_id ==
NULL) {
1493 "Invalid NULL pointer is found (boundary_id)");
1497 couple = get_couple_info(boundary_id);
1500 intercomm = get_intercomm_info(couple->couple_id);
1501 if (intercomm ==
NULL)
return NULL;
1503 comm = alloc_struct_comm();
1506 comm->psize = intercomm->comm->psize;
1507 comm->rank = intercomm->comm->rank;
1514 for (i = 0; i <
comm->psize; i++) {
1515 comm->ranks[i] = intercomm->comm->ranks[i];
1517 comm->comm = intercomm->comm->comm;
1518 comm->group = intercomm->comm->group;
1519 comm->root = intercomm->comm->root;
1520 comm->is_member = intercomm->comm->is_member;
1521 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)