Skip to content
Snippets Groups Projects
Commit 0066e03a authored by ESCOBAR Juan's avatar ESCOBAR Juan
Browse files

Juan 30/05/2024:Rules.LXnvhpc2202.mk, IMPORTANT CHANGE:: Only compile...

Juan 30/05/2024:Rules.LXnvhpc2202.mk, IMPORTANT CHANGE:: Only compile PHYEX(+some other source) with -sdtpar=gpu, otherwise BIG degradation of performance for source already ported with "!$acc kernels/parallel" directives
parent 5c4e30af
No related branches found
No related tags found
No related merge requests found
......@@ -117,9 +117,9 @@ endif
ifeq "$(OPTLEVEL)" "STDPAR"
STDPAR = -stdpar=gpu -Minfo=stdpar,accel -Mvect=nosimd
CPPFLAGS += -DMNH_OPENACC -DMNH_GPUDIRECT
OPT = -g $(STDPAR) $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF2)
OPT = -g $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF2)
OPT0 = -g $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF0)
OPT_NOCB = -g $(STDPAR) $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF2)
OPT_NOCB = -g $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF2)
CXXFLAGS = -g -acc -Kieee -Mnofma $(OPT_MANAGED)
$(OBJS_REPROD) : OPT = $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF2) -Mvect=nosimd -Minfo=all -g
OBJS_OPENACC = spll_modd_halo_d.o modd_halo_d.mod spll_mode_mnh_allocate_mg_halo.o mode_mnh_allocate_mg_halo.mod
......@@ -349,20 +349,34 @@ SPLL = spll_new
ifneq "$(OPTLEVEL)" "STDPAR"
PHYEX_LIST = $(notdir $(shell find PHYEX/micro PHYEX/turb -follow -type f -name "*.f*" | sed -e 's/\(.*\)\(\.\).*/\1.D/g' ))
PHYEX_LIST = $(call dependance_flist,PHYEX/micro PHYEX/turb)
PHYEX_OPTDEFAULT = --addMPPDB_CHECKS --addStack MESONH --stopScopes toto
$(PHYEX_LIST) : PYFT = pyft_tool.py $(PHYEX_OPTDEFAULT)
$(PHYEX_LIST) : CPPFLAGS += -DPHYEX
else
PHYEX_IGNORE_KERNELS = $(notdir $(shell find PHYEX -name "*.f*" | xargs grep -l 'acc kernels' | sed -e 's/\(.*\)\(\.\).*/\1.D/g' ))
print_phyex_kernels:
@echo PHYEX_IGNORE_KERNELS=$(PHYEX_IGNORE_KERNELS)
PHYEX_OPTDEFAULT = --addMPPDB_CHECKS --addStack MESONH --stopScopes toto
# OK --expandAllArraysPHYEXConcurrent --addMPPDB_CHECKS --addStack MESONH --stopScopes toto
# OK --expandAllArraysPHYEX --addMPPDB_CHECKS --addStack MESONH --stopScopes toto
# --expandAllArraysConcurrent --addMPPDB_CHECKS --addStack MESONH --stopScopes toto
PHYEX_LIST = $(notdir $(shell find PHYEX/micro PHYEX/turb -follow -type f -name "*.f*" | sed -e 's/\(.*\)\(\.\).*/\1.D/g' ))
#PHYEX_LIST += resolved_cloud.D TOTO
#PHYEX_LIST += $(notdir $(shell find PHYEX/micro PHYEX/turb -follow -type f -name "*.f*" | sed -e 's/\(.*\)\(\.\).*/\1.D/g' ))
PHYEX_LIST := $(call dependance_flist,PHYEX/micro PHYEX/turb)
#PHYEX_LIST += resolved_cloud.D TOTO
#
PHYEX_LIST += resolved_cloud.D
print_phyex_list:
@echo PHYEX_LIST=$(PHYEX_LIST)
# resolved_cloud.D # pb mppdb_check PSPEEDH,PINPRC3D,PINPRS3D,PINPRG3D,PINPRH3D
#sources_neg_correct.D resolved_cloud.D
$(PHYEX_LIST) : PYFT = pyft_tool.py --expandAllArraysConcurrent $(PHYEX_OPTDEFAULT)
......@@ -373,13 +387,33 @@ PHYEX_SHUMAN =
$(PHYEX_SHUMAN) : PYFT = pyft_tool.py --shumanFUNCtoCALL --expandAllArraysConcurrent $(PHYEX_OPTDEFAULT)
PHYEX_SHUMAN_PB = mode_turb_hor_sv_corr.D mode_turb_hor_sv_flux.D mode_turb_hor_thermo_corr.D mode_turb_hor_thermo_flux.D \
mode_turb_hor_uv.D mode_turb_hor_uw.D mode_turb_hor_vw.D mode_turb_hor_tke.D
mode_turb_hor_uv.D mode_turb_hor_uw.D mode_turb_hor_vw.D mode_turb_hor_tke.D \
rain_ice_old.D
$(PHYEX_SHUMAN_PB) : PYFT = pyft_tool.py --expandAllArraysPHYEXConcurrent $(PHYEX_OPTDEFAULT)
PHYEX_PB_ALLARRAYS = lima.D mode_turb_hor_dyn_corr.D mode_turb_ver_dyn_flux.D mode_turb_ver_thermo_corr.D mode_turb_ver.D \
PHYEX_PB_ALLARRAYS = phys_paramn.D turb.D lima.D mode_turb_hor_dyn_corr.D mode_turb_ver_dyn_flux.D mode_turb_ver_thermo_corr.D mode_turb_ver.D \
mode_turb_ver_thermo_flux.D mode_gradient_w_phy.D mode_gradient_m_phy.D mode_gradient_u_phy.D \
mode_tke_eps_sources.D
$(PHYEX_PB_ALLARRAYS) : PYFT = pyft_tool.py --deleteDrHook --deleteBudgetDDH --addArrayParentheses --expandAllArraysPHYEXConcurrent $(PHYEX_OPTDEFAULT)
# --mathFunctoBRFunc
PHYEX_STDPAR += $(PHYEX_SHUMAN_PB)
PHYEX_STDPAR += $(PHYEX_PB_ALLARRAYS)
PHYEX_STDPAR += $(PHYEX_LIST)
PHYEX_STDPAR := $(sort $(filter-out $(PHYEX_IGNORE_KERNELS), $(PHYEX_STDPAR) ) )
PHYEX_STDPAR += rain_ice_nucleation.D
PHYEX_STDPAR_TARGET = $(shell cd $(OBJDIR_MASTER) && egrep -hso '^\w+\.(o|mod)' $(PHYEX_STDPAR) )
#PHYEX_STDPAR_TARGET = $(shell cd $(OBJDIR_MASTER) && pwd && echo OBJDIR=$(OBJDIR_MASTER) && echo SUITE )
$(PHYEX_STDPAR_TARGET) : OPT := -g $(STDPAR) $(OPT_BASE) $(OPT_MANAGED) $(OPT_PERF2)
print_phyex_stdpar:
@echo OPT=$(OPT)
@echo PHYEX_STDPAR="' $(PHYEX_STDPAR) '"
@echo PHYEX_STDPAR_TARGET="' $(PHYEX_STDPAR_TARGET) '"
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment