[Darshan-commits] [Darshan] branch, trac-150-regression, updated. darshan-2.3.1-pre1-9-g48173bc

Service Account git at mcs.anl.gov
Tue Feb 3 19:50:05 CST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "".

The branch, trac-150-regression has been updated
       via  48173bc1eef809adb980ee0bee7bd67ef7ce2bdb (commit)
      from  ffc2ef63e93ea0766e9f16754c2bbba3a584a1e4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 48173bc1eef809adb980ee0bee7bd67ef7ce2bdb
Author: Phil Carns <carns at mcs.anl.gov>
Date:   Tue Feb 3 20:49:30 2015 -0500

    fortran test cases

-----------------------------------------------------------------------

Summary of changes:
 darshan-test/regression/run-all.sh                 |   12 ++
 darshan-test/regression/test-cases/cxxpi.sh        |    2 +-
 .../test-cases/{mpi-io-test.sh => fperf-f77.sh}    |    9 +-
 .../test-cases/{mpi-io-test.sh => fperf-f90.sh}    |    9 +-
 darshan-test/regression/test-cases/src/fperf.f     |  180 ++++++++++++++++++++
 .../regression/ws/{setup-cc.sh => setup-f77.sh}    |   14 +-
 .../regression/ws/{setup-cc.sh => setup-f90.sh}    |   14 +-
 7 files changed, 215 insertions(+), 25 deletions(-)
 copy darshan-test/regression/test-cases/{mpi-io-test.sh => fperf-f77.sh} (81%)
 copy darshan-test/regression/test-cases/{mpi-io-test.sh => fperf-f90.sh} (81%)
 create mode 100644 darshan-test/regression/test-cases/src/fperf.f
 copy darshan-test/regression/ws/{setup-cc.sh => setup-f77.sh} (60%)
 copy darshan-test/regression/ws/{setup-cc.sh => setup-f90.sh} (60%)


Diff of changes:
diff --git a/darshan-test/regression/run-all.sh b/darshan-test/regression/run-all.sh
index 47f159b..d2ee05a 100755
--- a/darshan-test/regression/run-all.sh
+++ b/darshan-test/regression/run-all.sh
@@ -53,6 +53,18 @@ if [ $? -ne 0 ]; then
 fi
 export DARSHAN_CXX
 
+# set up Fortran compilers for this platform
+DARSHAN_F77=`$DARSHAN_PLATFORM/setup-f77.sh`
+if [ $? -ne 0 ]; then
+    exit 1
+fi
+export DARSHAN_F77
+DARSHAN_F90=`$DARSHAN_PLATFORM/setup-f90.sh`
+if [ $? -ne 0 ]; then
+    exit 1
+fi
+export DARSHAN_F90
+
 # set up job execution wrapper for this platform
 DARSHAN_RUNJOB=`$DARSHAN_PLATFORM/setup-runjob.sh`
 if [ $? -ne 0 ]; then
diff --git a/darshan-test/regression/test-cases/cxxpi.sh b/darshan-test/regression/test-cases/cxxpi.sh
index cb49b7b..8151692 100755
--- a/darshan-test/regression/test-cases/cxxpi.sh
+++ b/darshan-test/regression/test-cases/cxxpi.sh
@@ -31,7 +31,7 @@ fi
 # check results
 # in this case we want to confirm that the open counts are zero; cxxpi does not do any IO
 POSIX_OPENS=`grep CP_POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 4`
-if [ $POSIX_OPENS != "" ]; then
+if [ "$POSIX_OPENS"x != ""x ]; then
     echo "Error: Found unexpected POSIX open count of $POSIX_OPENS" 1>&2
     exit 1
 fi
diff --git a/darshan-test/regression/test-cases/mpi-io-test.sh b/darshan-test/regression/test-cases/fperf-f77.sh
similarity index 81%
copy from darshan-test/regression/test-cases/mpi-io-test.sh
copy to darshan-test/regression/test-cases/fperf-f77.sh
index a2c7651..d056a04 100755
--- a/darshan-test/regression/test-cases/mpi-io-test.sh
+++ b/darshan-test/regression/test-cases/fperf-f77.sh
@@ -1,20 +1,20 @@
 #!/bin/bash
 
-PROG=mpi-io-test
+PROG=fperf-f77
 
 # set log file path; remove previous log if present
 export DARSHAN_LOGFILE=$DARSHAN_TMP/${PROG}.darshan.gz
 rm -f ${DARSHAN_LOGFILE}
 
 # compile
-$DARSHAN_CC test-cases/src/${PROG}.c -o $DARSHAN_TMP/${PROG}
+$DARSHAN_F77 test-cases/src/fperf.f -o $DARSHAN_TMP/${PROG}
 if [ $? -ne 0 ]; then
     echo "Error: failed to compile ${PROG}" 1>&2
     exit 1
 fi
 
 # execute
-$DARSHAN_RUNJOB $DARSHAN_TMP/${PROG} -f $DARSHAN_TMP/${PROG}.tmp.dat
+$DARSHAN_RUNJOB $DARSHAN_TMP/${PROG} -fname $DARSHAN_TMP/${PROG}.tmp.dat
 if [ $? -ne 0 ]; then
     echo "Error: failed to execute ${PROG}" 1>&2
     exit 1
@@ -29,7 +29,7 @@ fi
 
 # check results
 # in this case we want to confirm that both the MPI and POSIX open counters were triggered
-MPI_OPENS=`grep CP_INDEP_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 4`
+MPI_OPENS=`grep CP_COLL_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 4`
 if [ ! $MPI_OPENS -gt 0 ]; then
     echo "Error: MPI open count of $MPI_OPENS is incorrect" 1>&2
     exit 1
@@ -40,5 +40,4 @@ if [ ! $POSIX_OPENS -gt 0 ]; then
     exit 1
 fi
 
-
 exit 0
diff --git a/darshan-test/regression/test-cases/mpi-io-test.sh b/darshan-test/regression/test-cases/fperf-f90.sh
similarity index 81%
copy from darshan-test/regression/test-cases/mpi-io-test.sh
copy to darshan-test/regression/test-cases/fperf-f90.sh
index a2c7651..af6a1b7 100755
--- a/darshan-test/regression/test-cases/mpi-io-test.sh
+++ b/darshan-test/regression/test-cases/fperf-f90.sh
@@ -1,20 +1,20 @@
 #!/bin/bash
 
-PROG=mpi-io-test
+PROG=fperf-f90
 
 # set log file path; remove previous log if present
 export DARSHAN_LOGFILE=$DARSHAN_TMP/${PROG}.darshan.gz
 rm -f ${DARSHAN_LOGFILE}
 
 # compile
-$DARSHAN_CC test-cases/src/${PROG}.c -o $DARSHAN_TMP/${PROG}
+$DARSHAN_F90 test-cases/src/fperf.f -o $DARSHAN_TMP/${PROG}
 if [ $? -ne 0 ]; then
     echo "Error: failed to compile ${PROG}" 1>&2
     exit 1
 fi
 
 # execute
-$DARSHAN_RUNJOB $DARSHAN_TMP/${PROG} -f $DARSHAN_TMP/${PROG}.tmp.dat
+$DARSHAN_RUNJOB $DARSHAN_TMP/${PROG} -fname $DARSHAN_TMP/${PROG}.tmp.dat
 if [ $? -ne 0 ]; then
     echo "Error: failed to execute ${PROG}" 1>&2
     exit 1
@@ -29,7 +29,7 @@ fi
 
 # check results
 # in this case we want to confirm that both the MPI and POSIX open counters were triggered
-MPI_OPENS=`grep CP_INDEP_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 4`
+MPI_OPENS=`grep CP_COLL_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 4`
 if [ ! $MPI_OPENS -gt 0 ]; then
     echo "Error: MPI open count of $MPI_OPENS is incorrect" 1>&2
     exit 1
@@ -40,5 +40,4 @@ if [ ! $POSIX_OPENS -gt 0 ]; then
     exit 1
 fi
 
-
 exit 0
diff --git a/darshan-test/regression/test-cases/src/fperf.f b/darshan-test/regression/test-cases/src/fperf.f
new file mode 100644
index 0000000..a3fdfa2
--- /dev/null
+++ b/darshan-test/regression/test-cases/src/fperf.f
@@ -0,0 +1,180 @@
+! -*- Mode: Fortran; -*- 
+!  
+!  (C) 2001 by Argonne National Laboratory.
+!      See COPYRIGHT in top-level directory.
+!
+      program main
+      implicit none
+
+      include 'mpif.h'
+      
+
+!     Fortran equivalent of perf.c
+
+      integer SIZE 
+      parameter (SIZE=1048576*4)
+!     read/write size per node in bytes
+
+      integer buf(SIZE/4), j, mynod, nprocs, ntimes, flag, foo
+      double precision stim, read_tim, write_tim, new_read_tim
+      double precision new_write_tim, min_read_tim, min_write_tim
+      double precision read_bw, write_bw
+      integer fh, status(MPI_STATUS_SIZE), ierr, argc, iargc, i
+      character*1024 str    ! used to store the filename
+      integer*8 offset
+      
+
+      ntimes = 5
+      min_read_tim = 10000000.0D0
+      min_write_tim = 10000000.0D0
+
+      call MPI_INIT(ierr)
+      call MPI_COMM_SIZE(MPI_COMM_WORLD, nprocs, foo, ierr)
+      call MPI_COMM_RANK(MPI_COMM_WORLD, mynod, ierr)
+
+!     process 0 takes the file name as a command-line argument and 
+!     broadcasts it to other processes
+
+      if (mynod .eq. 0) then
+         argc = iargc()
+         i = 0
+         call getarg(i,str)
+         do while ((i .lt. argc) .and. (str .ne. '-fname'))
+            i = i + 1
+            call getarg(i,str)
+         end do
+         if (i .ge. argc) then
+            print *
+            print *, '*#  Usage: fperf -fname filename'
+            print *
+            call MPI_ABORT(MPI_COMM_WORLD, 1, ierr)
+         end if
+
+         i = i + 1
+         call getarg(i,str)
+         call MPI_BCAST(str, 1024, MPI_CHARACTER, 0,                    &  
+     &        MPI_COMM_WORLD, ierr)
+         print *, 'Access size per process = ', SIZE, ' bytes',         &
+     &        ', ntimes = ', ntimes
+      else 
+         call MPI_BCAST(str, 1024, MPI_CHARACTER, 0,                    &
+     &        MPI_COMM_WORLD, ierr)
+      end if
+
+
+      offset = mynod*SIZE
+      do j=1, ntimes
+         call MPI_FILE_OPEN(MPI_COMM_WORLD, str,                        &
+     &        MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr)
+
+         call MPI_FILE_SEEK(fh, offset, MPI_SEEK_SET, ierr)
+
+         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+         stim = MPI_WTIME()
+         call MPI_FILE_WRITE(fh, buf, SIZE, MPI_BYTE, status, ierr)
+         write_tim = MPI_WTIME() - stim
+  
+         call MPI_FILE_CLOSE(fh, ierr)
+
+         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+
+         call MPI_FILE_OPEN(MPI_COMM_WORLD, str,                        &
+     &        MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr)
+
+         call MPI_FILE_SEEK(fh, offset, MPI_SEEK_SET, ierr)
+
+         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+         stim = MPI_WTIME()
+         call MPI_FILE_READ(fh, buf, SIZE, MPI_BYTE, status, ierr)
+         read_tim = MPI_WTIME() - stim
+  
+         call MPI_FILE_CLOSE(fh, ierr)
+
+         call MPI_ALLREDUCE(write_tim, new_write_tim, 1,                &
+     &        MPI_DOUBLE_PRECISION, MPI_MAX, MPI_COMM_WORLD, ierr)
+         call MPI_ALLREDUCE(read_tim, new_read_tim, 1,                  &
+     &        MPI_DOUBLE_PRECISION, MPI_MAX, MPI_COMM_WORLD, ierr)
+
+         if (new_read_tim .lt. min_read_tim) then
+            min_read_tim = new_read_tim
+         end if
+         if (new_write_tim .lt. min_write_tim) then
+            min_write_tim = new_write_tim
+         end if
+      end do
+    
+      if (mynod .eq. 0) then
+         read_bw = (SIZE*nprocs*1.0D0)/(min_read_tim*1000000.0D0)
+         write_bw = (SIZE*nprocs*1.0D0)/(min_write_tim*1000000.0D0)
+         print *, 'Write bandwidth without file sync = ',               &
+     &        write_bw, ' Mbytes/sec'
+         print *, 'Read bandwidth without prior file sync = ',          &
+     &        read_bw, ' Mbytes/sec'
+      end if 
+
+      min_read_tim = 10000000.0D0
+      min_write_tim = 10000000.0D0
+
+      flag = 0
+      do j=1, ntimes
+         call MPI_FILE_OPEN(MPI_COMM_WORLD, str,                        & 
+     &        MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr)
+
+         call MPI_FILE_SEEK(fh, offset, MPI_SEEK_SET, ierr)
+
+         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+         stim = MPI_WTIME()
+         call MPI_FILE_WRITE(fh, buf, SIZE, MPI_BYTE, status, ierr)
+         call MPI_FILE_SYNC(fh, ierr)
+         write_tim = MPI_WTIME() - stim
+         if (ierr .eq. MPI_ERR_UNKNOWN) then 
+            flag = 1
+         end if
+  
+         call MPI_FILE_CLOSE(fh, ierr)
+
+         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+
+         call MPI_FILE_OPEN(MPI_COMM_WORLD, str,                        & 
+     &        MPI_MODE_CREATE+MPI_MODE_RDWR, MPI_INFO_NULL, fh, ierr)
+
+         call MPI_FILE_SEEK(fh, offset, MPI_SEEK_SET, ierr)
+
+         call MPI_BARRIER(MPI_COMM_WORLD, ierr)
+         stim = MPI_WTIME()
+         call MPI_FILE_READ(fh, buf, SIZE, MPI_BYTE, status, ierr)
+         read_tim = MPI_WTIME() - stim
+  
+         call MPI_FILE_CLOSE(fh, ierr)
+
+         call MPI_ALLREDUCE(write_tim, new_write_tim, 1,                &
+     &        MPI_DOUBLE_PRECISION, MPI_MAX, MPI_COMM_WORLD, ierr)
+         call MPI_ALLREDUCE(read_tim, new_read_tim, 1,                  &
+     &        MPI_DOUBLE_PRECISION, MPI_MAX, MPI_COMM_WORLD, ierr)
+
+         if (new_read_tim .lt. min_read_tim) then
+            min_read_tim = new_read_tim
+         end if
+         if (new_write_tim .lt. min_write_tim) then
+            min_write_tim = new_write_tim
+         end if
+
+      end do
+    
+      if (mynod .eq. 0) then
+         if (flag .eq. 1) then
+            print *, 'MPI_FILE_SYNC returns error.'
+         else
+            read_bw = (SIZE*nprocs*1.0D0)/(min_read_tim*1000000.0D0)
+            write_bw = (SIZE*nprocs*1.0D0)/(min_write_tim*1000000.0D0)
+            print *, 'Write bandwidth including file sync = ',          & 
+     &           write_bw, ' Mbytes/sec'
+            print *, 'Read bandwidth after file sync = ',               &
+     &           read_bw, ' Mbytes/sec'
+         end if 
+      end if
+
+      call MPI_FINALIZE(ierr)
+
+      stop
+      end
diff --git a/darshan-test/regression/ws/setup-cc.sh b/darshan-test/regression/ws/setup-f77.sh
similarity index 60%
copy from darshan-test/regression/ws/setup-cc.sh
copy to darshan-test/regression/ws/setup-f77.sh
index 37bb231..d370105 100755
--- a/darshan-test/regression/ws/setup-cc.sh
+++ b/darshan-test/regression/ws/setup-f77.sh
@@ -2,25 +2,25 @@
 
 # General notes
 #######################
