Skip to content

Commit

Permalink
Changes for fms2_io test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Mulhall authored and Ryan Mulhall committed Aug 1, 2023
1 parent 2147208 commit ae1146e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test_fms/fms2_io/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ TESTS_ENVIRONMENT= srcdir="$(abs_top_srcdir)" ncdump_skip=${skipflag}

# conditional testing options, scaling by 100 * current ranks
if DO_SCALING_TESTS
TESTS_ENVIRONMENT+= TEST_FMS2_IO_1_RANKS=600 \
TESTS_ENVIRONMENT+= TEST_FMS2_IO_1_RANKS=768 \
TEST_ATMOSPHERE_IO_1_RANKS=600 \
TEST_ATMOSPHERE_IO_2_RANKS=600 \
TEST_ATMOSPHERE_IO_3_RANKS=600 \
Expand Down
12 changes: 9 additions & 3 deletions test_fms/fms2_io/test_fms2_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ program main

namelist / test_fms2_io_nml / nx, ny, nz


!Initialize mpp.
call mpp_init()
my_rank = mpp_pe()
Expand Down Expand Up @@ -96,7 +95,13 @@ program main
io_layout(:) = 1
ocn_io_layout(:) = 1
npes_group = 1
debug = .false.
debug = .true.

! using large test option
if ( npes .eq. 768) then
nx = nx * 10; ny = ny * 10; nz = nz * 10
io_layout = (/ 1, 64/)
endif

!Parse command line arguments.
call get_argument(parser, "-t", buf)
Expand All @@ -115,6 +120,7 @@ program main
stop 1
endif
endif

call get_argument(parser, "-x", buf)
if (trim(buf) .ne. "not present") then
read(buf,*) nx
Expand Down Expand Up @@ -143,7 +149,7 @@ program main
call mpp_domains_init()
do i = 1,ntiles
global_indices(:, i) = (/1, nx, 1, ny/)
layout(:, i) = (/1, npes/ntiles/)
layout(:, i) = (/2, npes/ntiles/2 /)
pe_start(i) = (i-1)*(npes/ntiles)
pe_end(i) = i*(npes/ntiles) - 1
enddo
Expand Down
8 changes: 3 additions & 5 deletions test_fms/fms2_io/test_fms2_io.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@
# Create and enter output directory
output_dir

# use smaller arrays if system stack size is limited
if [ $STACK_LIMITED ]; then
cat <<_EOF > input.nml
touch input.nml

cat <<_EOF > input.nml
&test_fms2_io_nml
nx = 32
ny = 32
nz = 10
/
_EOF
fi
touch input.nml

# run the tests
test_expect_success "FMS2 IO Test" '
Expand Down

0 comments on commit ae1146e

Please sign in to comment.