Skip to content

Commit

Permalink
more work on getting pioperformance working on theia
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Apr 10, 2019
1 parent 9b8bafb commit 0b2d445
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
34 changes: 19 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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])

Expand Down
3 changes: 2 additions & 1 deletion tests/performance/Pioperformance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
9 changes: 5 additions & 4 deletions tests/performance/pioperf.nl
Original file line number Diff line number Diff line change
@@ -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
/
4 changes: 2 additions & 2 deletions tests/performance/pioperformance.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b2d445

Please sign in to comment.