File: installation.html

package info (click to toggle)
petsc 3.2.dfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 124,660 kB
  • sloc: ansic: 342,250; cpp: 62,975; python: 32,761; fortran: 17,337; makefile: 15,867; xml: 621; objc: 594; sh: 492; java: 381; f90: 347; csh: 245
file content (1252 lines) | stat: -rw-r--r-- 55,794 bytes parent folder | download
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
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
<html>
<body BGCOLOR="FFFFFF">

            <table border="0" width="100%">
              <tbody>
                <tr>
                  <td width="50%">
                    <h1><b><a name="Docs: Installation">Docs:&nbsp;
                          Installation</a></b></h1>
                  </td>
                  <td width="50%"><img src="../images/headbang.gif"
                      border="0" height="113" width="113"></td>
                </tr>
              </tbody>
            </table>
            

            <h3>&nbsp; Quick instructions:</h3>
            &nbsp; Invoke the following commands from the top level
            PETSc
            directory
            [using bash shell]&nbsp; <br>
            <div style="margin-left: 40px;"><font color="#ff0000">export
                PETSC_DIR=$PWD</font><br>
            </div>
            <div style="margin-left: 40px;"><font color="#ff0000">./configure
--with-cc=gcc
--with-fc=gfortran
                --download-f-blas-lapack=1
                --download-mpich=1</font><br>
            </div>
            <div style="margin-left: 40px;"><font color="#ff0000">make
                all
                test</font></div>
            <h3>&nbsp; Detailed instructions:&nbsp; [<a style="color:
                rgb(204, 102, 0);" href="#Windows">Check here for MS
                Windows Installation</a>]<br>
            </h3>
            <ul>
              <li>Sugest downloading and installing PETSc as a <span
                  style="font-weight: bold;">regular/non-root user,</span>
                perhaps in <span style="font-weight: bold;">/home/username/soft</span></li>
              <li><a href="../download/index.html">Download</a> latest
                PETSc
                release tarball: petsc-3.2-p0.tar.gz<br>
              </li>
              <li><font color="#ff0000">cd /home/username/soft</font></li>
              <li><font color="#ff0000">gunzip -c petsc-3.2-p0.tar.gz
                  | tar -xof -</font></li>
              <li><font color="#ff0000">cd petsc-3.2-p0</font></li>
              <li>sh/bash shell:&nbsp;&nbsp; <font color="#ff0000">PETSC_DIR=$PWD;
                  export
                  PETSC_DIR</font><br>
                csh/tcsh shell:&nbsp; <font color="#ff0000">setenv
                  PETSC_DIR $PWD</font></li>
              <li><font color="#ff0000">./configure</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
(use
--help
for
options
or
the






                <a href="#ExampleUsage">example usages</a>
                below)</li>
              <li> <font color="#ff0000">make all</font><br>
              </li>
              <li><font color="#ff0000">make test</font><br>
              </li>
            </ul>
            <h3>Encounter problems?</h3>
            <ul>
              <li><strong>Read the error message from
                  ./configure!</strong></li>
              <li>If you get the message 'No such file or
                directory'
                try <font color="#ff0000">python ./configure</font></li>
              <li><a href="installation.html#BLAS/LAPACK"> BLAS and
                  LAPACK problems</a></li>
              <li><a href="installation.html#MPI:"> MPI problems</a>.
                I <a
                  href="installation.html#I%20don%27t%20want%20to%20use%20MPI:">Don't
                  want
                  MPI</a></li>
              <li> Check the <a
href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/bugreporting.html">bug-reporting</a>
                section</li>
            </ul>
          </td>
        </tr>
      </tbody>
    </table>
    <table width="100%">
      <tbody>
        <tr>
          <td valign="top" width="75%">
            <hr>
            <h3><b><a name="ExampleUsage"></a>Example Usages:</b></h3>
            <ul>
              <li>Examples are at <span style="font-weight: bold;">config/examples/*.py</span>.
                We
                use
                some
                of
                these
                scripts
                locally
                for
                testing
                - <span style="font-weight: bold;"></span>for
                example
                one
                can update these
                files and run as:<span style="font-weight: bold;"><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span
                  style="color: rgb(255, 0, 0);">config/examples/arch-osx-10.6.py</span><br>
              </li>
              <li>Using the bash shell, assuming BLAS,
                LAPACK, MPICH are not currently installed <font
                  color="#551a8b">./configure</font>
                will download &amp;
                install BLAS, LAPACK, MPICH if they are not already
                installed on the
                system) :<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
                  color="#ff0000">export
                  PETSC_DIR=/home/petsc/petsc-3.2-p0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  cd $PETSC_DIR<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  ./configure
                  --with-cc=gcc --with-fc=gfortran
                  --download-f-blas-lapack=1
                  --download-mpich=1<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make <br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make test</font></li>
              <li>Same as above - but build Complex version of PETSc
                [using
                c++ compiler] (add the option <span style="color:
                  rgb(255, 0, 0);">--with-fortran-kernels=generic</span>
                to get possibly faster complex number performance on
                some systems):<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
                  color="#ff0000">export
                  PETSC_DIR=/home/petsc/petsc-3.2-p0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  cd $PETSC_DIR<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  ./configure
                  --with-cc=gcc --with-fc=gfortran --with-cxx=g++
                  --download-f-blas-lapack=1
                  --download-mpich=1
                  --with-scalar-type=complex --with-clanguage=cxx<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make <br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make test</font></li>
              <li>Using the bash shell, assuming BLAS,
                LAPACK, MPICH software are installed at the specified
                locations, and
                use MPI compilers <span style="font-weight: bold;">mpicc/mpif90</span>:<br>
                [Note: Do not specify --with-cc --with-fc&nbsp; etc when
                using
                --with-mpi-dir - so that mpicc/mpif90 can be picked up
                from mpi-dir]<br>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font
                  color="#ff0000">export
                  PETSC_DIR=/home/petsc/petsc-3.2-p0<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  cd $PETSC_DIR<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  ./configure
                  --with-blas-lapack-dir=/usr/local/lib
                  --with-mpi-dir=/usr/local/mpich<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make <br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make test</font><font color="#ff0000"> </font></li>
              <li>Using csh shell, install 2 variants of PETSc, one with
                gnu,
                the other with intel compilers<font color="#ff0000"><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  ./configure
                  PETSC_ARCH=linux-gnu CC=gcc FC=gfortran
                  --download-mpich=1<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make </font><font color="#ff0000">PETSC_ARCH=linux-gnu</font><br>
                <font color="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
make











                </font><font color="#ff0000">PETSC_ARCH=linux-gnu test</font><font
                  color="#ff0000"><br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  ./configure </font><font color="#ff0000">PETSC_ARCH=linux-gnu-intel
                </font><font color="#ff0000">CC=icc FC=ifort </font><font
                  color="#ff0000">--download-mpich=1</font><font
                  color="#ff0000">
                  --with-blas-lapack-dir=/usr/local/mkl<br>
                  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  make </font><font color="#ff0000">PETSC_ARCH=linux-gnu-intel</font><br>
                <font color="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
make











                </font><font color="#ff0000">PETSC_ARCH=linux-gnu-intel
                </font><font color="#ff0000">test </font></li>
            </ul>
            <hr>
            <p>PETSC_DIR and PETSC_ARCH are a couple of variables
              control the
              configuration and build
              process of PETSc. These variables can be set as envirnment
              variables
              or specified on the command line [to both configure and
              make]</p>
            <ul>
              <li>specify enviornment variable for csh/tcsh [can be
                specified
                in ~/.cshrc]<br>
                <pre><font color="#ff0000">setenv PETSC_DIR /home/balay/petsc-3.2-p0<br>setenv PETSC_ARCH linux-gnu-c-debug</font></pre>
              </li>
              <li>specify enviornment variable for bash [can be
                specified in
                ~/.bashrc]<br>
                <pre><font color="#ff0000">export PETSC_DIR=/home/balay/petsc-3.2-p0<br>export PETSC_ARCH=linux-gnu-c-debug</font>        </pre>
              </li>
              <li>specify variable on commandline to configure<br>
                <pre><font color="#ff0000">./configure PETSC_DIR=/home/balay/petsc-3.2-p0 PETSC_ARCH=linux-gnu-c-debug [other configure options]</font><br></pre>
              </li>
              <li>specify variables on command line to make<br>
                <pre><font color="#ff0000">make PETSC_DIR=/home/balay/petsc-3.2-p0 PETSC_ARCH=linux-gnu-c-debug [other make options]</font></pre>
              </li>
            </ul>
            <p><b><a name="PETSC_DIR"><font color="#551a8b">PETSC_DIR</font></a></b>:
              this
              variable
              should
              point
              to
              the
              location
              of
              the
              PETSc
              installation
              that
              is used. Multiple PETSc versions can coexist
              on the same file-system. By changing PETSC_DIR value, one
              can switch
              between these installed versions of PETSc.</p>
            <p><b><font color="#551a8b">PETSC_ARCH</font></b>:
              this variable gives a name to a&nbsp;
              configuration/build. Configure uses this value to stores
              the generated
              config makefiles in ${PETSC_DIR}/${PETSC_ARCH}/conf. And
              make uses
              this value to determine this location of these makefiles
              [which
              intern help in locating the correct include and library
              files].</p>
            <p>Thus one can install multiple variants of PETSc libraries
              - by
              providing different PETSC_ARCH values to each configure
              build. Then one
              can switch
              between using these variants of libraries [from make] by
              switching the
              PETSC_ARCH value used.<br>
            </p>
            <p>If configure doesn't find a PETSC_ARCH value [either in
              env
              variable or command line option], it automatically
              generates a default
              value and uses it. Also - if make doesn't find a
              PETSC_ARCH env
              variable - it defaults to the value used by last
              successful invocation
              of previous configure.</p>
            <p><font color="#551a8b"><b><a
                    href="#Docs:%20%20Installation">Return
                    to
                    Installation
                    Instructions</a>
                  &nbsp;&nbsp;&nbsp;&nbsp;</b></font> </p>
            <hr>
            <p><font color="#551a8b"><b><a name="Compilers">Compilers:</a></b></font>
              Specify compilers and compiler options used to build PETSc
              [and perhaps
              external packages]<br>
            </p>
            <ul>
              <li>Specify compilers using the options <span
                  style="color: rgb(255, 0, 0);">--with-cc --with-fc
                  --with-cxx</span>
                for c, c++, fortran compilers</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--with-cc=mpicc
                    --with-fc=mpif90</span><br>
                  <span style="color: rgb(255, 0, 0);"></span></li>
                <li><span style="color: rgb(255, 0, 0);">--with-cc=gcc
                    --with-fc=gfortran</span></li>
              </ul>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--with-cc=gcc
                    --with-cxx=g++ --with-fc=gfortran
                    --with-clanguage=cxx</span></li>
              </ul>
              <li>If fortran compiler is not available - then disabling
                using
                fortran</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--with-fc=0</span></li>
              </ul>
              <li>If no compilers are specified - configure will
                automatically look for available MPI or regular
                compilers in users PATH</li>
              <ul>
                <li>mpicc/mpiCC/mpif90 or mpif77<br>
                </li>
                <li>gcc/g++/gfortran or g77</li>
                <li>cc/CC/f77 etc..</li>
              </ul>
              <li>Its best to use <a href="MPICompilers">MPI compilers</a>
                as this will avoid the situation where MPI is compiled
                with one set of
                compilers [like gcc/g77] and user specified incompatible
                compilers&nbsp; to PETSc [perhaps icc/ifort]. This can
                be done by
                either specifying --with-cc=mpicc or --with-mpi-dir [and
                not
                --with-cc=gcc]</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--with-cc=mpicc
                    --with-fc=mpif90</span></li>
                <li><span style="color: rgb(255, 0, 0);">--with-mpi-dir=/opt/mpich2-1.1
                    [but
                    *no*
                    --with-cc=gcc
                    ]<br>
                  </span></li>
              </ul>
              <li>Configure defaults to building PETSc in debug mode.
                One can
                switch to using optimzed mode with the toggle option
                --with-debugging
                [defaults to debug enabled]. Additionally one can
                specify more suitable
                optimization flags
                with the options COPTFLAGS, FOPTFLAGS, CXXOPTFLAGS.</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">./configure
                    --with-cc=gcc
                    --with-fc=gfortran --with-debugging=0 COPTFLAGS='-O3
                    -march=p4
                    -mtune=p4' FOPTFLAGS='-O3 -qarch=p4 -qtune=p4'</span></li>
              </ul>
              <li>Configure cannot detect compiler libraries for certain
                set
                of compilers. In this case one can specify additional
                system/compiler
                libraries using the LIBS option</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">./configure
                    LIBS='-ldl
                    /usr/lib/libm.a'</span><br>
                </li>
              </ul>
            </ul>
            <p> </p>
            <p><font color="#551a8b"><b><a
                    href="installation.html#Docs:%20%20Installation">Return
to
                    Installation Instructions</a>&nbsp;&nbsp;&nbsp;&nbsp;</b></font>
            </p>
            <hr>
            <p><font color="#551a8b"><b><a name="external">External
                    Packages:</a></b></font>
              PETSc provides interfaces to various <a
                href="../miscellaneous/external.html">external packages</a>.
              Blas/Lapack and MPI are generally required packages - but
              one can
              optionally use <a href="linearsolvertable.html">external
                solvers</a>
              like Hypre, MUMPS etc.. from within PETSc aplications.<br>
            </p>
            <p>PETSc configure has the ability to download and install
              these
              external packages. Alternatively if these packages are
              already
              installed, then configure can detect and use them.</p>
            <p>The following modes can be used to install/use external
              packages with configure.<br>
              <span style="font-weight: bold;"></span></p>
            <p><span style="color: rgb(153, 51, 153);">--download-PACKAGENAME=1</span>
              : Download specified package and install it. Then
              configure PETSc to
              use this package.<br>
            </p>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">--download-f-blas-lapack=1
                  --download-mpich=1</span></li>
              <li><span style="color: rgb(255, 0, 0);">--download-blacs=1
--download-scalapack=1
                  --download-mumps=1</span><br>
              </li>
            </ul>
            <p><span style="color: rgb(255, 0, 0);"><span style="color:
                  rgb(153, 51, 153);">--download-PACKAGENAME=/PATH/TO/package.tar.gz</span></span>
              : If ./configure cannot automatically download the package
              [due
              to
              network/firewall issues], one can download the package by
              alternaive
              means [perhaps wget or scp via some other machine]. Once
              the tarfile is
              downloaded, the path to this file can be specified to
              configure with
              this option. Configure will proceed to install this
              package and then
              configure PETSc with it.<br>
            </p>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">--download-mpich</span><span
                  style="color: rgb(255, 0, 0);">=/home/petsc/mpich2-1.0.4p1.tar.gz</span><br>
              </li>
            </ul>
            <p><span style="color: rgb(153, 51, 153);">--with-PACKAGENAME-dir=PATH</span>
              : If the external package is already installed - specify
              its location
              to configure [it will attempt to detect, include, library
              files from
              this location.] Normally this corresponds to the top-level
              installation
              dir for the package.<br>
            </p>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">--with-mpi-dir=/home/petsc/software/mpich2-1.0.4p1</span></li>
            </ul>
            <span style="color: rgb(153, 51, 153);">--with-PACKAGENAME-include=INCLUDEPATH
              --with-PACKAGENAME-lib=LIBRARYLIST</span>: Usually a
            package is defined
            completely by its include file location - and library list.
            [If the
            package is already installed] - then one can use these two
            options to
            specify the package to configure. For eg:<br>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">--with-superlu-include=/home/petsc/software/suerplu/include
--with-superlu-lib=/home/petsc/software/superlu/lib/libsuperlu.a</span></li>
              <li><span style="color: rgb(255, 0, 0);">--with-parmetis-include=/sandbox/balay/parmetis/include
                  --with-parmetis-lib="-L/sandbox/balay/parmetis/lib
                  -lparmetis
                  -lmetis"</span></li>
              <li><span style="color: rgb(255, 0, 0);">--with-parmetis-include=/sandbox/balay/parmetis/include
--with-parmetis-lib=[/sandbox/balay/parmetis/lib/libparmetis.a,libmetis.a]</span></li>
            </ul>
            <span style="font-weight: bold;">Notes</span>:<br>
            <ul>
              <li>Run <span style="color: rgb(255, 0, 0);"></span><span
                  style="color: rgb(255, 0, 0);"><span style="color:
                    rgb(51, 0, 51);"><span style="color: rgb(255, 0, 0);
                      font-weight: bold;">./configure --help</span></span></span><span
                  style="color: rgb(255, 0, 0);"></span> to get the list
                of external
                packages - and corresponding additional options&nbsp;
                [for example <span style="color: rgb(255, 0, 0);">--with-mpiexec</span>
                for mpich]<br>
              </li>
              <li>Generally one would use either one of the above 4
                modes for any given package - and not mix these. [i.e
                mixing <span style="color: rgb(255, 0, 0);">-with-mpi-dir
                  <span style="color: rgb(51, 0, 51);">and</span> </span><span
                  style="color: rgb(255, 0, 0);">-with-mpi-include<span
                    style="color: rgb(51, 0, 51);"> etc.. should be
                    avoided]</span></span></li>
              <li><span style="color: rgb(255, 0, 0);"><span
                    style="color: rgb(51, 0, 51);">Some packages might
                    not support certain
                    options like <span style="color: rgb(255, 0, 0);">--download-PACKAGENAME</span>
                    or <span style="color: rgb(255, 0, 0);">--with-PACKAGENAME-dir</span>.
                    Some architectures like Windows might have issues
                    with these options.
                    In these cases, <span style="color: rgb(255, 0,
                      0);">--with-PACKAGENAME-include
                      --with-PACKAGENAME-lib</span> options should be
                    prefered.</span></span></li>
              <li><span style="color: rgb(255, 0, 0);"><span
                    style="color: rgb(51, 0, 51);">Its best to install
                    some external
                    packages like SuperLU_DIST, MUMPS, Hypre with the
                    option <span style="color: rgb(255, 0, 0);">--download-PACKAGENAME</span>.&nbsp;
[the
                    correct options for these packages are <span
                      style="color: rgb(255, 0, 0);">--download-superlu_dist=1
--download-mumps=1
                      --download-hypre=1</span>]<br>
                  </span></span></li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);"><span
                      style="color: rgb(51, 0, 51);">This will install
                      the COMPATIBLE
                      version of the external package. A generic install
                      of this package
                      might not be compatible with PETSc [perhaps due to
                      version differences
                      - or perhaps due to the requirement of additional
                      patches for it to
                      work with PETSc]</span></span></li>
                <li><span style="color: rgb(255, 0, 0);"><span
                      style="color: rgb(51, 0, 51);">All packages will
                      be installed with the
                      same set of compilers - this avoids problems [for
                      ex: wiered link time
                      errors] with mixing code compiled with multiple
                      compilers [for example
                      mixing gfortran and ifort compiled code].<br>
                    </span></span></li>
              </ul>
              <li><span style="color: rgb(255, 0, 0);"><span
                    style="color: rgb(51, 0, 51);">If one had to
                    download a compatible
                    external package manually, then the URL for this
                    package is listed in
                    configure source for this package. For example,
                    check <span style="color: rgb(153, 51, 153);">config/PETSc/packages/SuperLU.py</span>
                    for the url for download this package.</span></span></li>
            </ul>
            <span style="font-weight: bold;">Additional options</span>:<br>
            <p><span style="color: rgb(255, 0, 0);"><span style="color:
                  rgb(153, 51, 153);">--with-external-packages-dir=PATH</span></span>
              : By default, external packages will be installed in <span
                style="color: rgb(255, 0, 0);">${PETSC_DIR}/externalpackages</span>.
              However one can choose a different location where these
              packages are
              installed.</p>
            <p><font color="#551a8b"><b><a
                    href="#Docs:%20%20Installation">Return
                    to
                    Installation
                    Instructions</a>&nbsp;&nbsp;&nbsp;&nbsp;</b></font></p>
            <hr>
            <p><font color="#551a8b"><b><a name="BLAS/LAPACK">BLAS/LAPACK</a>:</b></font>
              these packages provide some basic numeric kernels used by
              PETSc.</p>
            <ul>
              <li>Configure will automatically look for blas/lapack in
                certain
                standard locations, on most systems you should not need
                to provide any
                information about BLAS/LAPACK in the ./configure
                command.</li>
              <li>One can use the following options to let configure
                download/install blas/lapack automatically. <br>
              </li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--download-f-blas-lapack=1</span>&nbsp;
                  [when
                  fortran
                  compiler
                  is
                  present]<br>
                </li>
                <li><span style="color: rgb(255, 0, 0);">--download-f2cblaslapack=1</span>
                  [when configuring without a fortran compiler - i.e
                  --with-fc=0]</li>
              </ul>
              <li>Alternatively one can use other options like one of
                the
                following.</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--with-blas-lapack-lib=libsunperf.a</span><br>
                </li>
              </ul>
              <ul>
                <li style="color: rgb(255, 0, 0);">--with-blas-lib=libblas.a
                  --with-lapack-lib=liblapack.a</li>
                <li><span style="color: rgb(255, 0, 0);">--with-blas-lapack-dir=opt/intel/mkl72</span></li>
              </ul>
            </ul>
            <span style="font-weight: bold;">Notes:</span><br>
            <ul>
              <li><font color="#0f0000">Sadly, IBM's ESSL
                  does not have all the routines of BLAS and LAPACK that
                  some packages,
                  such
                  as SuperLU expect; in particular slamch, dlamch and
                  xerbla. In this
                  case instead of using ESSL we suggest </font><font
                  style="color: rgb(255, 0, 0);" color="#0f0000">--download-f-blas-lapack=yes.&nbsp;&nbsp;

                </font><font color="#0f0000">If you really want to use
                  ESSL,
                  see <a
href="http://www.pdc.kth.se/resources/computers/bluegene/LAPACK-CBLAS/LAPACK-CBLAS-build">http://www.pdc.kth.se/resources/computers/bluegene/LAPACK-CBLAS/LAPACK-CBLAS-build</a></font><font
                  color="#0f0000"><br>
                </font></li>
            </ul>
            <p><font color="#551a8b"><b><a
                    href="#Docs:%20%20Installation">Return
                    to
                    Installation
                    Instructions</a>&nbsp;&nbsp;&nbsp;&nbsp;</b></font></p>
            <hr>
            <p><font color="#551a8b"><b><a name="MPI:">MPI:</a></b></font>
              This software provides the parallel functionality for
              PETSc. </p>
            <ul>
              <li>Configure will automatically look for MPI compilers
                mpicc/mpif77 etc and use them if found [in default PATH]<br>
              </li>
              <li>One can use the following options to download/install<br>
              </li>
              <li>One can use the following options to let configure
                download/install MPI automatically</li>
              <ul>
                <li><span style="color: rgb(255, 0, 0);">--download-mpich=1</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                  [install
                  and
                  use
                  MPICH]</li>
                <li><span style="color: rgb(255, 0, 0);">--download-openmpi=1</span>&nbsp;
                  [Install
                  and
                  use
                  Open
                  MPI]<br>
                </li>
              </ul>
              <li>Alternatively one can use other <a
                  href="installation.html#external">externalpackages</a>
                installation
                options.</li>
            </ul>
            <font color="#551a8b"><b><a name="MPICompilers"></a></b></font><span
              style="font-weight: bold; color: rgb(153, 51, 153);">Using
              MPI
              Compilers</span>:<br>
            <ul>
              <li>Its best to install PETSc with MPI compilers - this
                way,
                the SAME compilers used to build MPI are used to build
                PETSc [this
                avoids incompatibilities which might crop up - when
                using libraries
                compiled with different c or fortran compilers.]. This
                can be achieved
                with the following modes.</li>
              <ul>
                <li>Vendor provided MPI might
                  already
                  be installed.&nbsp; IBM, SGI, Cray etc provide their
                  own.<br>
                  &nbsp; <span style="color: rgb(255, 0, 0);">./config/confiure.py
--with-cc=mpcc
                    --with-fc=mpf77</span><br>
                </li>
              </ul>
              <ul>
                <li>If <font color="#0f0000">using MPICH which is
                    already
                    installed [perhaps using myrinet/gm] then use
                    [without specifying
                    --with-cc=gcc etc.so that configure picks up mpicc
                    from mpi-dir]:<br>
                    &nbsp; <span style="color: rgb(255, 0, 0);">./configure</span></font><span
                    style="color: rgb(255, 0, 0);">
                    --with-mpi-dir=/path-to-mpich-install</span></li>
              </ul>
            </ul>
            <p><font color="#551a8b"><b><a name="I don't want to use
                    MPI:">Installing
                    without
                    MPI:</a></b></font> <br>
            </p>
            <ul>
              <li>You can build
                (sequential) PETSc
                without an MPI. This is useful for quickly installing
                PETSc [if MPI is
                not available - for whatever reason]. However - if there
                is any MPI
                code in user application, then its best to install a
                full MPI - even if
                the usage is currently limited to uniprocessor mode.</li>
              <ul>
                <li><font color="#ff0000">./configure
                    --with-mpi=0</font></li>
              </ul>
            </ul>
            <font color="#551a8b"><b>Installing
                with Open MPI with shared MPI libraries:<br>
                <br>
              </b></font>Open MPI defaults to building shared libraries
            for
            MPI.
            However, the binaries generated by MPI wrappers mpicc/mpif77
            etc
            require LD_LIBRARY_PATH to be set to the location of these
            libraries.<br>
            <br>
            Due to this Open MPI restriction one has to set <span
              style="color: rgb(255, 0, 0);">LD_LIBRARY_PATH</span>
            correctly [per
            Open MPI installation instructions], before running PETSc
            configure.
            The
            same issue might exist with LAM as well.<br>
            <br>
            <span style="font-weight: bold;">Notes:<br>
            </span>
            <ul>
              <li>Avoid specifing compilers [with options <span
                  style="color: rgb(255, 0, 0);">--with-cc</span> or <span
                  style="color: rgb(255, 0, 0);">--with-fc</span>]&nbsp;
                when using the
                option <span style="color: rgb(255, 0, 0);">--with-mpi-dir</span>.
                [Option<span style="color: rgb(255, 0, 0);">--with-mpi-dir</span>
                specifies using MPI compilers - so its best to use them
                - and not
                overwride them with user specified <span style="color:
                  rgb(255, 0, 0);">--with-cc</span>].</li>
              <li>One can specify mpiexec or mpiexec with the options <span
                  style="color: rgb(255, 0, 0);">--with-mpiexec</span><br>
              </li>
            </ul>
            <br>
            <table style="border-collapse: collapse;" id="AutoNumber5"
              border="1" bordercolor="#111111" cellpadding="0"
              cellspacing="0" width="72%">
              <tbody>
                <tr>
                  <td width="26%">&nbsp;MPI&nbsp;&nbsp;&nbsp; </td>
                  <td width="74%">&nbsp;<a
                      href="http://www.mpi-forum.org">http://www.mpi-forum.org</a></td>
                </tr>
                <tr>
                  <td width="26%">&nbsp;MPICH</td>
                  <td width="74%">&nbsp;<a
                      href="http://www.mcs.anl.gov/mpi/mpich">http://www.mcs.anl.gov/mpi/mpich</a></td>
                </tr>
                <tr>
                  <td width="26%">&nbsp;Open MPI</td>
                  <td width="74%">&nbsp;<a href="http://www.lam-mpi.org">http://www.open-mpi.org<br>
                    </a></td>
                </tr>
              </tbody>
            </table>
            <br>
            <p><font color="#551a8b"><b><a
                    href="installation.html#Docs:%20%20Installation">Return
to
                    Installation Instructions</a>&nbsp;&nbsp;&nbsp;&nbsp;</b></font>
            </p>
            <hr>
            <h3><a name="Windows"><font color="#551a8b">&nbsp;Microsoft
                  Windows Installation With MS/Intel/Compaq Compilers:</font></a></h3>
            <p>Microsoft windows OS does not provide the same unix shell
              enviornment as the other OSes. Also the default
              MS/Intel/Compaq
              compilers behave differently than other unix compilers.
              And PETSc
              primarily relies on a unix envirment for build tools. So
              to install
              PETSc on windows - one has to install <a
                href="http://www.cygwin.com">cygwin</a>
              [for the unix enviornment] and use <a href="#Win32fe">win32fe</a>
              [part of PETSc sources,to interface to MS/Intel/Compaq
              compilers].<br>
            </p>
            <p><font color="#551a8b"><b>Install Cygwin: </b></font>Please
download
              and install cygwin package from <a
                href="http://www.cygwin.com">http://www.cygwin.com</a>&nbsp;
              Make sure
              the following cygwin components are installed.<br>
            </p>
            <ul>
              <li style="color: rgb(204, 102, 204);">python</li>
              <li style="color: rgb(204, 102, 204);">make</li>
              <li>[default selection should already have <span
                  style="color: rgb(204, 102, 204);">diff</span> and
                other tools]</li>
            </ul>
            <p><font color="#551a8b"><b>Remove Cygwin link.exe: </b></font>Cygwin
link.exe
can
conflict
with
Intel
ifort
and
Comapq
F90
compilers.
If
              you
              are using these compilers - please do [from cygwin/bash
              shell]:<br>
            </p>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">mv
                  /usr/bin/link.exe
                  /usr/bin/link-cygwin.exe</span><br>
              </li>
            </ul>
            <p><font color="#551a8b"><b>Setup cygwin bash shell with
                  Working
                  Compilers: </b></font>We require the compilers to be
              setup properly in
              a cygwin bash command shell, so that "<span style="color:
                rgb(255, 0, 0);">cl foo.c</span>" or "<span
                style="color: rgb(255, 0, 0);">ifort foo.f</span>" works
              from this
              shell. For example - if using VS2005 C and Intel 10
              Fortran one can do:</p>
            <ul>
              <li>Start -&gt; Programs -&gt; Intel Software Development
                Tools
                -&gt; Intel Fortran Compiler 10 -&gt; Visual Fortran
                Build Enviornment
                [32bit or 64bit depending on your usage]. This should
                start a 'dos cmd'
                shell.<br>
              </li>
              <li>Within this shell - run cygwin bash.exe as: <span
                  style="color: rgb(255, 0, 0);">c:\cygwin\bin\bash.exe
                  --login</span></li>
              <li>verify if the compilers are useable [by running cl,
                ifort
                in this shell]<br>
              </li>
              <li>Now run configure with win32fe and then build the
                libraries
                with make [as per the usual instructions]</li>
            </ul>
            Notes: This a new requirement as win32fe can no longer
            autodetect the
            newer versions of compilers. They currently default to
            "noautodetect
            mode.<br>
            <p><font color="#551a8b"><b>Example Configure usage</b></font><font
                color="#551a8b"><b> with Windows Compilers:<br>
                </b></font></p>
            <p><br>
              Use configure with VC2005 C and Intel Fortran 10 [With
              MPICH2
              installed].<br>
            </p>
            <p> <font color="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                ./configure
                --with-cc='win32fe
                cl'
                --with-fc='win32fe
                ifort'&nbsp;
                --with-cxx='win32fe
                cl'&nbsp;
                --download-f-blas-lapack=1</font></p>
            <p>If fortran usage is not required, use:<br>
            </p>
            <font color="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              ./configure --with-cc='win32fe cl' --with-fc=0
              --download-f2cblaslapack=1</font>
            <p><font color="#551a8b"><b>Using Compaq F90</b></font>:<br>
            </p>
            <p>Using Microsoft C/C++ 6.0 &amp; Compaq Fortran 6.0 with
              MPICH2
              configure command to use:<br>
            </p>
            <font color="#ff0000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              ./configure --with-cc='win32fe cl' --with-fc='win32fe f90'
              --download-f-blas-lapack=1</font><br>
            <br>
            Note:&nbsp; MPICH2 mpif.h needs a fix for it to work with
            Compaq F90
            [specifically remove line with MPI_DISPLACEMENT_CURRENT -
            which uses
            'integer*8' - which is unsupported by Compaq F90]<br>
            <p><font color="#551a8b"><b>ExternalPackages</b></font><font
                color="#551a8b"><b>:</b> </font>--download-package
              option does not
              work with many external packages.<br>
            </p>
            <p><font color="#551a8b"><b>Project Files:</b> </font>We
              cannot provide Microsoft Visual Studio project files for
              users as they
              are specific to the configure options, location of
              external packages,
              compiler versions etc. used for any given build of PETSc,
              so they
              are potentially different for each build of PETSc. So if
              you need a project file
              for use with PETSc - please do the following.<br>
            </p>
            <ul>
              <li>create an empty project file with one of the examples
                say src/ksp/ksp/examples/tutorials/ex2.c <br>
              </li>
              <li>try compiling the example from cygwin bash shell -
                using
                makefile - for eg: <br>
                cd src/ksp/ksp/examples/tutorials<br>
                make ex2</li>
              <li>if the above works - then make sure all the
                compiler/linker
                options used by make are also present in the project
                file in the
                correct notation.<br>
              </li>
              <li>if errors - redo the above step. [if all the options
                are
                correctly specified - then the example should compile
                from MSDev.<br>
              </li>
            </ul>
            <p> </p>
            <p><b><font color="#551a8b">Debugger:&nbsp; </font></b>Running
PETSc
              probrams with -start_in_debugger is not supported on this
              platform, so debuggers will need to be initiated manually.
              Make sure
              your environment is properly configured to use the
              appropriate debugger
              for your compiler. The debuggers can be initiated using
              Microsoft
              Visual Studio 6: <b>msdev&nbsp;ex1.exe</b>, Microsoft
              Visual Studio
              .NET: <b>devenv&nbsp;ex1.exe</b>, Intel Enhanced
              Debugger: <b>edb&nbsp;ex1.exe</b>,
              or GNU Debugger <b>gdb&nbsp;ex1.exe</b>.<br>
            </p>
            <p><b><font color="#551a8b">Using Cygwin gcc/g++/gfortran: </font></b>One
can
install
and
use
PETSc
with
gcc/gfortran
compilers
from
cygwin.
In
this
              case follow the regular instructions.<br>
            </p>
            <p><b><font color="#551a8b"><a name="Win32fe"></a>PETSc
                  Win32
                  front end - win32fe</font>:</b>&nbsp;
              This tool is used as a wrapper to Microsoft/ Borland/
              Intel compilers
              and associated tools - to enable building PETSc libraries
              using cygwin
              make
              and other UNIX tools. For additional info, run
              ${PETSC_DIR}/bin/win32/win32fe without any options.</p>
            <p><font color="#551a8b"><b><a
                    href="#Docs:%20%20Installation">Return
                    to
                    Installation
                    Instructions</a><br>
                </b></font></p>
            <hr>
            <h3 style="font-weight: bold;"><a name="root"><font
                  color="#551a8b">Installing PETSc in /usr/local or /opt
                  where sudo or
                  root previledges are required:</font></a></h3>
            <p>If one wants to install PETSc [with sources] in a common
              system location like /usr/local or /opt, then we suggest
              creating a dir
              for
              PETSc in the required location with user privileges, and
              then do the
              PETSc install [as a <span style="font-weight: bold;">regular/non-root
                user</span>]. i.e<br>
            </p>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">sudo mkdir
                  /opt/petsc</span></li>
              <li><span style="color: rgb(255, 0, 0);">sudo chown
                  user:group </span><span style="color: rgb(255, 0,
                  0);">/opt/petsc</span></li>
              <li><span style="color: rgb(255, 0, 0);">cd </span><span
                  style="color: rgb(255, 0, 0);"></span><span
                  style="color: rgb(255, 0, 0);">/opt/petsc</span></li>
              <li><span style="color: rgb(255, 0, 0);">tar -xzf
                  petsc-3.2-p0.tar.gz</span></li>
              <li><span style="color: rgb(255, 0, 0);">cd petsc-3.2-p0</span></li>
              <li><span style="color: rgb(255, 0, 0);">./configure</span></li>
              <li><span style="color: rgb(255, 0, 0);">make<br>
                </span></li>
            </ul>
            <p>&nbsp;One can also use the gnu
              prefix-install mode.<br>
            </p>
            <ul>
              <li><span style="color: rgb(255, 0, 0);">[untar PETSc in a
                  non-root regular location - say /home/username]</span></li>
              <li><span style="color: rgb(255, 0, 0);">setenv PETSC_DIR
                  $PWD<br>
                </span></li>
              <li><span style="color: rgb(255, 0, 0);">./configure
                  --prefix=/opt/petsc/petsc-3.2-p0&nbsp; [other
                  configure options]<br>
                </span></li>
              <li><span style="color: rgb(255, 0, 0);">make</span></li>
              <li><span style="color: rgb(255, 0, 0);">sudo make install
                  PETSC_DIR=$PWD<br>
                </span></li>
            </ul>
            After the install is done, one has to switch to using <span
              style="color: rgb(255, 0, 0);">PETSC_DIR=/opt/petsc/petsc-3.2-p0</span>.
            &nbsp;If
            you've
            installed
            PETSc
            with
            the
            --prefix
            option
            then
            you
            DO
            NOT
            use a PETSC_ARCH variable. You should install different
            configurations using different --prefix names.<br>
            <hr>
            <h3 style="font-weight: bold;"><a name="SP"><font
                  color="#551a8b">Installing
                  on
                  machine
                  requiring
                  cross
                  compiler
                  or
                  a
                  job
                  scheduler,
                  such
                  as
                  IBM SP or IBM Blue Gene:</font></a></h3>
            <p>If one has to use a cross compiler - or go through the
              job
              scheduler to use MPI on a
              given machine - use the configure option <span
                style="font-weight: bold;">'--with-batch=1'</span> as
              follows:<br>
            </p>
            <ul>
              <li>run configure with the additional option <span
                  style="font-weight: bold;">'--with-batch=1' </span>on
                the <span style="font-weight: bold;">frontend node</span>
                (compiler server)
                [perhaps with the
                additional option <span style="font-weight: bold;">'--known-mpi-shared-libraries=0']</span><br>
              </li>
              <li>the above configure run will create a binary <span
                  style="font-weight: bold;">'conftest'</span>. Run this
                binary
                'conftest' on <span style="font-weight: bold;">one
                  compute node</span>
                using the job scheduler.</li>
              <li>The above run of conftest will create a new python
                script <span style="font-weight: bold;">'reconfigure'</span>.
                Run <span style="font-weight: bold;">'python
                  reconfigure'</span>&nbsp; again on
                the <span style="font-weight: bold;">frontend node</span>
                (compiler
                server)to
                complete the configuration process</li>
            </ul>
            <hr>
            <h3><a name="AdditionalMicrosoftWindowsNotes"><font
                  color="#551a8b">Installing with TAU Instrumentation
                  package:</font></a></h3>
            <p><a
                href="http://www.cs.uoregon.edu/research/paracomp/tau/tautools/">TAU</a>
              package and the prerequisite <a
                href="http://www.cs.uoregon.edu/research/paracomp/pdtoolkit/">PDT</a>
              packages need to be installed separately. PETSc provides a
              wrapper
              compiler for TAU. This needs to be invoked with the
              correct information
              for the installed TAU and PDT packages. For eg:<br>
            </p>
            <p>&nbsp;<span style="color: rgb(255, 0, 0);">./configure
                --with-mpi-dir=/home/petsc/soft/linux-rh73/mpich-1.2.4 </span><span
                style="color: rgb(255, 0, 0);">--with-fc=0
                --with-cxx=0
                -PETSC_ARCH=linux-tau </span><span style="color:
                rgb(255, 0, 0);">--with-cc="`pwd`/bin/taucc.py
                -cc=gcc
-pdt_parse=/homes/petsc/soft/linux-rh73/pdtoolkit-2.2b1/linux/bin/cparse
-tau_lib_dir=/homes/petsc/soft/linux-rh73/tau-2.11.18/i386_linux/lib"<br>
              </span></p>
            <hr>
            <p><a name="PythonBindings"><font color="#551a8b"><big
                    style="font-weight: bold;">Installing
                    TOPS components</big>:</font></a></p>
            <p>To install TOPS components one has to download and
              install CCA
              Tools.&nbsp; [linux only]<br>
            </p>
            <ul>
              <li>Get the CCA Tools package from <a
href="http://www.cca-forum.org/download/cca-tools/cca-tools-0.5.9.tar.gz">http://www.cca-forum.org/download/cca-tools/cca-tools-0.5.9.tar.gz</a></li>
              <li>Configure cca-tools using '-with-mpi' option
                [prerequisites
                might be
                Java SDK, c++, mpich1]</li>
              <li>Configure PETSc with C++, babel, ccafe options.
                Check config/config/asterix-tops.py for an example.<br>
              </li>
              <li>Build PETSc libraries &amp; TOPS components with
                'make all'<br>
              </li>
              <li>To test&nbsp; do: 'cd src/tops; make examples'<br>
              </li>
            </ul>
            <hr>
            <h3><a name="CUDA"><font color="#551a8b">Installing PETSc to
                  use
                  NVidia GPUs (aka CUDA)</font></a></h3>
            <ul>
              <li>Install CUDA, Thrust, Cusp in default
                locations; /usr/local/cuda. The versions and locations
                of Thrust and
                Cusp you should use are listed in
                $PETSC_DIR/config/PETSc/packages/cuda.py. The required
                version of CUDA
                may not
                be publically available, you may need to register as an
                NVIDIA
                Developer (free) to access them. <br>
              </li>
            </ul>
            <ul>
              <li>Make sure nvcc is in PATH</li>
              <li>On Linux</li>
              <ul>
                <li>install compatible NVidia kernel <a
                    href="http://developer.nvidia.com/object/cuda_3_1_downloads.html#Linux">developer
                    driver</a> by running the executable you download,
                  as root</li>
                <li>make sure&nbsp; LD_LIBRARY_PATH is set to point to
                  the
                  CUDA libraries, for instance
                  <ul>
                    <li>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib</li>
                  </ul>
                </li>
                <li>verify CUDA installation with Nvidia CUDA SDK [by
                  compiling the SDK - and then running 'deviceQuery'
                  &amp;&amp;
                  'binomialOptions -type=double'] (how do you do
                  this????)<br>
                </li>
              </ul>
              <li>Configure and build PETSc with the additional
                configure
                options
                <ul>
                  <li> --with-cuda=1 --with-cusp=1 --with-thrust=1</li>
                  <li>if the GPU card only supports single precision add
                    --with-precision=single</li>
                  <li>if you did not install in default locations add
                    --with-thrust-dir=path_to_thrust and
                    --with-cusp-dir=path_to_cusp</li>
                </ul>
              </li>
              <li>Run a sample example with:</li>
            </ul>
            <span style="color: rgb(255, 0, 0);">cd
              src/snes/examples/tutorials</span><br style="color:
              rgb(255, 0, 0);">
            <span style="color: rgb(255, 0, 0);">make ex19</span><br
              style="color: rgb(255, 0, 0);">
            <span style="color: rgb(255, 0, 0);">./ex19 -da_vec_type
              mpicusp
              -da_mat_type mpiaijcusp -pc_type none -dmmg_nlevels 1
              -da_grid_x 100
              -da_grid_y 100 -log_summary -mat_no_inode -preload
              off&nbsp;
              -cusp_synchronize</span><br>
            <br>
            &nbsp;&nbsp;&nbsp;&nbsp; We only have experience using
            Nvidia GPUs on
            Apple machines and Intel Xeon servers running Ubuntu 10.04
            x86_64
            NVidia GT200 [Tesla C1060] <br>
            <hr>
            <h3><a name="threads"><font color="#551a8b">Installing PETSc
                  to use PThreads</font></a></h3>
            <ul>
              <li>Configure and build PETSc with the additional
                configure
                options(note this currently only works on Linux)<br>
                <ul>
                  <li> --with-pthreadclasses</li>
                </ul>
              </li>
              <li>Run a sample example with:</li>
            </ul>
            <span style="color: rgb(255, 0, 0);">cd
              src/snes/examples/tutorials</span><br style="color:
              rgb(255, 0, 0);">
            <span style="color: rgb(255, 0, 0);">make ex19</span><br
              style="color: rgb(255, 0, 0);">
            <span style="color: rgb(255, 0, 0);">./ex19 -da_vec_type
              pthread
              -da_mat_type aijpthread -pc_type none -dmmg_nlevels 1
              -da_grid_x 100
              -da_grid_y 100 -log_summary -mat_no_inode -preload
              off&nbsp;
              -cusp_synchronize</span><br>
            <br>
            <hr><br>
            <hr>
            <p></p>
            <p><font color="#551a8b"><b><a
                    href="installation.html#Docs:%20%20Installation">Return
to
                    Installation Instructions</a>&nbsp;&nbsp;&nbsp; <br>
                </b></font></p>
            <hr> </td>
          </body>
</html>