Skip to content

Commit

Permalink
automated test for pioperformance
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Apr 10, 2019
1 parent a8905ee commit ca6b558
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/performance/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ check_PROGRAMS = pioperf
pioperf_SOURCES = pioperformance.F90

# Tests will run from a bash script.
#TESTS = run_tests.sh
TESTS = run_tests.sh

EXTRA_DIST = CMakeLists.txt gensimple.pl Pioperformance.md
EXTRA_DIST = CMakeLists.txt gensimple.pl Pioperformance.md pioperf.nl

# Clean up files produced during testing.
CLEANFILES = *.nc *.log *.mod
8 changes: 8 additions & 0 deletions tests/performance/pioperf.nl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
&pioperf
decompfile= 'BLOCK',
pio_typenames = 'pnetcdf'
rearrangers = 1,2
nframes = 1
nvars = 1
niotasks = 4
/
30 changes: 30 additions & 0 deletions tests/performance/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/sh
# This is a test script for PIO for tests/performance directory.
# Ed Hartnett 4/10/19

# Stop execution of script if error is returned.
set -e

# Stop loop if ctrl-c is pressed.
trap exit INT TERM

printf 'running PIO performance test...\n'

PIO_TESTS='pioperf '

success1=true
for TEST in $PIO_TESTS
do
success1=false
echo "running ${TEST}"
mpiexec -n 4 ./${TEST} && success1=true
if test $success1 = false; then
break
fi
done

# Did we succeed?
if test x$success1 = xtrue; then
exit 0
fi
exit 1

0 comments on commit ca6b558

Please sign in to comment.