From c3f5a1d161cc89db900644bee7276666c8dd0caa Mon Sep 17 00:00:00 2001 From: Katetc Date: Tue, 29 Mar 2016 09:51:32 -0600 Subject: [PATCH 1/2] changes to pioperformance.F90 to support the PIO1 library. --- tests/performance/pioperformance.F90 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/performance/pioperformance.F90 b/tests/performance/pioperformance.F90 index fb54f84f09f..89430c7c442 100644 --- a/tests/performance/pioperformance.F90 +++ b/tests/performance/pioperformance.F90 @@ -31,6 +31,11 @@ program pioperformance nvars, varsize, unlimdimindof #ifdef BGQTRY external :: print_memusage +#endif +#ifdef _PIO1 + integer, parameter :: PIO_FILL_INT = 02147483647 + real, parameter :: PIO_FILL_FLOAT = 9.969209968E+36 + double precision, parameter :: PIO_FILL_DOUBLE = 9.969209968E+36 #endif ! ! Initialize MPI @@ -167,7 +172,13 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, & if(trim(filename) .eq. 'ROUNDROBIN' .or. trim(filename).eq.'BLOCK') then call init_ideal_dof(filename, mype, npe_base, ndims, gdims, compmap, varsize) else + ! Changed to support PIO1 as well +#ifdef _PIO1 + call pio_readdof(filename, compmap, MPI_COMM_WORLD) +#else call pio_readdof(filename, ndims, gdims, compmap, MPI_COMM_WORLD) +#endif + endif maplen = size(compmap) ! color = 0 From d5a24c00c769389249946422c53c3aefbe74b269 Mon Sep 17 00:00:00 2001 From: Katetc Date: Mon, 4 Apr 2016 15:34:49 -0600 Subject: [PATCH 2/2] Changes to pioperformance.F90 to get it to build and run with PIO1. Also adding the hacky makefile I built for my yelowstone work dir to build pioperf against PIO1 as an example and backup. --- tests/performance/kt.PIO1.perfmakefile | 19 +++++++++++++++++++ tests/performance/pioperformance.F90 | 12 +++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 tests/performance/kt.PIO1.perfmakefile diff --git a/tests/performance/kt.PIO1.perfmakefile b/tests/performance/kt.PIO1.perfmakefile new file mode 100644 index 00000000000..67f0d3be11f --- /dev/null +++ b/tests/performance/kt.PIO1.perfmakefile @@ -0,0 +1,19 @@ +all: pioperf pioperfp1 + +pioperf: pioperformance.o + mpif90 pioperformance.o -o pioperf ../pio_build_int/src/flib/libpiof.a ../pio_build_int/src/clib/libpioc.a ../pio_build_int/src/gptl/libgptl.a /glade/apps/opt/netcdf-mpi/4.3.3.1/intel/default/lib/libnetcdff.a /glade/apps/opt/netcdf-mpi/4.3.3.1/intel/default/lib/libnetcdf.so /glade/apps/opt/pnetcdf/1.6.1/intel/15.0.3/lib/libpnetcdf.a -lirng -ldecimal -lcilkrts -lstdc++ + +pioperformance.o: pioperformance.F90 + mpif90 -DCPRINTEL -DHAVE_MPI -DINCLUDE_CMAKE_FCI -DLINUX -DTIMING -DUSEMPIIO -DUSE_PNETCDF_VARN -DUSE_PNETCDF_VARN_ON_READ -D_NETCDF -D_NETCDF4 -D_PNETCDF -I/glade/p/work/katec/pio_work/ncar_pio2/src/flib -I/glade/p/work/katec/pio_work/pio_build_int/src/flib -I/glade/apps/opt/netcdf-mpi/4.3.2/intel/default/include -I/glade/apps/opt/pnetcdf/1.6.1/intel/15.0.3/include -I/glade/p/work/katec/pio_work/ncar_pio2/src/clib -I/glade/p/work/katec/pio_work/ncar_pio2/src/gptl -I/glade/p/work/katec/pio_work/pio_build_int/src/gptl -c pioperformance.F90 -o pioperformance.o + +pioperfp1: pioperformancep1.o + mpif90 pioperformancep1.o -o pioperfp1 ../PIO1_bld/pio/libpio.a ../pio_build_int/src/gptl/libgptl.a /glade/apps/opt/netcdf-mpi/4.3.3.1/intel/default/lib/libnetcdff.a /glade/apps/opt/netcdf-mpi/4.3.3.1/intel/default/lib/libnetcdf.so /glade/apps/opt/pnetcdf/1.6.1/intel/15.0.3/lib/libpnetcdf.a -lirng -ldecimal -lcilkrts -lstdc++ -openmp + +pioperformancep1.o: pioperformance.F90 + mpif90 -DPIO_GPFS_HINTS -DUSEMPIIO -D_NETCDF -D_NETCDF4 -D_NOUSEMCT -D_PNETCDF -D_USEBOX -D_PIO1 -no-opt-dynamic-align -convert big_endian -assume byterecl -ftz -traceback -assume realloc_lhs -fp-model source -g -xHost -debug minimal -openmp -DLINUX -DMCT_INTERFACE -DHAVE_MPI -DTHREADED_OMP -DFORTRANUNDERSCORE -DNO_R16 -DINTEL_MKL -DHAVE_SSE2 -DLINUX -DCPRINTEL -DHAVE_SLASHPROC -I. -I/glade/p/work/katec/pio_work/PIO1_bld/pio -I/glade/apps/opt/netcdf-mpi/4.3.3.1/intel/default/include -I/glade/apps/opt/pnetcdf/1.6.1/intel/15.0.3/include -I/glade/p/work/katec/pio_work/PIO1/pio -I/glade/p/work/katec/pio_work/PIO1_bld/pio/timing -I/glade/apps/opt/netcdf-mpi/4.3.3.1/intel/default/include -I/glade/apps/opt/pnetcdf/1.6.1/intel/15.0.3/include -c pioperformance.F90 -o pioperformancep1.o + +cleanp1: + rm pioperformancep1.o pioperfp1 + +clean: + rm pioperformance.o pioperf \ No newline at end of file diff --git a/tests/performance/pioperformance.F90 b/tests/performance/pioperformance.F90 index 89430c7c442..16fe145a193 100644 --- a/tests/performance/pioperformance.F90 +++ b/tests/performance/pioperformance.F90 @@ -168,17 +168,18 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, & character(len=*), parameter :: rearr_name(2) = (/' BOX','SUBSET'/) nullify(compmap) - if(mype.eq.0) print *,trim(filename) + if(trim(filename) .eq. 'ROUNDROBIN' .or. trim(filename).eq.'BLOCK') then call init_ideal_dof(filename, mype, npe_base, ndims, gdims, compmap, varsize) else ! Changed to support PIO1 as well #ifdef _PIO1 - call pio_readdof(filename, compmap, MPI_COMM_WORLD) + call pio_readdof(filename, compmap, MPI_COMM_WORLD, 81, ndims, gdims) #else call pio_readdof(filename, ndims, gdims, compmap, MPI_COMM_WORLD) #endif +! print *,__FILE__,__LINE__,' gdims=',ndims endif maplen = size(compmap) ! color = 0 @@ -260,8 +261,10 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, & ierr = PIO_CreateFile(iosystem, File, iotype, trim(fname), mode) call WriteMetadata(File, gdims, vari, varr, vard, unlimdimindof) + call MPI_Barrier(comm,ierr) call t_stampf(wall(1), usr(1), sys(1)) + if(.not. unlimdimindof) then #ifdef VARINT call PIO_InitDecomp(iosystem, PIO_INT, gdims, compmap, iodesc_i4, rearr=rearr) @@ -273,7 +276,8 @@ subroutine pioperformancetest(filename, piotypes, mype, npe_base, & call PIO_InitDecomp(iosystem, PIO_DOUBLE, gdims, compmap, iodesc_r8, rearr=rearr) #endif endif -! print *,__FILE__,__LINE__,minval(dfld),maxval(dfld),minloc(dfld),maxloc(dfld) + + ! print *,__FILE__,__LINE__,minval(dfld),maxval(dfld),minloc(dfld),maxloc(dfld) do frame=1,nframes recnum = frame @@ -561,7 +565,9 @@ subroutine WriteMetadata(File, gdims, vari, varr, vard,unlimdimindof) ndims=ndims-1 endif allocate(dimid(ndims+1)) + do i=1,ndims + write(dimname,'(a,i6.6)') 'dim',i iostat = PIO_def_dim(File, trim(dimname), int(gdims(i),pio_offset_kind), dimid(i)) enddo