generate-bg-compilers.sh 1.37 KB
Newer Older
1 2 3 4 5
#!/bin/bash
#
# Generates compiler scripts for all BG compilers
#

6
PREFIX=/soft/apps/darshan-x.x.x
7 8 9 10
BGPATH=/bgsys/drivers/ppcfloor/comm/xxx/bin

for compiler_type in default fast xl;
do
11 12
   compiler_path=${BGPATH/xxx/$compiler_type}
   compiler_opt=""
13 14
   for compiler in $(ls $compiler_path);
   do
15 16 17 18 19 20
       if [ $compiler != "mpich2version" -a \
            $compiler != "parkill" ]; then
           mkdir -p $PREFIX/bin/$compiler_type
           if [ $(expr match $compiler ".*xl.*") -gt 0 -o \
                $compiler_type = "fast" -o \
                $compiler_type = "xl" ]; then
21
               compiler_opt="--trim --xl";
22 23 24 25 26 27 28 29 30 31 32
           fi
           if [ $(expr match $compiler ".*cxx") -gt 0 ]; then
               $PREFIX/bin/darshan-gen-cxx.pl $compiler_opt --output=$PREFIX/bin/$compiler_type/$compiler $compiler_path/$compiler
           elif [ $(expr match $compiler ".*f77") -gt 0 -o \
                  $(expr match $compiler ".*f90") -gt 0 -o \
                  $(expr match $compiler ".*f95") -gt 0 -o \
                  $(expr match $compiler ".*f2003") -gt 0 ]; then
               $PREFIX/bin/darshan-gen-fortran.pl $compiler_opt --output=$PREFIX/bin/$compiler_type/$compiler $compiler_path/$compiler
           else
               $PREFIX/bin/darshan-gen-cc.pl $compiler_opt --output=$PREFIX/bin/$compiler_type/$compiler $compiler_path/$compiler
           fi
33 34 35
       fi
   done 
done