2 /* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
4 /* type-no-error-exhaustive-with-isends.c -- send with weird types */
8 "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/type-no-error-exhaustive-with-isends.c,v 1.4 2002/10/24 17:04:56 bronis Exp $";
17 typedef struct _test_basic_struct_t
25 typedef struct _test_lb_ub_struct_t
27 double dontsend_double1;
28 double the_double_to_send;
29 char the_chars[8]; /* only send the first one... */
30 double dontsend_double2;
35 #define TYPE_CONSTRUCTOR_COUNT 7
40 #define RUN_TYPE_STRUCT
41 #define RUN_TYPE_VECTOR
42 #define RUN_TYPE_HVECTOR
43 #define RUN_TYPE_INDEXED
44 #define RUN_TYPE_HINDEXED
45 #define RUN_TYPE_CONTIGUOUS
48 #define RUN_TYPE_STRUCT_LB_UB
53 main (int argc, char **argv)
57 int comm = MPI_COMM_WORLD;
58 char processor_name[128];
60 int i, j, k, basic_extent;
61 int blocklens[4], displs[4];
62 MPI_Datatype structtypes[4];
63 MPI_Datatype newtype[TYPE_CONSTRUCTOR_COUNT];
64 MPI_Request aReq[TYPE_CONSTRUCTOR_COUNT];
65 MPI_Status aStatus[TYPE_CONSTRUCTOR_COUNT];
66 #ifdef RUN_TYPE_STRUCT
67 test_basic_struct_t struct_buf[MSG_COUNT];
69 #ifdef RUN_TYPE_VECTOR
70 test_basic_struct_t vector_buf[7*MSG_COUNT];
72 #ifdef RUN_TYPE_HVECTOR
73 test_basic_struct_t hvector_buf[44*MSG_COUNT];
75 #ifdef RUN_TYPE_INDEXED
76 test_basic_struct_t indexed_buf[132*MSG_COUNT];
78 #ifdef RUN_TYPE_HINDEXED
79 test_basic_struct_t hindexed_buf[272*MSG_COUNT];
81 #ifdef RUN_TYPE_CONTIGUOUS
82 test_basic_struct_t contig_buf[2720*MSG_COUNT];
84 #ifdef RUN_TYPE_STRUCT_LB_UB
85 test_lb_ub_struct_t struct_lb_ub_send_buf[MSG_COUNT];
86 test_basic_struct_t struct_lb_ub_recv_buf[MSG_COUNT];
90 MPI_Init (&argc, &argv);
91 MPI_Comm_size (comm, &nprocs);
92 MPI_Comm_rank (comm, &rank);
93 MPI_Get_processor_name (processor_name, &namelen);
94 printf ("(%d) is alive on %s\n", rank, processor_name);
97 structtypes[0] = MPI_DOUBLE;
98 structtypes[1] = MPI_CHAR;
99 blocklens[0] = blocklens[1] = 1;
101 displs[1] = sizeof(double);
105 /* create the types */
106 MPI_Type_struct (2, blocklens, displs, structtypes, &newtype[0]);
108 MPI_Type_extent (newtype[0], &basic_extent);
109 if (basic_extent != sizeof (test_basic_struct_t)) {
110 fprintf (stderr, "(%d): Unexpected extent for struct\n");
111 MPI_Abort (MPI_COMM_WORLD, 666);
114 MPI_Type_vector (2, 3, 4, newtype[0], &newtype[1]);
115 MPI_Type_hvector (3, 2, 15 * sizeof (test_basic_struct_t),
116 newtype[1], &newtype[2]);
118 MPI_Type_indexed (2, blocklens, displs, newtype[2], &newtype[3]);
119 displs[1] = 140 * sizeof (test_basic_struct_t);
120 MPI_Type_hindexed (2, blocklens, displs, newtype[3], &newtype[4]);
121 MPI_Type_contiguous (10, newtype[4], &newtype[5]);
123 structtypes[0] = MPI_LB;
124 structtypes[1] = MPI_DOUBLE;
125 structtypes[2] = MPI_CHAR;
126 structtypes[3] = MPI_UB;
127 blocklens[0] = blocklens[1] = blocklens[2] = blocklens[3] = 1;
128 displs[0] = -sizeof(double);
130 displs[2] = sizeof(double);
131 displs[3] = 2*sizeof(double)+8*sizeof(char);
133 MPI_Type_struct (4, blocklens, displs, structtypes, &newtype[6]);
135 #ifdef RUN_TYPE_STRUCT
136 MPI_Type_commit (&newtype[0]);
139 #ifdef RUN_TYPE_VECTOR
140 MPI_Type_commit (&newtype[1]);
143 #ifdef RUN_TYPE_HVECTOR
144 MPI_Type_commit (&newtype[2]);
147 #ifdef RUN_TYPE_INDEXED
148 MPI_Type_commit (&newtype[3]);
151 #ifdef RUN_TYPE_HINDEXED
152 MPI_Type_commit (&newtype[4]);
155 #ifdef RUN_TYPE_CONTIGUOUS
156 MPI_Type_commit (&newtype[5]);
159 #ifdef RUN_TYPE_STRUCT_LB_UB
160 #ifndef RUN_TYPE_STRUCT
161 /* need the struct type for the receive... */
162 MPI_Type_commit (&newtype[0]);
164 MPI_Type_commit (&newtype[6]);
168 /* initialize buffers */
169 for (i = 0; i < MSG_COUNT; i++) {
170 #ifdef RUN_TYPE_STRUCT
171 struct_buf[i].the_double = 1.0;
172 struct_buf[i].the_char = 'a';
175 #ifdef RUN_TYPE_VECTOR
176 for (j = 0; j < 7; j++) {
177 vector_buf[i*7 + j].the_double = 1.0;
178 vector_buf[i*7 + j].the_char = 'a';
182 #ifdef RUN_TYPE_HVECTOR
183 for (j = 0; j < 44; j++) {
184 hvector_buf[i*44 + j].the_double = 1.0;
185 hvector_buf[i*44 + j].the_char = 'a';
189 #ifdef RUN_TYPE_INDEXED
190 for (j = 0; j < 132; j++) {
191 indexed_buf[i*132 + j].the_double = 1.0;
192 indexed_buf[i*132 + j].the_char = 'a';
196 #ifdef RUN_TYPE_HINDEXED
197 for (j = 0; j < 272; j++) {
198 hindexed_buf[i*272 + j].the_double = 1.0;
199 hindexed_buf[i*272 + j].the_char = 'a';
203 #ifdef RUN_TYPE_CONTIGUOUS
204 for (j = 0; j < 2720; j++) {
205 contig_buf[i*2720 + j].the_double = 1.0;
206 contig_buf[i*2720 + j].the_char = 'a';
210 #ifdef RUN_TYPE_STRUCT_LB_UB
211 struct_lb_ub_send_buf[i].dontsend_double1 = 1.0;
212 struct_lb_ub_send_buf[i].the_double_to_send = 1.0;
213 for (j = 0; j < 8; j++)
214 struct_lb_ub_send_buf[i].the_chars[j] = 'a';
215 struct_lb_ub_send_buf[i].dontsend_double2 = 1.0;
219 /* set up the sends */
220 #ifdef RUN_TYPE_STRUCT
221 MPI_Isend (struct_buf, MSG_COUNT, newtype[0], 1, 0, comm, &aReq[0]);
223 aReq[0] = MPI_REQUEST_NULL;
226 #ifdef RUN_TYPE_VECTOR
227 MPI_Isend (vector_buf, MSG_COUNT, newtype[1], 1, 1, comm, &aReq[1]);
229 aReq[1] = MPI_REQUEST_NULL;
232 #ifdef RUN_TYPE_HVECTOR
233 MPI_Isend (hvector_buf, MSG_COUNT, newtype[2], 1, 2, comm, &aReq[2]);
235 aReq[2] = MPI_REQUEST_NULL;
238 #ifdef RUN_TYPE_INDEXED
239 MPI_Isend (indexed_buf, MSG_COUNT, newtype[3], 1, 3, comm, &aReq[3]);
241 aReq[3] = MPI_REQUEST_NULL;
244 #ifdef RUN_TYPE_HINDEXED
245 MPI_Isend (hindexed_buf, MSG_COUNT, newtype[4], 1, 4, comm, &aReq[4]);
247 aReq[4] = MPI_REQUEST_NULL;
250 #ifdef RUN_TYPE_CONTIGUOUS
251 MPI_Isend (contig_buf, MSG_COUNT, newtype[5], 1, 5, comm, &aReq[5]);
253 aReq[5] = MPI_REQUEST_NULL;
256 #ifdef RUN_TYPE_STRUCT_LB_UB
257 MPI_Isend (&(struct_lb_ub_send_buf[0].the_double_to_send),
258 MSG_COUNT, newtype[6], 1, 6, comm, &aReq[6]);
260 aReq[6] = MPI_REQUEST_NULL;
263 else if (rank == 1) {
264 /* initialize buffers */
265 for (i = 0; i < MSG_COUNT; i++) {
266 #ifdef RUN_TYPE_STRUCT
267 struct_buf[i].the_double = 2.0;
268 struct_buf[i].the_char = 'b';
271 #ifdef RUN_TYPE_VECTOR
272 for (j = 0; j < 7; j++) {
273 vector_buf[i*7 + j].the_double = 2.0;
274 vector_buf[i*7 + j].the_char = 'b';
278 #ifdef RUN_TYPE_HVECTOR
279 for (j = 0; j < 44; j++) {
280 hvector_buf[i*44 + j].the_double = 2.0;
281 hvector_buf[i*44 + j].the_char = 'b';
285 #ifdef RUN_TYPE_INDEXED
286 for (j = 0; j < 132; j++) {
287 indexed_buf[i*132 + j].the_double = 2.0;
288 indexed_buf[i*132 + j].the_char = 'b';
292 #ifdef RUN_TYPE_HINDEXED
293 for (j = 0; j < 272; j++) {
294 hindexed_buf[i*272 + j].the_double = 2.0;
295 hindexed_buf[i*272 + j].the_char = 'b';
299 #ifdef RUN_TYPE_CONTIGUOUS
300 for (j = 0; j < 2720; j++) {
301 contig_buf[i*2720 + j].the_double = 2.0;
302 contig_buf[i*2720 + j].the_char = 'b';
306 #ifdef RUN_TYPE_STRUCT_LB_UB
307 struct_lb_ub_recv_buf[i].the_double = 2.0;
308 struct_lb_ub_recv_buf[i].the_char = 'b';
312 /* set up the receives... */
313 #ifdef RUN_TYPE_STRUCT
314 MPI_Irecv (struct_buf, MSG_COUNT, newtype[0], 0, 0, comm, &aReq[0]);
316 aReq[0] = MPI_REQUEST_NULL;
319 #ifdef RUN_TYPE_VECTOR
320 MPI_Irecv (vector_buf, MSG_COUNT, newtype[1], 0, 1, comm, &aReq[1]);
322 aReq[1] = MPI_REQUEST_NULL;
325 #ifdef RUN_TYPE_HVECTOR
326 MPI_Irecv (hvector_buf, MSG_COUNT, newtype[2], 0, 2, comm, &aReq[2]);
328 aReq[2] = MPI_REQUEST_NULL;
331 #ifdef RUN_TYPE_INDEXED
332 MPI_Irecv (indexed_buf, MSG_COUNT, newtype[3], 0, 3, comm, &aReq[3]);
334 aReq[3] = MPI_REQUEST_NULL;
337 #ifdef RUN_TYPE_HINDEXED
338 MPI_Irecv (hindexed_buf, MSG_COUNT, newtype[4], 0, 4, comm, &aReq[4]);
340 aReq[4] = MPI_REQUEST_NULL;
343 #ifdef RUN_TYPE_CONTIGUOUS
344 MPI_Irecv (contig_buf, MSG_COUNT, newtype[5], 0, 5, comm, &aReq[5]);
346 aReq[5] = MPI_REQUEST_NULL;
349 #ifdef RUN_TYPE_STRUCT_LB_UB
350 MPI_Irecv (struct_lb_ub_recv_buf,
351 MSG_COUNT, newtype[0], 0, 6, comm, &aReq[6]);
353 aReq[6] = MPI_REQUEST_NULL;
358 /* muck the holes... */
359 for (i = 0; i < MSG_COUNT; i++) {
360 #ifdef RUN_TYPE_STRUCT
361 /* no holes in struct_buf... */
364 #ifdef RUN_TYPE_VECTOR
365 /* one hole in vector_buf... */
366 vector_buf[i*7 + 3].the_double = 3.0;
367 vector_buf[i*7 + 3].the_char = 'c';
370 #ifdef RUN_TYPE_HVECTOR
371 /* eight holes in hvector_buf... */
372 /* hole in first vector, first block... */
373 hvector_buf[i*44 + 3].the_double = 3.0;
374 hvector_buf[i*44 + 3].the_char = 'c';
375 /* hole in second vector, first block... */
376 hvector_buf[i*44 + 10].the_double = 3.0;
377 hvector_buf[i*44 + 10].the_char = 'c';
378 /* hole in between first and second vector blocks... */
379 hvector_buf[i*44 + 14].the_double = 3.0;
380 hvector_buf[i*44 + 14].the_char = 'c';
381 /* hole in first vector, second block... */
382 hvector_buf[i*44 + 18].the_double = 3.0;
383 hvector_buf[i*44 + 18].the_char = 'c';
384 /* hole in second vector, second block... */
385 hvector_buf[i*44 + 25].the_double = 3.0;
386 hvector_buf[i*44 + 25].the_char = 'c';
387 /* hole in between second and third vector blocks... */
388 hvector_buf[i*44 + 29].the_double = 3.0;
389 hvector_buf[i*44 + 29].the_char = 'c';
390 /* hole in first vector, third block... */
391 hvector_buf[i*44 + 33].the_double = 3.0;
392 hvector_buf[i*44 + 33].the_char = 'c';
393 /* hole in second vector, third block... */
394 hvector_buf[i*44 + 40].the_double = 3.0;
395 hvector_buf[i*44 + 40].the_char = 'c';
398 #ifdef RUN_TYPE_INDEXED
399 /* sixty holes in indexed_buf... */
400 /* hole in first vector, first block, first hvector... */
401 indexed_buf[i*132 + 3].the_double = 3.0;
402 indexed_buf[i*132 + 3].the_char = 'c';
403 /* hole in second vector, first block, first hvector... */
404 indexed_buf[i*132 + 10].the_double = 3.0;
405 indexed_buf[i*132 + 10].the_char = 'c';
406 /* hole in between first and second vector blocks, first hvector... */
407 indexed_buf[i*132 + 14].the_double = 3.0;
408 indexed_buf[i*132 + 14].the_char = 'c';
409 /* hole in first vector, second block, first hvector... */
410 indexed_buf[i*132 + 18].the_double = 3.0;
411 indexed_buf[i*132 + 18].the_char = 'c';
412 /* hole in second vector, second block, first hvector... */
413 indexed_buf[i*132 + 25].the_double = 3.0;
414 indexed_buf[i*132 + 25].the_char = 'c';
415 /* hole in between second and third vector blocks, first hvector... */
416 indexed_buf[i*132 + 29].the_double = 3.0;
417 indexed_buf[i*132 + 29].the_char = 'c';
418 /* hole in first vector, third block, first hvector... */
419 indexed_buf[i*132 + 33].the_double = 3.0;
420 indexed_buf[i*132 + 33].the_char = 'c';
421 /* hole in second vector, third block, first hvector... */
422 indexed_buf[i*132 + 40].the_double = 3.0;
423 indexed_buf[i*132 + 40].the_char = 'c';
424 /* hole in between hvectors... */
425 for (j = 0; j < 44; j++) {
426 indexed_buf[i*132 + 44 + j].the_double = 3.0;
427 indexed_buf[i*132 + 44 + j].the_char = 'c';
429 /* hole in first vector, first block, second hvector... */
430 indexed_buf[i*132 + 3 + 88].the_double = 3.0;
431 indexed_buf[i*132 + 3 + 88].the_char = 'c';
432 /* hole in second vector, first block, second hvector... */
433 indexed_buf[i*132 + 10 + 88].the_double = 3.0;
434 indexed_buf[i*132 + 10 + 88].the_char = 'c';
435 /* hole in between first and second vector blocks, second hvector... */
436 indexed_buf[i*132 + 14 + 88].the_double = 3.0;
437 indexed_buf[i*132 + 14 + 88].the_char = 'c';
438 /* hole in first vector, second block, second hvector... */
439 indexed_buf[i*132 + 18 + 88].the_double = 3.0;
440 indexed_buf[i*132 + 18 + 88].the_char = 'c';
441 /* hole in second vector, second block, second hvector... */
442 indexed_buf[i*132 + 25 + 88].the_double = 3.0;
443 indexed_buf[i*132 + 25 + 88].the_char = 'c';
444 /* hole in between second and third vector blocks, second hvector... */
445 indexed_buf[i*132 + 29 + 88].the_double = 3.0;
446 indexed_buf[i*132 + 29 + 88].the_char = 'c';
447 /* hole in first vector, third block, second hvector... */
448 indexed_buf[i*132 + 33 + 88].the_double = 3.0;
449 indexed_buf[i*132 + 33 + 88].the_char = 'c';
450 /* hole in second vector, third block, second hvector... */
451 indexed_buf[i*132 + 40 + 88].the_double = 3.0;
452 indexed_buf[i*132 + 40 + 88].the_char = 'c';
455 #ifdef RUN_TYPE_HINDEXED
456 /* one hundred twenty eight holes in hindexed_buf... */
457 /* hole in first vector, first block, first hvector, index 1... */
458 hindexed_buf[i*272 + 3].the_double = 3.0;
459 hindexed_buf[i*272 + 3].the_char = 'c';
460 /* hole in second vector, first block, first hvector, index 1... */
461 hindexed_buf[i*272 + 10].the_double = 3.0;
462 hindexed_buf[i*272 + 10].the_char = 'c';
463 /* hole between first & second vector blocks, hvector 1, index 1... */
464 hindexed_buf[i*272 + 14].the_double = 3.0;
465 hindexed_buf[i*272 + 14].the_char = 'c';
466 /* hole in first vector, second block, first hvector, index 1... */
467 hindexed_buf[i*272 + 18].the_double = 3.0;
468 hindexed_buf[i*272 + 18].the_char = 'c';
469 /* hole in second vector, second block, first hvector, index 1... */
470 hindexed_buf[i*272 + 25].the_double = 3.0;
471 hindexed_buf[i*272 + 25].the_char = 'c';
472 /* hole between second & third vector blocks, hvector 1, index 1... */
473 hindexed_buf[i*272 + 29].the_double = 3.0;
474 hindexed_buf[i*272 + 29].the_char = 'c';
475 /* hole in first vector, third block, first hvector, index 1... */
476 hindexed_buf[i*272 + 33].the_double = 3.0;
477 hindexed_buf[i*272 + 33].the_char = 'c';
478 /* hole in second vector, third block, first hvector, index 1... */
479 hindexed_buf[i*272 + 40].the_double = 3.0;
480 hindexed_buf[i*272 + 40].the_char = 'c';
481 /* hole in between hvectors, index 1... */
482 for (j = 0; j < 44; j++) {
483 hindexed_buf[i*272 + 44 + j].the_double = 3.0;
484 hindexed_buf[i*272 + 44 + j].the_char = 'c';
486 /* hole in first vector, first block, second hvector, index 1... */
487 hindexed_buf[i*272 + 3 + 88].the_double = 3.0;
488 hindexed_buf[i*272 + 3 + 88].the_char = 'c';
489 /* hole in second vector, first block, second hvector, index 1... */
490 hindexed_buf[i*272 + 10 + 88].the_double = 3.0;
491 hindexed_buf[i*272 + 10 + 88].the_char = 'c';
492 /* hole between first & second vector blocks, hvector 2, index 1... */
493 hindexed_buf[i*272 + 14 + 88].the_double = 3.0;
494 hindexed_buf[i*272 + 14 + 88].the_char = 'c';
495 /* hole in first vector, second block, second hvector, index 1... */
496 hindexed_buf[i*272 + 18 + 88].the_double = 3.0;
497 hindexed_buf[i*272 + 18 + 88].the_char = 'c';
498 /* hole in second vector, second block, second hvector, index 1... */
499 hindexed_buf[i*272 + 25 + 88].the_double = 3.0;
500 hindexed_buf[i*272 + 25 + 88].the_char = 'c';
501 /* hole between second & third vector blocks, hvector 2, index 1... */
502 hindexed_buf[i*272 + 29 + 88].the_double = 3.0;
503 hindexed_buf[i*272 + 29 + 88].the_char = 'c';
504 /* hole in first vector, third block, second hvector, index 1... */
505 hindexed_buf[i*272 + 33 + 88].the_double = 3.0;
506 hindexed_buf[i*272 + 33 + 88].the_char = 'c';
507 /* hole in second vector, third block, second hvector, index 1... */
508 hindexed_buf[i*272 + 40 + 88].the_double = 3.0;
509 hindexed_buf[i*272 + 40 + 88].the_char = 'c';
510 /* indexed hole... */
511 for (j = 0; j < 8; j++) {
512 hindexed_buf[i*272 + 132 + j].the_double = 3.0;
513 hindexed_buf[i*272 + 132 + j].the_char = 'c';
515 /* hole in first vector, first block, first hvector, index 2... */
516 hindexed_buf[i*272 + 3 + 140].the_double = 3.0;
517 hindexed_buf[i*272 + 3 + 140].the_char = 'c';
518 /* hole in second vector, first block, first hvector, index 2... */
519 hindexed_buf[i*272 + 10 + 140].the_double = 3.0;
520 hindexed_buf[i*272 + 10 + 140].the_char = 'c';
521 /* hole between first & second vector blocks, hvector 1, index 2... */
522 hindexed_buf[i*272 + 14 + 140].the_double = 3.0;
523 hindexed_buf[i*272 + 14 + 140].the_char = 'c';
524 /* hole in first vector, second block, first hvector, index 2... */
525 hindexed_buf[i*272 + 18 + 140].the_double = 3.0;
526 hindexed_buf[i*272 + 18 + 140].the_char = 'c';
527 /* hole in second vector, second block, first hvector, index 2... */
528 hindexed_buf[i*272 + 25 + 140].the_double = 3.0;
529 hindexed_buf[i*272 + 25 + 140].the_char = 'c';
530 /* hole between second & third vector blocks, hvector 1, index 2... */
531 hindexed_buf[i*272 + 29 + 140].the_double = 3.0;
532 hindexed_buf[i*272 + 29 + 140].the_char = 'c';
533 /* hole in first vector, third block, first hvector, index 2... */
534 hindexed_buf[i*272 + 33 + 140].the_double = 3.0;
535 hindexed_buf[i*272 + 33 + 140].the_char = 'c';
536 /* hole in second vector, third block, first hvector, index 2... */
537 hindexed_buf[i*272 + 40 + 140].the_double = 3.0;
538 hindexed_buf[i*272 + 40 + 140].the_char = 'c';
539 /* hole in between hvectors, index 2... */
540 for (j = 0; j < 44; j++) {
541 hindexed_buf[i*272 + 44 + j + 140].the_double = 3.0;
542 hindexed_buf[i*272 + 44 + j + 140].the_char = 'c';
544 /* hole in first vector, first block, second hvector, index 2... */
545 hindexed_buf[i*272 + 3 + 88 + 140].the_double = 3.0;
546 hindexed_buf[i*272 + 3 + 88 + 140].the_char = 'c';
547 /* hole in second vector, first block, second hvector, index 2... */
548 hindexed_buf[i*272 + 10 + 88 + 140].the_double = 3.0;
549 hindexed_buf[i*272 + 10 + 88 + 140].the_char = 'c';
550 /* hole between first & second vector blocks, hvector 2, index 2... */
551 hindexed_buf[i*272 + 14 + 88 + 140].the_double = 3.0;
552 hindexed_buf[i*272 + 14 + 88 + 140].the_char = 'c';
553 /* hole in first vector, second block, second hvector, index 2... */
554 hindexed_buf[i*272 + 18 + 88 + 140].the_double = 3.0;
555 hindexed_buf[i*272 + 18 + 88 + 140].the_char = 'c';
556 /* hole in second vector, second block, second hvector, index 2... */
557 hindexed_buf[i*272 + 25 + 88 + 140].the_double = 3.0;
558 hindexed_buf[i*272 + 25 + 88 + 140].the_char = 'c';
559 /* hole between second & third vector blocks, hvector 2, index 2... */
560 hindexed_buf[i*272 + 29 + 88 + 140].the_double = 3.0;
561 hindexed_buf[i*272 + 29 + 88 + 140].the_char = 'c';
562 /* hole in first vector, third block, second hvector, index 2... */
563 hindexed_buf[i*272 + 33 + 88 + 140].the_double = 3.0;
564 hindexed_buf[i*272 + 33 + 88 + 140].the_char = 'c';
565 /* hole in second vector, third block, second hvector, index 2... */
566 hindexed_buf[i*272 + 40 + 88 + 140].the_double = 3.0;
567 hindexed_buf[i*272 + 40 + 88 + 140].the_char = 'c';
570 #ifdef RUN_TYPE_CONTIGUOUS
571 for (j = 0; j < 10; j++) {
572 /* hole in first vector, first block, first hvector, index 1... */
573 contig_buf[i*2720 + j*272 + 3].the_double = 3.0;
574 contig_buf[i*2720 + j*272 + 3].the_char = 'c';
575 /* hole in second vector, first block, first hvector, index 1... */
576 contig_buf[i*2720 + j*272 + 10].the_double = 3.0;
577 contig_buf[i*2720 + j*272 + 10].the_char = 'c';
578 /* hole between first & second vector blocks, hvector 1, index 1... */
579 contig_buf[i*2720 + j*272 + 14].the_double = 3.0;
580 contig_buf[i*2720 + j*272 + 14].the_char = 'c';
581 /* hole in first vector, second block, first hvector, index 1... */
582 contig_buf[i*2720 + j*272 + 18].the_double = 3.0;
583 contig_buf[i*2720 + j*272 + 18].the_char = 'c';
584 /* hole in second vector, second block, first hvector, index 1... */
585 contig_buf[i*2720 + j*272 + 25].the_double = 3.0;
586 contig_buf[i*2720 + j*272 + 25].the_char = 'c';
587 /* hole between second & third vector blocks, hvector 1, index 1... */
588 contig_buf[i*2720 + j*272 + 29].the_double = 3.0;
589 contig_buf[i*2720 + j*272 + 29].the_char = 'c';
590 /* hole in first vector, third block, first hvector, index 1... */
591 contig_buf[i*2720 + j*272 + 33].the_double = 3.0;
592 contig_buf[i*2720 + j*272 + 33].the_char = 'c';
593 /* hole in second vector, third block, first hvector, index 1... */
594 contig_buf[i*2720 + j*272 + 40].the_double = 3.0;
595 contig_buf[i*2720 + j*272 + 40].the_char = 'c';
596 /* hole in between hvectors, index 1... */
597 for (k = 0; k < 44; k++) {
598 contig_buf[i*2720 + j*272 + 44 + k].the_double = 3.0;
599 contig_buf[i*2720 + j*272 + 44 + k].the_char = 'c';
601 /* hole in first vector, first block, second hvector, index 1... */
602 contig_buf[i*2720 + j*272 + 3 + 88].the_double = 3.0;
603 contig_buf[i*2720 + j*272 + 3 + 88].the_char = 'c';
604 /* hole in second vector, first block, second hvector, index 1... */
605 contig_buf[i*2720 + j*272 + 10 + 88].the_double = 3.0;
606 contig_buf[i*2720 + j*272 + 10 + 88].the_char = 'c';
607 /* hole between first & second vector blocks, hvector 2, index 1... */
608 contig_buf[i*2720 + j*272 + 14 + 88].the_double = 3.0;
609 contig_buf[i*2720 + j*272 + 14 + 88].the_char = 'c';
610 /* hole in first vector, second block, second hvector, index 1... */
611 contig_buf[i*2720 + j*272 + 18 + 88].the_double = 3.0;
612 contig_buf[i*2720 + j*272 + 18 + 88].the_char = 'c';
613 /* hole in second vector, second block, second hvector, index 1... */
614 contig_buf[i*2720 + j*272 + 25 + 88].the_double = 3.0;
615 contig_buf[i*2720 + j*272 + 25 + 88].the_char = 'c';
616 /* hole between second & third vector blocks, hvector 2, index 1... */
617 contig_buf[i*2720 + j*272 + 29 + 88].the_double = 3.0;
618 contig_buf[i*2720 + j*272 + 29 + 88].the_char = 'c';
619 /* hole in first vector, third block, second hvector, index 1... */
620 contig_buf[i*2720 + j*272 + 33 + 88].the_double = 3.0;
621 contig_buf[i*2720 + j*272 + 33 + 88].the_char = 'c';
622 /* hole in second vector, third block, second hvector, index 1... */
623 contig_buf[i*2720 + j*272 + 40 + 88].the_double = 3.0;
624 contig_buf[i*2720 + j*272 + 40 + 88].the_char = 'c';
625 /* indexed hole... */
626 for (k = 0; k < 8; k++) {
627 contig_buf[i*2720 + j*272 + 132 + k].the_double = 3.0;
628 contig_buf[i*2720 + j*272 + 132 + k].the_char = 'c';
630 /* hole in first vector, first block, first hvector, index 2... */
631 contig_buf[i*2720 + j*272 + 3 + 140].the_double = 3.0;
632 contig_buf[i*2720 + j*272 + 3 + 140].the_char = 'c';
633 /* hole in second vector, first block, first hvector, index 2... */
634 contig_buf[i*2720 + j*272 + 10 + 140].the_double = 3.0;
635 contig_buf[i*2720 + j*272 + 10 + 140].the_char = 'c';
636 /* hole between first & second vector blocks, hvector 1, index 2... */
637 contig_buf[i*2720 + j*272 + 14 + 140].the_double = 3.0;
638 contig_buf[i*2720 + j*272 + 14 + 140].the_char = 'c';
639 /* hole in first vector, second block, first hvector, index 2... */
640 contig_buf[i*2720 + j*272 + 18 + 140].the_double = 3.0;
641 contig_buf[i*2720 + j*272 + 18 + 140].the_char = 'c';
642 /* hole in second vector, second block, first hvector, index 2... */
643 contig_buf[i*2720 + j*272 + 25 + 140].the_double = 3.0;
644 contig_buf[i*2720 + j*272 + 25 + 140].the_char = 'c';
645 /* hole between second & third vector blocks, hvector 1, index 2... */
646 contig_buf[i*2720 + j*272 + 29 + 140].the_double = 3.0;
647 contig_buf[i*2720 + j*272 + 29 + 140].the_char = 'c';
648 /* hole in first vector, third block, first hvector, index 2... */
649 contig_buf[i*2720 + j*272 + 33 + 140].the_double = 3.0;
650 contig_buf[i*2720 + j*272 + 33 + 140].the_char = 'c';
651 /* hole in second vector, third block, first hvector, index 2... */
652 contig_buf[i*2720 + j*272 + 40 + 140].the_double = 3.0;
653 contig_buf[i*2720 + j*272 + 40 + 140].the_char = 'c';
654 /* hole in between hvectors, index 2... */
655 for (k = 0; k < 44; k++) {
656 contig_buf[i*2720 + j*272 + 44 + k + 140].the_double = 3.0;
657 contig_buf[i*2720 + j*272 + 44 + k + 140].the_char = 'c';
659 /* hole in first vector, first block, second hvector, index 2... */
660 contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_double = 3.0;
661 contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_char = 'c';
662 /* hole in second vector, first block, second hvector, index 2... */
663 contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_double = 3.0;
664 contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_char = 'c';
665 /* hole between first & second vector blocks, hvector 2, index 2... */
666 contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_double = 3.0;
667 contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_char = 'c';
668 /* hole in first vector, second block, second hvector, index 2... */
669 contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_double = 3.0;
670 contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_char = 'c';
671 /* hole in second vector, second block, second hvector, index 2... */
672 contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_double = 3.0;
673 contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_char = 'c';
674 /* hole between second & third vector blocks, hvector 2, index 2... */
675 contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_double = 3.0;
676 contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_char = 'c';
677 /* hole in first vector, third block, second hvector, index 2... */
678 contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_double = 3.0;
679 contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_char = 'c';
680 /* hole in second vector, third block, second hvector, index 2... */
681 contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_double = 3.0;
682 contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_char = 'c';
686 #ifdef RUN_TYPE_STRUCT_LB_UB
687 /* muck the double member and char member being sent... */
688 struct_lb_ub_send_buf[i].dontsend_double1 = 3.0;
689 for (j = 1; j < 8; j++)
690 struct_lb_ub_send_buf[i].the_chars[j] = 'c';
691 struct_lb_ub_send_buf[i].dontsend_double2 = 3.0;
696 if ((rank == 0) || (rank == 1)) {
697 /* wait on everything... */
698 MPI_Waitall (TYPE_CONSTRUCTOR_COUNT, aReq, aStatus);
702 /* check the holes... */
703 for (i = 0; i < MSG_COUNT; i++) {
704 #ifdef RUN_TYPE_STRUCT
705 /* no holes in struct_buf... */
708 #ifdef RUN_TYPE_VECTOR
709 /* one hole in vector_buf... */
710 assert ((vector_buf[i*7 + 3].the_double == 2.0) &&
711 (vector_buf[i*7 + 3].the_char == 'b'));
714 #ifdef RUN_TYPE_HVECTOR
715 /* eight holes in hvector_buf... */
716 /* hole in first vector, first block... */
717 assert ((hvector_buf[i*44 + 3].the_double == 2.0) &&
718 (hvector_buf[i*44 + 3].the_char == 'b'));
719 /* hole in second vector, first block... */
720 assert ((hvector_buf[i*44 + 10].the_double == 2.0) &&
721 (hvector_buf[i*44 + 10].the_char == 'b'));
722 /* hole in between first and second vector blocks... */
723 assert ((hvector_buf[i*44 + 14].the_double == 2.0) &&
724 (hvector_buf[i*44 + 14].the_char == 'b'));
725 /* hole in first vector, second block... */
726 assert ((hvector_buf[i*44 + 18].the_double == 2.0) &&
727 (hvector_buf[i*44 + 18].the_char == 'b'));
728 /* hole in second vector, second block... */
729 assert ((hvector_buf[i*44 + 25].the_double == 2.0) &&
730 (hvector_buf[i*44 + 25].the_char == 'b'));
731 /* hole in between second and third vector blocks... */
732 assert ((hvector_buf[i*44 + 29].the_double == 2.0) &&
733 (hvector_buf[i*44 + 29].the_char == 'b'));
734 /* hole in first vector, third block... */
735 assert ((hvector_buf[i*44 + 33].the_double == 2.0) &&
736 (hvector_buf[i*44 + 33].the_char == 'b'));
737 /* hole in second vector, third block... */
738 assert ((hvector_buf[i*44 + 40].the_double == 2.0) &&
739 (hvector_buf[i*44 + 40].the_char == 'b'));
742 #ifdef RUN_TYPE_INDEXED
743 /* sixty holes in indexed_buf... */
744 /* hole in first vector, first block, first hvector... */
745 assert ((indexed_buf[i*132 + 3].the_double == 2.0) &&
746 (indexed_buf[i*132 + 3].the_char == 'b'));
747 /* hole in second vector, first block, first hvector... */
748 assert ((indexed_buf[i*132 + 10].the_double == 2.0) &&
749 (indexed_buf[i*132 + 10].the_char == 'b'));
750 /* hole in between first and second vector blocks, first hvector... */
751 assert ((indexed_buf[i*132 + 14].the_double == 2.0) &&
752 (indexed_buf[i*132 + 14].the_char == 'b'));
753 /* hole in first vector, second block, first hvector... */
754 assert ((indexed_buf[i*132 + 18].the_double == 2.0) &&
755 (indexed_buf[i*132 + 18].the_char == 'b'));
756 /* hole in second vector, second block, first hvector... */
757 assert ((indexed_buf[i*132 + 25].the_double == 2.0) &&
758 (indexed_buf[i*132 + 25].the_char == 'b'));
759 /* hole in between second and third vector blocks, first hvector... */
760 assert ((indexed_buf[i*132 + 29].the_double == 2.0) &&
761 (indexed_buf[i*132 + 29].the_char == 'b'));
762 /* hole in first vector, third block, first hvector... */
763 assert ((indexed_buf[i*132 + 33].the_double == 2.0) &&
764 (indexed_buf[i*132 + 33].the_char == 'b'));
765 /* hole in second vector, third block, first hvector... */
766 assert ((indexed_buf[i*132 + 40].the_double == 2.0) &&
767 (indexed_buf[i*132 + 40].the_char == 'b'));
768 /* hole in between hvectors... */
769 for (j = 0; j < 44; j++) {
770 assert ((indexed_buf[i*132 + 44 + j].the_double == 2.0) &&
771 (indexed_buf[i*132 + 44 + j].the_char == 'b'));
773 /* hole in first vector, first block, second hvector... */
774 assert ((indexed_buf[i*132 + 3 + 88].the_double == 2.0) &&
775 (indexed_buf[i*132 + 3 + 88].the_char == 'b'));
776 /* hole in second vector, first block, second hvector... */
777 assert ((indexed_buf[i*132 + 10 + 88].the_double == 2.0) &&
778 (indexed_buf[i*132 + 10 + 88].the_char == 'b'));
779 /* hole in between first and second vector blocks, second hvector... */
780 assert ((indexed_buf[i*132 + 14 + 88].the_double == 2.0) &&
781 (indexed_buf[i*132 + 14 + 88].the_char == 'b'));
782 /* hole in first vector, second block, second hvector... */
783 assert ((indexed_buf[i*132 + 18 + 88].the_double == 2.0) &&
784 (indexed_buf[i*132 + 18 + 88].the_char == 'b'));
785 /* hole in second vector, second block, second hvector... */
786 assert ((indexed_buf[i*132 + 25 + 88].the_double == 2.0) &&
787 (indexed_buf[i*132 + 25 + 88].the_char == 'b'));
788 /* hole in between second and third vector blocks, second hvector... */
789 assert ((indexed_buf[i*132 + 29 + 88].the_double == 2.0) &&
790 (indexed_buf[i*132 + 29 + 88].the_char == 'b'));
791 /* hole in first vector, third block, second hvector... */
792 assert ((indexed_buf[i*132 + 33 + 88].the_double == 2.0) &&
793 (indexed_buf[i*132 + 33 + 88].the_char == 'b'));
794 /* hole in second vector, third block, second hvector... */
795 assert ((indexed_buf[i*132 + 40 + 88].the_double == 2.0) &&
796 (indexed_buf[i*132 + 40 + 88].the_char == 'b'));
799 #ifdef RUN_TYPE_HINDEXED
800 /* one hundred twenty eight holes in hindexed_buf... */
801 /* hole in first vector, first block, first hvector, index 1... */
802 assert ((hindexed_buf[i*272 + 3].the_double == 2.0) &&
803 (hindexed_buf[i*272 + 3].the_char == 'b'));
804 /* hole in second vector, first block, first hvector, index 1... */
805 assert ((hindexed_buf[i*272 + 10].the_double == 2.0) &&
806 (hindexed_buf[i*272 + 10].the_char == 'b'));
807 /* hole between first & second vector blocks, hvector 1, index 1... */
808 assert ((hindexed_buf[i*272 + 14].the_double == 2.0) &&
809 (hindexed_buf[i*272 + 14].the_char == 'b'));
810 /* hole in first vector, second block, first hvector, index 1... */
811 assert ((hindexed_buf[i*272 + 18].the_double == 2.0) &&
812 (hindexed_buf[i*272 + 18].the_char == 'b'));
813 /* hole in second vector, second block, first hvector, index 1... */
814 assert ((hindexed_buf[i*272 + 25].the_double == 2.0) &&
815 (hindexed_buf[i*272 + 25].the_char == 'b'));
816 /* hole between second & third vector blocks, hvector 1, index 1... */
817 assert ((hindexed_buf[i*272 + 29].the_double == 2.0) &&
818 (hindexed_buf[i*272 + 29].the_char == 'b'));
819 /* hole in first vector, third block, first hvector, index 1... */
820 assert ((hindexed_buf[i*272 + 33].the_double == 2.0) &&
821 (hindexed_buf[i*272 + 33].the_char == 'b'));
822 /* hole in second vector, third block, first hvector, index 1... */
823 assert ((hindexed_buf[i*272 + 40].the_double == 2.0) &&
824 (hindexed_buf[i*272 + 40].the_char == 'b'));
825 /* hole in between hvectors, index 1... */
826 for (j = 0; j < 44; j++) {
827 assert ((hindexed_buf[i*272 + 44 + j].the_double == 2.0) &&
828 (hindexed_buf[i*272 + 44 + j].the_char == 'b'));
830 /* hole in first vector, first block, second hvector, index 1... */
831 assert ((hindexed_buf[i*272 + 3 + 88].the_double == 2.0) &&
832 (hindexed_buf[i*272 + 3 + 88].the_char == 'b'));
833 /* hole in second vector, first block, second hvector, index 1... */
834 assert ((hindexed_buf[i*272 + 10 + 88].the_double == 2.0) &&
835 (hindexed_buf[i*272 + 10 + 88].the_char == 'b'));
836 /* hole between first & second vector blocks, hvector 2, index 1... */
837 assert ((hindexed_buf[i*272 + 14 + 88].the_double == 2.0) &&
838 (hindexed_buf[i*272 + 14 + 88].the_char == 'b'));
839 /* hole in first vector, second block, second hvector, index 1... */
840 assert ((hindexed_buf[i*272 + 18 + 88].the_double == 2.0) &&
841 (hindexed_buf[i*272 + 18 + 88].the_char == 'b'));
842 /* hole in second vector, second block, second hvector, index 1... */
843 assert ((hindexed_buf[i*272 + 25 + 88].the_double == 2.0) &&
844 (hindexed_buf[i*272 + 25 + 88].the_char == 'b'));
845 /* hole between second & third vector blocks, hvector 2, index 1... */
846 assert ((hindexed_buf[i*272 + 29 + 88].the_double == 2.0) &&
847 (hindexed_buf[i*272 + 29 + 88].the_char == 'b'));
848 /* hole in first vector, third block, second hvector, index 1... */
849 assert ((hindexed_buf[i*272 + 33 + 88].the_double == 2.0) &&
850 (hindexed_buf[i*272 + 33 + 88].the_char == 'b'));
851 /* hole in second vector, third block, second hvector, index 1... */
852 assert ((hindexed_buf[i*272 + 40 + 88].the_double == 2.0) &&
853 (hindexed_buf[i*272 + 40 + 88].the_char == 'b'));
854 /* indexed hole... */
855 for (j = 0; j < 8; j++) {
856 assert ((hindexed_buf[i*272 + 132 + j].the_double == 2.0) &&
857 (hindexed_buf[i*272 + 132 + j].the_char == 'b'));
859 /* hole in first vector, first block, first hvector, index 2... */
860 assert ((hindexed_buf[i*272 + 3 + 140].the_double == 2.0) &&
861 (hindexed_buf[i*272 + 3 + 140].the_char == 'b'));
862 /* hole in second vector, first block, first hvector, index 2... */
863 assert ((hindexed_buf[i*272 + 10 + 140].the_double == 2.0) &&
864 (hindexed_buf[i*272 + 10 + 140].the_char == 'b'));
865 /* hole between first & second vector blocks, hvector 1, index 2... */
866 assert ((hindexed_buf[i*272 + 14 + 140].the_double == 2.0) &&
867 (hindexed_buf[i*272 + 14 + 140].the_char == 'b'));
868 /* hole in first vector, second block, first hvector, index 2... */
869 assert ((hindexed_buf[i*272 + 18 + 140].the_double == 2.0) &&
870 (hindexed_buf[i*272 + 18 + 140].the_char == 'b'));
871 /* hole in second vector, second block, first hvector, index 2... */
872 assert ((hindexed_buf[i*272 + 25 + 140].the_double == 2.0) &&
873 (hindexed_buf[i*272 + 25 + 140].the_char == 'b'));
874 /* hole between second & third vector blocks, hvector 1, index 2... */
875 assert ((hindexed_buf[i*272 + 29 + 140].the_double == 2.0) &&
876 (hindexed_buf[i*272 + 29 + 140].the_char == 'b'));
877 /* hole in first vector, third block, first hvector, index 2... */
878 assert ((hindexed_buf[i*272 + 33 + 140].the_double == 2.0) &&
879 (hindexed_buf[i*272 + 33 + 140].the_char == 'b'));
880 /* hole in second vector, third block, first hvector, index 2... */
881 assert ((hindexed_buf[i*272 + 40 + 140].the_double == 2.0) &&
882 (hindexed_buf[i*272 + 40 + 140].the_char == 'b'));
883 /* hole in between hvectors, index 2... */
884 for (j = 0; j < 44; j++) {
885 assert ((hindexed_buf[i*272 + 44 + j + 140].the_double == 2.0) &&
886 (hindexed_buf[i*272 + 44 + j + 140].the_char == 'b'));
888 /* hole in first vector, first block, second hvector, index 2... */
889 assert ((hindexed_buf[i*272 + 3 + 88 + 140].the_double == 2.0) &&
890 (hindexed_buf[i*272 + 3 + 88 + 140].the_char == 'b'));
891 /* hole in second vector, first block, second hvector, index 2... */
892 assert ((hindexed_buf[i*272 + 10 + 88 + 140].the_double == 2.0) &&
893 (hindexed_buf[i*272 + 10 + 88 + 140].the_char == 'b'));
894 /* hole between first & second vector blocks, hvector 2, index 2... */
895 assert ((hindexed_buf[i*272 + 14 + 88 + 140].the_double == 2.0) &&
896 (hindexed_buf[i*272 + 14 + 88 + 140].the_char == 'b'));
897 /* hole in first vector, second block, second hvector, index 2... */
898 assert ((hindexed_buf[i*272 + 18 + 88 + 140].the_double == 2.0) &&
899 (hindexed_buf[i*272 + 18 + 88 + 140].the_char == 'b'));
900 /* hole in second vector, second block, second hvector, index 2... */
901 assert ((hindexed_buf[i*272 + 25 + 88 + 140].the_double == 2.0) &&
902 (hindexed_buf[i*272 + 25 + 88 + 140].the_char == 'b'));
903 /* hole between second & third vector blocks, hvector 2, index 2... */
904 assert ((hindexed_buf[i*272 + 29 + 88 + 140].the_double == 2.0) &&
905 (hindexed_buf[i*272 + 29 + 88 + 140].the_char == 'b'));
906 /* hole in first vector, third block, second hvector, index 2... */
907 assert ((hindexed_buf[i*272 + 33 + 88 + 140].the_double == 2.0) &&
908 (hindexed_buf[i*272 + 33 + 88 + 140].the_char == 'b'));
909 /* hole in second vector, third block, second hvector, index 2... */
910 assert ((hindexed_buf[i*272 + 40 + 88 + 140].the_double == 2.0) &&
911 (hindexed_buf[i*272 + 40 + 88 + 140].the_char == 'b'));
914 #ifdef RUN_TYPE_CONTIGUOUS
915 for (j = 0; j < 10; j++) {
916 /* hole in first vector, first block, first hvector, index 1... */
917 assert ((contig_buf[i*2720 + j*272 + 3].the_double == 2.0) &&
918 (contig_buf[i*2720 + j*272 + 3].the_char == 'b'));
919 /* hole in second vector, first block, first hvector, index 1... */
920 assert ((contig_buf[i*2720 + j*272 + 10].the_double == 2.0) &&
921 (contig_buf[i*2720 + j*272 + 10].the_char == 'b'));
922 /* hole between first & second vector blocks, hvector 1, index 1... */
923 assert ((contig_buf[i*2720 + j*272 + 14].the_double == 2.0) &&
924 (contig_buf[i*2720 + j*272 + 14].the_char == 'b'));
925 /* hole in first vector, second block, first hvector, index 1... */
926 assert ((contig_buf[i*2720 + j*272 + 18].the_double == 2.0) &&
927 (contig_buf[i*2720 + j*272 + 18].the_char == 'b'));
928 /* hole in second vector, second block, first hvector, index 1... */
929 assert ((contig_buf[i*2720 + j*272 + 25].the_double == 2.0) &&
930 (contig_buf[i*2720 + j*272 + 25].the_char == 'b'));
931 /* hole between second & third vector blocks, hvector 1, index 1... */
932 assert ((contig_buf[i*2720 + j*272 + 29].the_double == 2.0) &&
933 (contig_buf[i*2720 + j*272 + 29].the_char == 'b'));
934 /* hole in first vector, third block, first hvector, index 1... */
935 assert ((contig_buf[i*2720 + j*272 + 33].the_double == 2.0) &&
936 (contig_buf[i*2720 + j*272 + 33].the_char == 'b'));
937 /* hole in second vector, third block, first hvector, index 1... */
938 assert ((contig_buf[i*2720 + j*272 + 40].the_double == 2.0) &&
939 (contig_buf[i*2720 + j*272 + 40].the_char == 'b'));
940 /* hole in between hvectors, index 1... */
941 for (k = 0; k < 44; k++) {
942 assert ((contig_buf[i*2720 + j*272 + 44 + k].the_double == 2.0) &&
943 (contig_buf[i*2720 + j*272 + 44 + k].the_char == 'b'));
945 /* hole in first vector, first block, second hvector, index 1... */
946 assert ((contig_buf[i*2720 + j*272 + 3 + 88].the_double == 2.0) &&
947 (contig_buf[i*2720 + j*272 + 3 + 88].the_char == 'b'));
948 /* hole in second vector, first block, second hvector, index 1... */
949 assert ((contig_buf[i*2720 + j*272 + 10 + 88].the_double == 2.0) &&
950 (contig_buf[i*2720 + j*272 + 10 + 88].the_char == 'b'));
951 /* hole between first & second vector blocks, hvector 2, index 1... */
952 assert ((contig_buf[i*2720 + j*272 + 14 + 88].the_double == 2.0) &&
953 (contig_buf[i*2720 + j*272 + 14 + 88].the_char == 'b'));
954 /* hole in first vector, second block, second hvector, index 1... */
955 assert ((contig_buf[i*2720 + j*272 + 18 + 88].the_double == 2.0) &&
956 (contig_buf[i*2720 + j*272 + 18 + 88].the_char == 'b'));
957 /* hole in second vector, second block, second hvector, index 1... */
958 assert ((contig_buf[i*2720 + j*272 + 25 + 88].the_double == 2.0) &&
959 (contig_buf[i*2720 + j*272 + 25 + 88].the_char == 'b'));
960 /* hole between second & third vector blocks, hvector 2, index 1... */
961 assert ((contig_buf[i*2720 + j*272 + 29 + 88].the_double == 2.0) &&
962 (contig_buf[i*2720 + j*272 + 29 + 88].the_char == 'b'));
963 /* hole in first vector, third block, second hvector, index 1... */
964 assert ((contig_buf[i*2720 + j*272 + 33 + 88].the_double == 2.0) &&
965 (contig_buf[i*2720 + j*272 + 33 + 88].the_char == 'b'));
966 /* hole in second vector, third block, second hvector, index 1... */
967 assert ((contig_buf[i*2720 + j*272 + 40 + 88].the_double == 2.0) &&
968 (contig_buf[i*2720 + j*272 + 40 + 88].the_char == 'b'));
969 /* indexed hole... */
970 for (k = 0; k < 8; k++) {
971 assert ((contig_buf[i*2720 + j*272 + 132 + k].the_double == 2.0) &&
972 (contig_buf[i*2720 + j*272 + 132 + k].the_char == 'b'));
974 /* hole in first vector, first block, first hvector, index 2... */
975 assert ((contig_buf[i*2720 + j*272 + 3 + 140].the_double == 2.0) &&
976 (contig_buf[i*2720 + j*272 + 3 + 140].the_char == 'b'));
977 /* hole in second vector, first block, first hvector, index 2... */
978 assert ((contig_buf[i*2720 + j*272 + 10 + 140].the_double == 2.0) &&
979 (contig_buf[i*2720 + j*272 + 10 + 140].the_char == 'b'));
980 /* hole between first & second vector blocks, hvector 1, index 2... */
981 assert ((contig_buf[i*2720 + j*272 + 14 + 140].the_double == 2.0) &&
982 (contig_buf[i*2720 + j*272 + 14 + 140].the_char == 'b'));
983 /* hole in first vector, second block, first hvector, index 2... */
984 assert ((contig_buf[i*2720 + j*272 + 18 + 140].the_double == 2.0) &&
985 (contig_buf[i*2720 + j*272 + 18 + 140].the_char == 'b'));
986 /* hole in second vector, second block, first hvector, index 2... */
987 assert ((contig_buf[i*2720 + j*272 + 25 + 140].the_double == 2.0) &&
988 (contig_buf[i*2720 + j*272 + 25 + 140].the_char == 'b'));
989 /* hole between second & third vector blocks, hvector 1, index 2... */
990 assert ((contig_buf[i*2720 + j*272 + 29 + 140].the_double == 2.0) &&
991 (contig_buf[i*2720 + j*272 + 29 + 140].the_char == 'b'));
992 /* hole in first vector, third block, first hvector, index 2... */
993 assert ((contig_buf[i*2720 + j*272 + 33 + 140].the_double == 2.0) &&
994 (contig_buf[i*2720 + j*272 + 33 + 140].the_char == 'b'));
995 /* hole in second vector, third block, first hvector, index 2... */
996 assert ((contig_buf[i*2720 + j*272 + 40 + 140].the_double == 2.0) &&
997 (contig_buf[i*2720 + j*272 + 40 + 140].the_char == 'b'));
998 /* hole in between hvectors, index 2... */
999 for (k = 0; k < 44; k++) {
1000 assert ((contig_buf[i*2720+j*272+44+k+140].the_double == 2.0) &&
1001 (contig_buf[i*2720 +j*272+44+k+140].the_char == 'b'));
1003 /* hole in first vector, first block, second hvector, index 2... */
1004 assert ((contig_buf[i*2720+j*272+3+88+140].the_double == 2.0) &&
1005 (contig_buf[i*2720 + j*272 + 3 + 88 + 140].the_char == 'b'));
1006 /* hole in second vector, first block, second hvector, index 2... */
1007 assert ((contig_buf[i*2720+j*272+10+88+140].the_double == 2.0) &&
1008 (contig_buf[i*2720 + j*272 + 10 + 88 + 140].the_char == 'b'));
1009 /* hole between first & second vector blocks, hvector 2, index 2... */
1010 assert ((contig_buf[i*2720+j*272+14+88+140].the_double == 2.0) &&
1011 (contig_buf[i*2720 + j*272 + 14 + 88 + 140].the_char == 'b'));
1012 /* hole in first vector, second block, second hvector, index 2... */
1013 assert ((contig_buf[i*2720+j*272+18+88+140].the_double == 2.0) &&
1014 (contig_buf[i*2720 + j*272 + 18 + 88 + 140].the_char == 'b'));
1015 /* hole in second vector, second block, second hvector, index 2... */
1016 assert ((contig_buf[i*2720+j*272+25+88+140].the_double == 2.0) &&
1017 (contig_buf[i*2720 + j*272 + 25 + 88 + 140].the_char == 'b'));
1018 /* hole between second & third vector blocks, hvector 2, index 2... */
1019 assert ((contig_buf[i*2720+j*272+29+88+140].the_double == 2.0) &&
1020 (contig_buf[i*2720 + j*272 + 29 + 88 + 140].the_char == 'b'));
1021 /* hole in first vector, third block, second hvector, index 2... */
1022 assert ((contig_buf[i*2720+j*272+33+88+140].the_double == 2.0) &&
1023 (contig_buf[i*2720 + j*272 + 33 + 88 + 140].the_char == 'b'));
1024 /* hole in second vector, third block, second hvector, index 2... */
1025 assert ((contig_buf[i*2720+j*272+40+88+140].the_double == 2.0) &&
1026 (contig_buf[i*2720 + j*272 + 40 + 88 + 140].the_char == 'b'));
1030 #ifdef RUN_TYPE_STRUCT_LB_UB
1031 /* no holes in struct_lb_ub_recv_buf... */
1036 for (i = 0; i < TYPE_CONSTRUCTOR_COUNT; i++) {
1037 MPI_Type_free (&newtype[i]);
1042 printf ("(%d) Finished normally\n", rank);