This file is indexed.

/usr/include/spooles/MPI/spoolesMPI.h is in libspooles-dev 2.2-11.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
/*  spoolesMPI.h  */

#ifndef _SPOOLES_MPI_

#define _SPOOLES_MPI_
#include <mpi.h>
#include "../FrontMtx.h"
#include "../misc.h"
#include "../timings.h"
#include "../SymbFac.h"
#include "../ETree.h"
#include "../SolveMap.h"
#include "../IVL.h"
#include "../IV.h"
#include "../Ideq.h"
#include "../Pencil.h"
#include "../Drand.h"

#endif

/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in IVallgather.c ------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------------------------
   purpose -- 
 
   the IV objects objIV and ownersIV are found on each process.
   the ownersIV object is identical over all the processes, and
   owners[ii] tells which processes owns location ii of the obj[]
   vector. on return from this entry, the obj[] vector is replicated
   over all the processes. each process sends the (ii,obj[ii]) pairs
   that it owns to all the other processes.
 
   created -- 98apr02, cca
   -----------------------------------------------------------------
*/
void
IV_MPI_allgather (
   IV         *objIV,
   IV         *ownersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        tag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in IVLallgather.c -----------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------------
   purpose -- 
 
   the IVL object ivl and IV object ownersIV are both found on 
   each process.  the ownersIV object is identical over all the 
   processes, and owners[ii] tells which processes owns list ii 
   of the ivl object. on return from this method, the ivl object 
   is replicated over all the processes. each process sends 
   the lists that it owns to all the other processes.
 
   created -- 98apr03, cca
   -------------------------------------------------------------
*/
void
IVL_MPI_allgather (
   IVL        *ivl,
   IV         *ownersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        tag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in IVL_alltoall.c -----------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------------------------------
   this method is used during the setup for matrix-vector multiplies.
   each processor has computed the vertices it needs from other
   processors, these lists are contained in sendIVL. on return,
   recvIVL contains the lists of vertices this processor must send
   to all others.
 
   sendIVL -- on input, list[q] contains the vertices needed by
              this processor that are owned by q
   recvIVL -- on output, list[q] contains the vertices owned by
              this processor that are needed by q. note, if NULL
              on input, a new IVL object is allocated
   stats[] -- statistics vector
     stats[0] -- contains # of sends
     stats[1] -- contains # of receives
     stats[2] -- contains # of bytes sent
     stats[3] -- contains # of bytes received
   firsttag -- first tag for messages,
     tags in range [firsttag, firsttag+nproc-1] are used
 
   return value -- recvIVL
 
   created -- 98jul26, cca
   ------------------------------------------------------------------
*/
IVL *
IVL_MPI_alltoall (
   IVL        *sendIVL,
   IVL        *recvIVL,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in aggListMPI.c -------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------
   create, initialize and return a ChvList object
   to deal with aggregate chevrons
      
   created  -- 98may21, cca
   -----------------------------------------------
*/
ChvList *
FrontMtx_MPI_aggregateList (
   FrontMtx   *frontmtx,
   IV         *frontOwnersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        tag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in splitDenseMtx.c ----------------------------------
------------------------------------------------------------------------
*/
/*

-----------------------------------------------------------------
   purpose -- to split a DenseMtx object by rows
 
   mtx         -- DenseMtx object
   rowmapIV    -- map from rows to owning processes
   firsttag    -- first tag to be used in these messages
   stats[4]    -- statistics vector
      stats[0] -- # of messages sent
      stats[1] -- # of messages received
      stats[2] -- # of bytes sent
      stats[3] -- # of bytes received
   msglvl      -- message level
   msgFile     -- message file
   comm        -- MPI communicator
 
   return value -- a new DenseMtx object filled with the owned rows

 
   created  -- 98may16, cca

-----------------------------------------------------------------
*/
DenseMtx *
DenseMtx_MPI_splitByRows (
   DenseMtx   *mtx,
   IV         *rowmapIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*
   -----------------------------------------------------------------
   purpose -- to scatter a DenseMtx object by rows
 
   Xglobal     -- global DenseMtx object, significant only for root
   Xlocal      -- local DenseMtx object, if NULL on input, will
                  be created if necessary
   rowmapIV    -- map from rows to owning processes
   firsttag    -- first tag to be used in these messages
   stats[4]    -- statistics vector
      stats[0] -- # of messages sent
      stats[1] -- # of messages received
      stats[2] -- # of bytes sent
      stats[3] -- # of bytes received
   msglvl      -- message level
   msgFile     -- message file
   comm        -- MPI communicator
 
   return value -- Xlocal, a local DenseMtx object, may be NULL
 
   created  -- 98may16, cca
   modified -- 98sep26, cca
      mtx is not modified
   -----------------------------------------------------------------
*/
DenseMtx *
DenseMtx_MPI_splitFromGlobalByRows (
   DenseMtx   *Xglobal,
   DenseMtx   *Xlocal,
   IV         *rowmapIV,
   int        root,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*
   -----------------------------------------------------------------
   purpose -- to merge a DenseMtx object by rows
 
   Xlocal      -- DenseMtx object, can be NULL
   Xglobal     -- DenseMtx object, can be NULL
                  significant only for root
   firsttag    -- first tag to be used in these messages
   stats[4]    -- statistics vector
      stats[0] -- # of messages sent
      stats[1] -- # of messages received
      stats[2] -- # of bytes sent
      stats[3] -- # of bytes received
   msglvl      -- message level
   msgFile     -- message file
   comm        -- MPI communicator
 
   return value -- 
      if processor is root
          Xglobal is returned, if was NULL on input, it is created
      else
          NULL
      endif
 
   Xlocal is not modified
 
   created  -- 98sep27, cca
   -----------------------------------------------------------------
*/
DenseMtx *
DenseMtx_MPI_mergeToGlobalByRows (
   DenseMtx   *Xglobal,
   DenseMtx   *Xlocal,
   int        root,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in splitInpMtx.c -----------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------------------------
   purpose -- to split a distributed InpMtx object
 
   inpmtx     -- pointer to the local InpMtx object
   mapIV      -- pointer to the map from vertices to processes
   firsttag   -- first tag value, one will be used
   stats[4]    -- statistics vector
      stats[0] -- # of messages sent
      stats[1] -- # of messages received
      stats[2] -- # of bytes sent
      stats[3] -- # of bytes received
   msglvl     -- local message level
   msgFile    -- local message file
   comm       -- MPI communication structure
 
   return value -- pointer to the new InpMtx object
      that contains the owned entries.
 
   created  -- 97jun20, cca
   modified -- 97oct17, cca
      stats added
   ------------------------------------------------------------
*/
InpMtx *
InpMtx_MPI_split (
   InpMtx     *inpmtx,
   IV         *mapIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*
   ------------------------------------------------------------
   purpose -- to split a distributed InpMtx object
 
   Aglobal  -- pointer to the global InpMtx object,
               significant only for root processor
   Alocal   -- pointer to the local InpMtx object,
               if NULL and will be nonempty, it will be created
   mapIV    -- pointer to the map from vertices to processes
   root     -- processor that presently owns the global matrix
   firsttag -- first tag value, one will be used
   stats[4] -- statistics vector
      stats[0] -- # of messages sent
      stats[1] -- # of messages received
      stats[2] -- # of bytes sent
      stats[3] -- # of bytes received
   msglvl  -- local message level
   msgFile -- local message file
   comm    -- MPI communication structure
 
   return value -- pointer to the local InpMtx object 
      that contains the owned entries.
 
   created  -- 98may16, cca
   modified -- 98sep26, cca
      inpmtx is not modified
   ------------------------------------------------------------
*/
InpMtx *
InpMtx_MPI_splitFromGlobal (
   InpMtx     *Aglobal,
   InpMtx     *Alocal,
   IV         *mapIV,
   int        root,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in splitPencil.c ------------------------------------
------------------------------------------------------------------------
*/
/*
   --------------------------------------------------------------
   purpose -- to split a distributed Pencil object
 
   pencil     -- pointer to the local Pencil object
   mapIV      -- pointer to the map from vertices to processes
   firsttag   -- first tag value, two will be used, tag and tag+1
   stats[4]    -- statistics vector
      stats[0] -- # of messages sent
      stats[1] -- # of messages received
      stats[2] -- # of bytes sent
      stats[3] -- # of bytes received
   msglvl     -- local message level
   msgFile    -- local message file
   comm       -- MPI communication structure
 
   created  -- 98may20, cca
   --------------------------------------------------------------
*/
void
Pencil_MPI_split (
   Pencil     *pencil,
   IV         *mapIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in symbfacMPI.c -------------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------------------------
   perform the symbolic factorization in parallel
 
   input --
      frontETree    -- front tree for the factorization
      frontOwnersIV -- map from fronts to owning process
      pencil        -- matrix pencil object
      firsttag      -- first tag to be used for messages,
                       will use tag, ..., tag + nfront - 1
      msglvl        -- message level
      msgFile       -- message file
      comm          -- MPI communicator
 
   return value --
      symbfacIVL -- contains front indices for supported fronts
 
   created -- 98may20, cca
   ------------------------------------------------------------
*/
IVL *
SymbFac_MPI_initFromPencil (
   ETree      *frontETree,
   IV         *frontOwnersIV,
   Pencil     *pencil,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*
   ------------------------------------------------------------
   perform the symbolic factorization in parallel
 
   input --
      frontETree    -- front tree for the factorization
      frontOwnersIV -- map from fronts to owning process
      inpmtx        -- matrix object
      firsttag      -- first tag to be used for messages,
                       will use tag, ..., tag + nfront - 1
      msglvl        -- message level
      msgFile       -- message file
      comm          -- MPI communicator
 
   return value --
      symbfacIVL -- contains front indices for supported fronts
 
   created -- 98may20, cca
   ------------------------------------------------------------
*/
IVL *
SymbFac_MPI_initFromInpMtx (
   ETree      *frontETree,
   IV         *frontOwnersIV,
   InpMtx     *inpmtx,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in postProcess.c ------------------------------------
------------------------------------------------------------------------
*/
/*
   --------------------------------------------------------------
   purpose -- post-process the factorization
      (1) permute row and column adjacency objects if necessary
      (2) permute lower and upper matrices if necessary
      (3) update the block adjacency objects if necessary
      (4) split the chevron submatrices into submatrices
          and make the submatrix indices local w.r.t their fronts
 
   created -- 98may20, cca
   --------------------------------------------------------------
*/
void
FrontMtx_MPI_postProcess (
   FrontMtx   *frontmtx,
   IV         *frontOwnersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*
   -------------------------------------------------------------
   purpose -- to permute the indices of the upper adjacency
      structure so that for each front J, bnd{J} is in 
      ascending order w.r.t. K cup bnd{K} for par[J] = K.
      process q sends to process r one message that contains
      J cup bnd{J} for all J owned by q and needed by r.
      once all the indices for the supported fronts are present,
      the indices in the upper adjacency structure are reordered
      as necessary.
 
   created -- 98may20, cca
   -------------------------------------------------------------
*/
void
FrontMtx_MPI_permuteUpperAdj (
   FrontMtx   *frontmtx,
   IV         *frontOwnersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*
   -------------------------------------------------------------
   purpose -- to permute the indices of the lower adjacency
      structure so that for each front J, bnd{J} is in
      ascending order w.r.t. K cup bnd{K} for par[J] = K.
      process q sends to process r one message that contains
      J cup bnd{J} for all J owned by q and needed by r.
      once all the indices for the supported fronts are present,
      the indices in the lower adjacency structure are reordered
      as necessary.
 
   created -- 98may20, cca
   -------------------------------------------------------------
*/
void
FrontMtx_MPI_permuteLowerAdj (
   FrontMtx   *frontmtx,
   IV         *frontOwnersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in fullAdjMPI.c -------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------------------
   purpose -- given a distributed InpMtx object,
      gather all the indices onto each process and create
      an IVL object that contains the full adjacency structure
 
   created -- 97dec17, cca
   -----------------------------------------------------------
*/
IVL *
InpMtx_MPI_fullAdjacency (
   InpMtx    *inpmtx,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*
   -----------------------------------------------------------
   purpose -- given a distributed Pencil object,
      gather all the indices onto each process and create
      an IVL object that contains the full adjacency structure
 
   created -- 97dec18, cca
   -----------------------------------------------------------
*/
IVL *
Pencil_MPI_fullAdjacency (
   Pencil    *pencil,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in factorMPI.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------------------
   this is the method that computes the
   parallel factorization of a sparse matrix A using MPI.
 
   input ---
 
      frontmtx      -- front matrix object that holds the factors
      inpmtx        -- matrix object for A
      tau           -- tolerance used in pivoting
      droptol       -- tolerance used in the approximate factorization
      chvmanager    -- ChvManager object to handle working storage
      frontOwnersIV -- map from fronts to owning processes
      lookahead     -- parameter that governs the ``lookahead''
                       behavior, use lookahead = 0 as a default
      cpus          -- vector to store breakdown of cpu times
         cpus[ 0] -- initialize fronts
         cpus[ 1] -- load original entries
         cpus[ 2] -- update fronts
         cpus[ 3] -- insert aggregate data
         cpus[ 4] -- assemble aggregate data
         cpus[ 5] -- assemble postponed data
         cpus[ 6] -- factor fronts
         cpus[ 7] -- extract postponed data
         cpus[ 8] -- store factor entries
         cpus[ 9] -- post initial receives
         cpus[10] -- check for received messages
         cpus[11] -- post initial sends
         cpus[12] -- check for sent messages
      stats         -- vector to store statistics
         stats[ 0] -- # of aggregate sends
         stats[ 1] -- # of bytes in the aggregate sends
         stats[ 2] -- # of aggregate received
         stats[ 3] -- # of bytes in the aggregate received
         stats[ 4] -- # of postponed data sends
         stats[ 5] -- # of bytes in the postponed data sends
         stats[ 6] -- # of postponed data received
         stats[ 7] -- # of bytes in the postponed data received
         stats[ 8] -- # of active Chv objects (working storage)
         stats[ 9] -- # of active bytes in working storage
         stats[10] -- # of requested bytes in working storage
      msglvl        -- message level
      msgFile       -- message file
      firsttag      -- first tag to use during the factorization,
                       reserved tags are tag, ..., tag + 3*nfront + 2
      comm          -- MPI communicator
 
   return value -- if process id is zero, a pointer to the first
   Chv object in a list that contains postponed rows and columns
   that could not be eliminated.
 
   created  -- 98may21, cca
   -------------------------------------------------------------------
*/
Chv *
FrontMtx_MPI_factorInpMtx (
   FrontMtx     *frontmtx,
   InpMtx       *inpmtx,
   double       tau,
   double       droptol,
   ChvManager   *chvmanager,
   IV           *frontOwnersIV,
   int          lookahead,
   int          *perror,
   double       cpus[],
   int          stats[],
   int          msglvl,
   FILE         *msgFile,
   int          firsttag,
   MPI_Comm     comm
) ;
/*
   -------------------------------------------------------------------
   this is the method that computes the 
   parallel factorization of A + sigma*B using MPI.
 
   input ---
 
      frontmtx      -- front matrix object that holds the factors
      pencil        -- matrix pencil object, contains A + sigma*B
      tau           -- tolerance used in pivoting
      droptol       -- tolerance used in the approximate factorization
      chvmanager    -- ChvManager object to handle working storage
      frontOwnersIV -- map from fronts to owning processes
      lookahead     -- parameter that governs the ``lookahead''
                       behavior, use lookahead = 0 as a default
      cpus          -- vector to store breakdown of cpu times
         cpus[ 0] -- initialize fronts
         cpus[ 1] -- load original entries
         cpus[ 2] -- update fronts
         cpus[ 3] -- insert aggregate data
         cpus[ 4] -- assemble aggregate data
         cpus[ 5] -- assemble postponed data
         cpus[ 6] -- factor fronts
         cpus[ 7] -- extract postponed data
         cpus[ 8] -- store factor entries
         cpus[ 9] -- post initial receives
         cpus[10] -- check for received messages
         cpus[11] -- post initial sends
         cpus[12] -- check for sent messages
      stats         -- vector to store statistics
         stats[ 0] -- # of aggregate sends
         stats[ 1] -- # of bytes in the aggregate sends
         stats[ 2] -- # of aggregate received
         stats[ 3] -- # of bytes in the aggregate received
         stats[ 4] -- # of postponed data sends
         stats[ 5] -- # of bytes in the postponed data sends
         stats[ 6] -- # of postponed data received
         stats[ 7] -- # of bytes in the postponed data received
         stats[ 8] -- # of active Chv objects (working storage)
         stats[ 9] -- # of active bytes in working storage
         stats[10] -- # of requested bytes in working storage
      msglvl        -- message level
      msgFile       -- message file
      firsttag      -- first tag to use during the factorization,
                       reserved tags are tag, ..., tag + 3*nfront + 2
      comm          -- MPI communicator
 
   return value -- if process id is zero, a pointer to the first
   Chv object in a list that contains postponed rows and columns
   that could not be eliminated.
 
   created  -- 98may21, cca
   -------------------------------------------------------------------
*/
Chv *
FrontMtx_MPI_factorPencil (
   FrontMtx     *frontmtx,
   Pencil       *pencil,
   double       tau,
   double       droptol,
   ChvManager   *chvmanager,
   IV           *frontOwnersIV,
   int          lookahead,
   int          *perror,
   double       cpus[],
   int          stats[],
   int          msglvl,
   FILE         *msgFile,
   int          firsttag,
   MPI_Comm     comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in splitFrontMtx.c ----------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------------
   purpose -- after the factorization has been computed and the
      front matrices have been split into submatrices, and after
      a solve map object has been computed, the submatrices
      are sent to the process that owns them.
 
   frontmtx -- stores the factor matrix
   solvemap -- stores the map from submatrices to processes
 
   created -- 98may21, cca
   -------------------------------------------------------------
*/
void
FrontMtx_MPI_split (
   FrontMtx   *frontmtx,
   SolveMap   *solvemap,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in Graph_Bcast.c ------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------
   purpose -- to broadcast a Graph IVL object from 
              one processor to all the others
 
   created -- 98sep10, cca
   -----------------------------------------------
*/
Graph *
Graph_MPI_Bcast (
   Graph      *graph,
   int        root,
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in IVL_Bcast.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   ------------------------------------------
   purpose -- to broadcast an IVL object from
              one processor to all the others
 
   created -- 98sep10, cca
   ------------------------------------------
*/
IVL *
IVL_MPI_Bcast (
   IVL        *ivl,
   int        root,
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in ETreeBcast.c -------------------------------------
------------------------------------------------------------------------
*/
/*
   ---------------------------------------------
   purpose -- to broadcast a front tree object 
              from one process to all the others
 
   created -- 98may21, cca
   ---------------------------------------------
*/
ETree *
ETree_MPI_Bcast (
   ETree      *etree,
   int        root,
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in rowmapMPI.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------------------
   purpose -- after pivoting for a nonsymmetric factorization,
              some delayed rows may belong to a process other
              than its original owner. this method returns an
              IV object that maps rows to owning processes.
 
   created -- 98may22, cca
   -----------------------------------------------------------
*/
IV *
FrontMtx_MPI_rowmapIV (
   FrontMtx   *frontmtx,
   IV         *frontOwnersIV,
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in colmapMPI.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------------
   purpose -- after pivoting for a nonsymmetric factorization,
              some delayed columns may belong to a process other
              than its original owner. this method returns an
              IV object that maps columns to owning processes.
 
   created -- 98may22, cca
   -------------------------------------------------------------
*/
IV *
FrontMtx_MPI_colmapIV (
   FrontMtx   *frontmtx,
   IV         *frontOwnersIV,
   int        msglvl,
   FILE       *msgFile,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in utilities.c --------------------------------------
------------------------------------------------------------------------
*/
/*
   ----------------------------
   return the maximum tag value
 
   created -- 98jan08, cca
   ----------------------------
*/
int
maxTagMPI (
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in solveMPI.c ---------------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------------------
   MPI solve method for (L + I)D(I + U)X = B or (U^T + I)D(I + U)X = B
 
   created -- 98may21, ca
   -------------------------------------------------------------------
*/
void
FrontMtx_MPI_solve (
   FrontMtx        *frontmtx,
   DenseMtx        *solmtx,
   DenseMtx        *rhsmtx,
   SubMtxManager   *mtxmanager,
   SolveMap        *solvemap,
   double          cpus[],
   int             stats[],
   int             msglvl,
   FILE            *msgFile,
   int             firstTag,
   MPI_Comm        comm
) ;
/*--------------------------------------------------------------------*/
#define MMM_WITH_A   0
#define MMM_WITH_AT  1
#define MMM_WITH_AH  2
#define MMM_LOCAL    1
#define MMM_GLOBAL   2
/*
   --------------------------------------------------------------------
   symflag -- symmetry flag
      SPOOLES_SYMMETRIC, SPOOLES_HERMITIAN or SPOOLES_NONSYMMETRIC
   opflag -- operations flag
      0 (MMM_WITH_A)  -- multiply with A
      1 (MMM_WITH_AT) -- multiply with A^T
      2 (MMM_WITH_AH) -- multiply with A^H
   XownedIV -- list of rows of X owned by this processor
   XsupIV   -- vector of rows of X that are supported by this processor
   XmapIV   -- vector that maps global rows of X to local rows of X
               that are supported by this processor,
       if jj = Xsup[ii] then
          Xmap[jj] = ii 
       else
          Xmap[jj] = -1
       endif
   XsendIVL -- list jproc contains the local entries of Xloc that get
               sent to processor jproc.
   XrecvIVL -- list jproc contains the local entries of Xsupp that will
               be received from processor jproc.
   YownedIV -- list of rows of Y owned by this processor
   Xsupp    -- DenseMtx object used in the matrix-matrix multiply
   YsupIV -- vector of rows of Y that are supported by this processor
   YmapIV -- vector that maps global rows of Y to local rows of Y
             that are supported by this processor,
       if jj = Ysup[ii] then
          Ymap[jj] = ii 
       else
          Ymap[jj] = -1
       endif
   YsendIVL -- list jproc contains the local entries of Yloc that get
               sent to processor jproc.
   YrecvIVL -- list jproc contains the local entries of Ysupp that will
               be received from processor jproc.
   Ysupp    -- DenseMtx object used in the matrix-matrix multiply

   created -- 98aug21, cca
   --------------------------------------------------------------------
*/
typedef struct _MatMulInfo   MatMulInfo ;
struct _MatMulInfo {
   int        symflag   ;
   int        opflag    ;
   IV         *XownedIV ;
   IV         *XsupIV   ;
   IV         *XmapIV   ;
   IVL        *XsendIVL ;
   IVL        *XrecvIVL ;
   DenseMtx   *Xsupp    ;
   IV         *YownedIV ;
   IV         *YsupIV   ;
   IV         *YmapIV   ;
   IVL        *YsendIVL ;
   IVL        *YrecvIVL ;
   DenseMtx   *Ysupp    ;
} ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in MMM.c --------------------------------------------
------------------------------------------------------------------------
*/
/*
   -------------------------------------------------------
   purpose -- setup the distributed matrix-matrix multiply
              information object
 
   created -- 98aug21, cca
   -------------------------------------------------------
*/
MatMulInfo *
MatMul_MPI_setup (
   InpMtx     *A,
   int        symflag,
   int        opflag,
   IV         *XownersIV,
   IV         *YownersIV,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        tag,
   MPI_Comm   comm
) ;
/*
   ------------------------------------------------------------
   set the indices of A to be local with respect to its support
 
   created -- 98aug21, cca
   ------------------------------------------------------------
*/
void
MatMul_setLocalIndices (
   MatMulInfo   *info,
   InpMtx       *A
) ;
/*
   -------------------------------------------------------------
   set the indices of A to be global with respect to its support
 
   created -- 98aug21, cca
   -------------------------------------------------------------
*/
void
MatMul_setGlobalIndices (
   MatMulInfo   *info,
   InpMtx       *A
) ;
/*
   ---------------------------------------------------------
   purpose -- compute the distributed matrix-matrix multiply
              Y := Y - alpha * A * X
      where A, Xloc and Yloc are distributed
 
   created -- 98aug21, cca
   ---------------------------------------------------------
*/
void
MatMul_MPI_mmm (
   MatMulInfo   *info,
   DenseMtx     *Yloc,
   double       alpha[],
   InpMtx       *A,
   DenseMtx     *Xloc,
   int          stats[],
   int          msglvl,
   FILE         *msgFile,
   int          tag,
   MPI_Comm     comm
) ;
/*
   --------------------------------------------------
   free the MatMulInfo object and its data structures 
 
   created -- 98aug21, cca
   --------------------------------------------------
*/
void
MatMul_cleanup (
   MatMulInfo   *info
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in DenseMtx_gather.c --------------------------------
------------------------------------------------------------------------
*/
/*
   --------------------------------------------------------------------
   purpose -- to gather entries from a distributed X into Y .
      what rows of X to be sent to other processors are 
      found in sendIVL. what rows of Y to be received 
      from other processors are found in recvIVL.
 
   Y  -- on return, contains the rows specified by recvIVL.
      row indices of Y will be in ascending order.
   X  -- this processor's part of the distributed partitioned
      DenseMtx object. row indices of X are assumed to be 
      in ascending order.
   sendIVL -- list jproc contains the global ids of rows in X
      that need to be sent to processor jproc. note, lists are
      assumed to be in ascending order and are local with respect to X.
   recvIVL -- list jproc contains the global ids of rows in jproc's
     part of X that will to be sent to this processor. note,
      lists are assumed to be in ascending order and are local
      with respect to Y.
 
   created -- 98jul31, cca
   --------------------------------------------------------------------
*/
void
DenseMtx_MPI_gatherRows (
   DenseMtx   *Y,
   DenseMtx   *X,
   IVL        *sendIVL,
   IVL        *recvIVL,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in DenseMtx_scatterAdd.c ----------------------------
------------------------------------------------------------------------
*/
/*
   --------------------------------------------------------------------
   purpose -- to scatter/add entries from a distributed X into Y.
      what rows of X to be sent to other processors are 
      found in sendIVL. what rows of Y to be received 
      from other processors are found in recvIVL.
 
   Y  -- on return, contains the rows specified by recvIVL.
      row indices of Y will be in ascending order.
   X  -- this processor's part of the distributed partitioned
      DenseMtx object. row indices of X are assumed to be 
      in ascending order.
   sendIVL -- list jproc contains the global ids of rows in X
      that need to be sent to processor jproc. note, lists are
      assumed to be in ascending order and are local with respect to X.
   recvIVL -- list jproc contains the global ids of rows in jproc's
     part of X that will to be sent to this processor. note,
      lists are assumed to be in ascending order and are local
      with respect to Y.
 
   created -- 98jul31, cca
   --------------------------------------------------------------------
*/
void
DenseMtx_MPI_scatterAddRows (
   DenseMtx   *Y,
   DenseMtx   *X,
   IVL        *sendIVL,
   IVL        *recvIVL,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/
/*
------------------------------------------------------------------------
---- methods found in makeSendRecvIVLs.c -------------------------------
------------------------------------------------------------------------
*/
/*
   -----------------------------------------------------------------
   purpose -- to analyze and organize communication. it was written
     in support of a distributed matrix-vector multiply but can be
     used for other applications.
 
   each processor has a list of items it "supports" or needs found
   in the supportedIV object. the globalmapIV object contains the
   map from items to owning processors. we need to figure out what
   items this processor will send to and receive from each other
   processor. this information is found in the sendIVL and recvIVL
   objects. 
 
   on return, list jproc of sendIVL contains the items owned by
   this processor and needed by jproc.
   on return, list jproc of recvIVL contains the items needed by
   this processor and owned by jproc.
 
   as a concrete example, consider a distributed Y = A * X.
   the matrix A, the right hand side X and the vector Y are
   distributed among processors. 
 
   consider the case where the supportedIV object contains the rows
   of X that are needed by this processor to perform its part of the
   matrix-vector multiply. globalmapIV contains the map from rows
   of X to the owning processors. on return, list jproc of sendIVL
   contains the row indices of X owned by this processor that are
   needed by processor jproc. on return, list jproc of recvIVL 
   contains the row indices of X needed by this processor that are
   owned by processor jproc.
 
   consider the case where the supportedIV object contains the rows
   of Y that will be updated by this processor when it performs it
   part of the matrix-vector multiply. globalmapIV contains the map
   from rows of Y to their owning processors. on return, list jproc
   of recvIVL contains the row indices of Y on this processor that
   need to be sent to their owner, processor jproc. on return, list
   jproc of sendIVL contains the row indices of Y owned by this 
   processor that will be sent by processor jproc to this
   processor.
 
   created -- 98aug01, cca
   -----------------------------------------------------------------
*/
void
makeSendRecvIVLs (
   IV         *supportedIV,
   IV         *globalmapIV,
   IVL        *sendIVL,
   IVL        *recvIVL,
   int        stats[],
   int        msglvl,
   FILE       *msgFile,
   int        firsttag,
   MPI_Comm   comm
) ;
/*--------------------------------------------------------------------*/