[Darshan-commits] [Git][darshan/darshan][master] 2 commits: add parser warnings for new posix/stdio modules

Shane Snyder xgitlab at cels.anl.gov
Tue Jan 22 11:33:49 CST 2019


Shane Snyder pushed to branch master at darshan / darshan


Commits:
55860948 by Shane Snyder at 2019-01-21T21:03:34Z
add parser warnings for new posix/stdio modules

- - - - -
e65be62d by Shane Snyder at 2019-01-22T17:29:59Z
update regression tests to avoid comment lines

- - - - -


8 changed files:

- darshan-test/regression/test-cases/cxxpi.sh
- darshan-test/regression/test-cases/fperf-f77.sh
- darshan-test/regression/test-cases/fperf-f90.sh
- darshan-test/regression/test-cases/fprintf-fscanf-test.sh
- darshan-test/regression/test-cases/mpi-io-test.sh
- darshan-test/regression/test-cases/stdio-test.sh
- darshan-util/darshan-posix-logutils.c
- darshan-util/darshan-stdio-logutils.c


Changes:

=====================================
darshan-test/regression/test-cases/cxxpi.sh
=====================================
@@ -29,7 +29,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 POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ "$POSIX_OPENS"x != ""x ]; then
     echo "Error: Found unexpected POSIX open count of $POSIX_OPENS" 1>&2
     exit 1


=====================================
darshan-test/regression/test-cases/fperf-f77.sh
=====================================
@@ -29,12 +29,12 @@ fi
 
 # check results
 # in this case we want to confirm that both the MPI and POSIX open counters were triggered
-POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ ! "$POSIX_OPENS" -gt 0 ]; then
     echo "Error: POSIX open count of $POSIX_OPENS is incorrect" 1>&2
     exit 1
 fi
-MPI_OPENS=`grep COLL_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+MPI_OPENS=`grep COLL_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ ! "$MPI_OPENS" -gt 0 ]; then
     echo "Error: MPI open count of $MPI_OPENS is incorrect" 1>&2
     exit 1


=====================================
darshan-test/regression/test-cases/fperf-f90.sh
=====================================
@@ -29,12 +29,12 @@ fi
 
 # check results
 # in this case we want to confirm that both the MPI and POSIX open counters were triggered
-POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ ! "$POSIX_OPENS" -gt 0 ]; then
     echo "Error: POSIX open count of $POSIX_OPENS is incorrect" 1>&2
     exit 1
 fi
-MPI_OPENS=`grep COLL_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+MPI_OPENS=`grep COLL_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ ! "$MPI_OPENS" -gt 0 ]; then
     echo "Error: MPI open count of $MPI_OPENS is incorrect" 1>&2
     exit 1


=====================================
darshan-test/regression/test-cases/fprintf-fscanf-test.sh
=====================================
@@ -29,21 +29,21 @@ fi
 
 # check results
 
-STDIO_OPENS=`grep STDIO_OPENS $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_OPENS=`grep STDIO_OPENS $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_OPENS" -eq 4 ]; then
     echo "Error: STDIO open count of $STDIO_OPENS is incorrect" 1>&2
     exit 1
 fi
 
 # this will check fprintf counting
-STDIO_BYTES_WRITTEN=`grep STDIO_BYTES_WRITTEN $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_BYTES_WRITTEN=`grep STDIO_BYTES_WRITTEN $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_BYTES_WRITTEN" -eq 15 ]; then
     echo "Error: STDIO bytes written count of $STDIO_BYTES_WRITTEN is incorrect" 1>&2
     exit 1
 fi
 
 # this will check fscanf counting
-STDIO_BYTES_READ=`grep STDIO_BYTES_READ $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_BYTES_READ=`grep STDIO_BYTES_READ $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_BYTES_READ" -eq 15 ]; then
     echo "Error: STDIO bytes read count of $STDIO_BYTES_READ is incorrect" 1>&2
     exit 1


=====================================
darshan-test/regression/test-cases/mpi-io-test.sh
=====================================
@@ -29,12 +29,12 @@ fi
 
 # check results
 # in this case we want to confirm that both the MPI and POSIX open counters were triggered
-POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+POSIX_OPENS=`grep POSIX_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ ! "$POSIX_OPENS" -gt 0 ]; then
     echo "Error: POSIX open count of $POSIX_OPENS is incorrect" 1>&2
     exit 1
 fi
-MPI_OPENS=`grep INDEP_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |cut -f 5`
+MPI_OPENS=`grep INDEP_OPENS $DARSHAN_TMP/${PROG}.darshan.txt |grep -vE "^#" |cut -f 5`
 if [ ! "$MPI_OPENS" -gt 0 ]; then
     echo "Error: MPI open count of $MPI_OPENS is incorrect" 1>&2
     exit 1


=====================================
darshan-test/regression/test-cases/stdio-test.sh
=====================================
@@ -31,22 +31,22 @@ fi
 
 # check at least one counter from each general open/read/write/seek category
 
-STDIO_OPENS=`grep STDIO_OPENS $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_OPENS=`grep STDIO_OPENS $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_OPENS" -gt 0 ]; then
     echo "Error: STDIO open count of $STDIO_OPENS is incorrect" 1>&2
     exit 1
 fi
-STDIO_SEEKS=`grep STDIO_SEEKS $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_SEEKS=`grep STDIO_SEEKS $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_SEEKS" -gt 0 ]; then
     echo "Error: STDIO open count of $STDIO_SEEKS is incorrect" 1>&2
     exit 1
 fi
-STDIO_BYTES_WRITTEN=`grep STDIO_BYTES_WRITTEN $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_BYTES_WRITTEN=`grep STDIO_BYTES_WRITTEN $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_BYTES_WRITTEN" -eq 6 ]; then
     echo "Error: STDIO open count of $STDIO_BYTES_WRITTEN is incorrect" 1>&2
     exit 1
 fi
-STDIO_BYTES_READ=`grep STDIO_BYTES_READ $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_BYTES_READ=`grep STDIO_BYTES_READ $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! "$STDIO_BYTES_READ" -eq 6 ]; then
     echo "Error: STDIO open count of $STDIO_BYTES_READ is incorrect" 1>&2
     exit 1
@@ -55,32 +55,32 @@ fi
 
 # make sure that some of the floating point counters are valid
 # use bc for floating point comparison
-STDIO_F_OPEN_START_TIMESTAMP=`grep STDIO_F_OPEN_START_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_F_OPEN_START_TIMESTAMP=`grep STDIO_F_OPEN_START_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! $(echo "$STDIO_F_OPEN_START_TIMESTAMP > 0" | bc -l) ]; then
     echo "Error: counter is incorrect" 1>&2
     exit 1
 fi
-STDIO_F_OPEN_END_TIMESTAMP=`grep STDIO_F_OPEN_END_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_F_OPEN_END_TIMESTAMP=`grep STDIO_F_OPEN_END_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! $(echo "$STDIO_F_OPEN_END_TIMESTAMP > 0" | bc -l) ]; then
     echo "Error: counter is incorrect" 1>&2
     exit 1
 fi
-STDIO_F_META_TIME=`grep STDIO_F_META_TIME $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_F_META_TIME=`grep STDIO_F_META_TIME $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! $(echo "$STDIO_F_META_TIME > 0" | bc -l) ]; then
     echo "Error: counter is incorrect" 1>&2
     exit 1
 fi
-STDIO_F_WRITE_TIME=`grep STDIO_F_WRITE_TIME $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_F_WRITE_TIME=`grep STDIO_F_WRITE_TIME $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! $(echo "$STDIO_F_WRITE_TIME > 0" | bc -l) ]; then
     echo "Error: counter is incorrect" 1>&2
     exit 1
 fi
-STDIO_F_CLOSE_START_TIMESTAMP=`grep STDIO_F_CLOSE_START_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_F_CLOSE_START_TIMESTAMP=`grep STDIO_F_CLOSE_START_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! $(echo "$STDIO_F_CLOSE_START_TIMESTAMP > 0" | bc -l) ]; then
     echo "Error: counter is incorrect" 1>&2
     exit 1
 fi
-STDIO_F_CLOSE_END_TIMESTAMP=`grep STDIO_F_CLOSE_END_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
+STDIO_F_CLOSE_END_TIMESTAMP=`grep STDIO_F_CLOSE_END_TIMESTAMP $DARSHAN_TMP/${PROG}.darshan.txt | grep -vE "^#" | grep -vE "STDIN|STDOUT|STDERR" | cut -f 5`
 if [ ! $(echo "$STDIO_F_CLOSE_END_TIMESTAMP > 0" | bc -l) ]; then
     echo "Error: counter is incorrect" 1>&2
     exit 1


=====================================
darshan-util/darshan-posix-logutils.c
=====================================
@@ -310,6 +310,13 @@ static void darshan_log_print_posix_description(int ver)
         printf("# \t- POSIX_RENAMED_FROM\n");
     }
 
+    if(ver >= 4)
+    {
+        printf("\n# WARNING: POSIX_OPENS counter includes both POSIX_FILENOS and POSIX_DUPS counts\n");
+        printf("\n# WARNING: POSIX counters related to file offsets may be incorrect if a file is simultaneously accessed by both POSIX and STDIO (e.g., using fileno())\n");
+        printf("# \t- Affected counters include: MAX_BYTE_{READ|WRITTEN}, CONSEC_{READS|WRITES}, SEQ_{READS|WRITES}, {MEM|FILE}_NOT_ALIGNED, STRIDE*_STRIDE\n");
+    }
+
     return;
 }
 


=====================================
darshan-util/darshan-stdio-logutils.c
=====================================
@@ -216,6 +216,12 @@ static void darshan_log_print_stdio_description(int ver)
         printf("# - No support for properly instrumenting fdopen operations (STDIO_FDOPENS)\n");
     }
 
+    if(ver >= 2)
+    {
+        printf("\n# WARNING: STDIO_OPENS counter includes STDIO_FDOPENS count\n");
+        printf("\n# WARNING: STDIO counters related to file offsets may be incorrect if a file is simultaneously accessed by both STDIO and POSIX (e.g., using fdopen())\n");
+        printf("# \t- Affected counters include: MAX_BYTE_{READ|WRITTEN}\n");
+    }
 
     return;
 }



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/a8815d569d99668a422cd79cf7842735d6debb3b...e65be62d315fb278a6837dcb8e21f013888aeead

-- 
View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/compare/a8815d569d99668a422cd79cf7842735d6debb3b...e65be62d315fb278a6837dcb8e21f013888aeead
You're receiving this email because of your account on xgitlab.cels.anl.gov.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20190122/c700776d/attachment-0001.html>


More information about the Darshan-commits mailing list