From 0b2d445f0384f9574fc63b6f7b0d11cf17002ee7 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 10 Apr 2019 14:37:22 -0600 Subject: [PATCH] more work on getting pioperformance working on theia --- configure.ac | 34 ++++++++++++++++------------ tests/performance/Pioperformance.md | 3 ++- tests/performance/pioperf.nl | 9 ++++---- tests/performance/pioperformance.F90 | 4 ++-- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 61b9b87aad3..329dcaa37d5 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,13 @@ if test "x$enable_timing" = xyes; then fi AM_CONDITIONAL(USE_GPTL, [test "x$enable_timing" = xyes]) +# Does the user want to disable papi? +AC_MSG_CHECKING([whether PAPI should be enabled (if enable-timing is used)]) +AC_ARG_ENABLE([papi], [AS_HELP_STRING([--disable-papi], + [disable PAPI library use])]) +test "x$enable_papi" = xno || enable_papi=yes +AC_MSG_RESULT($enable_papi) + # Does the user want to enable Fortran library? AC_MSG_CHECKING([whether Fortran library should be build]) AC_ARG_ENABLE([fortran], @@ -92,7 +99,7 @@ AM_CONDITIONAL(BUILD_DOCS, [test "x$enable_docs" = xyes]) # Is doxygen installed? AC_CHECK_PROGS([DOXYGEN], [doxygen]) -if test -z "$DOXYGEN" -a test "x$enable_docs" = xyes; then +if test -z "$DOXYGEN" -a "x$enable_docs" = xyes; then AC_MSG_ERROR([Doxygen not found but --enable-docs used.]) fi @@ -177,24 +184,21 @@ if test "x$enable_timing" = xyes; then AC_CHECK_LIB([papi], [PAPI_library_init]) AC_MSG_CHECKING([whether system can support PAPI]) have_papi=no - if test "x$ac_cv_lib_papi_PAPI_library_init" = xyes; then - # If we have PAPI library, check /proc/sys/kernel/perf_event_paranoid - # to see if we have permissions. - if test -f /proc/sys/kernel/perf_event_paranoid; then - if test `cat /proc/sys/kernel/perf_event_paranoid` != 1; then - AC_MSG_ERROR([PAPI library found, but /proc/sys/kernel/perf_event_paranoid != 1 - try sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid']) + if test $enable_papi = yes; then + if test "x$ac_cv_lib_papi_PAPI_library_init" = xyes; then + # If we have PAPI library, check /proc/sys/kernel/perf_event_paranoid + # to see if we have permissions. + if test -f /proc/sys/kernel/perf_event_paranoid; then + if test `cat /proc/sys/kernel/perf_event_paranoid` != 1; then + AC_MSG_ERROR([PAPI library found, but /proc/sys/kernel/perf_event_paranoid != 1 + try sudo sh -c 'echo 1 >/proc/sys/kernel/perf_event_paranoid']) + fi fi + AC_DEFINE([HAVE_PAPI], [1], [PAPI library is present and usable]) + have_papi=yes fi - AC_DEFINE([HAVE_PAPI], [1], [PAPI library is present and usable]) - have_papi=yes fi AC_MSG_RESULT($have_papi) - - # We must have papi to build pioperformance with timing. - dnl if test "x$have_papi" = xno; then - dnl AC_MSG_ERROR([PAPI library not found, but is required if enable-timing is used.]) - dnl fi fi AM_CONDITIONAL([HAVE_PAPI], [test "x$have_papi" = xyes]) diff --git a/tests/performance/Pioperformance.md b/tests/performance/Pioperformance.md index c6ce7f0fafc..efe7c611045 100644 --- a/tests/performance/Pioperformance.md +++ b/tests/performance/Pioperformance.md @@ -38,7 +38,8 @@ They call init_ideal_dof which internally generates a dof as follows: endif The size of the variable is npes*varsize where varsize can be set in -the namelist. +the namelist. varsize is the variable array size per task. You can add +variables by changing nvars in the namelist. When this is run, output like the following will appear: diff --git a/tests/performance/pioperf.nl b/tests/performance/pioperf.nl index cfa0349b4e4..29314215b7d 100644 --- a/tests/performance/pioperf.nl +++ b/tests/performance/pioperf.nl @@ -1,8 +1,9 @@ &pioperf decompfile= 'BLOCK', - pio_typenames = 'pnetcdf' + pio_typenames = 'pnetcdf' 'netcdf4p' 'netcdf4c' 'netcdf' rearrangers = 1,2 - nframes = 1 - nvars = 1 + nframes = 10 + nvars = 10 niotasks = 4 - / + varsize = 10000000 +/ diff --git a/tests/performance/pioperformance.F90 b/tests/performance/pioperformance.F90 index fcccde581ca..3f2af05954a 100644 --- a/tests/performance/pioperformance.F90 +++ b/tests/performance/pioperformance.F90 @@ -295,10 +295,10 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, & call PIO_InitDecomp(iosystem, PIO_DOUBLE, gdims, compmap, iodesc_r8, rearr=rearr) #endif endif - if(mype==0) print *,__FILE__,__LINE__,'Frame: ',recnum + !if(mype==0) print *,__FILE__,__LINE__,'Frame: ',recnum do nv=1,nvars - if(mype==0) print *,__FILE__,__LINE__,'var: ',nv + !if(mype==0) print *,__FILE__,__LINE__,'var: ',nv #ifdef VARINT call PIO_setframe(File, vari(nv), recnum) call pio_write_darray(File, vari(nv), iodesc_i4, ifld(:,nv) , ierr, fillval= PIO_FILL_INT)