Skip to content

Commit

Permalink
modify test and update pgi test for cheyenne
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Jan 3, 2019
1 parent 317963f commit bf6a987
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
5 changes: 3 additions & 2 deletions ctest/runcdash-nwscla-pgi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ fi
module reset
module unload netcdf
module swap intel pgi/17.9
module swap mpt mpt/2.18
module load git/2.10.2
module load cmake/3.12.1
module load netcdf-mpi/4.5.0
module load pnetcdf/1.9.0
module load netcdf-mpi/4.6.1
module load pnetcdf/1.11.0

export CC=mpicc
export FC=mpif90
Expand Down
17 changes: 13 additions & 4 deletions tests/general/pio_decomp_tests_1d.F90.in
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ END SUBROUTINE
PIO_TF_TEMPLATE<PIO_TF_PREDEF_TYPENAME PIO_TF_DATA_TYPE, PIO_TF_PREDEF_TYPENAME PIO_TF_FC_DATA_TYPE>
PIO_TF_AUTO_TEST_SUB_BEGIN nc_wr_rd_1d_bc
implicit none
type(var_desc_t) :: pio_var
type(var_desc_t) :: pio_var1, pio_var2
type(file_desc_t) :: pio_file
character(len=PIO_TF_MAX_STR_LEN) :: filename
type(io_desc_t) :: wr_iodesc, rd_iodesc
Expand Down Expand Up @@ -191,20 +191,29 @@ PIO_TF_AUTO_TEST_SUB_BEGIN nc_wr_rd_1d_bc
ierr = PIO_def_dim(pio_file, 'PIO_TF_test_dim', dims(1), pio_dim)
PIO_TF_CHECK_ERR(ierr, "Failed to define a dim : " // trim(filename))

ierr = PIO_def_var(pio_file, 'PIO_TF_test_var', PIO_TF_DATA_TYPE, (/pio_dim/), pio_var)
ierr = PIO_def_var(pio_file, 'PIO_TF_test_var1', PIO_TF_DATA_TYPE, (/pio_dim/), pio_var1)
PIO_TF_CHECK_ERR(ierr, "Failed to define a var : " // trim(filename))

ierr = PIO_def_var(pio_file, 'PIO_TF_test_var2', PIO_TF_DATA_TYPE, (/pio_dim/), pio_var2)
PIO_TF_CHECK_ERR(ierr, "Failed to define a var : " // trim(filename))

ierr = PIO_enddef(pio_file)
PIO_TF_CHECK_ERR(ierr, "Failed to end redef mode : " // trim(filename))

! Write the variable out
call PIO_write_darray(pio_file, pio_var, wr_iodesc, wbuf, ierr)
call PIO_write_darray(pio_file, pio_var1, wr_iodesc, wbuf, ierr)
PIO_TF_CHECK_ERR(ierr, "Failed to write darray : " // trim(filename))

wbuf = wbuf + 200

! Write the variable out
call PIO_write_darray(pio_file, pio_var2, wr_iodesc, wbuf, ierr)
PIO_TF_CHECK_ERR(ierr, "Failed to write darray : " // trim(filename))

call PIO_syncfile(pio_file)

rbuf = 0
call PIO_read_darray(pio_file, pio_var, rd_iodesc, rbuf, ierr)
call PIO_read_darray(pio_file, pio_var1, rd_iodesc, rbuf, ierr)
PIO_TF_CHECK_ERR(ierr, "Failed to read darray : " // trim(filename))

PIO_TF_CHECK_VAL((rbuf, exp_val), "Got wrong val")
Expand Down

0 comments on commit bf6a987

Please sign in to comment.