Skip to content

Commit

Permalink
fix: replace fms_platform.h includes with use platform_mod in mpp uni…
Browse files Browse the repository at this point in the history
…t tests (#1616)
  • Loading branch information
mlee03 authored Dec 2, 2024
1 parent 23df6d7 commit 76a6624
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions test_fms/mpp/test_domains_simple.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@

!> @author Ed Hartnett 6/22/20
program test_domains_simple

use mpp_mod
use mpp_domains_mod

use platform_mod
implicit none
#include "../../include/fms_platform.h"

integer :: pe, npes !> This pe and the total number of pes.
integer :: nx=40, ny=40 !> Size of our 2D domain.
integer :: layout(2) !> Layout of our 2D domain.
Expand Down
3 changes: 2 additions & 1 deletion test_fms/mpp/test_mpp_mem_dump.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@
!! Test that the call to mpp_mem_dump is functional. On a supported OS, the return value
!! of mpp_mem_dump should be a positive integer.
program test_mpp_mem_dump

use mpp_memutils_mod, only: mpp_mem_dump
#include "../../include/fms_platform.h"
use platform_mod
implicit none

real :: memuse
Expand Down
2 changes: 1 addition & 1 deletion test_fms/mpp/test_mpp_memutils_begin_2x.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
!! code this is an error, which should be caught. This program should exit
!! non-zero.
program test_mpp_memutils_init_end
#include "../../include/fms_platform.h"

use mpp_mod, only : mpp_init, mpp_exit
use mpp_memutils_mod, only: mpp_memuse_begin, mpp_memuse_end
use platform_mod
implicit none

real, dimension(:), allocatable :: ralloc_mem
Expand Down
2 changes: 1 addition & 1 deletion test_fms/mpp/test_mpp_memutils_begin_end.F90
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
!! This test will exit with status zero if successful. The script launching this test
!! program may, if desired, check if the memory output numbers are sane.
program test_mpp_memutils_init_end
#include "../../include/fms_platform.h"

use mpp_mod, only : mpp_init, mpp_exit
use mpp_memutils_mod, only: mpp_memuse_begin, mpp_memuse_end
use platform_mod
implicit none

real, dimension(:), allocatable :: ralloc_mem
Expand Down
2 changes: 1 addition & 1 deletion test_fms/mpp/test_mpp_memutils_end_before_begin.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
!! Test the error case when mpp_memuse_end() is called before mpp_memuse_begin().
!! This test program should exit non-zero if successful.
program test_mpp_memutils_init_end
#include "../../include/fms_platform.h"

use mpp_mod, only : mpp_init, mpp_exit
use mpp_memutils_mod, only: mpp_memuse_begin, mpp_memuse_end
use platform_mod
implicit none

real, dimension(:), allocatable :: ralloc_mem
Expand Down
2 changes: 1 addition & 1 deletion test_fms/mpp/test_mpp_print_memuse_stats_file.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
!! successful. The script calling the program can check if the numbers are sane, if
!! desired.
program test_mpp_mem_print_stats_file
#include "../../include/fms_platform.h"

use mpp_mod, only : mpp_init, mpp_exit, stdout
use mpp_memutils_mod, only: mpp_memuse_begin, mpp_memuse_end
use mpp_memutils_mod, only: mpp_print_memuse_stats
use platform_mod
implicit none

real, dimension(:), allocatable :: ralloc_mem1, ralloc_mem2
Expand Down
2 changes: 1 addition & 1 deletion test_fms/mpp/test_mpp_print_memuse_stats_stderr.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
!! successful. The script calling the program can check if the numbers are sane, if
!! desired.
program test_mpp_mem_print_stats_stderr
#include "../../include/fms_platform.h"

use mpp_mod, only : mpp_init, mpp_exit
use mpp_memutils_mod, only: mpp_memuse_begin, mpp_memuse_end
use mpp_memutils_mod, only: mpp_print_memuse_stats
use platform_mod
implicit none

real, dimension(:), allocatable :: ralloc_mem1, ralloc_mem2
Expand Down

0 comments on commit 76a6624

Please sign in to comment.