Commit 29bb17cf authored by Philip Carns's avatar Philip Carns

Update compile test script to handle xl compilers. Use subroutines for

a change.


git-svn-id: https://svn.mcs.anl.gov/repos/darshan/trunk@325 3b7491f3-a168-0410-bf4b-c445ed680a29
parent 9f4c5e46
#!/bin/bash #!/bin/bash
mkdir -p out compile_examples() {
TEST_PROG_DIR=/home/carns/working/darshan-examples if [ -z $1 ]
then
echo "No parameters passed to function."
exit 1
fi
if [ -z $2 ]
then
echo "Not enough parameters passed to function."
exit 1
fi
CFLAGS="-g" PATH=/home/carns/working/darshan/install/bin/$1:$PATH
LDFLAGS=""
LIBS=""
PATH=/home/carns/working/darshan/install/bin/fast:$PATH
mpicc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpicc.fast mpicc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o $2/mpi-io-test.mpicc.$1
mpixlc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc.fast mpixlc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o $2/mpi-io-test.mpxlc.$1
mpixlc_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc_r.fast mpixlc_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o $2/mpi-io-test.mpxlc_r.$1
mpicxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpicxx.fast mpicxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o $2/cxxpi.mpicxx.$1
mpixlcxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx.fast mpixlcxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o $2/cxxpi.mpxlcxx.$1
mpixlcxx_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx_r.fast mpixlcxx_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o $2/cxxpi.mpxlcxx_r.$1
mpif77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif77.fast mpif77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpif77.$1
mpixlf77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77.fast mpixlf77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf77.$1
mpixlf77_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77_r.fast mpixlf77_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf77_r.$1
mpif90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif90.fast mpif90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpif90.$1
mpixlf90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90.fast mpixlf90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf90.$1
mpixlf90_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90_r.fast mpixlf90_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf90_r.$1
mpixlf95 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95.fast mpixlf95 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf95.$1
mpixlf95_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95_r.fast mpixlf95_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf95_r.$1
mpixlf2003 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003.fast mpixlf2003 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf2003.$1
mpixlf2003_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003_r.fast mpixlf2003_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $FLIBS -o $2/fperf.mpxlf2003_r.$1
}
CFLAGS="-g" mkdir -p out
LDFLAGS="-L/home/carns/working/fpmpi/build/lib" mkdir -p out/normal
LIBS="-lfpmpi" mkdir -p out/fmpi
PATH=/home/carns/working/darshan/install/bin/fast:$PATH TEST_PROG_DIR=/home/carns/working/darshan-examples
mpicc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpicc.fpmpi.fast
mpixlc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc.fpmpi.fast
mpixlc_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc_r.fpmpi.fast
mpicxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpicxx.fpmpi.fast
mpixlcxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx.fpmpi.fast
mpixlcxx_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx_r.fpmpi.fast
LIBS="-lfmpich.cnk -lfpmpi"
mpif77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif77.fpmpi.fast
mpixlf77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77.fpmpi.fast
mpixlf77_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77_r.fpmpi.fast
mpif90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif90.fpmpi.fast
mpixlf90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90.fpmpi.fast
mpixlf90_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90_r.fpmpi.fast
mpixlf95 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95.fpmpi.fast
mpixlf95_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95_r.fpmpi.fast
mpixlf2003 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003.fpmpi.fast
mpixlf2003_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003_r.fpmpi.fast
# tests with darshan enabled
CFLAGS="-g" CFLAGS="-g"
LDFLAGS="" LDFLAGS=""
LIBS="" LIBS=""
PATH=/home/carns/working/darshan/install/bin:$PATH FLIBS=""
compile_examples default out/normal
mpicc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpicc compile_examples fast out/normal
mpixlc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc compile_examples xl out/normal
mpixlc_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc_r
mpicxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpicxx
mpixlcxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx
mpixlcxx_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx_r
mpif77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif77
mpixlf77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77
mpixlf77_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77_r
mpif90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif90
mpixlf90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90
mpixlf90_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90_r
mpixlf95 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95
mpixlf95_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95_r
mpixlf2003 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003
mpixlf2003_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003_r
# tests with another pmpi library taking precedence
CFLAGS="-g" CFLAGS="-g"
LDFLAGS="-L/home/carns/working/fpmpi/build/lib" LDFLAGS="-L/home/carns/working/fpmpi/build/lib"
LIBS="-lfpmpi" LIBS="-lfpmpi"
PATH=/home/carns/working/darshan/install/bin:$PATH FLIBS="-lfmpich.cnk -lfpmpi"
compile_examples default out/fpmpi
mpicc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpicc.fpmpi compile_examples fast out/fpmpi
mpixlc $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc.fpmpi compile_examples xl out/fpmpi
mpixlc_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/mpi-io-test.c $LIBS -o out/mpi-io-test.mpxlc_r.fpmpi
mpicxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpicxx.fpmpi
mpixlcxx $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx.fpmpi
mpixlcxx_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/cxxpi.cxx $LIBS -o out/cxxpi.mpxlcxx_r.fpmpi
LIBS="-lfmpich.cnk -lfpmpi"
mpif77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif77.fpmpi
mpixlf77 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77.fpmpi
mpixlf77_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf77_r.fpmpi
mpif90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpif90.fpmpi
mpixlf90 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90.fpmpi
mpixlf90_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf90_r.fpmpi
mpixlf95 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95.fpmpi
mpixlf95_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf95_r.fpmpi
mpixlf2003 $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003.fpmpi
mpixlf2003_r $CFLAGS $LDFLAGS $TEST_PROG_DIR/fperf.f $LIBS -o out/fperf.mpxlf2003_r.fpmpi
for i in `ls out/`; do echo $i; nm out/$i |grep -c darshan; done for i in `ls out/normal`; do echo $i; nm out/$i |grep -c darshan; done
for i in `ls out/fpmpi`; do echo $i; nm out/$i |grep -c darshan; done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment