-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathuserhtmlse6.html
4142 lines (3839 loc) · 168 KB
/
userhtmlse6.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html >
<head><title>Data management routines</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="generator" content="TeX4ht (https://tug.org/tex4ht/)">
<meta name="originator" content="TeX4ht (https://tug.org/tex4ht/)">
<!-- html,3 -->
<meta name="src" content="userhtml.tex">
<link rel="stylesheet" type="text/css" href="userhtml.css">
</head><body
>
<!--l. 1--><div class="crosslinks"><p class="noindent">[<a
href="userhtmlse10.html" >next</a>] [<a
href="userhtmlse5.html" >prev</a>] [<a
href="userhtmlse5.html#tailuserhtmlse5.html" >prev-tail</a>] [<a
href="userhtmlse3.html#tailuserhtmlse6.html">tail</a>] [<a
href="userhtml.html#userhtmlse9.html" >up</a>] </p></div>
<h3 class="sectionHead"><span class="titlemark">6 </span> <a
id="x11-770006"></a>Data management routines</h3>
<!--l. 8--><p class="noindent" >
<h4 class="subsectionHead"><span class="titlemark">6.1 </span> <a
id="x11-780006.1"></a>psb_cdall — Allocates a communication descriptor</h4>
<pre class="verbatim" id="verbatim-33">
call psb_cdall(icontxt, desc_a, info,mg=mg,parts=parts)
call psb_cdall(icontxt, desc_a, info,vg=vg,[mg=mg,flag=flag])
call psb_cdall(icontxt, desc_a, info,vl=vl,[nl=nl,globalcheck=.false.,lidx=lidx])
call psb_cdall(icontxt, desc_a, info,nl=nl)
call psb_cdall(icontxt, desc_a, info,mg=mg,repl=.true.)
</pre>
<!--l. 16--><p class="nopar" >
<!--l. 18--><p class="indent" > This subroutine initializes the communication descriptor associated with an
index space. One of the optional arguments <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">parts</span></span></span>, <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span>, <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span>, <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">nl</span></span></span> or <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">repl</span></span></span> must be
specified, thereby choosing the specific initialization strategy.
<dl class="description"><dt class="description">
<!--l. 24--><p class="noindent" >
<span
class="pplb7t-">On Entry</span> </dt><dd
class="description">
<!--l. 24--><p class="noindent" >
</dd><dt class="description">
<!--l. 25--><p class="noindent" >
<span
class="pplb7t-">Type:</span> </dt><dd
class="description">
<!--l. 25--><p class="noindent" >Synchronous.
</dd><dt class="description">
<!--l. 26--><p class="noindent" >
<span
class="pplb7t-">icontxt</span> </dt><dd
class="description">
<!--l. 26--><p class="noindent" >the communication context.<br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer value.
</dd><dt class="description">
<!--l. 31--><p class="noindent" >
<span
class="pplb7t-">vg</span> </dt><dd
class="description">
<!--l. 31--><p class="noindent" >Data allocation: each index <span
class="zplmr7m-">i </span><span
class="zplmr7y-">∈{</span>1<span
class="zplmr7m-">…</span><span
class="zplmr7m-">mg</span><span
class="zplmr7y-">} </span>is allocated to process <span
class="zplmr7m-">vg</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">)</span>.<br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer array.
</dd><dt class="description">
<!--l. 37--><p class="noindent" >
<span
class="pplb7t-">flag</span> </dt><dd
class="description">
<!--l. 37--><p class="noindent" >Specifies whether entries in <span
class="zplmr7m-">vg </span>are zero- or one-based.<br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer value 0, 1, default 0.
</dd><dt class="description">
<!--l. 43--><p class="noindent" >
<span
class="pplb7t-">mg</span> </dt><dd
class="description">
<!--l. 43--><p class="noindent" >the (global) number of rows of the problem.<br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer value. It is required if <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">parts</span></span></span> or <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">repl</span></span></span> is specified,
it is optional if <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span> is specified.
</dd><dt class="description">
<!--l. 49--><p class="noindent" >
<span
class="pplb7t-">parts</span> </dt><dd
class="description">
<!--l. 49--><p class="noindent" >the subroutine that defines the partitioning scheme.<br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Specified as: a subroutine.
</dd><dt class="description">
<!--l. 53--><p class="noindent" >
<span
class="pplb7t-">vl</span> </dt><dd
class="description">
<!--l. 53--><p class="noindent" >Data allocation: the set of global indices <span
class="zplmr7m-">vl</span><span
class="zplmr7t-">(</span>1 <span
class="zplmr7t-">: </span><span
class="zplmr7m-">nl</span><span
class="zplmr7t-">) </span>belonging to the calling
process. <br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer array.
</dd><dt class="description">
<!--l. 59--><p class="noindent" >
<span
class="pplb7t-">nl</span> </dt><dd
class="description">
<!--l. 59--><p class="noindent" >Data allocation: in a generalized block-row distribution the number of
indices belonging to the current process. <br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer value. May be specified together with <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span>.
</dd><dt class="description">
<!--l. 66--><p class="noindent" >
<span
class="pplb7t-">repl</span> </dt><dd
class="description">
<!--l. 66--><p class="noindent" >Data allocation: build a replicated index space (i.e. all processes own all
indices).<br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: the logical value <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.true.</span></span></span>
</dd><dt class="description">
<!--l. 72--><p class="noindent" >
<span
class="pplb7t-">globalcheck</span> </dt><dd
class="description">
<!--l. 72--><p class="noindent" >Data allocation: do global checks on the local index lists <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span><br
class="newline" />Scope:<span
class="pplb7t-">global</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: a logical value, default: <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.false.</span></span></span>
</dd><dt class="description">
<!--l. 78--><p class="noindent" >
<span
class="pplb7t-">lidx</span> </dt><dd
class="description">
<!--l. 78--><p class="noindent" >Data allocation: the set of local indices <span
class="zplmr7m-">lidx</span><span
class="zplmr7t-">(</span>1 <span
class="zplmr7t-">: </span><span
class="zplmr7m-">nl</span><span
class="zplmr7t-">) </span>to be assigned to the
global indices <span
class="zplmr7m-">vl</span>. <br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer array.</dd></dl>
<!--l. 86--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 87--><p class="noindent" >
<span
class="pplb7t-">On Return</span> </dt><dd
class="description">
<!--l. 87--><p class="noindent" >
</dd><dt class="description">
<!--l. 88--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_a</span> </dt><dd
class="description">
<!--l. 88--><p class="noindent" >the communication descriptor.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.
</dd><dt class="description">
<!--l. 93--><p class="noindent" >
<span
class="pplb7t-">info</span> </dt><dd
class="description">
<!--l. 93--><p class="noindent" >Error code.<br
class="newline" />Scope: <span
class="pplb7t-">local </span><br
class="newline" />Type: <span
class="pplb7t-">required </span><br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />An integer value; 0 means no error has been detected.</dd></dl>
<!--l. 100--><p class="noindent" ><span
class="pplb7t-x-x-120">Notes</span>
<ol class="enumerate1" >
<li
class="enumerate" id="x11-78002x1">
<!--l. 102--><p class="noindent" >One of the optional arguments <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">parts</span></span></span>, <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span>, <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span>, <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">nl</span></span></span> or <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">repl</span></span></span> must be specified,
thereby choosing the initialization strategy as follows:
<dl class="description"><dt class="description">
<!--l. 106--><p class="noindent" >
<span
class="pplb7t-">parts</span> </dt><dd
class="description">
<!--l. 106--><p class="noindent" >In this case we have a subroutine specifying the mapping between global
indices and process/local index pairs. If this optional argument is
specified, then it is mandatory to specify the argument <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">mg</span></span></span> as well. The
subroutine must conform to the following interface:
<pre class="verbatim" id="verbatim-34">
  interface
     subroutine psb_parts(glob_index,mg,np,pv,nv)
       integer, intent (in)  :: glob_index,np,mg
       integer, intent (out) :: nv, pv(*)
     end subroutine psb_parts
  end interface