-# Script to set up the C compiler to use for subsequent test cases.  This
+# Script to set up the F77 compiler to use for subsequent test cases.  This
 # script may load optional modules (as in a Cray PE), set LD_PRELOAD
 # variables (as in a dynamically linked environment), or generate mpicc
 # wrappers (as in a statically linked environment).
 
 # The script should produce a single string to stdout, which is the command
-# line to use for invoking the C compiler
+# line to use for invoking the F77 compiler
 
 # Notes specific to this platform (ws)
 ########################
 # This particular version of the setup-cc script assumes that mpicc is
-# present in the path already, and that the C compiler to use for
-# subsequent tests should be generated from this using darshan-gen-cc.pl.
+# present in the path already, and that the F77 compiler to use for
+# subsequent tests should be generated from this using darshan-gen-fortran.pl.
 
-$DARSHAN_PATH/bin/darshan-gen-cc.pl `which mpicc` --output $DARSHAN_TMP/mpicc
+$DARSHAN_PATH/bin/darshan-gen-fortran.pl `which mpif77` --output $DARSHAN_TMP/mpif77
 if [ $? -ne 0 ]; then
-    echo "Error: failed to generate c compiler." 1>&2
+    echo "Error: failed to generate f77 compiler." 1>&2
     exit 1
 fi
 
