File: runconf

package info (click to toggle)
adios 1.13.1-16
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 23,248 kB
  • sloc: ansic: 133,236; f90: 8,791; sh: 7,806; python: 7,480; xml: 3,793; makefile: 3,002; cpp: 2,340; java: 626; sed: 16; perl: 8
file content (1110 lines) | stat: -rwxr-xr-x 38,367 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
#!/bin/bash
#
# This script is for configuring adios on the authors' machines
# You can study it to figure out how to configure adios on your system
#

SRCDIR=`dirname ${BASH_SOURCE[0]}`
BUILD_FULL=true
if [ x"$1" == x"lean" ]; then
    BUILD_FULL=false
    echo "Build ADIOS without extra packages"
fi

if [ `hostname | cut -c 1-4` == "rhea" ]; then

    ########
    # Rhea #
    ########
    source /etc/profile.d/modules.sh
    TARGET=`module list 2>&1 | grep "PE"- | sed "s/^.*PE-\([a-z]*\).*/\1/"`

    if [ -z "$TARGET" ]; then
        echo "Cannot determine Programming environment. Exit"
        exit 1
    fi
    echo "Configure on Rhea for $TARGET env. for user ${USER}"
    module unload hdf5
    module unload netcdf
    module unload PE-gnu
    module unload PE-pgi
    module unload PE-intel
    module unload PE-pathscale
    module unload pgi gcc intel pathscale
    module unload python
    module load PE-$TARGET
    #module load python
    # Use both seq hdf5 (for utils) and 
    #   parallel hdf5 (for PHDF5 method)

    if [ $BUILD_FULL == "true" ]; then
        echo "Load modules for full build"
        module load hdf5/1.8.11
        SEQ_HDF5_DIR=$HDF5_DIR
        SEQ_HDF5_CLIB=$HDF5_CLIB
        module unload hdf5
        module load hdf5-parallel/1.8.11
        PAR_HDF5_DIR=$HDF5_DIR
        PAR_HDF5_CLIB=$HDF5_CLIB
        module unload hdf5
        # Seq. and Parallel NetCDF 4 
        module load netcdf/4.1.3
        SEQ_NC_DIR=$NETCDF_DIR
        SEQ_NC_CLIB=$NETCDF_CLIB
        module unload netcdf
        #module load netcdf/4.1.3_par
        #PAR_NC_DIR=$NETCDF_DIR
        #PAR_NC_CLIB=$NETCDF_CLIB
        #module unload netcdf
        #module load szip
        #module load bzip2
        module load dataspaces/1.6.2
        module load flexpath/1.12
        module load alacrity/1.0.0
        module load fastbit/svn
    fi
    export MPICC=mpicc
    export MPICXX=mpiCC
    export MPIFC=mpif90
    unset EXTRA_CFLAGS
    if [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export CXX=pgCC
        export FC=pgf90
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
    elif [ "$TARGET" == "intel" ]; then
        export CC=icc
        export CXX=icpc
        export FC=ifort
        export EXTRA_CFLAGS="-std=c99"
        WITHFLEX=""
    else
        echo "TARGET must be pgi or gnu or intel"
        exit 1
    fi
        
    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK" 
    export CFLAGS="-g -fPIC ${EXTRA_CFLAGS}" 
    if [ $BUILD_FULL == "true" ]; then
        echo "Configure for full build"
        $SRCDIR/configure --prefix=/ccs/proj/e2e/${USER}/ADIOS/rhea.$TARGET \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --enable-research-transports \
        --with-lustre \
        --with-dataspaces=$DATASPACES_DIR \
        --with-flexpath=$FLEXPATH_DIR \
        --with-alacrity=$ALACRITY_DIR \
        --with-zlib \
        --with-bzip2 \
        --with-fastbit=$FASTBIT_DIR \
        --with-hdf5=${SEQ_HDF5_DIR} \
        --with-hdf5-libs="${SEQ_HDF5_CLIB}" \
        #--with-phdf5=${PAR_HDF5_DIR} \
        #--with-phdf5-libs="${PAR_HDF5_CLIB}" \
        #--with-netcdf=${SEQ_NC_DIR} \
        #--with-netcdf-libs="${SEQ_NC_CLIB}" \
        #--with-nc4par=${PAR_NC_DIR} \
        #--with-nc4par-libs="${PAR_NC_CLIB}" \
        #--with-aplod=/ccs/proj/e2e/ncsu/sith.gnu \
        #--with-isobar=/ccs/proj/e2e/ncsu/sith.gnu \
        #--with-fgr=/ccs/proj/e2e/qliu/tap \
        #--with-glib=/ccs/proj/e2e/qliu/glib
        #--with-szip=$SZIP_DIR

    else
        echo "Configure for lean build"
        $SRCDIR/configure --prefix=/ccs/proj/e2e/${USER}/ADIOS/rhea.$TARGET \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --with-lustre \
        --disable-timers --disable-timer-events

    fi


elif [ `hostname | cut -c 1-5` == "titan" ]; then

    #source /opt/modules/default/etc/modules.sh
    TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
    
    #########
    # Titan #
    #########
    #TARGET=pgi
    echo "Configure on TITAN (XK7) including staging methods for $TARGET env."
    module unload szip
    module unload hdf5
    module unload netcdf
    module unload hdf5-parallel
    module unload netcdf-hdf5parallel
    module unload fastbit
    module unload craype-interlagos craype-interlagos-cu 
    module unload craype-barcelona craype-abudhabi craype-abudhabi-cu 
    module unload craype-ivybridge craype-sandybridge craype-haswell 
    module unload craype-mc8 craype-mc12
    module load craype-istanbul
    if [ $BUILD_FULL == "true" ]; then
        module load dataspaces # /1.6.1
        module load flexpath # /1.12
        # NOTE hdf5-parallel module does not work with C++ compiler
        #module load hdf5-parallel
        #module load netcdf-hdf5parallel
        #module load szip
        #module load papi
    fi
    unset EXTRA_CFLAGS
    unset EXTRA_LIBS
    unset LDFLAGS
    unset WITHFLEX
    unset WITHFASTBIT
    unset WITHSZ
    export CC=cc
    export FC=ftn
    export CXX=CC
    if [ "$TARGET" == "pgi" ]; then
        if [ $BUILD_FULL == "true" ]; then
            # FASTBIT needs libstdc++ and -pgcpplibs flag
            export LDFLAGS="-pgc++libs" 
            #DATASPACES_DIR="/ccs/proj/e2e/dataspaces/titan/$target-cpu"
            WITHFLEX="--with-flexpath=$FLEXPATH_DIR"
            #export EXTRA_LIBS="/opt/gcc/4.9.0/snos/lib64/libstdc++.a"
            export EXTRA_LIBS="${GCC_PATH}/snos/lib64/libstdc++.a"
            WITHSZ="--with-sz=/sw/xk6/adios/SZ/1.4.10.0/pgi16.10.0"
        fi
        export EXTRA_CFLAGS="-fast"
    elif [ "$TARGET" == "gnu" ]; then
        #export CC=gcc
        #export FC=gfortran
        #export CXX=g++
        #export MPICC=cc
        #export MPIFC=ftn
        #export MPICXX=CC
        # NSSI/FLEXPATH/FASTBIT needs libstdc++
        export LDFLAGS="" 
        export EXTRA_CFLAGS="-Ofast"
        if [ $BUILD_FULL == "true" ]; then
            module load fastbit
            WITHFLEX="--with-flexpath=$FLEXPATH_DIR"
            #WITHFLEX="--with-flexpath=/ccs/proj/e2e/chaos/titan/$TARGET"
            # FASTBIT needs libstdc++
            #WITHFASTBIT="--with-fastbit=$FASTBIT_DIR"
            #export EXTRA_LIBS="${GCC_PATH}/snos/lib64/libstdc++.a"
            #DATASPACES_DIR="/ccs/proj/e2e/dataspaces/titan/$TARGET"
            WITHSZ="--with-sz=/sw/xk6/adios/SZ/1.4.10.0/gnu4.9.3"
        fi
    elif [ "$TARGET" == "cray" ]; then
        export EXTRA_CFLAGS="-h gnu"
    fi
 
    # use the two lines below for openmpi
    #export CC=mpicc
    #export FC=mpif90
    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -DDART_DO_VERSIONING" 
    export CFLAGS="-fPIC -g ${EXTRA_CFLAGS}" 
    if [ $BUILD_FULL == "true" ]; then
        LIBS="$EXTRA_LIBS" ${SRCDIR}/configure --prefix=/ccs/proj/e2e/${USER}/ADIOS/xk6.$TARGET \
        --enable-dependency-tracking \
        --disable-maintainer-mode \
        --with-cray-pmi=/opt/cray/pmi/default \
        --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
        --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
        --with-dataspaces=$DATASPACES_DIR \
        --with-dimes=$DATASPACES_DIR \
        --without-infiniband \
        $WITHFLEX \
        $WITHFASTBIT \
        $WITHSZ \
        --with-lustre \
        --disable-timers --disable-timer-events \
        --with-zlib --with-bzip2 

        #--enable-skel-timing
        #--with-fgr=/ccs/proj/e2e/qliu/tap \
        #--with-glib=/ccs/proj/e2e/qliu/glib \
        #--with-netcdf=/opt/cray/netcdf/3.6.2/netcdf-${TARGET} \
        #--with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu4.2.0 \
        #--with-nc4par=/opt/cray/netcdf-hdf5parallel/4.0.1.3/netcdf-hdf5parallel-$TARGET \
        #--with-phdf5=/opt/cray/hdf5-parallel/1.8.4.1/hdf5-parallel-$TARGET \
        #--with-dimes=/ccs/proj/e2e/pnorbert/spaces/$TARGET
        #--with-nssi=/ccs/proj/e2e/pnorbert/nssi/xt5/$TARGET \
        #--with-datatap=/ccs/home/zf2/work/pe.$TARGET \
        #--with-datatap=/ccs/proj/e2e/pnorbert/datatap/xt5/$TARGET \

    else
        LIBS="$EXTRA_LIBS" ${SRCDIR}/configure --prefix=/ccs/proj/e2e/${USER}/ADIOS/xk6.$TARGET \
        --enable-dependency-tracking \
        --disable-maintainer-mode \
        --with-lustre \
        --disable-timers --disable-timer-events \
        --without-infiniband 

    fi




elif [ `hostname | cut -c 1-4` == "eos-" ]; then

      #################
      # EOS Cray XC30 #
      #################
      #source /opt/modules/default/etc/modules.sh
      TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
      echo "Configure on EOS (Cray XC30) for $TARGET env."
      export CC=cc
      #export CFLAGS="-Wall -g" 
      export FC=ftn
      export CXX=CC
      module unload szip
      module unload hdf5
      module unload netcdf
      module unload netcdf-hdf5parallel
      module unload hdf5-parallel
      module unload papi
      module unload pmi
      if [ "$TARGET" == "pgi" ]; then
          # NSSI needs -pgc++libs flag 
          export LDFLAGS="-pgc++libs" 
          unset EXTRA_LIBS 
      elif [ "$TARGET" == "gnu" ]; then
          # NSSI needs libstdc++
          unset LDFLAGS 
          export EXTRA_LIBS="/opt/gcc/4.8.1/snos/lib64/libstdc++.a"
          module swap gcc gcc/4.8.1
      elif [ "$TARGET" == "cray" ]; then
          export EXTRA_CFLAGS="-h gnu"
      else
          unset LDFLAGS 
          unset EXTRA_LIBS 
          unset EXTRA_CFLAGS 
      fi
      module load pmi
      module load craype-hugepages2M
      CFLAGS="-g -fPIC ${EXTRA_CFLAGS}" ${SRCDIR}/configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/eos.$TARGET \
          --disable-maintainer-mode \
          --enable-dependency-tracking \
          --with-cray-pmi=/opt/cray/pmi/default \
          --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
          --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
          --with-dataspaces=/ccs/proj/e2e/dataspaces/eos/1.6.1/$TARGET \
          --with-dimes=/ccs/proj/e2e/dataspaces/eos/1.6.1/$TARGET \
            

elif [ `hostname | cut -c 1-7` == "chester" ]; then

      ###############
      # Chester XK6 #
      ###############
      #source /opt/modules/default/etc/modules.sh
      TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
      echo "Configure on Chester (XK6) for $TARGET env."
      export CC=cc
      export FC=ftn
      export CXX=CC
      module unload szip
      module unload hdf5
      module unload netcdf
      module unload netcdf-hdf5parallel
      module unload hdf5-parallel
      module swap craype-interlagos craype-istanbul
      module load dataspaces # /1.6.2
      module load flexpath # /1.12
      module load fastbit
      WITHFASTBIT=""
      WITHALACRITY=""
      if [ "$TARGET" == "pgi" ]; then
          export CC=pgcc
          export FC=pgf90
          export CXX=pgc++
          export MPICC=cc
          export MPIFC=ftn
          export MPICXX=CC
          # FASTBIT, ALACRITY need -pgcpplibs flag 
          WITHALACRITY="--with-alacrity=/ccs/proj/e2e/ncsu/alacrity/xk6/pgi"
          export FLEXPATH="--with-flexpath=$FLEXPATH_DIR"
          export LDFLAGS="-pgc++libs" 
          unset EXTRA_LIBS 
      elif [ "$TARGET" == "gnu" ]; then
          export CC=gcc
          export FC=gfortran
          export CXX=g++
          export MPICC=cc
          export MPIFC=ftn
          export MPICXX=CC
          # FASTBIT, ALACRITY needs libstdc++
          # PROBLEM: there is libstdc++.so and libtool uses that in any case leading to link error 
          #WITHALACRITY="--with-alacrity=/ccs/proj/e2e/ncsu/alacrity/xk6/gnu"
          #WITHFASTBIT="--with-fastbit=${FASTBIT_DIR}"
          #export LDFLAGS="-static -static-libstdc++"
          #export EXTRA_LIBS="${GCC_PATH}/snos/lib64/libstdc++.a"
          #export FLEXPATH="--with-flexpath=/ccs/proj/e2e/chaos/titan/gnu"
          export FLEXPATH="--with-flexpath=$FLEXPATH_DIR"
          #module swap gcc gcc/4.4.4
      elif [ "$TARGET" == "cray" ]; then
          export EXTRA_CFLAGS="-h gnu"
          WITHALACRITY="--with-alacrity=/ccs/proj/e2e/ncsu/alacrity/xk6/cray"
      else
          unset LDFLAGS 
          unset EXTRA_LIBS 
          unset EXTRA_CFLAGS 
      fi
      CFLAGS="-g -fPIC ${EXTRA_CFLAGS}" LDFLAGS="$LDFLAGS $CRAY_RCA_POST_LINK_OPTS" \
      ${SRCDIR}/configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/chester.$TARGET \
          --disable-maintainer-mode \
          --enable-dependency-tracking \
          --with-cray-pmi=/opt/cray/pmi/default \
          --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
          --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
          --with-dataspaces=$DATASPACES_DIR \
          --with-dimes=$DATASPACES_DIR \
          $FLEXPATH \
          $WITHALACRITY \
          $WITHFASTBIT \
          --without-infiniband 
#            --with-lustre=/opt/xt-lustre-ss/2.2_1.6.5/usr \
#            --with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.$TARGET \
#            --enable-research-transports \
#            --with-netcdf=/opt/cray/netcdf/3.6.2/netcdf-${TARGET} \
#            --with-nc4par=/opt/cray/netcdf-hdf5parallel/4.0.1.3/netcdf-hdf5parallel-$TARGET \
#            --with-phdf5=/opt/cray/hdf5-parallel/1.8.4.1/hdf5-parallel-$TARGET \
#            --with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu7.2.3 \
#            --with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu4.2.0 \
#          --with-cray-ugni-incdir=/opt/cray/gni-headers/2.1-1.0400.4351.3.1.gem/include \
            

elif [ `hostname -f | cut -c 1-9` == "summitdev" ]; then
    #####################
    #  SUMMITDEV IBM    #
    #####################
    MLIST=`module list 2>&1 ` #| grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
    TARGET=`echo $MLIST | grep " xl\/" | sed "s/^.* xl\/.*/xl/"`
    if [ -z $TARGET ]; then
        TARGET=`echo $MLIST | grep " pgi\/" | sed "s/^.* pgi\/.*/pgi/"`
        if [ -z $TARGET ]; then
            TARGET=`echo $MLIST | grep " gcc\/" | sed "s/^.* gcc\/.*/gcc/"`
            if [ -z $TARGET ]; then
                TARGET=`echo $MLIST | grep " clang\/" | sed "s/^.* clang\/.*/clang/"`
            fi
        fi
    fi
    echo "Configure on Summitdev for $TARGET env."
    
    unset WITH_DATASPACES
    FORTRAN_BUILD="--enable-fortran"
    if [ "$TARGET" == "xl" ]; then
        export MPICC=mpicc
        export MPCXX=mpic++
        export MPIFC=mpif90
        export CFLAGS="-g -O0"
        export FC=xlf90
        export CC=xlc
        export CXX=xlC
        #export LIBS="-lrdmacm -libverbs"
        DATASPACES_DIR=/ccs/proj/e2e/dataspaces/summitdev/1.6.1/xl
        #WITH_DATASPACES="--with-dataspaces=$DATASPACES_DIR --with-dimes=$DATASPACES_DIR"
    elif [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export FC=pgf90
        export CXX=pgc++
        export MPICC=mpicc
        export MPCXX=mpic++
        export MPIFC=mpif90
        export CFLAGS="-g -O0"
        #DATASPACES_DIR=/ccs/proj/e2e/dataspaces/summitdev/1.6.1/pgi
        #WITH_DATASPACES="--with-dataspaces=$DATASPACES_DIR --with-dimes=$DATASPACES_DIR"
    elif [ "$TARGET" == "gcc" ]; then
        export CC=gcc
        export FC=gfortran
        export CXX=g++
        export MPICC=mpicc
        export MPCXX=mpic++
        export MPIFC=mpif90
        export CFLAGS="-g -O0"
        DATASPACES_DIR=/ccs/proj/e2e/dataspaces/summitdev/1.6.1/gcc
        #WITH_DATASPACES="--with-dataspaces=$DATASPACES_DIR --with-dimes=$DATASPACES_DIR"
    elif [ "$TARGET" == "clang" ]; then
        export CC=clang
        export CXX=clang++
        export MPICC=mpicc
        export MPCXX=mpic++
        export CFLAGS="-g -O0"
        DATASPACES_DIR=/ccs/proj/e2e/dataspaces/summitdev/1.6.1/clang
        FORTRAN_BUILD="--disable-fortran"
        #WITH_DATASPACES="--with-dataspaces=$DATASPACES_DIR --with-dimes=$DATASPACES_DIR"
    fi

    ${SRCDIR}/configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/summitdev.$TARGET  \
            --disable-maintainer-mode \
            --enable-dependency-tracking \
            $FORTRAN_BUILD \
            --without-datatap  \
            $WITH_DATASPACES

elif [ `hostname | cut -c 1-4` == "sith" ]; then

    ########
    # Sith #
    ########
    #source /etc/profile.d/modules.sh
    TARGET=`module list 2>&1 | grep "PE"- | sed "s/^.*PE-\([a-z]*\).*/\1/"`

    if [ -z "$TARGET" ]; then
        echo "Cannot determine Programming environment. Exit"
        exit 1
    fi
    echo "Configure on SITH for $TARGET env. for user ${USER}"
    module unload hdf5
    module unload netcdf
    module unload python
    #module unload PE-gnu
    #module unload PE-pgi
    #module unload PE-intel
    #module unload PE-pathscale
    #module unload pgi gcc intel pathscale
    #module load PE-$TARGET
    module load python
    # Use both seq hdf5 (for utils) and 
    #   parallel hdf5 (for PHDF5 method)
    module load hdf5/1.8.10
    SEQ_HDF5_DIR=$HDF5_DIR
    SEQ_HDF5_CLIB=$HDF5_CLIB
    module unload hdf5
    module load hdf5/1.8.10_par
    PAR_HDF5_DIR=$HDF5_DIR
    PAR_HDF5_CLIB=$HDF5_CLIB
    module unload hdf5
    # Seq. and Parallel NetCDF 4 
    module load netcdf/4.1.3
    SEQ_NC_DIR=$NETCDF_DIR
    SEQ_NC_CLIB=$NETCDF_CLIB
    module unload netcdf
    module load netcdf/4.1.3_par
    PAR_NC_DIR=$NETCDF_DIR
    PAR_NC_CLIB=$NETCDF_CLIB
    module unload netcdf
    #module load szip
    module load bzip2
    module unload dataspaces
    unset DATASPACES_DIR
    module load dataspaces/1.6.0
    export MPICC=mpicc
    export MPICXX=mpiCC
    export MPIFC=mpif90
    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK" 
    export CFLAGS="-g -O0 -fPIC" 
    export CXXFLAGS="-g -O0 -fPIC" 
    export FCFLAGS="-g -O0 -fPIC" 
    WITHFLEX=""
    WITHFGR=""
    WITHFASTBIT=""
    WITHALACRITY=""
    WITHSZ=""
    if [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export CXX=pgc++
        export FC=pgf90
        WITHFLEX="--with-flexpath=/ccs/proj/e2e/chaos/sith/$TARGET"
        WITHFGR="--with-fgr=/ccs/proj/e2e/qliu/tap" 
        WITHALACRITY="--with-alacrity=/ccs/proj/e2e/ncsu/alacrity/sith/pgi"
        WITHFASTBIT="--with-fastbit=/sw/redhat6/fastbit/svn/rhel6_gnu4.4.7"
        WITHSZ="--with-sz=/ccs/proj/e2e/SZ/1.4.10.0/sith/pgi16.9"
        #DATASPACES_DIR="/ccs/proj/e2e/dataspaces/sith-tcp/1.6.pgi"
        #DATASPACES_DIR="/ccs/home/hbui/usr/software/dataspaces-dev"
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
        #export CFLAGS="$CFLAGS -gdwarf-3" 
        #export FCFLAGS="$FCFLAGS -gdwarf-3" 
        WITHFLEX="--with-flexpath=/ccs/proj/e2e/chaos/sith/$TARGET"
        WITHALACRITY="--with-alacrity=/ccs/proj/e2e/ncsu/alacrity/sith/gnu"
        WITHFASTBIT="--with-fastbit=/sw/redhat6/fastbit/svn/rhel6_gnu4.8.2"
        #DATASPACES_DIR="/ccs/proj/e2e/dataspaces/sith-tcp/1.6.gnu"
    elif [ "$TARGET" == "intel" ]; then
        export CC=icc
        export CXX=icpc
        export FC=ifort
        WITHALACRITY="--with-alacrity=/ccs/proj/e2e/ncsu/alacrity/sith/intel"
        WITHFASTBIT="--with-fastbit=/sw/redhat6/fastbit/svn/rhel6_gnu4.8.2"
    else
        echo "TARGET must be pgi or gnu or intel"
        exit 1
    fi
    
    $SRCDIR/configure --prefix=/ccs/proj/e2e/${USER}/ADIOS/sith.$TARGET \
        --config-cache \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --enable-research-transports \
        --with-lustre \
        $WITHSZ  
        #--with-zlib \
        #--with-bzip2=$BZIP2_DIR \
        #--with-dataspaces=$DATASPACES_DIR \
        #$WITHFLEX \
        #$WITHFASTBIT \
        #$WITHALACRITY \
        #--with-aplod=/ccs/proj/e2e/ncsu/sith.gnu \
        #--with-isobar=/ccs/proj/e2e/ncsu/sith.gnu \
        #--with-hdf5=${SEQ_HDF5_DIR} \
        #--with-hdf5-libs="${SEQ_HDF5_CLIB}" \
        #--with-netcdf=${SEQ_NC_DIR} \
        #--with-netcdf-libs="${SEQ_NC_CLIB}" \
        #--with-dimes=$DATASPACES_DIR \
        #--with-glib=/ccs/proj/e2e/qliu/glib
        #$WITHFGR \
        #--with-szip=$SZIP_DIR \
        #--with-phdf5=${PAR_HDF5_DIR} \
        #--with-phdf5-libs="${PAR_HDF5_CLIB}" \
        #--with-nc4par=${PAR_NC_DIR} \
        #--with-nc4par-libs="${PAR_NC_CLIB}" \
        #--with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.sith.$TARGET 
        #--with-dmalloc=/ccs/proj/e2e/pnorbert/dmalloc.$TARGET 
        #--enable-shared --disable-static
        #--without-datatap #--without-infiniband
        #--with-dmalloc=/ccs/proj/e2e/pnorbert/dmalloc.$TARGET 
        #--with-datatap=/ccs/home/habbasi/work/ewok/
        #--enable-datatap=ib

elif [ `hostname | cut -c 1-4` == "yona" ]; then

    ########
    # Yona #
    ########
    source /etc/profile.d/modules.sh
    TARGET=`module list 2>&1 | grep "PE"- | sed "s/^.*PE-\([a-z]*\).*/\1/"`
    echo "Configure on Yona for $TARGET env."
    module unload hdf5
    module unload netcdf
    module unload PE-gnu
    module unload PE-pgi
    module unload PE-intel
    module unload PE-pathscale
    module unload pgi gcc intel pathscale
    #module unload python
    module load PE-$TARGET
    #module load python
    # Use both seq hdf5 (for utils) and 
    #   parallel hdf5 (for PHDF5 method)
    module load hdf5/1.8.5
    SEQ_HDF5_DIR=$HDF5_DIR
    SEQ_HDF5_CLIB=$HDF5_CLIB
    module unload hdf5
    #module load hdf5/1.8.5_par
    #PAR_HDF5_DIR=$HDF5_DIR
    #PAR_HDF5_CLIB=$HDF5_CLIB
    #module unload hdf5
    # Seq. and Parallel NetCDF 4 
    module load netcdf/3.6.2
    SEQ_NC_DIR=$NETCDF_DIR
    SEQ_NC_CLIB=$NETCDF_CLIB
    module unload netcdf
    #module load netcdf/4.1.1_par
    #PAR_NC_DIR=$NETCDF_DIR
    #PAR_NC_CLIB=$NETCDF_CLIB
    #module unload netcdf
    export MPICC=mpicc
    export MPICXX=mpiCC
    export MPIFC=mpif90
    if [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export CXX=pgCC
        export FC=pgf90
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
    elif [ "$TARGET" == "intel" ]; then
        export CC=pgcc
        export CXX=pgCC
        export FC=pgf90
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
    elif [ "$TARGET" == "intel" ]; then
        export CC=icc
        export CXX=icpc
        export FC=ifort
    else
        echo "TARGET must be pgi or gnu or intel"
        exit 1
    fi
        
    export CFLAGS="-g -fPIC" 
    ${SRCDIR}/configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/yona.$TARGET \
        --config-cache \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --enable-research-transports  \
        --with-hdf5=${SEQ_HDF5_DIR} \
        --with-hdf5-libs="${SEQ_HDF5_CLIB}" \
        --with-netcdf=${SEQ_NC_DIR} \
        --with-netcdf-libs="${SEQ_NC_CLIB}" \
        --with-lustre=/usr \
        --without-datatap --without-infiniband
        #--with-phdf5=${PAR_HDF5_DIR} \
        #--with-phdf5-libs="${PAR_HDF5_CLIB}" \
        #--with-nc4par=${PAR_NC_DIR} \
        #--with-nc4par-libs="${PAR_NC_CLIB}" \
        #--with-dmalloc=/ccs/proj/e2e/pnorbert/dmalloc.$TARGET 
        #--with-datatap=/ccs/home/habbasi/work/ewok/
        #--enable-datatap=ib



elif [ `hostname | cut -c 1-5` == "theta" ]; then

    ##########
    # THETA  #
    ##########
    TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
    CPUARCH=`module list 2>&1 | grep -e craype-broadwell -e craype-haswell -e craype-mic-knl -e craype-ivybridge -e craype-sandybridge -e craype-intel-knc | sed -e "s/.*craype-//"`
    echo "Configure on THETA for $TARGET env. for $CPUARCH CPU"
    export MPICC=cc
    export MPICXX=CC
    export MPIFC=ftn
    module unload darshan
    module unload hdf5
    module unload netcdf
    module unload hdf5-parallel
    module unload netcdf-hdf5parallel
    WITHDART=""
    if [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export CXX=pgCC
        export FC=pgf90
        export LDFLAGS="-pgc++libs" 
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
        export LDFLAGS=""
    elif [ "$TARGET" == "intel" ]; then
        export CC=icc
        export CXX=icpc
        export FC=ifort
        export LDFLAGS=""
    elif [ "$TARGET" == "cray" ]; then
        export EXTRA_CFLAGS="-h gnu"
        export CC=cc
        export CXX=CC
        export FC=ftn
        export LDFLAGS=""
        export EXTRA_CFLAGS="-h gnu"
    else
        echo "TARGET must be one of [ pgi | gnu | intel | cray ]"
        exit 1
    fi

    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK"
    export CFLAGS="-fPIC ${EXTRA_CFLAGS}"
    ${SRCDIR}/configure --prefix=/home/pnorbert/sw/adios/1.12/theta/$TARGET.$CPUARCH \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --with-cray-pmi-incdir=/opt/cray/pmi/default/include \
        --with-cray-pmi-libdir=/opt/cray/pmi/default/lib64 \
        --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
        --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
        --without-infiniband \
        --without-hdf5 --without-netcdf


elif [ `hostname -f | cut -c 1-4` == "mira" -o `hostname -f | cut -c 1-5` == "cetus" ]; then
    #####################
    #  MIRA   BlueGene  #
    #####################
    echo "Configure on Mira (BlueGene/Q)"
    #export MPICC=mpicc
    #export MPIFC=mpif90
    #export CFLAGS=""
    #export FC=gfortran
    #export CC=gcc
    #export FCFLAGS="-funderscoring"
    export MPICC=mpixlc_r
    export MPIFC=mpixlf90_r
    export CFLAGS=""
    export FC=xlf90_r
    export CC=xlc_r

    ${SRCDIR}/configure --prefix=/home/pnorbert/sw/adios/xl \
            --disable-maintainer-mode \
            --disable-timers \
            --enable-dependency-tracking \
            --without-datatap --without-infiniband --with-bgq

elif [ `hostname -f | cut -c 1-5` == "vesta" ]; then
    ######################
    #  VESTA   BlueGene  #
    ######################
    echo "Configure on Vesta (BlueGene/Q)"
    export MPICC=mpixlc_r
    export MPIFC=mpixlf90
    export CFLAGS=""
    export FC=bgxlf90
    export CC=bgxlc

    ${SRCDIR}/configure --prefix=/home/qliu/ADIOS \
            --disable-maintainer-mode \
            --enable-dependency-tracking \
            --without-datatap --without-infiniband --with-bgq


elif [ `hostname | cut -c 1-4` == "cori" ]; then

    ##########
    # CORI #
    ##########
    TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
    CPUARCH=`module list 2>&1 | grep -e craype-broadwell -e craype-haswell -e craype-mic-knl -e craype-ivybridge -e craype-intel-knc | sed -e "s/.*craype-//"`
    echo "Configure on CORI for $TARGET env. for $CPUARCH CPU"
    export MPICC=cc
    export MPICXX=CC
    export MPIFC=ftn
    module unload darshan
    module unload hdf5
    module unload netcdf
    module unload hdf5-parallel
    module unload netcdf-hdf5parallel
    module load python
    WITHDART=""
    if [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export CXX=pgCC
        export FC=pgf90
        export LDFLAGS="-pgcpplibs"
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
        export LDFLAGS=""
    elif [ "$TARGET" == "intel" ]; then
        export CC=icc
        export CXX=icpc
        export FC=ifort
        export LDFLAGS=""
    elif [ "$TARGET" == "cray" ]; then
        export EXTRA_CFLAGS="-h gnu"
        export CC=cc
        export CXX=CC
        export FC=ftn
        export LDFLAGS=""
        export EXTRA_CFLAGS="-h gnu"
    else
        echo "TARGET must be one of [ pgi | gnu | intel | cray ]"
        exit 1
    fi

    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK"
    export CFLAGS="-fPIC ${EXTRA_CFLAGS}"
    ${SRCDIR}/configure --prefix=/global/homes/p/pnorbert/adios/1.12/cori/$TARGET.$CPUARCH \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --with-lustre=/usr \
        --with-cray-pmi-incdir=/opt/cray/pmi/default/include \
        --with-cray-pmi-libdir=/opt/cray/pmi/default/lib64 \
        --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
        --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
        --without-infiniband \
        --without-hdf5 --without-netcdf

elif [ `hostname | cut -c 1-6` == "edison" ]; then
    ##########
    # EDISON #
    ##########
    TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
    echo "Configure on EDISON for $TARGET env."
    export MPICC=cc
    export MPICXX=CC
    export MPIFC=ftn 
    module unload darshan
    module unload automake
    module unload autoconf
    module unload hdf5
    module unload netcdf
    module unload hdf5-parallel
    module unload netcdf-hdf5parallel
    module unload PrgEnv-gnu
    module unload PrgEnv-pgi
    module unload PrgEnv-pathscale
    module unload PrgEnv-cray
    module load PrgEnv-$TARGET
    module swap cray-libsci
    module unload darshan
    module load automake/1.15
    module load autoconf
    module load python
    WITHDART=""
    if [ "$TARGET" == "pgi" ]; then
        export CC=pgcc
        export CXX=pgCC
        export FC=pgf90
        export LDFLAGS="-pgcpplibs"
    elif [ "$TARGET" == "gnu" ]; then
        export CC=gcc
        export CXX=g++
        export FC=gfortran
        export LDFLAGS=""
    elif [ "$TARGET" == "intel" ]; then
        export CC=icc
        export CXX=icpc
        export FC=ifort
        export LDFLAGS=""
    elif [ "$TARGET" == "cray" ]; then
        export EXTRA_CFLAGS="-h gnu"
        export CC=cc
        export CXX=CC
        export FC=ftn
        export LDFLAGS=""
        export EXTRA_CFLAGS="-h gnu"
    else
        echo "TARGET must be pgi or gnu or intel"
        exit 1
    fi
    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK"
    export CFLAGS="-fPIC ${EXTRA_CFLAGS}"
    ${SRCDIR}/configure --prefix=/global/homes/p/pnorbert/adios/master/edison/$TARGET \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --with-lustre=/usr \
        --with-cray-pmi-incdir=/opt/cray/pmi/default/include \
        --with-cray-pmi-libdir=/opt/cray/pmi/default/lib64 \
        --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
        --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
    	--without-infiniband \
        --without-hdf5 --without-netcdf

elif [ `hostname | cut -c 1-4` == "dyn9" -o `hostname | cut -c 1-3` == "pnb" ]; then

    #######
    # Mac #
    #######
    echo "Configure on Mac"
    #   but using Apple's default gcc compiler
#    export OMPI_CC=$CC
#    export OMPI_FC=$FC
#    export OMPI_CXX=$CXX
    # Installed Homebrew, gcc/gfortran 5.3.0 and OpenMPI 1.10.2 in /usr/local
    # But should work with default mpicc and gcc, using --disable-fortran or with Homebrew gfortran
    #
    unset WITHZFP # build from the included zfp source
    USE_GCC5=false
    if [ $USE_GCC5 == "true" ]; then
        # If want to use gcc/gfortran 5.3.0
        export CC=/usr/local/bin/gcc-5
        export CXX=/usr/local/bin/g++-5
        export FC=/usr/local/bin/gfortran
        export OMPI_CC=/usr/local/bin/gcc-5
        export OMPI_CXX=/usr/local/bin/g++-5
        export OMPI_FC=/usr/local/bin/gfortran
        export WITHALACRITY="--with-alacrity=/opt/alacrity/gcc5"
        export WITHFASTBIT="--without-fastbit"
        export WITHFLEXPATH="--without-flexpath"
        export WITHDATASPACES="--without-dataspaces --without-dimes"
        #export WITHZFP="--without-zfp"
        # ALACRITY, FASTBIT are C++ lib so we need to link with the actual libstdc++
        # if the automatically added -lstdc++ does not work
        #export LIBS="/usr/local/Cellar/gcc/5.3.0/lib/gcc/5/libstdc++.dylib" 
        echo "Configure using gcc-5"
    else
        # If want to use clang C/C++ and gfortran 5.3.0
        export CC=/usr/bin/gcc
        export CXX=/usr/bin/g++
        export FC=/usr/local/bin/gfortran
        unset OMPI_CC
        unset OMPI_CXX
        unset OMPI_FC
#        export WITHALACRITY="--with-alacrity=/opt/alacrity/clang"
#        export WITHFASTBIT="--with-fastbit=/opt/fastbit"
        export WITHDATASPACES="--with-dataspaces=/opt/dataspaces --without-dimes"
        export WITHFLEXPATH="--with-flexpath=/opt/chaos"
        #export WITHZFP="--with-zfp=/Users/pnb/scratch/zfp-0.5.0"
        echo "Configure using clang"
        # Problem: test/test_src/selection_api.F90 link will fail because
        #   gfortran is used which finds the gcc-5 libstdc++ library instead of the system libstdc++
        # Manual fix: use mpif90 for that build command, or use "gfortran ... -Wl,-flat_namespace" command
    fi
    # The rest is common for all
    export MPICC=/usr/local/bin/mpicc
    export MPIFC=/usr/local/bin/mpif90
    export MPICXX=/usr/local/bin/mpicxx

    export CFLAGS="-g -O0 -DO_LARGEFILE=0 -fno-common -Wall" 
    export CXXFLAGS="-g -O0"
    export FCFLAGS="-g -O0"
    ${SRCDIR}/configure --prefix=/opt/adios --disable-shared \
        --with-zlib \
        ${WITHALACRITY} \
        ${WITHFASTBIT} \
        ${WITHZFP} \
        ${WITHDATASPACES} \
        ${WITHFLEXPATH} \
        --with-phdf5=/usr/local 
    #    --disable-mpi --disable-write --disable-fortran \
    #        --with-netcdf=/opt/netcdf \
    #        --with-hdf5=/opt/hdf5.seq


elif [ `hostname | cut -c 1-7` == "ubuntu" ]; then

    #########################
    # Scott's ubuntu laptop #
    #########################
    echo "Configure on UBUNTU"
    export CC=mpicc
    ${SRCDIR}/configure --prefix=/usr/local/adios \
        --enable-dependency-tracking \
        #--with-hdf5=/usr/local/hdf5-serial\
        #--with-phdf5=/usr/local \
        #--with-netcdf=/usr 

elif [ `hostname | cut -c 1-13` == "whoopingcough" ]; then

    #########################
    # Dave's workstation    #
    #########################
    echo "Configure on Whoopingcough"
    export CC=mpicc
    export CFLAGS="-fPIC -g"
    ${SRCDIR}/configure --prefix=/apps/adios/install \
        --enable-dependency-tracking \
        --without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
        --with-dataspaces=/apps/dataspaces
        #--with-hdf5=/usr/local/hdf5-serial\
        #--with-phdf5=/usr/local \

elif [ `hostname | cut -c 1-6` == "tomato" ]; then

    #########################
    # Todd's ubuntu laptop #
    #########################
    echo "Configure on UBUNTU"
    export CC=mpicc
    ${SRCDIR}/configure --prefix=/home/thkorde/local \
        --enable-dependency-tracking \
        --with-phdf5=/home/thkorde/local \
        --with-hdf5=/home/thkorde/local \
        --with-netcdf=/home/thkorde/local


elif [ `hostname | cut -c 1-4` == "qliu" ]; then

    #########################
    # Gary's ubuntu laptop #
    #########################
    echo "Configure on UBUNTU"
    export CC=mpicc
    export CFLAGS="-g -O0 -fPIC"
    ${SRCDIR}/configure --prefix=/home/qliu/ADIOS \
        --enable-dependency-tracking \
        --with-phdf5=/home/thkorde/local \
        #--with-hdf5=/home/thkorde/local \
        #--with-netcdf=/home/thkorde/local


elif [ `hostname | cut -c 1-2` == "ln" ]; then
    #######################
    # Tianhe-1A           #
    #######################
    echo "Configure on Tianhe-1A."
    #export MPICC=
    #export MPICXX=
    #export MPIFC=
    export CC=icc
    export CXX=icpc
    export FC=ifort

    ${SRCDIR}/configure --prefix=/vol6/home/Jeremy/adios-install \
        --enable-dependency-tracking \
        --enable-skel-timing \
        --disable-maintainer-mode 


        #--with-phdf5=/opt/hdf5-1.8.12-parallel \
        #--with-hdf5=/opt/hdf5-1.8.12 \
        #--with-netcdf=/opt/netcdf-3.6.3 \
        #--with-zlib=/opt/zlib  \
        #--with-szip=/opt/szip-2.1 \
        #--with-bzip2=/usr/lib/i386-linux-gnu \
        #--with-isobar=/opt/isobar \
        #--with-flexpath=/opt/chaos

elif [ `hostname | cut -c 1-9` == "PC0098504" ]; then

    #######################
    #      Linux PC       # 
    #######################
    echo "Configure on Linux PC."
    export MPICC=mpicc
    export MPICXX=mpicxx
    export MPIFC=mpif90
    export CC=gcc
    export CXX=g++
    export FC=gfortran
    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK"
    export LDFLAGS="-lpthread"
    export CFLAGS="-g -O0 -fPIC -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"
    ${SRCDIR}/configure --prefix=/opt/adios1 \
        --enable-dependency-tracking \
        --enable-timers \
        --disable-timer-events 

elif [ `hostname | cut -c 1-7` == "adiosVM" ]; then

    #######################
    # ADIOS Virtual Box #
    #######################
    echo "Configure on ADIOS VirtualBox."
    export MPICC=mpicc
    export MPICXX=mpicxx
    export MPIFC=mpif90
    export CC=gcc
    export CXX=g++
    export FC=gfortran

    export CFLAGS="-g -O0 -fPIC -Wno-int-to-pointer-cast -Wno-pointer-to-int-cast"
    if [ $BUILD_FULL == "true" ]; then
        ${SRCDIR}/configure --prefix=/opt/adios1 \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --enable-timers \
        --disable-timer-events \
        --with-zlib \
        --with-bzip2 \
        --with-lz4 \
        --with-sz=/opt/SZ/1.4.12.3  \
        --with-blosc=/opt/blosc \
        --without-szip \
        --with-isobar=/opt/isobar \
        --with-flexpath=/opt/korvo/dev-static \
        --with-dataspaces=/opt/dataspaces --without-infiniband \
        --with-fastbit=/opt/fastbit \
        --with-alacrity=/opt/alacrity \
        --with-hdf5=/opt/hdf5-1.8.17 \
        --with-phdf5=/opt/hdf5-1.8.17-parallel \
        --with-netcdf=/opt/netcdf-4.4.0 
#        --with-mgard=/home/adios/work/Software/MGARD \
#        --with-zchecker=/opt/Z-checker/0.1.2 \

    else
        ${SRCDIR}/configure --prefix=/opt/adios1/lean \
        --disable-maintainer-mode \
        --enable-dependency-tracking \
        --without-infiniband \
        --disable-timers --disable-timer-events

    fi


else
    echo "Could not determine what machine is this."
    echo "This script is for configuring adios on the authors' machines."
    echo "You can study it to figure out how to configure adios on your system."
fi