Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding support to run CDEPS as a part of HAFS application #115

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ ifndef CXX
$(error CXX not defined)
endif

ifndef INTERNAL_PIO_INIT
INTERNAL_PIO_INIT := 1
endif
$(info INTERNAL_PIO_INIT is set to $(INTERNAL_PIO_INIT))

MEDIATOR_DIR := $(BASE_DIR)/mediator
LIBRARY_MEDIATOR := $(MEDIATOR_DIR)/libcmeps.a
LIBRARY_UTIL := $(BASE_DIR)/nems/util/libcmeps_util.a
Expand Down Expand Up @@ -53,7 +58,7 @@ endif

$(LIBRARY_MEDIATOR): $(LIBRARY_UTIL) .FORCE
cd mediator ;\
exec $(MAKE) PIO_INCLUDE_DIR=$(PIO_INCLUDE_DIR) INTERNAL_PIO_INIT=1
exec $(MAKE) PIO_INCLUDE_DIR=$(PIO_INCLUDE_DIR) INTERNAL_PIO_INIT=$(INTERNAL_PIO_INIT)

$(LIBRARY_UTIL): $(PIO_INSTALL_LIBS) .FORCE
cd nems/util ;\
Expand Down
6 changes: 3 additions & 3 deletions mediator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ifndef PIO_INCLUDE_DIR
$(error PIO_INCLUDE_DIR not set)
endif

ifdef INTERNAL_PIO_INIT
ifeq ($(INTERNAL_PIO_INIT),1)
CPPDEFS += -DINTERNAL_PIO_INIT
endif

Expand Down Expand Up @@ -58,5 +58,5 @@ med_phases_prep_wav_mod.o : med_kind_mod.o med_utils_mod.o med_internalstate_mod
med_phases_profile_mod.o : med_kind_mod.o med_utils_mod.o med_constants_mod.o med_internalstate_mod.o med_time_mod.o
med_phases_restart_mod.o : med_kind_mod.o med_utils_mod.o med_constants_mod.o med_internalstate_mod.o esmFlds.o med_io_mod.o
med_time_mod.o : med_kind_mod.o med_utils_mod.o med_constants_mod.o
med_utils_mod.o : med_kind_mod.o
med_diag_mod.o : med_kind_mod.o med_time_mod.o med_utils_mod.o med_methods_mod.o med_internalstate_mod.o
med_utils_mod.o : med_kind_mod.o med_utils_mod.o
med_diag_mod.o : med_kind_mod.o med_time_mod.o med_utils_mod.o med_methods_mod.o med_internalstate_mod.o med_diag_mod.o
2 changes: 2 additions & 0 deletions mediator/med_utils_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ subroutine med_memcheck(string, level, mastertask)
logical, intent(in) :: mastertask
integer :: ierr
#ifndef INTERNAL_PIO_INIT
#ifdef CESMCOUPLED
integer, external :: GPTLprint_memusage
if((mastertask .and. memdebug_level > level) .or. memdebug_level > level+1) then
ierr = GPTLprint_memusage(string)
endif
#endif
#endif
end subroutine med_memcheck

Expand Down
2 changes: 1 addition & 1 deletion nems/lib/ParallelIO
Submodule ParallelIO updated 133 files
2 changes: 1 addition & 1 deletion nems/lib/genf90
Submodule genf90 updated 1 files
+36 −30 genf90.pl
4 changes: 4 additions & 0 deletions nuopc_cap_share/nuopc_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,16 @@ subroutine memcheck(string, level, mastertask)

! local variables
integer :: ierr
#ifdef CESMCOUPLED
integer, external :: GPTLprint_memusage
#endif
!-----------------------------------------------------------------------

#ifdef CESMCOUPLED
if ((mastertask .and. memdebug_level > level) .or. memdebug_level > level+1) then
ierr = GPTLprint_memusage(string)
endif
#endif

end subroutine memcheck

Expand Down