</pre>
<!--l. 118--><p class="nopar" > The input arguments are:
<dl class="description"><dt class="description">
<!--l. 121--><p class="noindent" >
<span
class="pplb7t-">glob</span><span
class="pplb7t-">_index</span> </dt><dd
class="description">
<!--l. 121--><p class="noindent" >The global index to be mapped;
</dd><dt class="description">
<!--l. 122--><p class="noindent" >
<span
class="pplb7t-">np</span> </dt><dd
class="description">
<!--l. 122--><p class="noindent" >The number of processes in the mapping;
</dd><dt class="description">
<!--l. 123--><p class="noindent" >
<span
class="pplb7t-">mg</span> </dt><dd
class="description">
<!--l. 123--><p class="noindent" >The total number of global rows in the mapping;</dd></dl>
<!--l. 125--><p class="noindent" >The output arguments are:
<dl class="description"><dt class="description">
<!--l. 127--><p class="noindent" >
<span
class="pplb7t-">nv</span> </dt><dd
class="description">
<!--l. 127--><p class="noindent" >The number of entries in <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">pv</span></span></span>;
</dd><dt class="description">
<!--l. 128--><p class="noindent" >
<span
class="pplb7t-">pv</span> </dt><dd
class="description">
<!--l. 128--><p class="noindent" >A vector containing the indices of the processes to which the
global index should be assigend; each entry must satisfy 0 <span
class="zplmr7y-">≤</span>
<span
class="zplmr7m-">pv</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">) </span><span
class="zplmr7m-">< np</span>; if <span
class="zplmr7m-">nv > </span>1 we have an index assigned to multiple
processes, i.e. we have an overlap among the subdomains.</dd></dl>
</dd><dt class="description">
<!--l. 133--><p class="noindent" >
<span
class="pplb7t-">vg</span> </dt><dd
class="description">
<!--l. 133--><p class="noindent" >In this case the association between an index and a process is specified via
an integer vector <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg(1:mg)</span></span></span>; each index <span
class="zplmr7m-">i </span><span
class="zplmr7y-">∈{</span>1<span
class="zplmr7m-">…</span><span
class="zplmr7m-">mg</span><span
class="zplmr7y-">} </span>is assigned to process
<span
class="zplmr7m-">vg</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">)</span>. The vector <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span> must be identical on all calling processes; its
entries may have the ranges <span
class="zplmr7t-">(</span>0<span
class="zplmr7m-">…</span><span
class="zplmr7m-">np</span><span
class="zplmr7y-">- </span>1<span
class="zplmr7t-">) </span>or <span
class="zplmr7t-">(</span>1<span
class="zplmr7m-">…</span><span
class="zplmr7m-">np</span><span
class="zplmr7t-">) </span>according to
the value of <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">flag</span></span></span>. The size <span
class="zplmr7m-">mg </span>may be specified via the optional
argument <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">mg</span></span></span>; the default is to use the entire vector <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span>, thus having
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">mg=size(vg)</span></span></span>.
</dd><dt class="description">
<!--l. 142--><p class="noindent" >
<span
class="pplb7t-">vl</span> </dt><dd
class="description">
<!--l. 142--><p class="noindent" >In this case we are specifying the list of indices <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl(1:nl)</span></span></span> assigned to the
current process; thus, the global problem size <span
class="zplmr7m-">mg </span>is given by the range of
the aggregate of the individual vectors <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span> specified in the calling
processes. The size may be specified via the optional argument <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">nl</span></span></span>; the
default is to use the entire vector <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span>, thus having <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">nl=size(vl)</span></span></span>. If
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">globalcheck=.true.</span></span></span> the subroutine will check how many times each
entry in the global index space <span
class="zplmr7t-">(</span>1<span
class="zplmr7m-">…</span><span
class="zplmr7m-">mg</span><span
class="zplmr7t-">) </span>is specified in the input lists <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span>,
thus allowing for the presence of overlap in the input, and checking for
“orphan” indices. If <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">globalcheck=.false.</span></span></span>, the subroutine will not
check for overlap, and may be significantly faster, but the user is
implicitly guaranteeing that there are neither orphan nor overlap
indices.
</dd><dt class="description">
<!--l. 157--><p class="noindent" >
<span
class="pplb7t-">lidx</span> </dt><dd
class="description">
<!--l. 157--><p class="noindent" >The optional argument <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">lidx</span></span></span> is available for those cases in which the user
has already established a global-to-local mapping; if it is specified, each
index in <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl(i)</span></span></span> will be mapped to the corresponding local index <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">lidx(i)</span></span></span>.
When specifying the argument <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">lidx</span></span></span> the user would also likely employ
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">lidx</span></span></span> in calls to <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">psb_cdins</span></span></span> and <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">local</span></span></span> in calls to <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">psb_spins</span></span></span> and
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">psb_geins</span></span></span>; see also sec. <a
href="userhtmlse2.html#x4-70002.3.1">2.3.1<!--tex4ht:ref: sec:usermaps --></a>.
</dd><dt class="description">
<!--l. 165--><p class="noindent" >
<span
class="pplb7t-">nl</span> </dt><dd
class="description">
<!--l. 165--><p class="noindent" >If this argument is specified alone (i.e. without <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span>) the result is a
generalized row-block distribution in which each process <span
class="zplmr7m-">I </span>gets assigned
a consecutive chunk of <span
class="zplmr7m-">N</span><sub><span
class="zplmr7m-x-x-76">I</span></sub> <span
class="zplmr7t-">= </span><span
class="zplmr7m-">nl </span>global indices.
</dd><dt class="description">
<!--l. 169--><p class="noindent" >
<span
class="pplb7t-">repl</span> </dt><dd
class="description">
<!--l. 169--><p class="noindent" >This arguments specifies to replicate all indices on all processes. This is a
special purpose data allocation that is useful in the construction of some
multilevel preconditioners.</dd></dl>
</li>
<li
class="enumerate" id="x11-78004x2">
<!--l. 173--><p class="noindent" >On exit from this routine the descriptor is in the build state.
</li>
<li
class="enumerate" id="x11-78006x3">
<!--l. 175--><p class="noindent" >Calling the routine with <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span> or <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">parts</span></span></span> implies that every process will scan the
entire index space to figure out the local indices.
</li>
<li
class="enumerate" id="x11-78008x4">
<!--l. 178--><p class="noindent" >Overlapped indices are possible with both <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">parts</span></span></span> and <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span> invocations.
</li>
<li
class="enumerate" id="x11-78010x5">
<!--l. 180--><p class="noindent" >When the subroutine is invoked with <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span> in conjunction with <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">globalcheck=.true.</span></span></span>,
it will perform a scan of the index space to search for overlap or orphan
indices.
</li>
<li
class="enumerate" id="x11-78012x6">
<!--l. 183--><p class="noindent" >When the subroutine is invoked with <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span> in conjunction with
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">globalcheck=.false.</span></span></span>, no index space scan will take place. Thus it is the
responsibility of the user to make sure that the indices specified in <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vl</span></span></span> have
neither orphans nor overlaps; if this assumption fails, results will be
unpredictable.
</li>
<li
class="enumerate" id="x11-78014x7">
<!--l. 189--><p class="noindent" >Orphan and overlap indices are impossible by construction when the
subroutine is invoked with <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">nl</span></span></span> (alone), or <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">vg</span></span></span>.</li></ol>
<h4 class="subsectionHead"><span class="titlemark">6.2 </span> <a
id="x11-790006.2"></a>psb_cdins — Communication descriptor insert routine</h4>
<pre class="verbatim" id="verbatim-35">
call psb_cdins(nz, ia, ja, desc_a, info [,ila,jla])
call psb_cdins(nz,ja,desc,info[,jla,mask,lidx])
</pre>
<!--l. 204--><p class="nopar" >
<!--l. 206--><p class="indent" > This subroutine examines the edges of the graph associated with the
discretization mesh (and isomorphic to the sparsity pattern of a linear system
coefficient matrix), storing them as necessary into the communication descriptor. In
the first form the edges are specified as pairs of indices <span
class="zplmr7m-">ia</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">)</span>, <span
class="zplmr7m-">ja</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">)</span>; the starting index
<span
class="zplmr7m-">ia</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">) </span>should belong to the current process. In the second form only the remote
indices <span
class="zplmr7m-">ja</span><span
class="zplmr7t-">(</span><span
class="zplmr7m-">i</span><span
class="zplmr7t-">) </span>are specified.
<!--l. 214--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 215--><p class="noindent" >
<span
class="pplb7t-">Type:</span> </dt><dd
class="description">
<!--l. 215--><p class="noindent" >Asynchronous.
</dd><dt class="description">
<!--l. 216--><p class="noindent" >
<span
class="pplb7t-">On Entry</span> </dt><dd
class="description">
<!--l. 216--><p class="noindent" >
</dd><dt class="description">
<!--l. 217--><p class="noindent" >
<span
class="pplb7t-">nz</span> </dt><dd
class="description">
<!--l. 217--><p class="noindent" >the number of points being inserted.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer value.
</dd><dt class="description">
<!--l. 222--><p class="noindent" >
<span
class="pplb7t-">ia</span> </dt><dd
class="description">
<!--l. 222--><p class="noindent" >the indices of the starting vertex of the edges being inserted.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer array of length <span
class="zplmr7m-">nz</span>.
</dd><dt class="description">
<!--l. 227--><p class="noindent" >
<span
class="pplb7t-">ja</span> </dt><dd
class="description">
<!--l. 227--><p class="noindent" >the indices of the end vertex of the edges being inserted.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer array of length <span
class="zplmr7m-">nz</span>.
</dd><dt class="description">
<!--l. 232--><p class="noindent" >
<span
class="pplb7t-">mask</span> </dt><dd
class="description">
<!--l. 232--><p class="noindent" >Mask entries in <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">ja</span></span></span>, they are inserted only when the corresponding <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">mask</span></span></span>
entries are <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.true.</span></span></span><br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: a logical array of length <span
class="zplmr7m-">nz</span>, default <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">.true.</span></span></span>.
</dd><dt class="description">
<!--l. 238--><p class="noindent" >
<span
class="pplb7t-">lidx</span> </dt><dd
class="description">
<!--l. 238--><p class="noindent" >User defined local indices for <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">ja</span></span></span>.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: an integer array of length <span
class="zplmr7m-">nz</span>.</dd></dl>
<!--l. 253--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 254--><p class="noindent" >
<span
class="pplb7t-">On Return</span> </dt><dd
class="description">
<!--l. 254--><p class="noindent" >
</dd><dt class="description">
<!--l. 255--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_a</span> </dt><dd
class="description">
<!--l. 255--><p class="noindent" >the updated communication descriptor.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">inout</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.
</dd><dt class="description">
<!--l. 260--><p class="noindent" >
<span
class="pplb7t-">info</span> </dt><dd
class="description">
<!--l. 260--><p class="noindent" >Error code.<br
class="newline" />Scope: <span
class="pplb7t-">local </span><br
class="newline" />Type: <span
class="pplb7t-">required </span><br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />An integer value; 0 means no error has been detected.
</dd><dt class="description">
<!--l. 265--><p class="noindent" >
<span
class="pplb7t-">ila</span> </dt><dd
class="description">
<!--l. 265--><p class="noindent" >the local indices of the starting vertex of the edges being inserted.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />Specified as: an integer array of length <span
class="zplmr7m-">nz</span>.
</dd><dt class="description">
<!--l. 270--><p class="noindent" >
<span
class="pplb7t-">jla</span> </dt><dd
class="description">
<!--l. 270--><p class="noindent" >the local indices of the end vertex of the edges being inserted.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />Specified as: an integer array of length <span
class="zplmr7m-">nz</span>.
</dd></dl>
<!--l. 277--><p class="noindent" ><span
class="pplb7t-x-x-120">Notes</span>
<ol class="enumerate1" >
<li
class="enumerate" id="x11-79002x1">
<!--l. 279--><p class="noindent" >This routine may only be called if the descriptor is in the build state;
</li>
<li
class="enumerate" id="x11-79004x2">
<!--l. 281--><p class="noindent" >This routine automatically ignores edges that do not insist on the current
process, i.e. edges for which neither the starting nor the end vertex belong
to the current process.
</li>
<li
class="enumerate" id="x11-79006x3">
<!--l. 284--><p class="noindent" >The second form of this routine will be useful when dealing with
user-specified index mappings; see also <a
href="userhtmlse2.html#x4-70002.3.1">2.3.1<!--tex4ht:ref: sec:usermaps --></a>.</li></ol>
<h4 class="subsectionHead"><span class="titlemark">6.3 </span> <a
id="x11-800006.3"></a>psb_cdasb — Communication descriptor assembly routine</h4>
<pre class="verbatim" id="verbatim-36">
call psb_cdasb(desc_a, info [, mold])
</pre>
<!--l. 298--><p class="nopar" >
<!--l. 300--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 301--><p class="noindent" >
<span
class="pplb7t-">Type:</span> </dt><dd
class="description">
<!--l. 301--><p class="noindent" >Synchronous.
</dd><dt class="description">
<!--l. 302--><p class="noindent" >
<span
class="pplb7t-">On Entry</span> </dt><dd
class="description">
<!--l. 302--><p class="noindent" >
</dd><dt class="description">
<!--l. 303--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_a</span> </dt><dd
class="description">
<!--l. 303--><p class="noindent" >the communication descriptor.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">inout</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.
</dd><dt class="description">
<!--l. 308--><p class="noindent" >
<span
class="pplb7t-">mold</span> </dt><dd
class="description">
<!--l. 308--><p class="noindent" >The desired dynamic type for the internal index storage.<br
class="newline" />Scope: <span
class="pplb7t-">local</span>.<br
class="newline" />Type: <span
class="pplb7t-">optional</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: a object of type derived from (integer)
<a
id="vbasedata"></a><span
class="cmtt-10">psb</span><span
class="cmtt-10">_T</span><span
class="cmtt-10">_base</span><span
class="cmtt-10">_vect</span><span
class="cmtt-10">_type</span>.</dd></dl>
<!--l. 315--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 316--><p class="noindent" >
<span
class="pplb7t-">On Return</span> </dt><dd
class="description">
<!--l. 316--><p class="noindent" >
</dd><dt class="description">
<!--l. 317--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_a</span> </dt><dd
class="description">
<!--l. 317--><p class="noindent" >the communication descriptor.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">inout</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.
</dd><dt class="description">
<!--l. 322--><p class="noindent" >
<span
class="pplb7t-">info</span> </dt><dd
class="description">
<!--l. 322--><p class="noindent" >Error code.<br
class="newline" />Scope: <span
class="pplb7t-">local </span><br
class="newline" />Type: <span
class="pplb7t-">required </span><br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />An integer value; 0 means no error has been detected.</dd></dl>
<!--l. 329--><p class="noindent" ><span
class="pplb7t-x-x-120">Notes</span>
<ol class="enumerate1" >
<li
class="enumerate" id="x11-80002x1">
<!--l. 331--><p class="noindent" >On exit from this routine the descriptor is in the assembled state.</li></ol>
<!--l. 334--><p class="noindent" >This call will set up all the necessary information for the halo data exchanges. In doing
so, the library will need to identify the set of processes owning the halo indices
through the use of the <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">desc%fnd_owner()</span></span></span> method; the owning processes
are the topological neighbours of the calling process. If the user has some
background information on the processes that are neighbours of the current one,
it is possible to specify explicitly the list of adjacent processes with a call
to <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">desc%set_p_adjcncy(list)</span></span></span>; this will speed up the subsequent call to
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">psb_cdasb</span></span></span>.
<h4 class="subsectionHead"><span class="titlemark">6.4 </span> <a
id="x11-810006.4"></a>psb_cdcpy — Copies a communication descriptor</h4>
<pre class="verbatim" id="verbatim-37">
call psb_cdcpy(desc_in, desc_out, info)
</pre>
<!--l. 351--><p class="nopar" >
<!--l. 353--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 354--><p class="noindent" >
<span
class="pplb7t-">Type:</span> </dt><dd
class="description">
<!--l. 354--><p class="noindent" >Asynchronous.
</dd><dt class="description">
<!--l. 355--><p class="noindent" >
<span
class="pplb7t-">On Entry</span> </dt><dd
class="description">
<!--l. 355--><p class="noindent" >
</dd><dt class="description">
<!--l. 356--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_in</span> </dt><dd
class="description">
<!--l. 356--><p class="noindent" >the communication descriptor.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">in</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.
</dd></dl>
<!--l. 364--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 365--><p class="noindent" >
<span
class="pplb7t-">On Return</span> </dt><dd
class="description">
<!--l. 365--><p class="noindent" >
</dd><dt class="description">
<!--l. 366--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_out</span> </dt><dd
class="description">
<!--l. 366--><p class="noindent" >the communication descriptor copy.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.
</dd><dt class="description">
<!--l. 371--><p class="noindent" >
<span
class="pplb7t-">info</span> </dt><dd
class="description">
<!--l. 371--><p class="noindent" >Error code.<br
class="newline" />Scope: <span
class="pplb7t-">local </span><br
class="newline" />Type: <span
class="pplb7t-">required </span><br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />An integer value; 0 means no error has been detected.</dd></dl>
<h4 class="subsectionHead"><span class="titlemark">6.5 </span> <a
id="x11-820006.5"></a>psb_cdfree — Frees a communication descriptor</h4>
<pre class="verbatim" id="verbatim-38">
call psb_cdfree(desc_a, info)
</pre>
<!--l. 386--><p class="nopar" >
<!--l. 388--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 389--><p class="noindent" >
<span
class="pplb7t-">Type:</span> </dt><dd
class="description">
<!--l. 389--><p class="noindent" >Synchronous.
</dd><dt class="description">
<!--l. 390--><p class="noindent" >
<span
class="pplb7t-">On Entry</span> </dt><dd
class="description">
<!--l. 390--><p class="noindent" >
</dd><dt class="description">
<!--l. 391--><p class="noindent" >
<span
class="pplb7t-">desc</span><span
class="pplb7t-">_a</span> </dt><dd
class="description">
<!--l. 391--><p class="noindent" >the communication descriptor to be freed.<br
class="newline" />Scope:<span
class="pplb7t-">local</span>.<br
class="newline" />Type:<span
class="pplb7t-">required</span>.<br
class="newline" />Intent: <span
class="pplb7t-">inout</span>.<br
class="newline" />Specified as: a structured data of type <a
href="userhtmlse3.html#descdata"><span
class="cmtt-10">psb</span><span
class="cmtt-10">_desc</span><span
class="cmtt-10">_type</span></a>.</dd></dl>
<!--l. 398--><p class="indent" >
<dl class="description"><dt class="description">
<!--l. 399--><p class="noindent" >
<span
class="pplb7t-">On Return</span> </dt><dd
class="description">
<!--l. 399--><p class="noindent" >
</dd><dt class="description">
<!--l. 400--><p class="noindent" >
<span
class="pplb7t-">info</span> </dt><dd
class="description">
<!--l. 400--><p class="noindent" >Error code.<br
class="newline" />Scope: <span
class="pplb7t-">local </span><br
class="newline" />Type: <span
class="pplb7t-">required </span><br
class="newline" />Intent: <span
class="pplb7t-">out</span>.<br
class="newline" />An integer value; 0 means no error has been detected.</dd></dl>
<h4 class="subsectionHead"><span class="titlemark">6.6 </span> <a
id="x11-830006.6"></a>psb_cdbldext — Build an extended communication descriptor</h4>
<pre class="verbatim" id="verbatim-39">
call psb_cdbldext(a,desc_a,nl,desc_out, info, extype)
</pre>
<!--l. 417--><p class="nopar" >
<!--l. 419--><p class="indent" > This subroutine builds an extended communication descriptor, based on the
input descriptor <span class="obeylines-h"><span class="verb"><span
class="cmtt-10">desc_a</span></span></span> and on the stencil specified through the input sparse matrix
<span class="obeylines-h"><span class="verb"><span
class="cmtt-10">a</span></span></span>.
<dl class="description"><dt class="description">
<!--l. 423--><p class="noindent" >