-echo $DARSHAN_TMP/mpicc
+echo $DARSHAN_TMP/mpif77
 exit 0
diff --git a/darshan-test/regression/ws/setup-cc.sh b/darshan-test/regression/ws/setup-f90.sh
similarity index 60%
copy from darshan-test/regression/ws/setup-cc.sh
copy to darshan-test/regression/ws/setup-f90.sh
index 37bb231..1d5192c 100755
--- a/darshan-test/regression/ws/setup-cc.sh
+++ b/darshan-test/regression/ws/setup-f90.sh
@@ -2,25 +2,25 @@
 
 # General notes
 #######################
-# Script to set up the C compiler to use for subsequent test cases.  This
+# Script to set up the F90 compiler to use for subsequent test cases.  This
 # script may load optional modules (as in a Cray PE), set LD_PRELOAD
 # variables (as in a dynamically linked environment), or generate mpicc
 # wrappers (as in a statically linked environment).
 
 # The script should produce a single string to stdout, which is the command
-# line to use for invoking the C compiler
+# line to use for invoking the F90 compiler
 
 # Notes specific to this platform (ws)
 ########################
 # This particular version of the setup-cc script assumes that mpicc is
-# present in the path already, and that the C compiler to use for
-# subsequent tests should be generated from this using darshan-gen-cc.pl.
+# present in the path already, and that the F90 compiler to use for
+# subsequent tests should be generated from this using darshan-gen-fortran.pl.
 
-$DARSHAN_PATH/bin/darshan-gen-cc.pl `which mpicc` --output $DARSHAN_TMP/mpicc
+$DARSHAN_PATH/bin/darshan-gen-fortran.pl `which mpif90` --output $DARSHAN_TMP/mpif90
 if [ $? -ne 0 ]; then
-    echo "Error: failed to generate c compiler." 1>&2
+    echo "Error: failed to generate f90 compiler." 1>&2
     exit 1
 fi
 
-echo $DARSHAN_TMP/mpicc
+echo $DARSHAN_TMP/mpif90
 exit 0


hooks/post-receive
--



More information about the Darshan-commits mailing list